aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmldata_p.h
diff options
context:
space:
mode:
authorAlan Alpert <aalpert@blackberry.com>2013-05-15 12:53:11 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-22 19:46:35 +0200
commit2f988d4b65428d03f3e3fee383787106b3f38c35 (patch)
tree6eb3c51a103f115f1b69826abe2b196027d7d7c3 /src/qml/qml/qqmldata_p.h
parent2074386df9ce8a72b6fb2553bb7a5a353964c7b4 (diff)
Partial fix for deferred properties when combined with components
Current deferred properties implementation did not store context or compiled data pointers correctly. Those pointers are now stored when the defer is reached, so as to avoid confusion (confusion leads to asserts or crashes). Does not extend the deferred property support to allow multiple deferred blocks per item. This now prints and error and the side effect is only that one of the deferred blocks is lost. This use case is sufficiently rare that it may not be worth the cost. Task-number: QTBUG-30325 Change-Id: I80cb074ed4452e95020208a0142a91e721bced7d Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmldata_p.h')
-rw-r--r--src/qml/qml/qqmldata_p.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/qml/qml/qqmldata_p.h b/src/qml/qml/qqmldata_p.h
index 14f1fef90a..cedb2d688a 100644
--- a/src/qml/qml/qqmldata_p.h
+++ b/src/qml/qml/qqmldata_p.h
@@ -82,7 +82,7 @@ public:
hasTaintedV8Object(false), isQueuedForDeletion(false), rootObjectInCreation(false),
hasVMEMetaObject(false), parentFrozen(false), notifyList(0), context(0), outerContext(0),
bindings(0), signalHandlers(0), nextContextObject(0), prevContextObject(0), bindingBitsSize(0), bindingBits(0),
- lineNumber(0), columnNumber(0), compiledData(0), deferredIdx(0), v8objectid(0),
+ lineNumber(0), columnNumber(0), compiledData(0), deferredData(0), v8objectid(0),
propertyCache(0), guards(0), extendedData(0) {
init();
}
@@ -173,8 +173,13 @@ public:
quint16 lineNumber;
quint16 columnNumber;
+ struct DeferredData {
+ unsigned int deferredIdx;
+ QQmlCompiledData *compiledData;//Not always the same as the other compiledData
+ QQmlContextData *context;//Could be either context or outerContext
+ };
QQmlCompiledData *compiledData;
- unsigned int deferredIdx;
+ DeferredData *deferredData;
quint32 v8objectid;
v8::Persistent<v8::Object> v8object;