aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqmlincubator.cpp17
-rw-r--r--src/qml/qml/qqmlincubator_p.h1
2 files changed, 12 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlincubator.cpp b/src/qml/qml/qqmlincubator.cpp
index 71adf44e6b..ade4634c2d 100644
--- a/src/qml/qml/qqmlincubator.cpp
+++ b/src/qml/qml/qqmlincubator.cpp
@@ -253,6 +253,16 @@ void QQmlIncubationController::incubatingObjectCountChanged(int incubatingObject
Q_UNUSED(incubatingObjectCount);
}
+void QQmlIncubatorPrivate::forceCompletion(QQmlVME::Interrupt &i)
+{
+ while (QQmlIncubator::Loading == status) {
+ while (QQmlIncubator::Loading == status && !waitingFor.isEmpty())
+ static_cast<QQmlIncubatorPrivate *>(waitingFor.first())->forceCompletion(i);
+ if (QQmlIncubator::Loading == status)
+ incubate(i);
+ }
+}
+
void QQmlIncubatorPrivate::incubate(QQmlVME::Interrupt &i)
{
if (!compiledData)
@@ -587,12 +597,7 @@ returns, the incubator will not be in the Loading state.
void QQmlIncubator::forceCompletion()
{
QQmlVME::Interrupt i;
- while (Loading == status()) {
- while (Loading == status() && !d->waitingFor.isEmpty())
- static_cast<QQmlIncubatorPrivate *>(d->waitingFor.first())->incubate(i);
- if (Loading == status())
- d->incubate(i);
- }
+ d->forceCompletion(i);
}
/*!
diff --git a/src/qml/qml/qqmlincubator_p.h b/src/qml/qml/qqmlincubator_p.h
index 58e9c93f15..e7246ce3b2 100644
--- a/src/qml/qml/qqmlincubator_p.h
+++ b/src/qml/qml/qqmlincubator_p.h
@@ -99,6 +99,7 @@ public:
void clear();
+ void forceCompletion(QQmlVME::Interrupt &i);
void incubate(QQmlVME::Interrupt &i);
};