diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-01-24 14:26:57 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-01-25 18:08:36 +0100 |
commit | bb8a8872e341f64a87e09bef64d33a753273102c (patch) | |
tree | 61668e42d76c597176e9c2c455e4e69975da1174 /tests/auto/qml/qmltyperegistrar | |
parent | b59bc4fe935245029a96d09a7dd55b53968fcc32 (diff) |
qmltyperegistrar: Use base of the current major version by default
We had accidentally changed it to always export the tip of the current
major version by default.
Amends commit aba13583ac1e42ca1a8b0c0a0fac9e0ec3d72460.
Pick-to: 6.5
Change-Id: I2ab7da1136cf05041f663a14e1c67383974767b0
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'tests/auto/qml/qmltyperegistrar')
-rw-r--r-- | tests/auto/qml/qmltyperegistrar/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp | 7 | ||||
-rw-r--r-- | tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/qml/qmltyperegistrar/CMakeLists.txt b/tests/auto/qml/qmltyperegistrar/CMakeLists.txt index a7bd600315..b570a6e6db 100644 --- a/tests/auto/qml/qmltyperegistrar/CMakeLists.txt +++ b/tests/auto/qml/qmltyperegistrar/CMakeLists.txt @@ -61,7 +61,7 @@ qt_internal_extend_target(tst_qmltyperegistrar CONDITION TARGET Qt::Quick # Simulate conditions that qt6_add_qml_module() would normally set up for us set_target_properties(tst_qmltyperegistrar PROPERTIES - QT_QML_MODULE_VERSION 1.0 + QT_QML_MODULE_VERSION 1.1 QT_QML_MODULE_PAST_MAJOR_VERSIONS 0 QT_QML_MODULE_URI QmlTypeRegistrarTest QT_QML_MODULE_TYPEINFO tst_qmltyperegistrar.qmltypes diff --git a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp index f1776b0cc6..a0f9a92b5c 100644 --- a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp +++ b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp @@ -537,4 +537,11 @@ void tst_qmltyperegistrar::uncreatable() qmlRegisterTypesAndRevisions<GoodUncreatableExtended>("A", 1); } +void tst_qmltyperegistrar::baseVersionInQmltypes() +{ + // Since it has no QML_ADDED_IN_VERSION, WithMethod was added in .0 of the current version. + // The current version is 1.1, so it's 1.0. + QVERIFY(qmltypesData.contains("exports: [\"QmlTypeRegistrarTest/WithMethod 1.0\"]")); +} + QTEST_MAIN(tst_qmltyperegistrar) diff --git a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h index 969bb73f2b..44dac36fbe 100644 --- a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h +++ b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h @@ -548,6 +548,7 @@ private slots: void resettableProperty(); void duplicateExportWarnings(); void clonedSignal(); + void baseVersionInQmltypes(); private: QByteArray qmltypesData; |