diff options
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/data')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/cppbaseclass.h | 3 | ||||
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/versionmismatch.qml | 10 |
3 files changed, 15 insertions, 1 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt b/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt index ecfd26b78a..e8e0029b63 100644 --- a/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt +++ b/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt @@ -163,6 +163,7 @@ set(qml_files valueTypeLists.qml valueTypeProperty.qml variantlist.qml + versionmismatch.qml voidfunction.qml ) @@ -184,7 +185,7 @@ set_target_properties(codegen_test_module PROPERTIES ) qt6_add_qml_module(codegen_test_module - VERSION 1.0 + VERSION 1.5 URI TestTypes IMPORT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/imports/" AUTO_RESOURCE_PREFIX diff --git a/tests/auto/qml/qmlcppcodegen/data/cppbaseclass.h b/tests/auto/qml/qmlcppcodegen/data/cppbaseclass.h index 416a61defc..eecc3d968e 100644 --- a/tests/auto/qml/qmlcppcodegen/data/cppbaseclass.h +++ b/tests/auto/qml/qmlcppcodegen/data/cppbaseclass.h @@ -15,6 +15,8 @@ class CppBaseClass : public QObject Q_PROPERTY(int cppProp2 MEMBER cppProp2 BINDABLE cppProp2Bindable FINAL) Q_PROPERTY(QList<int> boo MEMBER boo FINAL CONSTANT) Q_PROPERTY(QList<qreal> hoo MEMBER hoo FINAL CONSTANT) + Q_PROPERTY(int inaccessible READ inaccessible FINAL CONSTANT REVISION(1, 5)) + QML_ADDED_IN_VERSION(1, 0) QML_ELEMENT public: CppBaseClass(QObject *parent = nullptr) @@ -35,6 +37,7 @@ public: Q_INVOKABLE void doCall(QObject *foo); + int inaccessible() const { return 7; } private: QList<int> boo; QList<qreal> hoo; diff --git a/tests/auto/qml/qmlcppcodegen/data/versionmismatch.qml b/tests/auto/qml/qmlcppcodegen/data/versionmismatch.qml new file mode 100644 index 0000000000..2fa163c047 --- /dev/null +++ b/tests/auto/qml/qmlcppcodegen/data/versionmismatch.qml @@ -0,0 +1,10 @@ +import QtQml +import TestTypes 1.0 + +QtObject { + property int inaccessible: 4 + property CppBaseClass a: CppBaseClass { + property int b: inaccessible + 1 + } + property int c: a.b +} |
