aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src/cppintegration
Commit message (Collapse)AuthorAgeFilesLines
* Doc: mention that INCLUDEPATH must be set in some casesMitch Curtis2020-11-211-0/+8
| | | | | | | | | | Otherwise the generated type registrations .cpp file will not be able to include the sources. Change-Id: I7821c7674b4341546da2fc49e584bf10cc60b46f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 06c31f386f8664343debd219a522a8897df0f3ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc:: Fix documentation warnings for Qt QMLTopi Reinio2020-11-051-7/+4
| | | | | | Task-number: QTBUG-88156 Change-Id: Ic6127c6128b4c7736cb4b5ab8ce51629388b59ca Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QML: Allow namespaces as extensions to typesUlf Hermann2020-11-021-0/+3
| | | | | | | | | | | | | | | | | This way we can access the enums of namespaces as properties of the primary type. This is achieved by: 1. Making enums of extended types available in the base type 2. Allowing the extension to be specified as plain metaObject rather than as type name. 3. Refraining from creating the extension if the create function does not exist. The goal of this is to declare the Qt namespace in a civilized way, but will also help with cleaning up the QtQuick value types and their enums. Change-Id: I13399741d30ce38d1bff753cfa1b11e72ccfbf6a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-091-0/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmlirbuilder_p.h src/qml/qml/qqmlpropertycachecreator_p.h src/qmltyperegistrar/qmltypesclassdescription.cpp src/qmltyperegistrar/qmltypesclassdescription.h src/qmltyperegistrar/qmltypescreator.cpp src/quick/items/qquicktext_p.h src/quick/util/qquickvaluetypes_p.h Change-Id: Ic209741592e7b85820bf3845722023a190ebc1c5
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-031-0/+19
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qmlmodels/qqmltableinstancemodel.cpp src/qmlmodels/qqmltableinstancemodel_p.h Change-Id: I89339b1cb41ba27fe30c79530859a1c2bfbecc69
| | * Doc: Add section about QVariantList and QVariantMap as C++ propertiesUlf Hermann2020-02-241-0/+19
| | | | | | | | | | | | | | | | | | | | | Change-Id: Ie18661274880f45d911baf05797a8b384d72f9f7 Fixes: QTBUG-82249 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-212-11/+20
|\| | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquickmousearea/BLACKLIST Change-Id: I3de2c6377d57f5f9204d2cfc688d50a7a0b4150c
| * | Doc: Fix documentation warnings for Qt QMLTopi Reinio2020-02-201-1/+1
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-82313 Change-Id: I7c2f30411ab8011254d7c232c87cb12a39761bda Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * | Doc: Update documentation for "extending" exampleUlf Hermann2020-02-191-10/+19
| | | | | | | | | | | | | | | | | | | | | It referred to qmlRegisterType() even though we don't call it anymore. Change-Id: Ib07e4428d032e789d705156ddc4c9589fd797c65 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-172-88/+66
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/qtqml/plugin.cpp src/qml/qml/qqml.h src/qml/qml/qqmlmetatype.cpp src/qml/qml/qqmlmetatype_p.h src/qml/qml/qqmltypeloader.cpp src/qml/types/qqmlbind.cpp src/quick/items/qquickitemsmodule.cpp tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp Change-Id: I52548938a582cb6510271ed4bc3a9aa0c3c11df6
| * | Doc: Modernize backend example and adapt C++ integration docsUlf Hermann2020-02-121-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | We want people to use the static type registration. Change-Id: I98e51af9df1a2f73df10f82458a7b7f5c5e5aad1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Doc: Modernize the type definition docsUlf Hermann2020-02-121-79/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mention the QML_* macros instead of the qmlRegister* functions and adapt the code examples to use them. Task-number: QTBUG-81615 Change-Id: I9e4cf5b3700b7e727b0f2a93035559b75b733adb Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | Remove uses of QLinkedListSona Kurazyan2020-02-041-1/+1
|/ / | | | | | | | | | | | | | | | | | | QLinkedList is moved to Qt5Compat. Remove the unused include and don't mention it in docs. Task-number: QTBUG-81630 Task-number: QTBUG-80312 Change-Id: I7136a23cf458b50da6a7be6612cc5c5d3f4004e9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Generate registrations for all examplesUlf Hermann2020-01-131-11/+8
| | | | | | | | | | | | | | | | Now that we can generate all QML type information at build time, we should also use it. Change-Id: I647c72bbe38fdb2deb565b75c86a696af3d15b61 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | doc: Clarify Q_GADGET limitations in Qt 5Shawn Rutledge2019-12-231-0/+8
| | | | | | | | | | | | Fixes: QTBUG-79640 Change-Id: I7c4377312a337ec5f65389dc4998f1df91e5f67c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Document that you can use QJSValue as list typeUlf Hermann2019-12-101-0/+5
|/ | | | | | Change-Id: I199d92f05f48f58349d5918e6615018e4b759576 Fixes: QTBUG-79028 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-121-2/+1
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine.cpp src/quick/handlers/qquicktaphandler.cpp src/quick/items/qquicktableview.cpp Done-With: Richard Moe Gustavsen <richard.gustavsen@qt.io> Done-With: Ulf Hermann <ulf.hermann@qt.io> Done-With: Shawn Rutledge <shawn.rutledge@qt.io> Change-Id: If9558a33f01693ce96420c094e0b57dfff0626cd
| * Doc: Fix documentation warnings for qtdeclarativeTopi Reinio2019-08-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After recent changes to QDoc, it now correctly warns about missing documentation for QML method parameters - fix all of these and also do some minor language editing. Remove duplicated entries for - \qmlmodule Qt.labs.qmlmodels - \group qtjavascript as they were causing issues. Change-Id: I55cd670cc8a0cc6427cdb7945dbd7c28ea94f796 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-261-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/handlers/qquickpointerdevicehandler.cpp src/quick/scenegraph/qsgdefaultglyphnode.cpp src/quick/scenegraph/qsgdefaultglyphnode_p.cpp src/quick/scenegraph/qsgdefaultglyphnode_p_p.h tests/auto/qml/qjsengine/tst_qjsengine.cpp Done-With: Jan Arve Sæther <jan-arve.saether@qt.io> Done-With: Laszlo Agocs <laszlo.agocs@qt.io> Change-Id: I35749152f8dce44b9af8d52b1283629879010f11
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-241-2/+2
| |\ | | | | | | | | | Change-Id: I081bcb9cc238e6cff5f8a23b684c5d6f76dba047
| | * Doc: fix code snippetPaul Wicking2019-07-191-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-77094 Change-Id: I9058bf7b65e8d390327af0624df611de4965f1e4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Doc: Fix typos in code snippetsPaul Wicking2019-07-181-2/+2
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-77094 Change-Id: Ia974c4d8abeab48a206fb868ee5532d4aeae7319 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Fix docs to explain the new type syntax for QML methodsSimon Hausmann2019-07-101-15/+18
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQml] It is now possible to specify types for method parameters and their return value in QML (basic and object types), using TypeScript-like syntax with a colon separator. The syntax for QML declared signals supports the same style. This change also adapts the remaining snippets and docs to the "fresher" qml signal parameter syntax. Change-Id: I601781f01f696276951b04785584adab39fedfd9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-211-3/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4bytecodehandler.cpp src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4compileddata_p.h src/qml/compiler/qv4compiler.cpp src/qml/compiler/qv4instr_moth.cpp src/qml/compiler/qv4instr_moth_p.h src/qml/jit/qv4baselinejit.cpp src/qml/jit/qv4baselinejit_p.h src/qml/jsruntime/qv4function.cpp src/qml/jsruntime/qv4vme_moth.cpp Change-Id: I8fb4d6f19677bcec0a4593b250f2eda5ae85e3d2
| * Doc: Clarify section about qmlRegisterInterface()Ulf Hermann2019-03-201-3/+4
| | | | | | | | | | | | | | | | There is very little you can do with things registered as interfaces. Change-Id: I5e4dcf8529c2d7c8012db3fa1dcfc23563cc2cba Fixes: QTBUG-74318 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-131-0/+2
|\| | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4codegen.cpp src/qml/animations/qsequentialanimationgroupjob.cpp Change-Id: I8b76e509fd7c8599d4cef25181d790ee28edab54
| * Doc: link to C++ and QML integration flowchartMitch Curtis2019-03-121-0/+2
| | | | | | | | | | | | | | | | | | | | The chart makes it easier to find the correct way to register a C++ type with the QML type system, so it makes sense to link to it from these docs. Task-number: QTBUG-74318 Change-Id: Iba74ce02d200d6609dbb0a508d618226a6fe1e54 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-02-011-1/+1
|\| | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4codegen.cpp Done-With: Erik Verbruggen <erik.verbruggen@qt.io> Change-Id: I3ae3d64317e4f3fccba6605f4c6da15479ca75e0
| * doc: Two class members can not have the same nameRainer Keller2019-02-011-1/+1
| | | | | | | | | | | | | | At least gcc complains about it. Change-Id: I122b0bab2c2fcea24814a83f005be1ad4686aa78 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-241-1/+1
|\| | | | | | | Change-Id: I57e4b762dcccf2f7f6e4b659f6fc8c40465d3322
| * Improve documentation of QML's handling of dates and timesEdward Welbourne2018-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | Encourage use of QDateTime in preference to QDate. Explain the problems of converting plain dates to date-times. Include times in the examples. Change-Id: I12731a9f80a833c41385f787336d1ba60a6fa4d3 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Add support for QSequentialIterable in QMLJędrzej Nowacki2018-10-081-0/+3
|/ | | | | | | | | That means that now QML understand many sequential value types and it is able to convert it to a JS array. Fixes: QTBUG-60338 Change-Id: I46943b7c130296bb64c23008ce2e52a55d7f019d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Provide option to skip registration of enum classes unscopedRainer Keller2018-08-211-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Enums classes are registered unscoped which leads to clashes in the following cases: 1. Two different enums contain the same values 2. The name of an enum class is the same as an enum value In the 2nd case you can not even access the scoped enum at all because it will be overwritten by the primitive type. Users can now add a class info to the meta type to disable the unscoped registration which solves all clashes. The default is kept as is. class MyClass : public QObject { Q_OBJECT Q_CLASSINFO("RegisterEnumClassesUnscoped", "false") public: ... }; [ChangeLog][QtQml] Added option to disable unscoped registration of enum classes. Change-Id: Ifa4197a14a252575e8a25ae56fb6ee479addf80b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-161-9/+9
|\ | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickloader.cpp tests/auto/quick/qquickanimations/tst_qquickanimations.cpp Change-Id: I0cb9f637d24ccd0ecfb50c455cc210119f744b02
| * Doc: Update QTime to JavaScript Date conversion descriptionPaul Wicking2018-07-101-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * Update description as the behavior changed with 2b8b7a162be52f8cd6c2bc39f498a1ddfb59dd68. * Remove implementation details from description (the specific date), as it may be subject to change. * Simplify a needlessly complicated explanation. Task-number: QTBUG-68516 Change-Id: Ibc25a9923d8c996c47927964cd69b5bd7bbe0240 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | doc: Remove hint to use not recommended constructorRainer Keller2018-06-251-3/+0
| | | | | | | | | | | | | | | | | | The documentation of QQmlListProperty states that this constructor should not be used in production code. Removing this statement prevents users from unintentional usage. Change-Id: I19130204384d5dbef79cec828de49a628af60c02 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Minor tweak to the docs for sequence typesSimon Hausmann2018-05-021-2/+2
|/ | | | | | | | | | Let's clarify that they behave like arrays but aren't strictly arrays. The paragraph further down emphasizes that as well, but it makes sense to soften the wording in the introduction sentence. Task-number: QTBUG-67775 Change-Id: I7cce6a21acde0a69858bbc9d41cea6674c488228 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add note about revisions for grouped and attached property objectsMitch Curtis2018-04-161-0/+2
| | | | | | | If they're not supported, it should be documented. Change-Id: I9219db1c9d31666e005074a863b04438052b3f05 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Document QObject::setProperty()'s behavior in relation to bindingsMitch Curtis2018-04-161-2/+17
| | | | | | | | | Make it clear that setting a property via QObject::setProperty() will not break any binding already set on that property. Task-number: QTBUG-67451 Change-Id: Id032c2217a46133d1d6728598f79682dff459897 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: add a flowchart to aid choosing the correct C++ => QML integrationMitch Curtis2018-04-051-0/+6
| | | | | | | | | | | http://doc.qt.io/qt-5/qtqml-cppintegration-overview.html is currently a scary wall of text. A flowchart is something that is very easy to follow, making it much easier for users to choose the correct C++ => QML integration method for their situation. Change-Id: If684126395054c69e4583844aa0d7c0ff525c7a1 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: Move the warning about manipulating QML objects from C++Venugopal Shivashankar2017-11-033-11/+9
| | | | | | | | | | Manipulating QML objects from C++ is not a best practice when integrating QML and C++, except for testing and prototying. So its apt to warn the reader about such an approach much earlier. Task-number: QTPM-425 Change-Id: Iebb93d099008ff3ebcefe6af25364afe379b7fcf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update to new QRandomGenerator APIThiago Macieira2017-11-031-1/+1
| | | | | Change-Id: I69f37f9304f24709a823fffd14e676c097712329 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-247-35/+35
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlimport.cpp src/qml/qml/qqmlimport_p.h src/qml/qml/qqmltypenamecache.cpp Done-with: Ulf Hermann<ulf.hermann@qt.io> Change-Id: I41ba7a592b2659ddf53da6952ea3b456a7bba319
| * Fix outdated FDL license headerKai Koehne2017-10-177-35/+35
| | | | | | | | | | Change-Id: I76dccf547de40b5e72fd7abaa062fa96cb2c118a Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Doc: List relevant source files under each chapterVenugopal Shivashankar2017-10-051-0/+19
| | | | | | | | | | | | | | | | | | | | | | The example used in the tutorial is split into several source files, which were listed towards the end of the tutorial. Instead of this big list at the end, listing only relevant files under each chapter seems ideal. Task-number: QTBUG-60629 Change-Id: I2d877f4e4e9a7b91f9def1f00dc545e0842458c7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta1Liang Qi2017-10-041-2/+0
|\| | | | | | | Change-Id: I75b0099b2b9ebb5cfb6f07b43b90b598743ae033
| * Docs: remove empty table headersFrederik Schwarzer2017-10-031-2/+0
| | | | | | | | | | Change-Id: I0693057b57a311b598186a72738021c7d104c41f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | QByteArray gets mapped to ArrayBufferAlbert Astals Cid2017-09-051-0/+5
| | | | | | | | | | Change-Id: I884e6c747af6dfffce23fa21fc320be53951a7d4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-051-1/+1
|\| | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickwindow.cpp src/quick/scenegraph/qsgrenderloop.cpp Change-Id: Idd7106995b5545fcac869e9056a365ef9edb36ca
| * Doc: Fix capitalization in section titlesTopi Reinio2017-08-291-1/+1
| | | | | | | | | | | | | | | | ...and fix some section titles to be less confusing. Change-Id: If83c3faffead9e2e9be7fc0fb360f1c5b8b1bb51 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>