diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-08-12 12:34:35 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-08-12 14:43:59 +0200 |
commit | 0af61d773fc7263573afc6b7a973451783bf7424 (patch) | |
tree | 327563220f4fe53649b7fc98f982b659b462a9dc /src/qml/qml | |
parent | 4ad1b63f257ac033e3876130f39eba3325363de5 (diff) | |
parent | 61f72d32b4fddc6e87f21d0243d9f0a32ca61987 (diff) |
Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4
Diffstat (limited to 'src/qml/qml')
-rw-r--r-- | src/qml/qml/qqmlcomponent.cpp | 9 | ||||
-rw-r--r-- | src/qml/qml/qqmlincubator.cpp | 7 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index e087785901..84ceefccba 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -265,7 +265,7 @@ V8_DEFINE_EXTENSION(QQmlComponentExtension, componentExtension); /*! \qmlattachedsignal Component::completed() - Emitted after component "startup" has completed. This can be used to + Emitted after the object has been instantiated. This can be used to execute script code at startup, once the full QML environment has been established. @@ -286,14 +286,13 @@ V8_DEFINE_EXTENSION(QQmlComponentExtension, componentExtension); /*! \qmlattachedsignal Component::destruction() - Emitted as the component begins destruction. This can be used to undo + Emitted as the object begins destruction. This can be used to undo work done in response to the \l {completed}{completed()} signal, or other imperative code in your application. The corresponding handler is \c onDestruction. It can be declared on - any object. However, it applies to the destruction of the component as - a whole, and not the destruction of the specific object. The order of - running the \c onDestruction handlers is undefined. + any object. The order of running the \c onDestruction handlers is + undefined. \qml Rectangle { diff --git a/src/qml/qml/qqmlincubator.cpp b/src/qml/qml/qqmlincubator.cpp index 0665a4ac1a..c342d8b080 100644 --- a/src/qml/qml/qqmlincubator.cpp +++ b/src/qml/qml/qqmlincubator.cpp @@ -292,10 +292,7 @@ void QQmlIncubatorPrivate::incubate(QQmlInstantiationInterrupt &i) QQmlEngine *engine = compiledData->engine; QQmlEnginePrivate *enginePriv = QQmlEnginePrivate::get(engine); - bool guardOk = vmeGuard.isOK(); - vmeGuard.clear(); - - if (!guardOk) { + if (!vmeGuard.isOK()) { QQmlError error; error.setUrl(compiledData->url()); error.setDescription(QQmlComponent::tr("Object destroyed during incubation")); @@ -305,6 +302,8 @@ void QQmlIncubatorPrivate::incubate(QQmlInstantiationInterrupt &i) goto finishIncubate; } + vmeGuard.clear(); + if (progress == QQmlIncubatorPrivate::Execute) { enginePriv->referenceScarceResources(); QObject *tresult = 0; |