aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix warnings about snippets in qtdeclarativeNico Vertriest2021-02-192-3/+8
| | | | | | | | | | | Cannot find file to quote from: 'code/backend/backend.pro' Cannot find file to quote from: 'code/doc_src_qtqml.pro' Cannot find file to quote from: 'code/doc_src_qtquick.pro' Change-Id: I26642a375a659a3d8dbda097702ffc2f68d10137 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit ca7d2c1f4ca010096b668108200cd9f1357a5b2e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use functions as signal handlers when accessing parametersUlf Hermann2021-02-125-10/+10
| | | | | | | | | | Injected signal handlers are bad practice because they aren't declared. Task-number: QTBUG-89943 Change-Id: I3a691f68342a199bd63034637aa7ed438e3a037b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 4cc91a6a0e4f9063233a4d6554ae64855cf99c14) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Avoid unqualified lookup in the signals documentationUlf Hermann2021-02-121-2/+2
| | | | | | | Change-Id: Ibcb20311c7e5a56038c738da77d9dfcc9464bce4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 165ba01a6833e88896cf3f323d8fad67561e1edd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Update type registration flowchartUlf Hermann2021-02-093-0/+3
| | | | | | | | | | You're not supposed to call the registration functions manually. Fixes: QTBUG-90718 Change-Id: I829800132484dea670657ed1679357fe58d0ddf9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 707f7603fbb6bce60ed532cd42ff2dc9ae39e611) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Describe QML_FOREIGN in "Defining QML Types from C++"Ulf Hermann2021-01-291-0/+26
| | | | | | | | Fixes: QTBUG-83852 Change-Id: I8dd5fa6887ad607fe91ac658efa51152c46df36e Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Change section about writing a qmltypes fileUlf Hermann2021-01-201-102/+8
| | | | | | | | | | | You should not write qmltypes files manually. We only document their existence and that you should add them to manually written qmldir files now. Change-Id: I434398656179806c3e57724324aba38738384e1d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Remove the qmake project filesFabian Kosmale2021-01-153-42/+0
| | | | | | | | | Remove all qmake project files, except for examples which are used to test that qmake continues to work. Change-Id: Ic4abb72dc2dcd75df7a797c56056b6b3c5fe62ac Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* exposecppattributes.qdoc: Warn about aliasesMaximilian Goldstein2021-01-141-0/+23
| | | | | | | | | Using aliases in conjunction with Q_PROPERTY might cause some issues, so we should warn about it. Task-number: QTBUG-83950 Change-Id: I53db6848e3a7659e8b7ad93de70088cab6e53184 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Fix broken QDoc markupPaul Wicking2021-01-051-2/+2
| | | | | | | | | \code must be closed with \endcode. Pick-to: 6.0 5.15 Fixes: QTBUG-89738 Change-Id: I0cadb14b6726a6fdc6c3fb773155066d30490e74 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* definetypes.qdoc: Add note about include path prefixesMaximilian Goldstein2021-01-041-0/+1
| | | | | | | | | We do not allow for prefixes when using declarative QML registration. Task-number: QTBUG-87221 Change-Id: Ie1ce604390d49601a48217c71ba161f1b5f5e6e0 Reviewed-by: Erik Schilling <ablu.erikschilling@gmail.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmlfunctions.doc: Improve qmlRegisterSingleton documentationMaximilian Goldstein2020-12-151-4/+3
| | | | | | | | Reflect that qmlRegisterSingleton can't be used in conjunction with QML_SINGLETON. Change-Id: Ie7b2fd4f6fa5cb29806a212c284781799b796a32 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* docs/QML_ELEMENT: Warn about possible namespace conflictsMaximilian Goldstein2020-12-151-0/+4
| | | | | Change-Id: I8fff0ba3e571273c203d4e566dcb604b75a835a8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Fix occurrences of \Q_OBJECT in code snippetsTopi Reinio2020-12-083-0/+248
| | | | | | | | | | | | | | 'Q_OBJECT', even in a comment, interferes with automoc. Prefixing it with a backslash solves the automoc issue, but documentation looks wrong as content inside \code is taken verbatim. Move code snippets to doc/snippets and refer to them with \snippet commands. Pick-to: 6.0 Change-Id: Ied7fdf87ef5edd2b237498b91b162c19bf7bc636 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix qdoc warning, document macro parameterVolker Hilsheimer2020-12-041-1/+1
| | | | | | | | Pick-to: 6.0 Change-Id: I60c3d9cc34bc658d5317da951cc1975990f27a9b Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* Doc: Do not highlight "Writing QML Extensions with C++" exampleKai Koehne2020-12-031-2/+0
| | | | | | | | | | This is a more complex example that is also not that visually appealing. Change-Id: Ia5ebfa407c6bcbd3d701068384bfd660833a867c Reviewed-by: Tuukka Turunen <tuukka.turunen@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 86b9ae4da1be2f797f6d6762d870555ee8c893de) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Use explicit linkage with target_link_librariesKai Koehne2020-12-021-1/+1
| | | | | | | | | | | | | | | The Professional CMake book suggests always using explicit linkage with target_link_libraries, so let's use that. Whether to use PUBLIC or PRIVATE depends on the context. But let's be conservative and advise on using PRIVATE by default. Also prefer the versioned target name over the unversioned one. Task-number: QTBUG-88935 Change-Id: I29a6b07803d7aab10eb93a5348d12b9d1620d132 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Craig Scott <craig.scott@qt.io>
* Fix usage of oldcode and newcode in qt6-changes.qdocAndreas Buhr2020-12-021-2/+2
| | | | | | | | | | There was wrong usage of \begincode and similar commands. This patch fixes it. Task-number: QTBUG-88533 Pick-to: 6.0 Change-Id: I70b3d0104ba1dc8eb44556f35fc552e259317f88 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Porting guide: Document URL resolution changeFabian Kosmale2020-11-301-0/+22
| | | | | | | Task-number: QTBUG-88965 Pick-to: 6.0 Change-Id: Ib62082935ddba7bf5b359a32712e6799b3242091 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Remove version numbers for import statementJerome Pasion2020-11-263-22/+21
| | | | | | | | | | | -recommend using the import statement without versions for Qt 6.0 -update use of \qml snippet without \QtMinorVersion -some language change to be neutral about versions Task-number: QTBUG-87155 Pick-to: 6.0 6.0.0 Change-Id: I3ac44f93aab3086c1a49de79ecc677beb4ef9180 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* qml/doc: Add QV4 debugging informationMaximilian Goldstein2020-11-262-3/+11
| | | | | | Change-Id: I6545a54fc6753d896c9a865087d55146922658be Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Fix documentation dependenciesTopi Reinio2020-11-251-1/+12
| | | | | | | | | | - Add missing dependency to qtquick3d - Remove qtscript, qtquickdialog dependencies - Use multiline formatting to have a clean git history of dependencies Pick-to: 6.0 6.0.0 Change-Id: If79df67ef14cce4156cd24042725e56654da4444 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
* Doc: Remove version numbers for import statementJerome Pasion2020-11-241-2/+2
| | | | | | | | | | -recommend using the import statement without versions for Qt 6.0 -update use of \qml Task-number: QTBUG-87155 Pick-to: 6.0 6.0.0 Change-Id: I555d582a13006c5abb6dc1e0266d2987ba79c6d8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmlfunctions.qdoc: Add QML_IMPLEMENTS_INTERFACESMaximilian Goldstein2020-11-231-1/+16
| | | | | Change-Id: I4ff76b49bd5f40eb58c9f44669bb4836dd9e48be Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmlfunctions.qdoc: Add clarification to QML_FOREIGNMaximilian Goldstein2020-11-231-0/+4
| | | | | | | Fixes: QTBUG-87150 Pick-to: 5.15 6.0 Change-Id: If99a06a07892bdfef7b6b1e8fa737480750992fe Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: mention that INCLUDEPATH must be set in some casesMitch Curtis2020-11-201-0/+8
| | | | | | | | | Otherwise the generated type registrations .cpp file will not be able to include the sources. Pick-to: 6.0 5.15 Change-Id: I7821c7674b4341546da2fc49e584bf10cc60b46f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Porting guide: mention qmlDebug/Info/WarningFabian Kosmale2020-11-191-3/+3
| | | | | | | | Also don't mention qmlExecuteDeferred: That one is internal anyway (albeit not explicitly marked as such yet). Change-Id: Icef5fb4092b6a109613ae1f2e90fcff93d7c0b4b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Porting Guide: Mention QQmlListProperty changeFabian Kosmale2020-11-171-1/+25
| | | | | Change-Id: I173e2ff05b3fc3bbe56df423abcbfc84bdc2a17a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Rename "Porting" pages to "Changes"Jerome Pasion2020-11-091-2/+2
| | | | | | | | | | | | | | The content in the porting guides are closer to a changelog than a porting guide. At this point, it is easier for maintainers and contributors to write in a changelog than a guide. This change should help with readability and is closer to the usage of "Changes" in documentation. Part of a rename in other submodules. Task-number: QTBUG-87156 Change-Id: Ibb58a3cba5394962a5709aeb08e3701e16c7775d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Doc:: Fix documentation warnings for Qt QMLTopi Reinio2020-11-053-12/+11
| | | | | | Task-number: QTBUG-88156 Change-Id: Ic6127c6128b4c7736cb4b5ab8ce51629388b59ca Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QML: Fix typo in documentationUlf Hermann2020-11-021-1/+1
| | | | | Change-Id: I6018e1585c6f9b778d8f8559b3f1fb9486411bff Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML: Allow singletons to be created with a factory functionUlf Hermann2020-11-021-6/+8
| | | | | | | | | | This is in line with what we do on qmlRegisterSingletonType(), and it allows us to return singleton objects created independently of the instantiation mechanism. Change-Id: Ia6a077f5d22241593acd8cc87b3f65ae20f95667 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* QML: Allow namespaces as extensions to typesUlf Hermann2020-11-022-5/+22
| | | | | | | | | | | | | | | | | 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>
* Migration guide: cover removal of deprecated functionsFabian Kosmale2020-11-021-0/+102
| | | | | | Change-Id: I9e35d84940652d6de02cb7bd18bbb25f3e111184 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QML migration guide: Add initial contentFabian Kosmale2020-10-291-1/+29
| | | | | | | | | Add information about the variant/var unification. Remove place-holder sentence. Change-Id: I79bb230820eab71fea72929a24fb8c1b0479b256 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: use editingFinished signal of TextInput instead of textChangedMitch Curtis2020-10-061-1/+1
| | | | | | | | | | The former is only emitted as a result of user interaction, whereas the latter is also emitted as a result of programmatic changes. It's better to use editingFinished(). Pick-to: 5.15 5.12 Change-Id: I71bb084bced6c33d940f550b5e3b2e57df45bd3c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Add porting guides for all modules to porting guidePaul Wicking2020-09-161-0/+46
| | | | | | | Task-number: QTBUG-84051 Change-Id: Iffc8774898dba5bda329fa572289cc0134fddb6f Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
* Document QML_FOREIGN_NAMESPACE() macroFawzi Mohamed2020-08-271-1/+20
| | | | | Change-Id: I5793df82849f06e2d870335c3c17902e452399a4 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Unify "variant" and "var" properties in QMLFabian Kosmale2020-08-241-95/+0
| | | | | | | | | | | | | | | | | | | | variant and var properties differ in two important ways: - variant properties trigger "magic" string conversions: variant v1: "red" // contains a QColor var v2: "red" // contains a string - variant properties behave differently for value types: they create copies, instead of references. However, as variant properties were marked as obsolete and this behavior was effetively undocumented, it should be safe to give "variant" "var semantics". With this change, we can also avoid doing magic conversions when storing data in QVariant properties of QObjects/QGadgets Change-Id: I549b1beb98e6af9639c1ee81f316bda513d5ff65 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove qml statemachine plugin from qtdeclarativeKarsten Heimrich2020-08-2321-1603/+0
| | | | | | Task-number: QTBUG-80316 Change-Id: I584b699a1eec88117f343870bd2cd01075da64f7 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* docs: Mention URL object in url documentationMaximilian Goldstein2020-07-091-0/+5
| | | | | | Task-number: QTBUG-54988 Change-Id: I41c9cd0488db338b5dc1a2d5b8c4d707770b6ba8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* doc: Explain how to work around the linker removing registrationsUlf Hermann2020-07-021-0/+17
| | | | | | | Fixes: QTBUG-83402 Pick-to: 5.15 Change-Id: Ie8dc93afb3c3333d1263dcf0f13b41c833de91d5 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc:Update docs with cmake package informationNico Vertriest2020-07-021-0/+1
| | | | | | Task-number: QTBUG-85179 Change-Id: I14a1d01c8e983021461f72c5108383f4b277478b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Discern between "auto" and versioned imports in qmldirsUlf Hermann2020-06-241-0/+17
| | | | | | | | | | | | | You can now import the latest version, a specific version, or, "auto" which is the same version as the parent module. [ChangeLog][QtQml] You can now procedurally add module imports to modules, using qmlRegisterModuleImport(). However, actual import statements in qmldir files should be preferred wherever possible. Fixes: QTBUG-84899 Change-Id: I3b32dd8b07a19d31b6538b9a6bb436840862f345 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Document how to use CMake for Qt QmlKai Koehne2020-06-235-79/+25
| | | | | | Task-number: QTBUG-73058 Change-Id: Ic27cfdf76b8f77c9834baaeaf449434bf5f28416 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: Update QML connection inline snippetPaul Wicking2020-06-221-1/+1
| | | | | | | | Pick-to: 5.15 Fixes: QTBUG-85177 Change-Id: I52f0f8a24e53051aff984cabd414bbfa73fe098e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Revert "Decode directory separators in source URLs"Ulf Hermann2020-06-221-3/+1
| | | | | | | | | | | | | | | | This reverts commit 7ec30c51b287159377761338fe6d3b48706d74ee. We don't want to half-decode directory separators on assignment. This just introduces inconsistency down the line. [ChangeLog][QtQml][Important Behavior Changes] Percent-encoded directory separators in URLs are not automatically decoded on assignment to url properties anymore. This was obviously not a good idea to begin with. Fixes: QTBUG-81244 Change-Id: I1938abbe8aada88beff0d628397674255e8b2472 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Improve documentation for DateKai Koehne2020-06-121-12/+36
| | | | | | | | | | | | | | | Structure the overview more by adding section titles. Also be more elaborate on what the enum's mean for the different parts/methods. Finally, make it explicit that NarrowFormat for date and time is the same as ShortFormat. Pick-to: 5.15 Fixes: QTBUG-83841 Change-Id: I0a93361fcc8e30f1080938976d8e0b2d5a55e563 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Doc: Update example of QML int valueYuya Nishihara2020-06-121-1/+1
| | | | | | | | | Item width and height are real numbers. Let's pick other property of int type. Pick-to: 5.15 Change-Id: I43e74e4005681d570047648e2c141994a075150e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Clarify exact range of QML int valueYuya Nishihara2020-06-121-1/+1
| | | | | | | | | The original definition "around -2000000000 to around 2000000000" was unscientific and would make a false impression that full 32bit integer range wouldn't be supported. Change-Id: I712eb35dee05410f50572a12af98365013efeb62 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Allow QML plugins to be optionalUlf Hermann2020-06-091-1/+6
| | | | | | | | | | | If a plugin does nothing but load the library that provides the types, we can skip the plugin loading by linking the library directly. State that in the qmldir file, and evaluate it when loading the module. Task-number: QTBUG-84639 Change-Id: I2097237866a50f66c55e4653ad119fe10e18a893 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>