aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/workerscript
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Fix qml module version to use the repo project versionAlexandru Croitor2021-04-161-1/+1
| | | | | | | | | | | | Use PROJECT_VERSION instead of CMAKE_PROJECT_VERSION, so that the repo project version is used in a top-level build, rather than the version of the qt5 project. Task-number: QTBUG-92861 Change-Id: I5a7a09baf81353558e512800746ac24e8e8b9a47 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit cd7bd71d08f1c21648756d0a9fd501ce37a8cc0c) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Remove version numbers for import statementJerome Pasion2020-11-261-1/+1
| | | | | | | | | | | | -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 Change-Id: I3ac44f93aab3086c1a49de79ecc677beb4ef9180 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 72746ef0ad69d589de91f43aa2043d6e47745d68) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Remove version numbers for import statementJerome Pasion2020-11-241-1/+1
| | | | | | | | | | | -recommend using the import statement without versions for Qt 6.0 -update use of \qml Task-number: QTBUG-87155 Change-Id: I555d582a13006c5abb6dc1e0266d2987ba79c6d8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 370fe537badd2b98c2da7f8918a15411d5aa67ad) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Use the declared typeinfos rather than the defaultUlf Hermann2020-10-071-0/+1
| | | | | | | | | | ... and produce a warning when encountering the default. This shows us that the qmake build omits some typeinfo entries from common modules. Add those. Change-Id: I1c7e87e8a54ef24a6076090e6051eb1c03c09b2a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-10-061-1/+1
| | | | | | | | 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>
* CMake: Regenerate projectsAlexandru Croitor2020-07-092-1/+26
| | | | | | | | | We need the qt_add_tool changes to successfully configure qemu builds. The rest of the changes are just to be in sync with the .pro files. Change-Id: I7bcc08ac58f57a5761aedef09761428c55235289 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Allow QML plugins to be optionalUlf Hermann2020-06-092-2/+2
| | | | | | | | | | | 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>
* 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-123-17/+4
|\ | | | | | | | | | | | | | | Conflicts: dependencies.yaml src/qml/qml/qqmlengine.cpp Change-Id: I6a73fd1064286f4a2232de85c2ce7f80452d4641
| * Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-091-2/+0
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Move dependencies.json files into the right placesUlf Hermann2020-02-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | The workerscript and models qmltypes are built from the library directory, the testlib qmltypes are built from the plugin directory. Change-Id: Ifc497aaf8204616ca817ee08ad86383ab2cbbdae Reviewed-by: Fabian Kosmale <fabian.kosmale@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-14/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Force models and workerscript plugins to link their librariesUlf Hermann2020-01-301-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some linkers can determine that we don't use any symbols from the QtQmlModels and QtQmlWorkerScript libraries in the respective plugins and avoid to link the libraries into the plugins. That means, when loading the plugins, the types are not registered. We avoid that by adding a debug message that accesses a symbol of the library to each plugin. Change-Id: I3d946259df96382a3751eaafa12cbdd3d830c139 Fixes: QTBUG-81721 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | Regenerate projects to handle private deps correctlyAlexandru Croitor2020-02-051-4/+1
| | | | | | | | | | | | | | | | | | 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-37/+17
|\| | | | | | | | | | | 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>
| * | WorkerScript and QmlModels plugins: Force linking of base modulesUlf Hermann2020-01-141-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to access some symbol from QtQmlWorkerScript or QtQmlModels, repsectively, so that the linker doesn't optimize the dependency out. Otherwise the QML types won't be loaded and we can in fact not create worker scripts or models. Change-Id: Ibd665baf8552e08216eb203c8493300c1773cb29 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-142-38/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-38/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Regenerate all projects with new CMake API versionAlexandru Croitor2019-11-151-1/+1
| | | | | | | | | | | | | | | | | | 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/wip/qt6' into wip/cmakeAlexandru Croitor2019-10-111-0/+26
|\| | | | | | | | | | | Change-Id: I4a91928610f79c8e21a05781953ffa41508c828a
| * | Merge remote-tracking branch 'origin/dev' into wip/qt6Ulf Hermann2019-09-051-0/+26
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/qml/qqmlengine.cpp src/qmlmodels/qqmlmodelsmodule.cpp Change-Id: Id60420f8250a9c97fcfe56d4eea19b62c6870404
| | * Regenerate plugins.qmltypesUlf Hermann2019-08-261-0/+26
| | | | | | | | | | | | | | | | | | 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/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-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-3/+3
|\| | | | | | | | | | | Change-Id: I52b2d17d9334313e4b3d84b52432f2ebc77f7415
| * | 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>
| * | Merge remote-tracking branch 'origin/dev' into wip/qt6Simon Hausmann2019-07-171-1/+1
| |\| | | | | | | | | | Change-Id: I849578dc1122c8ea36c3d4219ebcb1ca86a8016f
| | * Fix importing the worker scripts pluginSimon Hausmann2019-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The plugin entry in the qmldir file must match the name of the plugin in the build system. Change-Id: I3780ee352d27aa5971700d891da116495a04d142 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@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/+24
|/ | | | | | | | | | 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>
* Move workerscript to its own moduleUlf Hermann2019-05-064-0/+97
Change-Id: I778cfe842ddf1c600a837d8f2061a338887eed95 Reviewed-by: Lars Knoll <lars.knoll@qt.io>