From 1e712c95cee58ae242a93c029a7f79cf65b43882 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 30 Sep 2022 09:23:20 +0200 Subject: 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 Reviewed-by: Fabian Kosmale --- tests/auto/qml/qmlcppcodegen/data/cppbaseclass.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/auto/qml/qmlcppcodegen/data/cppbaseclass.h') 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 boo MEMBER boo FINAL CONSTANT) Q_PROPERTY(QList 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 boo; QList hoo; -- cgit v1.2.3