aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcomponent_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-09-14 13:24:42 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-10-18 10:12:05 +0000
commit3b6eeee177b64eebe240d51be0c7bb5f031471d8 (patch)
treef8f579d881da44a2fd2c0f25f27587e541882061 /src/qml/qml/qqmlcomponent_p.h
parent5a03ab88c9bcff60744220c5f2dc91c5e1f363c8 (diff)
Fix execution of deferred properties
When deferred properties were assigned in multiple contexts, only the outermost context was executed. Any deferred property assignments in other inner contexts were never executed. Collect the deferred data to a container to be able to execute them all. Task-number: QTBUG-63200 Change-Id: I88fab27c1f81b5188430ada086dcc19842507e99 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlcomponent_p.h')
-rw-r--r--src/qml/qml/qqmlcomponent_p.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlcomponent_p.h b/src/qml/qml/qqmlcomponent_p.h
index d01a987acc..2a57f7b247 100644
--- a/src/qml/qml/qqmlcomponent_p.h
+++ b/src/qml/qml/qqmlcomponent_p.h
@@ -114,8 +114,17 @@ public:
};
ConstructionState state;
- static void beginDeferred(QQmlEnginePrivate *enginePriv, QObject *object,
- ConstructionState *state);
+ struct DeferredState {
+ ~DeferredState() {
+ qDeleteAll(constructionStates);
+ constructionStates.clear();
+ }
+ QVector<ConstructionState *> constructionStates;
+ };
+
+ static void beginDeferred(QQmlEnginePrivate *enginePriv, QObject *object, DeferredState* deferredState);
+ static void completeDeferred(QQmlEnginePrivate *enginePriv, DeferredState *deferredState);
+
static void complete(QQmlEnginePrivate *enginePriv, ConstructionState *state);
QQmlEngine *engine;