1
commit 249b1a73fdb01fc27e036fc4334925674c281793
2
Author: Albert Astals Cid <albert.astals@canonical.com>
3
Date: Mon Jun 30 17:22:55 2014 +0200
5
Pass down parent to subCreator
7
Otherwise the object might get garbage collected while it's being created
9
Change-Id: I553c3432d5242bcd89723b72d8f8ae82577abaf9
10
Task-number: QTBUG-39966
12
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
13
index 36c7dfb..cceb9b2 100644
14
--- a/src/qml/qml/qqmlobjectcreator.cpp
15
+++ b/src/qml/qml/qqmlobjectcreator.cpp
16
@@ -1076,7 +1076,7 @@ QObject *QQmlObjectCreator::createInstance(int index, QObject *parent, bool isCo
19
QQmlObjectCreator subCreator(context, typeRef->component, sharedState.data());
20
- instance = subCreator.create();
21
+ instance = subCreator.create(-1, parent);
23
errors += subCreator.errors;