summaryrefslogtreecommitdiff
path: root/tests/auto/qml/qmlcppcodegen/data/cppbaseclass.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-09-30 09:23:20 +0200
committerUlf Hermann <ulf.hermann@qt.io>2022-10-06 20:37:53 +0200
commit1e712c95cee58ae242a93c029a7f79cf65b43882 (patch)
tree0a96614a2b62b75340628e02d7c282cf27647f67 /tests/auto/qml/qmlcppcodegen/data/cppbaseclass.h
parentb515099d4d7d90385a0258893ec949d4fba84b29 (diff)
downloadqtdeclarative-1e712c95cee58ae242a93c029a7f79cf65b43882.tar.gz
QmlCompiler: Do not crash on version-mismatched property access
If we cannot access a property due to a version mismatch, that's not an unqualified access. Pick-to: 6.4 Fixes: QTBUG-107080 Change-Id: I1780b171928df437a2121601f1aac829dbe1e994 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/data/cppbaseclass.h')
-rw-r--r--tests/auto/qml/qmlcppcodegen/data/cppbaseclass.h3
1 files changed, 3 insertions, 0 deletions
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;