diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-02-12 17:49:31 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-02-25 09:58:56 +0100 |
commit | 11ff5c314682258b6eb26e90847210662eb0f533 (patch) | |
tree | 4b0b2f6bed8f25423bec5a64a1458207822662b5 /tests/auto/qml/qqmllanguage/qqmllanguage.pro | |
parent | 94901065ddd0c0c65e0db7c2151c0eb9eb3f64c5 (diff) |
Provide a way to statically register namespaces
Previously, qmltyperegistrar would stumble over any QML_* macros in
namespaces, as the namespaces could not be used as template arguments.
However, namespaces are intended to be usable by QML as uncreatable
"types".
Now, qmltyperegistrar checks the namespace flag that moc records in the
JSON output, and if that is given, registers an uncreatable metaobject
instead of a type. Therefore you can use QML_ELEMENT and friends to
register namespaces, just like you would register classes (except that
they're implicitly uncreatable, of course).
Task-number: QTBUG-68796
Change-Id: I186d7e9425471c32fb1a1f29c0c0b946afb2a9d2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/qqmllanguage.pro')
-rw-r--r-- | tests/auto/qml/qqmllanguage/qqmllanguage.pro | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmllanguage/qqmllanguage.pro b/tests/auto/qml/qqmllanguage/qqmllanguage.pro index 724a27320c..6c54525544 100644 --- a/tests/auto/qml/qqmllanguage/qqmllanguage.pro +++ b/tests/auto/qml/qqmllanguage/qqmllanguage.pro @@ -1,4 +1,7 @@ -CONFIG += testcase +CONFIG += testcase qmltypes +QML_IMPORT_NAME = StaticTest +QML_IMPORT_VERSION = 1.0 + TARGET = tst_qqmllanguage macx:CONFIG -= app_bundle |