aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/importedScriptsAccessOnObjectWithInvalidContext.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/importedScriptsAccessOnObjectWithInvalidContext.qml')
-rw-r--r--tests/auto/qml/qqmlecmascript/data/importedScriptsAccessOnObjectWithInvalidContext.qml42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/importedScriptsAccessOnObjectWithInvalidContext.qml b/tests/auto/qml/qqmlecmascript/data/importedScriptsAccessOnObjectWithInvalidContext.qml
new file mode 100644
index 0000000000..74310c6d6b
--- /dev/null
+++ b/tests/auto/qml/qqmlecmascript/data/importedScriptsAccessOnObjectWithInvalidContext.qml
@@ -0,0 +1,42 @@
+import QtQuick 2.0
+
+import "Types.js" as Types
+
+Rectangle {
+ id: root
+ property bool success: false
+
+ color: "white"
+ height: 100
+ width: 100
+
+ signal modelChanged
+
+ Timer {
+ id: timer
+ interval: 100
+ onTriggered: {
+ root.modelChanged();
+ root.success = true;
+ }
+ }
+
+ Loader{
+ id: weekPage
+ sourceComponent: Component {
+ Item{
+ function createAllDayEvents() {
+ if (3 == Types.Foo) {
+ console.log("Hello")
+ }
+ }
+ }
+ }
+ onLoaded: root.modelChanged.connect(item.createAllDayEvents);
+ }
+
+ Component.onCompleted: {
+ weekPage.sourceComponent = null
+ timer.running = true
+ }
+}