diff options
Diffstat (limited to 'src/declarative/qml/qmlcomponent.cpp')
-rw-r--r-- | src/declarative/qml/qmlcomponent.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index da8f26d..24b5dd2 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -482,18 +482,19 @@ QObject *QmlComponent::beginCreate(QmlContext *context) ctxt->deactivate(); + QmlEnginePrivate *ep = d->engine->d_func(); + if (ep->rootComponent == this) { + ep->rootComponent = 0; + + d->bindValues = ep->bindValues; + d->parserStatus = ep->parserStatus; + ep->bindValues.clear(); + ep->parserStatus.clear(); + d->completePending = true; + } + if (rv) { QFx_setParent_noEvent(ctxt, rv); - QmlEnginePrivate *ep = d->engine->d_func(); - if (ep->rootComponent == this) { - ep->rootComponent = 0; - - d->bindValues = ep->bindValues; - d->parserStatus = ep->parserStatus; - ep->bindValues.clear(); - ep->parserStatus.clear(); - d->completePending = true; - } } else { delete ctxt; } |