aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/SingletonLookupTest.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/SingletonLookupTest.qml')
-rw-r--r--tests/auto/qml/qqmlecmascript/data/SingletonLookupTest.qml14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/SingletonLookupTest.qml b/tests/auto/qml/qqmlecmascript/data/SingletonLookupTest.qml
new file mode 100644
index 0000000000..3166ab647d
--- /dev/null
+++ b/tests/auto/qml/qqmlecmascript/data/SingletonLookupTest.qml
@@ -0,0 +1,14 @@
+import QtQml 2.0
+import Test.Singletons 1.0
+
+QtObject {
+ property Component singletonAccessor : Component {
+ QtObject {
+ property var singletonHolder;
+ property int result: singletonHolder.testVar
+ }
+ }
+
+ property int firstLookup: singletonAccessor.createObject(this, { singletonHolder: CppSingleton1 }).result;
+ property int secondLookup: singletonAccessor.createObject(this, { singletonHolder: CppSingleton2 }).result;
+}