aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/testtypes.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2012-03-15 11:58:58 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-21 01:10:41 +0100
commit37cd29b2ff024f27f84ef6214ff5403603d522f2 (patch)
tree88dd0d32f024195ed068dd87663e3b07bb6d798b /tests/auto/qml/qqmllanguage/testtypes.cpp
parentfd8028514550da7594736a10f1d20bab1576bcfd (diff)
Support (registered) non-local enums for signal/slot params in QML.
It's now possible to detect whether a registered type is an enum, allowing registered non-local enums to be used as parameters in signals and slots from QML/C++. Author: Glenn Watson <glenn.watson@nokia.com> Task-number: QTBUG-20639 Change-Id: I8c439f2dcc7bfd8ec31914b0c86cd3a1de3c038c Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/testtypes.cpp')
-rw-r--r--tests/auto/qml/qqmllanguage/testtypes.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmllanguage/testtypes.cpp b/tests/auto/qml/qqmllanguage/testtypes.cpp
index 3c7a7c2058..5e9423761c 100644
--- a/tests/auto/qml/qqmllanguage/testtypes.cpp
+++ b/tests/auto/qml/qqmllanguage/testtypes.cpp
@@ -77,6 +77,10 @@ void registerTypes()
qmlRegisterType<MyVersion2Class>("Test.VersionOrder", 2,0, "MyQmlObject");
qmlRegisterType<MyQmlObject>("Test.VersionOrder", 1,0, "MyQmlObject");
+
+ qmlRegisterType<MyEnum1Class>("Test",1,0,"MyEnum1Class");
+ qmlRegisterType<MyEnum2Class>("Test",1,0,"MyEnum2Class");
+ qmlRegisterType<MyEnumDerivedClass>("Test",1,0,"MyEnumDerivedClass");
}
QVariant myCustomVariantTypeConverter(const QString &data)
@@ -85,4 +89,3 @@ QVariant myCustomVariantTypeConverter(const QString &data)
rv.a = data.toInt();
return QVariant::fromValue(rv);
}
-