aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/qtquick2
Commit message (Collapse)AuthorAgeFilesLines
* Remove the qmake project filesFabian Kosmale2021-01-151-13/+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>
* Remove qmldir files in src/importsFabian Kosmale2021-01-151-6/+0
| | | | | | | | Those files are automatically generated by CMake nowadays, and not necessary since the removal of the qmake build system. Change-Id: I74ba10a58fb17bb28cbfeff49947c962687ad4e0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-10-061-2/+2
| | | | | | | | Modify special case locations to use the new API as well. Task-number: QTBUG-86815 Change-Id: I3b964e3baf0cc7040830156dac30358ea1152801 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Quick: Make sure the module initialization runs in static buildsUlf Hermann2020-08-101-0/+2
| | | | | | | | | | | | We need to keep a reference to the module initialization function somewhere in order to prevent the linker from removing it. In order to avoid further littering of the namespace, the QQuick_initializeProviders function is transformed to cover all of the initialization. Task-number: QTBUG-85693 Change-Id: Ie93e5abd1dfb5a425b87c70d8ec6327bb68880cb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Make the qtquick and qtqml plugins optionalUlf Hermann2020-07-023-25/+5
| | | | | | | | | We can do the initialization and de-initialization as constructor and destructor functions. Then we don't need to load the plugins. Task-number: QTBUG-84639 Change-Id: I2aeeee7e8d028555e3af91e93518c2c2afd70dbb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Discern between "auto" and versioned imports in qmldirsUlf Hermann2020-06-242-2/+2
| | | | | | | | | | | | | 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>
* Remove --dependencies option from qmltyperegistrarUlf Hermann2020-05-261-2/+0
| | | | | | | | | | | We don't need to list the dependencies in the qmltypes files. The information given in the qmldir file should be enough. Ultimately, we should get rid of all hidden dependencies. Task-number: QTBUG-84286 Change-Id: Iaf67d476b449215715270043591d8c4858104ea6 Reviewed-by: Christian Kamm <mail@ckamm.de> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Regenerate and adapt to merge from devwip/cmakeAlexandru Croitor2020-03-121-2/+2
| | | | | | Change-Id: If8daa6152a563d4309d7342414780ef75b9f5589 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-03-122-3/+9
|\ | | | | | | | | | | | | | | Conflicts: dependencies.yaml src/qml/qml/qqmlengine.cpp Change-Id: I6a73fd1064286f4a2232de85c2ce7f80452d4641
| * Avoid unloading plugins which register types to prevent crashesFabian Kosmale2020-03-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Plugins could register an arbitrary number of types in arbitrary places with qRegisterMetaType. This would lead to crashes when the plugin is unloaded, as the type registry would hold stale references to their QMetaTypes. By not unloading the plugin, the metatypes are kept safe in memory. [ChangeLog][QML][Important Behavior Changes] When writing a QQmlExtensionPlugin which procedurually registers types, you should overload the newly introduced unregisterTypes function, if you want to support unregistration with qmlClearEnginePlugins. Additionally, the destructor of your plugin should not contain any logic. Change-Id: I63b7a153f82be7996dbfca4d36f279c351dc6b9e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * Fix all import versionsUlf Hermann2020-02-191-1/+1
| | | | | | | | | | | | | | | | | | Bump all the *.15 versions to QT_VERSION and use QML_IMPORT_VERSION rather than IMPORT_VERSION. Change-Id: I5bfbc960d119a7386bdcedb9bdbfdbfa4486a187 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-171-1/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Synthetically reference type registration functionsUlf Hermann2020-02-041-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add unused volatile pointers to the type registration functions in each import plugin. We need to do this in order to prevent the linker from optimizing the registration away. There are two ways for this to happen: When linking statically, the linker will examine the referenced symbols on a per-object base and leave out all unreferenced objects. When linking dynamically, the linker may do the same on a per-library base and drop any unreferenced libraries from the dependencies. Forcing a reference to the type registration function prevents both. The volatile technique allows us to remove the previous qCDebug() hack. Having an unused volatile auto variable should only result in a single memory read as runtime overhead. The qCDebug() technique would generate a read and a block of mostly dead code (as no one would ever use that logging category). Fixes: QTBUG-81622 Change-Id: I255667276dfd355b19baa17b1aad3db406bf1954 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | Regenerate projects to handle private deps correctlyAlexandru Croitor2020-02-051-10/+4
| | | | | | | | | | | | | | | | | | Change-Id: Ifcbab0407e93dfc35d0459d7d29dee2cd3508a86 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Post-merge fixesAlexandru Croitor2020-01-301-2/+1
| | | | | | | | | | | | | | | Change-Id: I2350df5368ee34d6c7072d456806e518ce533839 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-01-291-1/+1
|\| | | | | | | | | | | | | | | | | | | | Conflicts: dependencies.yaml Change-Id: Ie3e9dc62031a85e5e81cbdf04694b95159d49fca
| * | Drop all the .2 from import directoriesUlf Hermann2020-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | No one is going to import version 1 of those anymore, and we will be able to export multiple major versions from the same plugin in Qt6. Change-Id: Icb2b80d349498f0e7c14d27ebba76f3d100d85e8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Post merge fixesLeander Beernaert2020-01-241-2/+2
| | | | | | | | | | | | | | | Change-Id: Ie8aca222809f35174fb6c6488832ec3ff5432272 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2020-01-163-5924/+1
|\| | | | | | | | | | | Change-Id: I0c5b939c70bdb91ccdf7068784308416dcaa5736
| * | Fix maximum minor to 15 for importsUlf Hermann2020-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | QT_MINOR_VERSION resets to 0 in dev. Change-Id: I0b0210c3664c8c42b5dfabf13abac2beef2a0e34 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-142-5923/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/folderlistmodel/plugin.cpp src/imports/layouts/plugin.cpp src/imports/localstorage/plugin.cpp src/imports/models/plugin.cpp src/imports/particles/plugin.cpp src/imports/qtqml/plugin.cpp src/imports/qtquick2/plugin.cpp src/imports/shapes/plugin.cpp src/imports/statemachine/plugin.cpp src/imports/testlib/main.cpp src/imports/wavefrontmesh/plugin.cpp src/imports/window/plugin.cpp src/imports/workerscript/plugin.cpp src/qml/jsruntime/qv4sequenceobject.cpp src/qml/qml/qqmlengine.cpp src/qmlmodels/qqmlmodelsmodule.cpp src/qmlmodels/qqmlmodelsmodule_p.h src/qmlworkerscript/qqmlworkerscriptmodule.cpp src/qmlworkerscript/qqmlworkerscriptmodule_p.h src/quick/items/qquickitemsmodule.cpp Change-Id: I5f1fbc3d00e8f583d2c89afc5389de84d68633a7
| | * Generate registrations for all importsUlf Hermann2020-01-102-5924/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we can generate all QML type information at build time, we should also use it. Move the types for QtTest into the testlib import plugin. They don't need to be exported from QtQuickTest. Trigger the resource initialization of the shapes library from the plugin so that we retain a dependency and the linker doesn't optimize the module initialization away. Change-Id: Icc8cb338aa03ef1e3085e29356a5db7b73ba0a01 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | Post Merge FixesLeander Beernaert2019-11-251-1/+1
| | | | | | | | | | | | | | | Change-Id: I13bc3aef318d8b497b01c61fcca7760abd96339a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Regenerate all projects with new CMake API versionAlexandru Croitor2019-11-151-2/+2
| | | | | | | | | | | | | | | | | | Change-Id: Ie0db35f674137c229eaf049616f38f8e818f7092 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Regenerate projectsAlexandru Croitor2019-11-141-1/+0
| | | | | | | | | | | | | | | | | | Change-Id: I38044c382e4d84b5865a19cdd04cc8922bd72a77 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-141-130/+597
|\| | | | | | | | | | | | | | | | | | | | Removed dependencies.yaml because we don't use it yet in wip/cmake. Fixed conflict in qmlcachegen.cpp. Change-Id: Ie1060c737bee1daa85779903598e5b6d5020d922
| * | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2019-10-071-6/+262
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp Change-Id: Id2e81000bcbd4de18fe22b085fdf5eed42c02516
| | * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-041-6/+262
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/qtquick2/plugins.qmltypes src/quick/items/qquickitemsmodule.cpp Change-Id: I841c65c9c131354788b4f3fcfe3d7ed27be316d5
| | | * Update plugins.qmltypes for 5.14Kai Koehne2019-09-261-6/+262
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-78690 Change-Id: Iaee681cc10ae33c582806900a041d79bc0cc8d1d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-09-271-126/+337
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/folderlistmodel/plugin.cpp src/imports/shapes/plugin.cpp src/qml/qml/qqmlengine.cpp src/qmlmodels/qqmlmodelsmodule.cpp src/qmlworkerscript/qqmlworkerscriptmodule.cpp src/quick/items/qquickitemsmodule.cpp Change-Id: Ib9215a07aa95b5801ce3cb7287f7903926e8c838
| | * | Specify parameters of type registration in class declarationsUlf Hermann2019-09-261-126/+337
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using this technique we can automatically register all necessary revisions and minor versions of a type, using the metaobject system. This greatly reduces the potential for mistakes and resulting incompatibilities between versions of imports. We assume that for each type we need to register all revisions of its super types and its attached type, and that the revisions match. That is, if you import version X of type A, you will also get version X of its attached type and of any super types. As we previously didn't take these dependencies into account when manually registering the types, a number of extra revisions are now registered for some types. Potentially, we can now generate the qmltypes files at compile time, using moc. Change-Id: I7abb8a5c39f5e63ad1a0cb41a783f2c91909491b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-10-111-55/+192
|\| | | | | | | | | | | Change-Id: I4a91928610f79c8e21a05781953ffa41508c828a
| * | Merge remote-tracking branch 'origin/dev' into wip/qt6Ulf Hermann2019-09-051-55/+192
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/qml/qqmlengine.cpp src/qmlmodels/qqmlmodelsmodule.cpp Change-Id: Id60420f8250a9c97fcfe56d4eea19b62c6870404
| | * Harmonize meta object revisions and minor versionsUlf Hermann2019-08-261-39/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to avoid complexity we want those to match. We can easily "rename" the meta object revisions as those are not public interfaces. Change-Id: I48e063d49758c7bacd9b7816bf5541cf67e07b0d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | * Regenerate plugins.qmltypesUlf Hermann2019-08-261-16/+153
| | | | | | | | | | | | | | | | | | Change-Id: I9e470d08ee93c44663e6f99cebe7817c90cba3e4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Regenerate qtdeclarative before mergeAlexandru Croitor2019-10-111-0/+1
| | | | | | | | | | | | | | | | | | Change-Id: I5710110679220c4e22bc7f8b540f18a51b735ddf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | | Add qt6_add_qml_module() public APILeander Beernaert2019-09-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add qt6_add_qml_module() as a public API for building QML modules. Since the shared implementation details are small, it was easier to just reimplement the shared code than to unmangle the more complicated version we use to build Qt from QtBuild. This patch includes an example conversion. Changes for pro2cmake will follow in a separate patch in qtbase. Change-Id: I942526cc7d978e2d8309b506e785f9c1509d0bbc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Re-generate QML imports after latest pro2cmake changesSimon Hausmann2019-08-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | The resource prefix is now calculated. Change-Id: If6faf9aea193a534d3b02d00de28c59724974d3c Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Re-generate QML importsSimon Hausmann2019-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This brings the output up-to-date with the latest generator changes (qml_files among others) and fixes the URI parameter for QtQuick, etc. Change-Id: Iafe7404ce12bf2132252d88ae38c4cc70c4f0d07 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Update qml modulesLeander Beernaert2019-08-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Updated qml modules to be compatible with the latest changes to add_qml_modules. Change-Id: I37965db931d44e02a18fb0d5948e0c4439ff0852 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Update qml modulesLeander Beernaert2019-08-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Updated qml modules to be compatible with the latest changes to add_qml_modules. Change-Id: I3342a1375bfa64a16fb0c54f812c56bad173f73c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Update add_qml_module() call to match new requirementsLeander Beernaert2019-07-311-0/+1
| | | | | | | | | | | | | | | | | | | | | Add INSTALL_QML_FILES as the default option for all qml_plugins. Change-Id: I567aeff7b4b2b40765c83ac08ab7af3917a25981 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-07-242-17/+2
|\| | | | | | | | | | | Change-Id: I52b2d17d9334313e4b3d84b52432f2ebc77f7415
| * | Remove module registration related Qt version #ifdefsSimon Hausmann2019-07-221-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ahead of compiling declarative with a newer qtbase that bumps the Qt version to 6, we can already now remove the Qt 5 code paths related to type registrations as commit 8534634bd204ccdca3edcc244a35be6e81739fce implements those dependencies differently. This also required lowering the minimum minor version for the Instantiator to 1, as it was in the Qt 5 branch. Change-Id: Idd38c967eeb8423509237116803d292bba422f8b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | Fix module compatibility with Qt 5Simon Hausmann2019-07-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Importing QtQuick 2.x should make all QtQml types, including models and worker script available as well. The same goes for QtQml, which imports QtQml.Models and WorkerScript. Change-Id: I47acff2dd39495a42095270d1fd07e9c8921fb62 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | Fix module imports when building with Qt Version 6.0.0Simon Hausmann2019-07-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For modules such as QtQuick we register 2.$QT_VERSION_MINOR to allow our users to simply use the latest "Qt version" with their imports. When switching to version 6.0.0, code that used import QtQuick 5.13 would stop working because we had some types registered to say minor version 10 but nothing after that, and the qmlRegisterModule() call would use QT_VERSION_MINOR, which is now zero. Therefore in this Qt 6 branch, let's stick to the latest Qt 5 release planned, to maintain compatibility. Change-Id: I174be32cef8de152cd32010156ae716bd474397c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | Build projects from src/importAlexandru Croitor2019-07-241-0/+36
|/ / | | | | | | | | | | | | | | | | | | Add support to build the projects under src/imports. All the CMakeLists.txt were generate with pro2cmake, except for src/imports/builtins. Change-Id: I06046ede82ba5b1e677e92b7548f543d020b0354 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* / Fix Qt6 builds after dev -> wip/qt6 mergeAlexandru Croitor2019-07-091-0/+1
|/ | | | | Change-Id: I56b9d3abdbc6663a2d514f12aa20f2f574042bc1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Move workerscript to its own moduleUlf Hermann2019-05-062-0/+8
| | | | | Change-Id: I778cfe842ddf1c600a837d8f2061a338887eed95 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move model types into their own libraryUlf Hermann2019-05-022-2/+5
| | | | | | | | | | The model types are not part of the core QML runtime and should only be loaded if you explicitly import them. We cannot enforce that in Qt5 as some of them are available from the QtQml import, but we can change it in Qt6. Change-Id: I1e49e84d748e352537ec2d4af901c034c91d038f Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>