diff options
author | Thomas McGuire <thomas.mcguire@kdab.com> | 2016-02-17 15:45:46 +0100 |
---|---|---|
committer | Thomas McGuire <thomas.mcguire@kdab.com> | 2016-02-24 12:11:27 +0000 |
commit | 029003851b5f9f5062385884d5591c46c4ebb1d2 (patch) | |
tree | 3cd6635c80222ca4d4e40b215876dfe0e4986c34 /tests/auto/qml/qqmllanguage/testtypes.h | |
parent | 90e9b622f01465666f4ae3f88d1710a36bb2ed1f (diff) |
Properly signal errors when accessing lowercase enum values
Task-number: QTBUG-46758
Change-Id: I14e394021c231bda5552c8d1c98f20c903a62f12
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/testtypes.h')
-rw-r--r-- | tests/auto/qml/qqmllanguage/testtypes.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmllanguage/testtypes.h b/tests/auto/qml/qqmllanguage/testtypes.h index c64fda5ea1..c6c956cf36 100644 --- a/tests/auto/qml/qqmllanguage/testtypes.h +++ b/tests/auto/qml/qqmllanguage/testtypes.h @@ -297,7 +297,7 @@ public: emit flagPropertyChanged(); } - enum MyEnum { EnumVal1, EnumVal2 }; + enum MyEnum { EnumVal1, EnumVal2, lowercaseEnumVal }; MyEnum enumPropertyValue; MyEnum enumProperty() const { return enumPropertyValue; @@ -597,6 +597,12 @@ signals: }; Q_DECLARE_OPERATORS_FOR_FLAGS(MyTypeObject::MyFlags) +// FIXME: If no subclass is used for the singleton registration with qmlRegisterSingletonType(), +// the valueTypes() test will fail. +class MyTypeObjectSingleton : public MyTypeObject +{ + Q_OBJECT +}; class MyContainer : public QObject { |