aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlcachegen
Commit message (Collapse)AuthorAgeFilesLines
* qmlcachegen: Fix typo in command line option descriptionPavol Markovic2021-09-281-1/+1
| | | | | | | | | | | 'resource-file-mapping option' is actually using '=' in code and tools Task-number: QBS-1676 Change-Id: I0d67e13e9d614bf973a0d4332c6b4dcda4c121a4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 1bae74dfa031ed12eb3ca002040559425571303f) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Replace qmlcachegen's --qmljs-runtime with generic mechanismUlf Hermann2021-07-091-3/+0
| | | | | | | | | | | | | We don't need --qmljs-runtime after all. However, we do want to pass custom arguments to qmlcachegen. This way we don't need to change the world whenever we invent one. Change-Id: I99f0c99c4b15e469605dc43d26871fa43dc36c08 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 06b3f1f2e7898b72b6c2baf87d63c118dc1ae267) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Update warning about qtquick_compiler_add_resourcesAlexandru Croitor2021-06-251-3/+4
| | | | | | | | | | | To mention qt_add_qml_module instead of qt6_add_resources. The latter does not process qml files anymore. Change-Id: I12ce2b60b1d20cbfc9c781e3f15f7999f5ba563d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 63b91343adb63adf514887fa84f8bef3c04a0f12) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Remove unneeded *.pro and .prev_CMakeLists.txt filesCraig Scott2021-05-191-46/+0
| | | | | | | | | | The .pro files corresponding to the .prev_CMakeLists.txt files have already been removed. Change-Id: I254eafe4c7de1a516e33bd9cb3d9879e73fa83b4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Move tools to libexecKai Köhne2021-05-113-2/+3
| | | | | | | | | | | | | | Move qmlimportscanner, qmltyperegistrar, qmljsrootgen, qmlcachegen to libexec These are internal tools that is not supposed to be run by the user directly. [ChangeLog][Linux] qmlimportscanner, qmltyperegistrar, qmljsrootgen, qmlcachegen tools got moved from QTDIR/bin into QTDIR/libexec directory. Task-number: QTBUG-88791 Change-Id: I2739044e872ec83ef7da7dd857c26395ecfd407d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* Fix regression where qtquickcompiler cannot find rccKai Köhne2021-05-071-1/+1
| | | | | | | | | | | | RCC got moved to libexec in 6.1 [ChangeLog][qmake] Fixed regression in Qt 6.1.0 which broke 'QT += qtquickcompiler' on Linux, macOS. Pick-to: 6.1 Fixes: QTBUG-93563 Change-Id: I5fb661a529c43b3b58316b73f4c62e069d1c7df4 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* qmlcachegen: Add an ignored option -IUlf Hermann2021-03-041-0/+3
| | | | | | | | In other implementations this may be used the same way as qmllint's -I option, to specify additional import paths. Change-Id: I447712551ff1fb2a7c379712e938f778b37c514a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rework QQmlJSResourceFileMapperUlf Hermann2021-02-241-3/+5
| | | | | | | | | | We need more generic filtering capabilities so that it can, for example, retrieve all the .qml files in a directory, both as qrc paths and local file paths. Change-Id: I72a72abc6dd39adb41bcd035f7aa6777e50cb5a5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* qmlcachegen: Accept both --resource and --resource-pathUlf Hermann2021-02-231-7/+0
| | | | | | | | | | --resource-path directly specifies the resource path for the file being compiled and overrides any information we might retrieve from the qrc file. However, we might still find other relevant information in the qrc file. Change-Id: I587c6e4e81f792f62a28b035ee97b33d12eeb06d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove the qmake project filesFabian Kosmale2021-01-151-39/+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>
* Add a -i <qmltypes> option to qmlcachegenUlf Hermann2021-01-121-0/+5
| | | | | | | | | | | | | qmlcachegen needs to see the qmltypes file for the current project so that it can query it for C++ types exposed to QML. This is only relevant when generating C++ code, which qmlcachegen itself cannot do. However, in order to write a compatible drop-in, we need it. Also, hide related ignored options from --help in qmlcachegen. Change-Id: Id2f1b8b1750351c7de8dfe49e4065ef1b29423b7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Allow passing --qmljs-runtime to the qmlcachegen implementationUlf Hermann2020-12-021-0/+2
| | | | | | | | | | | | This signals qmlcachegenplus to not paste the whole JavaScript type system into each generated file. In turn, user projects need to add a dependency in order to build against the JS runtime. qmlcachegen ignores the option. Change-Id: I0f87dedb969e99e94fbb712b7faa23d84f76dfbe Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Allow passing --direct-calls to the qmlcachegen implementationUlf Hermann2020-12-011-0/+2
| | | | | | | | | | | | | qmlcachegenplus has an argument --direct-calls which instructs it to call methods of known C++ types directly rather than through the JS engine or the metaobject. This is faster but requires that all those types are visible to the generated code. Introduce a way to pass this option on a per-target base. Adjust qmlcachegen to ignore the option. Change-Id: I474e577e4a197f6ca4c8b8e868dfd39983e77041 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlcachegen: Move functions to compile QML/JS files to QmlCompilerUlf Hermann2020-10-231-375/+13
| | | | | | | | We need to re-use them. Also, provide a way to insert AOT compiled functions into the C++ code. Change-Id: I7b0d13cb307e8f979745f096a9614f087d135f68 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlcachegen: Add empty AOT built functions to the loaderUlf Hermann2020-10-231-1/+11
| | | | | | | | This enables us to use the same generateloader.cpp for qmlcachegen and any replacement that actually produces AOT compiled functions. Change-Id: I12fe81236e4ef16a627729c644d54b6c171b3860 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Move generateloader.cpp to QmlCompilerUlf Hermann2020-10-235-244/+7
| | | | | | | We need to be able to generate the loader code from multiple places. Change-Id: I9e04fd3583b535bc5f7d5fb293cb61309c1e199a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlcachegen: Move resourcefilter.cpp into QmlCompilerUlf Hermann2020-10-205-179/+3
| | | | | | | | For backwards compatibility, a replacement for qmlcachegen will need to provide the same functionality. Change-Id: I22664230ea636d384190122223d15819ebee930c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-10-062-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>
* QmlCompiler: Rename ResourceFileMapperUlf Hermann2020-10-051-3/+3
| | | | | | | The file class names should start with a common prefix. Change-Id: I5e014c103668a1bc73d359b00a1dda33e5637a79 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Long live libQtQmlCompiler!Ulf Hermann2020-10-054-15/+4
| | | | | | | | Move all the code from tools/shared into src/qmlcompiler and build a static library from it so that we can re-use it in external tools. Change-Id: I7c8d8e59063dc7c711f4072f103a01095e6f5997 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Install public qmake .prf files into the prefix mkspecs dirAlexandru Croitor2020-09-211-0/+12
| | | | | | | | | These are needed for qmake projects. Fixes: QTBUG-86802 Task-number: QTBUG-86498 Change-Id: I09c05a358fa580a3a9eab002c6ada42ad70e999c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Prepare Qt5QuickCompiler.cmake.in for Qt6Ulf Hermann2020-07-055-97/+17
| | | | | | | | | | Increment all the version numbers. Replace qtquick_compiler_add_resources with a warning and a call to qt6_add_resources. Task-number: QTBUG-85190 Change-Id: Ifed5449ab4d6312a57add870eee13175872146db Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Revive QTQUICK_COMPILER_SKIPPED_RESOURCESUlf Hermann2020-06-301-0/+12
| | | | | | | | | There are valid reasons not to compile some resources with qmlcachegen. Pick-to: 5.15 Fixes: QTBUG-85243 Change-Id: I9a1233864ed5dda0c264e61db596a9d8c80ea1f3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Port QtDeclarative from QStringRef to QStringViewKarsten Heimrich2020-06-161-1/+1
| | | | | | | | Task-number: QTBUG-84319 Change-Id: I2dcfb8a2db98282c7a1acdad1e6f4f949f26df15 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* qtquickcompiler: Fix compilation from different drive (Windows)Kai Koehne2020-06-161-2/+1
| | | | | | | | | | | In this case the absolute path on Windows will start with e.g. "C:/", which is not a valid file name. Therefore also convert colon to an underscore. Pick-to: 5.15 Fixes: QTBUG-84901 Change-Id: If79245a5dda5a699f3dceb8e4f08e5a206d566a3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Regenerate qtdeclarative/toolsAlexandru Croitor2020-05-292-1/+2
| | | | | | | | Includes - A bunch of TARGET_DESCRIPTION Change-Id: I6acfe05187afbdd45cf7e1bf8634f1554a51c791 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Port qmlcachegen to QRegularExpressionLars Knoll2020-04-241-2/+2
| | | | | | Change-Id: I2de2cb1c04c58b750531f8f00981bcce0bd724ba Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Move qmllint's metatype support to tools/sharedUlf Hermann2020-04-012-3/+7
| | | | | | | | | We want to read qmltypes files and analyze scopes also from other tools. Furthermore, restructure the shared directory, so that each tool only includes what it needs. Change-Id: I96a2dcc8b1c5fac613592fb1867bf51fa5ef3a6e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* CMake: Regenerate and adapt to merge from devwip/cmakeAlexandru Croitor2020-03-122-6/+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-4/+5
|\ | | | | | | | | | | | | | | 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-3/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Restore offset/length in QQmlJS::DiagnosticMessageSimon Hausmann2020-03-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed in a few places outside of declarative, so this change restores the loc member in DiagnosticMessage and moves QQmlJS::AST::SourceLocation into common's QQmlJS namespace/directory. QQmlError is unaffected and retains only line/column. Amends d4d197d06279f9257647628f7e1ccc9ec763a6bb Change-Id: Ifb9d344228e3c6e9e26fc4fe112686f9336ea2b2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-171-0/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-061-0/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/types/qqmlbind.cpp src/quick/items/qquicklistview.cpp tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp Change-Id: Id6805c13256ad13d5651011e5dd09bba0ec02987
| | | * Run qtEnsurePluginResourcesCpp() from qtquickcompiler.prfUlf Hermann2020-01-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was missed when factoring out the resources flattening. Fixes: QTBUG-81699 Fixes: QTBUG-81713 Change-Id: I6ee42c0b91aaa57c593b218eb52359205098e5c6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | Use QTypeRevision for all versions and revisionsUlf Hermann2020-02-031-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In many places we carry major and minor versions or revisions that are loosely coupled to minor versions. As the Qt minor version resets now, we need to handle these things more systematically. In particular, we need to add a "major" part to revisions. QTypeRevision can express the current major/minor pairs more efficiently and can also be used to add a major version to revisions. This change does not change the semantics, yet, but only replaces the types. Change-Id: Ie58ba8114d7e4c6427f0f28716deee71995c0d24 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2020-01-161-1/+2
|\| | | | | | | | | | | Change-Id: I0c5b939c70bdb91ccdf7068784308416dcaa5736
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-091-1/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/particles/qquickitemparticle.cpp src/qmlmodels/qqmladaptormodel.cpp tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp Change-Id: Ibd8fbb91da6893a09f4ffe61ad0b95d8149bbc87
| | * Fix usage of qtquickcompiler.prf after lrelease.prfJoerg Bornemann2019-12-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider a project that sets CONFIG += lrelease embed_translations qtquickcompiler qtquickcompiler.prf is loaded first and loads resources.prf. Then lrelease.prf is loaded and extends RESOURCES. The latter changes are never picked up, because resources.prf was already loaded which is recorded in QMAKE_INTERNAL_INCLUDED_FEATURES. Use the newly introduced qtFlattenResources function instead of fully loading resources.prf. Task-number: QTBUG-79672 Change-Id: I1894ede97b4d5de567971a1a8cef407460bba97d Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * | Avoid deprecated non-q-prefixed hex() functionUlf Hermann2019-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | Use Qt::hex() instead. Change-Id: I46bc2f2006ce860cd938a86432783011365c8164 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | Post Merge FixesLeander Beernaert2019-11-252-2/+8
| | | | | | | | | | | | | | | Change-Id: I13bc3aef318d8b497b01c61fcca7760abd96339a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2019-11-253-221/+4
|\ \ \ | | | | | | | | | | | | Change-Id: I48b9c2e4f3a75c18470c55f73f2089dc1401de54
| * | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-273-221/+4
| |\| | | | | | | | | | | | | | Change-Id: I4f7033b15c8ac8cff685e7c1a5a6b0343313c98c
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-263-221/+4
| | |\| | | | | | | | | | | | | Change-Id: Iaa7dbbe9926d25cfb1b1c51e7013e58cb71d86b5
| | | * Add support for scanning qrc files in qmlimportscannerAndy Shaw2019-10-243-221/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reuses the ResourceFileMapper and extends it slightly to return full paths on request. Subsequently, this is moved into a shared directory inside tools. Fixes: QTBUG-55259 Change-Id: Ice5fc68d03b767a4185742e182556ab4290bd28d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | | Regenerate all projects with new CMake API versionAlexandru Croitor2019-11-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie0db35f674137c229eaf049616f38f8e818f7092 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Regenerate projectsAlexandru Croitor2019-11-142-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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-145-314/+41
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 devQt Forward Merge Bot2019-09-225-2/+192
| |\| | | | | | | | | | | | | | Change-Id: I801567c11fcc3244a1ee7dabeb5079d49fc5c3a1
| | * | Fix link errors when enabling CONFIG+=qtquickcompiler on non-QML projectsSimon Hausmann2019-09-191-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-apply commit c5578b16d6454e708c8ce12661a85d41eeaaa758 now that with commit 41864db3b61d9e81a9fe4906918d2cd3d6d32a0c the .qml/.js/etc. files are always retained. The difference is that now this is not an error situation but merely a reason to skip processing. Fixes: QTBUG-73669 Change-Id: I53e1e7d471a66e82694ceca83c548c03aaf88f87 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>