diff options
Diffstat (limited to 'src/declarative/qml/qmlcomponent.cpp')
-rw-r--r-- | src/declarative/qml/qmlcomponent.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index a9f5442..06e15ec 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -523,8 +523,9 @@ QObject *QmlComponent::beginCreate(QmlContext *context) if (!d->engine->d_func()->rootComponent) d->engine->d_func()->rootComponent = this; - QmlContext *ctxt = - new QmlContext(context, 0); + QmlContextPrivate *contextPriv = + static_cast<QmlContextPrivate *>(QObjectPrivate::get(context)); + QmlContext *ctxt = new QmlContext(context, 0, true); static_cast<QmlContextPrivate*>(ctxt->d_ptr)->url = d->cc->url; if(d->start != -1) { // ### FIXME @@ -558,6 +559,8 @@ QObject *QmlComponent::beginCreate(QmlContext *context) delete ctxt; } + if (rv && !contextPriv->isInternal && ep->isDebugging) + contextPriv->instances.append(rv); return rv; } |