diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-02-06 16:33:15 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-07 12:44:10 +0100 |
commit | 324ae0d7d99ef9f7159d29b2e0e7eabe5f8a43a4 (patch) | |
tree | 9576687c7580065e819392a3be6250dcf6e0c07c /src/qml/qml/qqmlincubator.cpp | |
parent | 50ce88a53107f97664d928719c1877b8077e9a2e (diff) |
[new compiler] Allow for interruption during object finalization
The object tree construction and binding allocation remains synchronous, but
the initial evaluation of the bindings is now cooperatively interruptible
again, like in the VME.
Change-Id: Idd037dd481782c81ad43e20e93d922eb12ac8b85
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlincubator.cpp')
-rw-r--r-- | src/qml/qml/qqmlincubator.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/qml/qqmlincubator.cpp b/src/qml/qml/qqmlincubator.cpp index 10fd05ab58..de8eab7bd2 100644 --- a/src/qml/qml/qqmlincubator.cpp +++ b/src/qml/qml/qqmlincubator.cpp @@ -91,7 +91,7 @@ void QQmlEnginePrivate::incubate(QQmlIncubator &i, QQmlContextData *forContext) p->changeStatus(QQmlIncubator::Loading); if (!watcher.hasRecursed()) { - QQmlVME::Interrupt i; + QQmlInstantiationInterrupt i; p->incubate(i); } } else { @@ -254,7 +254,7 @@ void QQmlIncubationController::incubatingObjectCountChanged(int incubatingObject Q_UNUSED(incubatingObjectCount); } -void QQmlIncubatorPrivate::forceCompletion(QQmlVME::Interrupt &i) +void QQmlIncubatorPrivate::forceCompletion(QQmlInstantiationInterrupt &i) { while (QQmlIncubator::Loading == status) { while (QQmlIncubator::Loading == status && !waitingFor.isEmpty()) @@ -264,7 +264,7 @@ void QQmlIncubatorPrivate::forceCompletion(QQmlVME::Interrupt &i) } } -void QQmlIncubatorPrivate::incubate(QQmlVME::Interrupt &i) +void QQmlIncubatorPrivate::incubate(QQmlInstantiationInterrupt &i) { if (!compiledData) return; @@ -345,7 +345,7 @@ void QQmlIncubatorPrivate::incubate(QQmlVME::Interrupt &i) QQmlContextData *ctxt = 0; if (enginePriv->useNewCompiler) - ctxt = creator->finalize(); + ctxt = creator->finalize(i); else ctxt = vme.complete(i); if (ctxt) { @@ -391,7 +391,7 @@ void QQmlIncubationController::incubateFor(int msecs) if (!d || !d->incubatorCount) return; - QQmlVME::Interrupt i(msecs * 1000000); + QQmlInstantiationInterrupt i(msecs * 1000000); i.reset(); do { static_cast<QQmlIncubatorPrivate*>(d->incubatorList.first())->incubate(i); @@ -410,7 +410,7 @@ void QQmlIncubationController::incubateWhile(volatile bool *flag, int msecs) if (!d || !d->incubatorCount) return; - QQmlVME::Interrupt i(flag, msecs * 1000000); + QQmlInstantiationInterrupt i(flag, msecs * 1000000); i.reset(); do { static_cast<QQmlIncubatorPrivate*>(d->incubatorList.first())->incubate(i); @@ -609,7 +609,7 @@ returns, the incubator will not be in the Loading state. */ void QQmlIncubator::forceCompletion() { - QQmlVME::Interrupt i; + QQmlInstantiationInterrupt i; d->forceCompletion(i); } |