aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qmldirparser
Commit message (Collapse)AuthorAgeFilesLines
* QQmlDirParser: Drop unneeded includeUlf Hermann2020-11-181-1/+0
| | | | | Change-Id: Iba9f99f0fcdb7692ceadaec223d82e425f1e424b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Allow optional imports in qmldir filesUlf Hermann2020-10-082-51/+71
| | | | | | | | | | 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>
* QQmlDirParser: Return typeinfos as string listUlf Hermann2020-10-062-15/+4
| | | | | | | ... and notice that we don't use them so far. Change-Id: Id57c5a45307fb8425207635b266b81a942b7651c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlDirParser: Treat dependencies like importsUlf Hermann2020-09-252-24/+15
| | | | | | | In particular, allow auto and latest versions. Change-Id: I4a6b26112950d066ae2d8a37dc0e9fa1dec24724 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlimportscanner: Use QmlDirParserUlf Hermann2020-07-082-6/+6
| | | | | | | | | | | | | | 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>
* Discern between "auto" and versioned imports in qmldirsUlf Hermann2020-06-242-6/+34
| | | | | | | | | | | | | 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>
* Port QtDeclarative from QStringRef to QStringViewKarsten Heimrich2020-06-163-7/+7
| | | | | | | | 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>
* Deduplicate the import resolution algorithmUlf Hermann2020-06-103-2/+191
| | | | | | | We will need it in various other places, too. Change-Id: I61c55f88b66ab85448ae8fff125fe34108532fc4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Allow QML plugins to be optionalUlf Hermann2020-06-092-4/+22
| | | | | | | | | | | 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>
* Remove QT_CREATOR special casesUlf Hermann2020-04-011-3/+0
| | | | | | | | Always parse typeinfo entries from qmldir files, and export QQmlJS the Qt way. Change-Id: I3a87a8d0a9ed1014628df6eb906bde5ea23e5d9f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* 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>
* | Use QTypeRevision for all versions and revisionsUlf Hermann2020-02-032-31/+32
|/ | | | | | | | | | | | | | 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>
* QQmlDirParser: Use QMultiHash when it was intendedMårten Nordheim2019-12-102-9/+9
| | | | | | Change-Id: Icc143badb492ce042149b561516d73ca7d5dcd52 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-262-7/+15
|\ | | | | | | | | | | | | | | Conflicts: src/qml/qmldirparser/qqmldirparser.cpp src/qml/qmldirparser/qqmldirparser_p.h Change-Id: Ia68a8d4f345e6e456eebc3f215fc90d3819ddd70
| * QQmlDirParser: Fix lifecycle managementUlf Hermann2019-11-232-16/+13
| | | | | | | | | | | | | | | | | | Remove pointless ctor and dtor, provide a clear() method that actually clears everything, call that explicitly where needed. Task-number: QTBUG-30467 Change-Id: I67c632af3a7a76d1d1a706a5ab6d1c446240405c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-11-221-1/+1
|\| | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlextensionplugin.cpp tests/auto/quick/qquicktableview/tst_qquicktableview.cpp Change-Id: Ic58d36a8532015bae30f2690063db9829b3bf372
| * Fix warning about non-relative paths in qmldir filesSimon Hausmann2019-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Permit the use of resource urls in qmldir files to allow for the use-case of a plugin including its .qml files in resources and optionally compiling them ahead of time. When the resources are bundled in the plugin, qmlplugindump might or might not work. Task-number: QTBUG-48809 Change-Id: Icb331c7575f26316b5c2bcc604b9c6d793977a9f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Modernize QQmlDirParser a bitUlf Hermann2019-09-172-19/+8
|/ | | | | | | In particular, use the default ctos and assignment operators. Change-Id: Ia43302953c049963a21bad5c6d58f17c5984556b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add support for implicit module importsSimon Hausmann2019-07-172-0/+14
| | | | | | | | | | | | This allows a module to make another module import with the same minor version and in the same qualified namespace. This will be used to make import QtQuick 2.5 implicitly import QtQml 2.5, to maintain compatibility. It used to be implemented by means of calling C++ type registration functions directly. Change-Id: I64c7bfe25d75b9a45f5d44a10d035fc2f86d30ca Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Split compiler and runtime more clearlyUlf Hermann2019-07-111-2/+2
| | | | | | | | Provide different export macros and different top level headers for each, don't include runtime headers from compiler sources. Change-Id: I7dc3f8c95839a00a871ba045ec65af87123154be Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Simplify errors and diagnosticsUlf Hermann2019-06-146-552/+13
| | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-261-3/+21
| | | | Change-Id: I208cd36d2b7add94f36e4d86cf0c790a1e4a7e86
* Make QQmlDirParser and QQmlError available in QmlDevToolsUlf Hermann2018-10-256-0/+1101
We will need them for the QML language server. Also, always build all of QQmlDirParser. The QT_CREATOR condition is mostly useless. Change-Id: I476864b55f6ff3953c11e7887525a043a9405e00 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>