aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* qmlprofiler tool: In attach mode, finish when connection dropsUlf Hermann2018-02-022-0/+19
| | | | | | | | | We won't have a process that terminates in this case and we don't want to wait forever. Task-number: QTBUG-66159 Change-Id: I5d0bbe2f8bc9c7cbc8732272ccca779d5f9bcc7d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix illegal name setup in qmlcachegenSimon Hausmann2018-01-181-0/+2
| | | | | | | | | After commit c2b4c6393fee37e0c6c4a8c5d40d13120cc8a94e we must also initialize the set in order to benefit from the improved lookup on the cache side. Change-Id: I0f66f118b912ed66a281d16caea67500f9c14046 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use a more optimized lookup for global propertiesLars Knoll2018-01-171-3/+19
| | | | | | | | | | | | | | Force the use of a global lookup if we know that the property can and will be found in the global object. This is possible, as the global object is frozen in QML mode and can't be overwritten. Shaves of .5% on the delegates_item_states benchmark, and will significantly speed up all accesses to e.g. the Math object. Change-Id: Ia1e248781a13ebaeb8bc43652e53a6fdde336d0d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Use potentially intercepted URL as ID for compilation unitsUlf Hermann2017-12-211-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | We generally have to pass a URL and a file name everywhere because the logical URL might be something else than the actual file being loaded. For example a QQmlFileSelector might modify the URL to be loaded for a specific file. This resulting URL, however, should not be used to resolve further URLs defined in the file loaded that way. As we need to access QQmlTypeLoader::m_url as string more often now, cache it and avoid frequent translations between QUrl and QString. Furthermore, QQmlDataBlob's URLs are changed to follow the same semantics. The finalUrl is the one that should be used to resolve further URLs, the url is the one used to load the content, and subject to any redirects or interceptions. This changes the semantics of URL redirects. Previously a redirected URL was used as the base URL for furher URL resolution. This doesn't work because redirection occurs after interception and interception should not influence the resolution of further URLs. We now use the original URL as base URL for resolution of further URLs and rely on the server to redirect those, too. Task-number: QTBUG-61209 Change-Id: I93822f820bed2515995de3cb118099218b510ca4 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Add logging categories for GC statisticsLars Knoll2017-12-111-2/+0
| | | | | | | | | | | And use them to dump some useful information. This replaces the old QV4_MM_STATS environment variable and introduces the qt.qml.gc.statistics (for some stats at app exit) and qt.qml.gc.allocatorStats (for stats on each GC run) logging categories. Change-Id: I0a16b25b8663aa7dbfe2adae299d3d990e8e5554 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix outdated BSD license headerKai Koehne2017-10-172-6/+26
| | | | | Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* qmlimportscanner: Scan the root directory againMorten Johan Sørvig2017-09-191-1/+1
| | | | | | | | | | “qmlimportscanner -rootPath /path/to/foo” should scan QML files in the “foo” directory. Remove QDir::NoDot, which was added in commit 6ff0e9a6. Change-Id: I15cc4a289cf246786cdf8fe2020c7f3d2798b7a5 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Error out when compiling signal handlers with arguments in qml filesSimon Hausmann2017-09-121-0/+36
| | | | | | | | | | | | | | | Ahead of time we cannot tell whether the use of "arguments" in a signal hander refers to the JS arguments object or a potential arguments signal parameter. Resolving that requires access to information we currently don't have. The QML engine has it at run-time (in SignalHandlerConverter) and that's why it works there accordingly. However when generating caches ahead of time, let's rather produce an error message with a hint how to work around it instead of producing differing behavior at run-time. Task-number: QTBUG-60011 Change-Id: I9e460bd467dbb5998f12a44c439223ea44e7bbad Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* qmlplugindump: skip imports containing "private"Marco Benelli2017-09-081-1/+1
| | | | | | | | | Skipping paths that ends with "private" is not enough. Task-number: QTBUG-47027 Change-Id: I25af518b76f594c268db6b77dbafd343f2f57ee8 Reviewed-by: Teemu Holappa <teemu.holappa@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* qmlimportscanner: Only skip debug/release directories if the path ends with themAndy Shaw2017-09-041-2/+2
| | | | | | | | | Since the preceding path may contain debug or release in it, then we only want to check if the path ends with it as opposed to containing it. Change-Id: Ib4d466987fccb75771fcd2fa018b6f1375df7dc4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* qmlplugindump: fix bug in reading command lineMarco Benelli2017-08-211-1/+1
| | | | | | Task-number: QTBUG-58264 Change-Id: I317fb18d9ceb8738f2f132b8703dc1af3b17d35b Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Change data structures in QQmlMetaTypeDataLars Knoll2017-08-021-55/+55
| | | | | | | | | | | | | | | | | Make sure any QQmlType stored in the meta type data has a refcount of 1. This should now make it possible to clean out unused types by iterating over the list of types and removing those that have a refcount of 1. Some care is still needed for C++ registered types, that will need to get one more refcount, so we don't accidentally remove them. Task-number: QTBUG-61536 Change-Id: Id2a18dae5ddcb815f34013f5fde1f05d2d9d0214 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QQmlType by valueLars Knoll2017-08-021-11/+11
| | | | | | | | | | | QQmlType is now refcounted, and we need to use it by value, to control it's lifetime properly. This is required, so we can clean up the QQmlMetaTypeData cache on engine destruction and with trimComponentCache() Task-number: QTBUG-61536 Change-Id: If86391c86ea20a646ded7c9925d8f743f628fb91 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Disable ahead-of-time cache generation on AndroidSimon Hausmann2017-06-061-0/+5
| | | | | | | | | It appears that not all phones are happy with the code that we generate. Until we can find a fix for that, let's disable the feature. Change-Id: If4aa5cc14edcb69843fb9ef32691657c8c507b83 Task-number: QTBUG-60918 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove invalid QObject::connect callJoerg Bornemann2017-05-041-1/+0
| | | | | | | | | Neither signal close nor slot doClose exist. This fixes a "QObject::connect: No such signal MainWindow::close()" warning. Change-Id: Ie634e42b3f73ac0e6c42b795c7071e6275286b28 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix licensingJani Heikkinen2017-05-042-34/+24
| | | | | | | | | - Remove unused license files - Switch old LGPLv21 license headers with GPL-EXCEPT one Task-number: QTBUG-57147 Change-Id: Ib59c3e2e39bfe0038db795af85dc75028564efa3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Run includemocs in qtdeclarativeThiago Macieira2017-04-266-0/+11
| | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix forced error warnings in -no-gui buildv5.9.0-beta2Alex Blasche2017-04-121-1/+6
| | | | | | | | | | | | | | | | compiling main.cpp main.cpp:361:23: error: unused parameter argc [-Werror=unused-parameter] void getAppFlags(int &argc, char **argv) ^ main.cpp:361:36: error: unused parameter argv [-Werror=unused-parameter] void getAppFlags(int &argc, char **argv) ^ main.cpp:74:12: error: exitTimerId defined but not used [-Werror=unused-variable] static int exitTimerId = -1; ^ Change-Id: I3eb7aff4ab3b5f1e89fdbf6d090107efedb376dd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix support for jsTr() and QT_TR_NOOP in list elements when cachingSimon Hausmann2017-04-061-3/+5
| | | | | | | | | Similar to the Qt Quick Compiler we need to do the expression simplification pass at cache generation time to extract translation calls in list elements. Change-Id: I267fc9647ab82bc83d6b087c06c0036df38238ff Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix loading of ahead-of-time generated cache files when cross-compilingSimon Hausmann2017-04-062-5/+15
| | | | | | | | | The target ABI is something that we must include correctly at cache generation time. The corresponding qmake variable is available in qtbase now, so we can use that and embed it in the generated data. Change-Id: Icd6e44824f5151535ce9ddac27687b7877288725 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix build without features.commandlineparserTasuku Suzuki2017-04-031-2/+3
| | | | | Change-Id: I8b54d1fe7923ce698a1f3979e69a496bb312cff4 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix build without features.animationTasuku Suzuki2017-04-031-0/+4
| | | | | | Change-Id: Ie45a2f01def64941a323973ea27446e3fc85a72b Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Simon Hausmann2017-03-251-6/+2
|\
| * Merge remote-tracking branch 'origin/5.8' into 5.9Simon Hausmann2017-03-151-6/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qqmltypecompiler_p.h src/qml/qml/qqmltypeloader.cpp src/qml/qml/qqmltypeloader_p.h Change-Id: I4894555ab7a0879b56bbda7a46d16d1c40c19e7c
* | | Avoid an extra stat() on the source .qml file when loading cacheSimon Hausmann2017-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | For timestamp comparison it is not necessary to create another QFileInfo() object and call exists() and lastModified(), when we can pass that information through from the type loader. Change-Id: I225cd36e672f1f390bddb4e6ebfafa3fc1269795 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QRegExp include cleanupSamuel Gaist2017-03-172-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing include statement where the QRegExp class is used. Change-Id: I02d2995dd380f1e4db3777ae9759098c0e7757bd Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | | QHash: use the public functions to set the global hash seedThiago Macieira2017-03-161-2/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-47566 Change-Id: I4a7dc1fe14154695b968fffd14abd2e3189c6ad2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | qml runtime: don't assume http by defaultShawn Rutledge2017-03-151-1/+1
|/ / | | | | | | | | | | | | | | Avoid doing network operations unless a network-specific scheme is given. Task-number: QTBUG-57870 Change-Id: I1387603da5b8325232bef27b0ed45483a0ae30a4 Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-131-2/+2
|\| | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlimport.cpp Change-Id: I26f8d18fe8af664ee8573116f182fe12b71e089a
| * Fix building with -no-feature-processUlf Hermann2017-03-021-1/+1
| | | | | | | | | | | | | | | | Drop an unused include, don't try to build qmlplugindump in this case, and add some guards around QProcess includes and usages. Change-Id: I6ce5985a8dd1967f146016a7acd1ea31fb3bda2a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Add feature.qml-profiler with extended build dependenciesStephan Binner2017-02-241-1/+1
| | | | | | | | | | Change-Id: If165cea6f176e7a7066f50b73261baf97634a0bb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Fix support for enums and translations in list elementsSimon Hausmann2017-03-101-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQC uses valid constructs like ListElement { dayOfWeek: Locale.Sunday }, where the enums are resolved at type compilation time. Syntactically Locale.Sunday is a JS expression, but as scripts are not permitted for list elements, we must retain the values in string form when generating the binary (cache) qml representation. This is a forward port of commit 736f4f9c847d1102f6ac77674c831f0555ff445e from the qml compiler, and also matches QTRD-3226. Change-Id: I3e615f224d4ab222a50f3271735cb8f7a24f5f11 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | Fix relocation related errors when loading AOT cachesSimon Hausmann2017-03-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original directory of the source file the cache was created from - when generating ahead of time - is unlikely going to be identical to the final location for example on a deployed device. Therefore when generating caches ahead of time, don't store the source path, don't attempt to verify it when loading and don't try to save the cache file at run-time again. We still need set the sourceFileIndex at load-time though, in order to make relative path url resolution work (for example source: "my.png" in an Image element). Change-Id: I3d6952f5d0a165cfa2cb400191a9f6ffe6be69f4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix time stamp related errors when loading AOT cachesSimon Hausmann2017-03-091-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Cache files created ahead of time do not require a timestamp match towards the source file. This is because we cannot guarantee that all transport mechanism from source to deployment preserve the timestamp at the required resolution (if at all) and the source may also not be present at all (obfuscated deployment chosen). For cache files created at run-time however we'll continue to require time stamp verification. Change-Id: Ia7cdf3d063edd5bb1e6985089f1a666c970a0bd0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Simplify build system integrationSimon Hausmann2017-03-091-14/+4
| | | | | | | | | | | | | | | | Make the prf file available via COPIES for non-prefix builds and otherwise install it. Change-Id: Ie11b6653d250a4491c4f5897bc61a1efdd546d27 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix cache file generation for prefix and shadow buildsSimon Hausmann2017-03-091-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | For prefix builds generate the cache files in $$MODULE_BASE_OUTDIR/qml/ and install them from there. The use of relative paths for the qml cache extra compiler output is required because target_predeps in the extra compiler configuration will generate relative paths as dependency for the target. Task-number: QTBUG-58570 Change-Id: I6eedfd2aca1b0bdc7a230ce7521e499c6ab70ee0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix skipping of qml cache generation on unsupported architecturesSimon Hausmann2017-03-072-7/+35
| | | | | | | | | | | | | | | | Detect support for the target architecture at qmake time and gently skip the process. Change-Id: I7cc22a0cfb9a8b503c182062a56e506035f84fa2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix qmlcachegen command line parametersSimon Hausmann2017-03-071-7/+15
| | | | | | | | | | | | | | Add support for specifying the output file name Change-Id: I3ec3cecae2334a7640baa928c0739c5521496d2d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix qml cache generation for non-prefix buildsSimon Hausmann2017-03-061-4/+18
| | | | | | | | | | | | | | | | | | Generate cache files right in the target locatioa, similar to how qml_module.prf uses COPIES to copy .qml source files to the target location in non-prefix builds. Change-Id: I06f6112c29ffd212e29a84e29418d042255b5861 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-2413-9/+135
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/quick/accessible/qaccessiblequickview_p.h src/quick/items/qquickmousearea.cpp src/quick/util/qquickanimatorjob.cpp tools/qmlplugindump/main.cpp Change-Id: I84474cf39895b9b757403971d2e9196e8c9d1809
| * Do not build qmlplugindump for -no-feature-regularexpressionStephan Binner2017-02-211-1/+5
| | | | | | | | | | Change-Id: Iac046f56bbd477d4565ab138d9e236b2dce44162 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix typo in qmlplugindump error messagePeter Varga2017-01-311-1/+1
| | | | | | | | | | Change-Id: Icbe18330ae665b693047f098e219c3b665be22e9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * qmlplugindump: add -qapp optionMarco Benelli2017-01-312-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | Some modules (ie QtChart) require a QApplication instead of the QGuiApplication that qmlplugindump use by default. This option let the user specify if a QApplication is needed. Task-number: QTBUG-58264 Change-Id: I10e68d0d3eab2afad315b57fef9ce92c42e70124 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Tools: Add product name, version and description to the .pro filesFriedemann Kleint2017-01-3111-0/+99
| | | | | | | | | | | | | | | | This information will then be visible in Windows explorer. Change-Id: I9d2f936584308394b4e3246d57bed44083b3cbca Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Do not crash when qmlcachegen is called without argumentsRobert Loehning2017-02-231-1/+3
| | | | | | | | | | Change-Id: Ib91271e0ac365f69e43dfc0981c74dcfd69d6ab3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | qmlimportscanner: allow "-" as value for qmlFilesMarco Benelli2017-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | Passing "-" as an argument for -qmlFiles instructs qmlimportscanner to read the qml file from stdin. This is how qmlimportscanner is invoked by qmlplugindump. Task-number: QTBUG-58930 Change-Id: Ie43292988a31f9821887fbb704b903c03012fd3d Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | qmlplugindump: reports qmlimportscanner's messageMarco Benelli2017-02-171-0/+2
| | | | | | | | | | | | | | | | Report to the user the stderr of qmlimportscanner, if needed. Task-number: QTBUG-58930 Change-Id: Ib8ddf12cb3d18c936eb151f12991900a32175576 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | qmlplugindump: import paths clean-upMarco Benelli2017-02-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove "qrc:/qt-project.org/imports" from the paths list passed to qmlimportscanner. qmlimportscanner will error out on a path that does not exist. Since the internal qrc:/qt-project.org/imports path only exists if the plugins are compiled in statically into qmlimportscanner, we have to remove this path to stop it from erroring out. Task-number: QTBUG-58930 Change-Id: I39525f2b6ff29c02b38f5f701342026dea871701 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | Fix crash when generating cache filesSimon Hausmann2017-02-081-1/+2
| | | | | | | | | | | | | | | | | | Make sure that the allocator in bootstrap builds really just allocates memory for the generated code and otherwise doesn't try to allocate executable memory. Change-Id: Ic40724903706ae98ef272a028e7d8299400e232b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Add qmlcachegen to the default buildSimon Hausmann2017-02-081-2/+3
| | | | | | | | | | | | | | | | Ooops, forgot to do this when importing the sources. Change-Id: I1a002315a164597ccbd69b5722c7417984b0d1cf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>