aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlimportscanner/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Port from container::count() and length() to size() - V5Marc Mutz2022-10-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); except that on() was replaced with a matcher that doesn't ignoreParens(). a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'. Change-Id: I58e1b41b91c34d2e860dbb5847b3752edbfc6fc9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-1/+1
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I601bf70f020f511019ed28731ba53b14b765dbf0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Port from container::count() and length() to size()Marc Mutz2022-10-071-11/+11
| | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)); makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container', with the extended set of container classes recognized. Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlimportscanner: Don't crash on invalid argumentUlf Hermann2022-08-291-1/+5
| | | | | | | | | | | | | Apparently you can pass one "root path" as a bare argument, but you have to specify "-rootPath" if you want to pass more than one. The whole concept of a "root path" is wrong. Therefore let's not add more ways to specify root paths. It should not crash, though. Pick-to: 6.4 Fixes: QTBUG-104928 Change-Id: Ie8a10ac7208f927fdb1fed0f87c088739b41c983 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-111-27/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* qmlimportscanner: Improve performance using caches continuedAlexandru Croitor2022-06-041-62/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cache module details (plugin path, components, etc) for each processed module. Cache recursive dependency module details for each processed module. Skip self dependencies. Discard duplicates when merging module details. Use a custom hasher object to store QVariantMaps in std::unordered_set / std::unordered_map because QVariant does not provide a qHash overload. With the improvements above, for a project that has 100 qml files, each importing QtQuick.Controls and QtQuick as many times as the file index (file 100 imports QtQuick and Controls 100 times), the execution time is reduced ~7x times. Before 1.52s user 0.22s system 99% cpu 1.741 total After 0.22s user 0.03s system 97% cpu 0.248 total For the examples/quickcontrols2/gallery project, the stats are Before 0.81s user 0.13s system 96% cpu 0.968 total debug After 0.17s user 0.03s system 75% cpu 0.266 total debug Before 0.15s user 0.09s system 95% cpu 0.251 total release After 0.05s user 0.03s system 54% cpu 0.138 total release That's a ~5x improvement for a debug build of qmlimportscanner and a ~3x improvement for a release build of qmlimportscanner. Benched on a 16" Intel macbook pro 2019 with a USB SSD. Pick-to: 6.2 6.3 Fixes: QTBUG-103187 Change-Id: I730d762ff99b52918568fdf119eb68201a7d6c4a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* qmlimportscanner: Improve performance using cachesAlexandru Croitor2022-06-041-18/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add caching for import statements found while scanning .qml/.js files. This covers the import statements parsed from the .qml/.js file AST, and does not include recursive dependencies. By caching these we avoid repeated file system access and parsing. Add caching of qmldir files. Same idea. When processing a qmldir's contents, we collect the imports and dependencies into a single dependency list. Also, for each component and script, we parse their contents to see which modules they import. These are also added to the same list. Make sure to remove duplicates in that list. This contributes substantially to the performance improvement, because the list of dependencies for e.g. the QtQuick.Controls module goes down from ~400 to ~30. With the improvements above, for a project that has 100 qml files each importing just QtQuick and QtQuick.Controls, the execution time is reduced ~40x times. Before 39.26s user 3.14s system 100% cpu 42.386 total debug After 0.94s user 0.17s system 99% cpu 1.113 total debug For the examples/quickcontrols2/gallery project, the stats are Before 36.56s user 3.03s system 99% cpu 39.639 total debug After 0.81s user 0.13s system 96% cpu 0.968 total debug Before 7.14s user 2.14s system 99% cpu 9.29 total release After 0.15s user 0.09s system 95% cpu 0.251 total release That's a ~45x time improvement for both debug and release builds of qmlimportscanner. Benched on a 16" Intel macbook pro 2019 with a USB SSD. Pick-to: 6.2 6.3 Task-number: QTBUG-103187 Change-Id: I6593ab4ef3ccc146dca4ed134eeee46e3b3581f9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmlimportscanner: Add logging to help with debugging performanceAlexandru Croitor2022-06-041-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | Add two new logging categories: qt.qml.import.scanner qt.qml.import.scanner.files The first one logs how many files are scanned, which files are scanned timestamps for operations done on each file, durations for the operations that we expect to take longer. The second category logs each qml file that is processed recursively (so not only the input files). Because the output is quite verbose, it's a separate category rather than being part of the first one. This is useful to identify performance bottlenecks in projects, without having to profile the executable. Pick-to: 6.2 6.3 Task-number: QTBUG-103187 Change-Id: I09506b488dda594b371d229e5fd535a534fe9515 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* qmlimportscanner: Ensure deterministic outputAlexandru Croitor2022-06-041-2/+9
| | | | | | | | | | | | | | QQmlDirParser::components and other methods return QMultiHash types which don't have a predefined order. Use QHashSeed::setDeterministicGlobalSeed() to always use the same order for QHash keys. Also sort the components and scripts for each module. Pick-to: 6.2 6.3 Task-number: QTBUG-103187 Change-Id: Iff7c1cd14a723a5aff7c8772a2b94b110fb6ca44 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Replace uses of deprecated _qs with _s/QStringLiteralSona Kurazyan2022-04-291-2/+4
| | | | | | Task-number: QTBUG-101408 Change-Id: Ic925751b73f52d8fa5add5cacc52d6dd6ea2dc27 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Make formerly transitive includes explicitFabian Kosmale2022-02-151-0/+1
| | | | | Change-Id: Ib10fc05dead6fcba222b9ef4cabcb92491bbdac3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qml{plugindump|importscanner}: Don't mix std::cerr and std::wcerrUlf Hermann2022-01-061-3/+3
| | | | | | | | | | | Apparently that causes output to be suppressed. Pick-to: 6.3 6.2 5.15 Fixes: QTBUG-99400 Change-Id: I4ac6a66a10c7d2c27dfc1efa6d52afa60bdc58d6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add prefer record to the output of qmlimportscannerAlexey Edelev2021-12-171-1/+9
| | | | | | | Pick-to: 6.3 Task-number: QTBUG-95984 Change-Id: I2e126db655ef986b23d66a465e8b28b9fb17bbb1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add listing of the components and scripts that belongs to the qml moduleAlexey Edelev2021-12-171-4/+38
| | | | | | | | | | Add qml components and scripts to the qmlimportscanner output to give information about files that actually belong to the qml module. Pick-to: 6.3 Task-number: QTBUG-97834 Change-Id: I41394ba6fe9d9fe3af74786b4a802903849ae27d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add CMake deploy support for QML module appsCraig Scott2021-12-131-1/+21
| | | | | | | Task-number: QTBUG-98545 Pick-to: 6.3 Change-Id: I2d04ccbae0288c88ada399552e8f9c20e221b21d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qmlimportscanner: Prefer directories with qmldirFabian Kosmale2021-11-041-5/+19
| | | | | | | | | | | | | With the new CMake module API, we often have both the source and the binary dir as an import path, with the qmldir only being available in the binary directory. For deployment to work correctly, we need to pick up the qmldir. Thus, when finding a module both with and without a qmldir in different paths, prefer the version with the qmldir. Pick-to: 6.2 Change-Id: I12efeae321da60b1b5ffe5c6d950ba486887ceb1 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove obsolete bootstrap codeFabian Kosmale2021-09-301-4/+0
| | | | | Change-Id: Ifcbf81b5ee04753af916dc1ef1177617785c961d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Allow QML plugin's CMake target name to be specified for qmldir fileCraig Scott2021-08-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | The current code assumes that the basename of the QML plugin is the same as the CMake target it corresponds to. This won't be the case for installed Qt packages due to the installed name including a namespace. It also won't match when a Qt library infix is used. The current code works around the former by trying to heuristically work out whether a namespaced Qt target exists for the plugin. The Qt library infix is more problematic because the plugin target name won't include the infix whereas the plugin library basename will. Address both of those issues by adding an internal option INSTALLED_PLUGIN_TARGET to qt6_add_qml_module() which allows the installed target name to be provided. When included in a qmldir file, qt6_import_qml_plugin() will use that name, otherwise it will fall back to using the plugin library's basename, as per the current behavior. The option may become public in the future, but for now it is only for Qt's internal use for the 6.2 release. Fixes: QTBUG-95140 Pick-to: 6.2 Change-Id: I5a057c80b70ee802c0f0840e9eea2e579193d126 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>
* qmlimportscanner: Remove superfluous QV4 includesFabian Kosmale2021-06-031-3/+0
| | | | | Change-Id: I6ea8dd969c9550e34bbf47ec1291c554f3aee79b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Extend qmlimportscanner to support response files on the command lineCraig Scott2021-05-071-1/+32
| | | | | | | | | | | | | | This is preparation for being able to list individual qml files on the command line instead of requiring them to be in a .qrc file. To avoid running into line length issues when there are a lot of files, allow response files to be used to store arguments instead. Use the common tool convention of a leading "@" before the name of the response file. Change-Id: Id91daf08a6022033a448e9ed98085df8b246a849 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* qmlimportscanner: Mark plugins as optionalMaximilian Goldstein2021-03-121-1/+18
| | | | | | | | | | qmlimportscanner will now relay information about whether or not a plugin is optional. Tooling will need to be adapted to take advantage of this. Fixes: QTBUG-91087 Change-Id: I3f4097ce797c02d9018f98f4e57453179e4f8fec Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rework QQmlJSResourceFileMapperUlf Hermann2021-02-241-2/+4
| | | | | | | | | | 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>
* Use QLibraryInfo::QmlImportsPath rather than Qml2ImportsPathUlf Hermann2021-02-091-1/+1
| | | | | | | | | The "2" is meaningless and there is a better name available now. Task-number: QTBUG-85064 Change-Id: I65d26b06712ed7dcf2825f16dffaa6060dd86985 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Find qml imports inside subdirectories of symlinksJeroen Oomkes2020-11-301-1/+1
| | | | | | | | | | Added QDirIterator::FollowSymlinks flag in function findQmlImportsInDirectory. This is to find qml imports in subdirectories of symlinks. Reason is that qwindeployqt does not scan imports inside directories following symlinks and therefore might skip dependencies that are needed for the application. And this is caused by the qmlimportscanner. [ChangeLog][tools][qmlimportscanner] Follow sybmolic links in findQmlImportsInDirectory Change-Id: I9739164e50cf48ec9e67f63a110e99da83facc2c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Allow optional imports in qmldir filesUlf Hermann2020-10-081-1/+1
| | | | | | | | | | This is useful for modules that select their imports at runtime using qmlRegisterModuleImport(). We can list all possible variants as optional imports so that tools can see what types might be available. Task-number: QTBUG-87130 Change-Id: I8a37bdde79aef3619fd1f05e5ea6781d521afa88 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Rename ResourceFileMapperUlf Hermann2020-10-051-2/+2
| | | | | | | 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-051-2/+1
| | | | | | | | 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>
* QQmlDirParser: Treat dependencies like importsUlf Hermann2020-09-251-1/+1
| | | | | | | In particular, allow auto and latest versions. Change-Id: I4a6b26112950d066ae2d8a37dc0e9fa1dec24724 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlimportscanner: don't include QtQuick.Controls.xxx.impl as depdendencyAssam Boudjelthia2020-09-171-0/+4
| | | | | | | | | | | Since Qt 5 series include those modules QtQuick.Controls.xxx.Impl inside QtQuick.Controls.xxx, we shouldn't add them to the dependencies list. This also will silence androiddeployqt warning about invalid path for these modules. Pick-to: 5.15 Change-Id: Ic8c8aa1248b170ab1d455484effb38d24a1b4d35 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix additional warnings from usage of deprecated APIsVolker Hilsheimer2020-09-161-1/+1
| | | | | | | | Replace QLibaryInfo::location with QLibraryInfo::path, and remove usage of Qt::AA_EnableHighDpiScaling, which doesn't have any effect anymore. Change-Id: I347e8a83e0f4c2b4405f2512e569ad3234f05a98 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix a bunch of compiler warningsLars Knoll2020-08-281-4/+4
| | | | | | Taks-number: QTBUG-86234 Change-Id: I4c945edecdbe55bc5587c18599d49dfb82ade1eb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlimportscanner: Use QmlDirParserUlf Hermann2020-07-081-67/+95
| | | | | | | | | | | | | | This gives us a reliable way to parse imports and versions. Apparently we can also have multiple classname entries in the same qmldir file. Reflect that in the parser. Also, drop the version field from the output. Nobody uses it and maintaining it while allowing partial, missing and auto versions would be rather difficult. Fixes: QTBUG-85304 Change-Id: Iab89a6d505a3c58174e623f02f0418899cb5fa2f 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>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-091-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-03-021-1/+1
| | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step cloaser to that goal. Change-Id: I3214ad6ccaca9dfd4a026589cabeb40cbf4a6298 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Restore offset/length in QQmlJS::DiagnosticMessageSimon Hausmann2020-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Use QTypeRevision for all versions and revisionsUlf Hermann2020-02-031-1/+5
|/ | | | | | | | | | | | | | 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>
* Replace QVariant::type with QVariant::userTypeOlivier Goffart2020-01-171-1/+1
| | | | | | | | | | | as type is going to be deprecated. This change was done automatically with the help of clazy. In addition, ColumnRoleMetadata was changed to take an int instead of a QVariant::Type Change-Id: Ibc02d7b52e7d931a56c19fdebc4788b5e6df2a39 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add support for scanning qrc files in qmlimportscannerAndy Shaw2019-10-241-1/+10
| | | | | | | | | | | 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>
* CMake: Provide API to allow handling of QML static pluginsAlexandru Croitor2019-08-171-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a new -cmake-output command line argument to qmlimportscanner which outputs its result in a format which is consumable by CMake. This change also adds a new CMake package called Qt5QmlImportScanner. It provides a function called QT5_IMPORT_QML_PLUGINS() which is useful for projects that use a static build of Qt and which also use QML plugins. Calling it with the target name of your application does the following: - Runs qmlimportscanner at configure time to find out which QML / QtQuick plugins are used by your project - Links the imported QML plugins into the target - Links the static dependencies of the QML plugins into the target - Generates a .cpp file that initializes imported QML plugins, which is subsequently compiled and linked into the given target When Qt is built in a shared library config, the introduced function is a no-op. [ChangeLog][CMake] Added ability to import static qml plugins with CMake builds using the new QT5_IMPORT_QML_PLUGINS function. Task-number: QTBUG-38913 Change-Id: Ib9b9a69654eab13dfbe12d10f5cb28ba3c307d1b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* extend grammar for better version parsing supportFabian Kosmale2019-07-041-3/+4
| | | | | | | | | | | | | | | | | | Be more strict in parsing version numbers This also makes it easier to access the version number in other places using the Visitor interface, like (soon) the linter and avoids reparsing the text twice. Potential disadvantages: previously allowed import statements will rejected at parse time, e.g. import QtQuick 0b10 Potential further advantage: Weird import statements like import QtQuick 0b10 will be rejected earlier Change-Id: Ifcd187b79a90952bc964c688afa4ea9b158e5109 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Simplify errors and diagnosticsUlf Hermann2019-06-141-1/+2
| | | | | | | | | | | | | | | | We only need two classes to describe all possible diagnostics: * A low-level private POD DiagnosticMessage. This is easily copied and passed around internally. It doesn't need to adhere to a stable API and it doesn't carry any extra baggage. * The high-level public QQmlError with its stable interface. This can internally also use a DiagnosticMessage as storage. Change-Id: I52be88d9b5d9855a661b8032b01eedb43a0fb0b3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Split QV4::Value into a static and a dynamic partUlf Hermann2019-05-311-1/+1
| | | | | | | | The static part can be used for compilation and won't resolve managed objects. This allows us to remove all the remaining V4_BOOTSTRAP. Change-Id: Id2f6feb64c48beb2a407697881aea8c0d791a532 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* qmlimportscanner: Fix commentsKai Koehne2019-03-211-11/+10
| | | | | Change-Id: I435662abafbe7b76fed7b012bfed2f99aa7158a3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmlimportscanner: add some literal strings definitionsMarco Benelli2018-07-121-9/+12
| | | | | Change-Id: Ie65e7541b5a189867b27471b83e52dc2e4416183 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Use anonymous namespace instead of static declarationsMarco Benelli2018-07-121-11/+15
| | | | | Change-Id: Iced889303616fdae0074149a3f10572425275085 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-1/+1
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-09-201-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4compileddata.cpp src/qml/compiler/qv4compileddata_p.h src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4qmlcontext.cpp src/qml/jsruntime/qv4qmlcontext_p.h src/qml/jsruntime/qv4regexpobject.cpp src/qml/jsruntime/qv4regexpobject_p.h src/qml/types/qqmllistmodel.cpp src/quick/items/qquickanimatedimage_p.h src/quick/scenegraph/qsgrenderloop.cpp tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp Change-Id: If20ef62b2c98bdf656cb2f5d27b1897b754d3dc0
| * 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>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-051-2/+2
|\| | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickwindow.cpp src/quick/scenegraph/qsgrenderloop.cpp Change-Id: Idd7106995b5545fcac869e9056a365ef9edb36ca