aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlobjectcreator_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-03-12 13:00:46 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-13 13:58:40 +0100
commit110c38a8a6fa30ad8e114d26df88fc3c23ec42de (patch)
treea1a11f0363cea0ad9220dbbe30989566c055bf0d /src/qml/qml/qqmlobjectcreator_p.h
parent1ddd4f8f0641948aabfd1031a080720e8dc61984 (diff)
Fix property caches out of sync with grouped properties that have a VME meta object
Because QQmlObjectCreator::populateInstance would take the property cache to install from the outside and also pass it as the cache to use for the VME meta object to install, it could happen that the wrong cache was installed - the one supplied by engine->cache(propType) instead of the cache created together with the VME meta-object at type compilation time. This patch ensures that they're always in sync and correct by removing the responsibility of the caller to supply the cache to use and install. Instead the function will always use the cache calculated at type compile time (and also use that when installing the VME meta object). Installation of the property cache on the declarative data of the instance is now done only at createInstance() time, which fortunately also simplifies the code. Change-Id: Ia722cd57bc48007aaf725f1f59daa2f21569e324 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator_p.h')
-rw-r--r--src/qml/qml/qqmlobjectcreator_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlobjectcreator_p.h b/src/qml/qml/qqmlobjectcreator_p.h
index 6717257bcf..9fd52a9f48 100644
--- a/src/qml/qml/qqmlobjectcreator_p.h
+++ b/src/qml/qml/qqmlobjectcreator_p.h
@@ -98,8 +98,8 @@ private:
QObject *createInstance(int index, QObject *parent = 0);
- bool populateInstance(int index, QObject *instance, QQmlRefPointer<QQmlPropertyCache> cache,
- QObject *bindingTarget, QQmlPropertyData *valueTypeProperty, bool installPropertyCache = true,
+ bool populateInstance(int index, QObject *instance,
+ QObject *bindingTarget, QQmlPropertyData *valueTypeProperty,
const QBitArray &bindingsToSkip = QBitArray());
void setupBindings(const QBitArray &bindingsToSkip);