aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlcomponent/data
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-06-21 16:10:43 +0200
committerLars Knoll <lars.knoll@digia.com>2013-06-21 19:55:14 +0200
commitf847e4588fa67e63623c8e824aa53de6e54dcf04 (patch)
tree7506bbd21b02e6f450d5cf810fdde554b6f2db17 /tests/auto/qml/qqmlcomponent/data
parent4fc0a4fa75c57c3d345e97931e46aca628d6cedb (diff)
Fix tst_qqmlcomponent::onDestructionLookup
Don't rely on the JIT generated code to immediately discard and ignore the return value of createObject(). Instead move that call into another function that, so that the return value of createObject() is guaranteed to be invisible to the GC and thus collect the recently created object as expected. Change-Id: I08a0a35fc895482792deffbae7f7f6437727d871 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmlcomponent/data')
-rw-r--r--tests/auto/qml/qqmlcomponent/data/onDestructionLookup.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlcomponent/data/onDestructionLookup.qml b/tests/auto/qml/qqmlcomponent/data/onDestructionLookup.qml
index a49a86e1f3..a62d81c844 100644
--- a/tests/auto/qml/qqmlcomponent/data/onDestructionLookup.qml
+++ b/tests/auto/qml/qqmlcomponent/data/onDestructionLookup.qml
@@ -18,8 +18,13 @@ Item {
}
}
+ function createObject()
+ {
+ internalComponent.createObject();
+ }
+
Component.onCompleted: {
- internalComponent.createObject()
+ createObject()
gc()
}
}