aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/MySingleton.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/MySingleton.qml')
-rw-r--r--tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/MySingleton.qml16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/MySingleton.qml b/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/MySingleton.qml
new file mode 100644
index 0000000000..9789be8191
--- /dev/null
+++ b/tests/auto/qml/qqmlmoduleplugin/moduleWithQmlSingleton/MySingleton.qml
@@ -0,0 +1,16 @@
+pragma Singleton
+import QtQuick 2.0
+
+QtObject {
+ property Loader _loader: Loader {
+ source: "internal/InternalType.qml"
+ }
+
+ Component.onCompleted: {
+ if (tracker.objectName === "first")
+ tracker.objectName = "second"
+ else
+ tracker.objectName = "first"
+ //console.log("created singleton", this)
+ }
+}