Commit 960801b5 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.instances: fix for QmlPropertyCache



Setting the original parent to preserve data constructed from
the VME.

Change-Id: Ib3c31e129e2f25affee37c97f725c6bfe3fb0286
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent bd67bd8d
......@@ -177,8 +177,11 @@ NodeInstanceMetaObject::NodeInstanceMetaObject(const ObjectNodeInstance::Pointer
//Assign cache to object
if (ddata && ddata->propertyCache) {
cache->setParent(ddata->propertyCache);
cache->invalidate(engine, this);
ddata->propertyCache = m_cache;
}
}
NodeInstanceMetaObject::NodeInstanceMetaObject(const ObjectNodeInstancePointer &nodeInstance, QObject *object, const QString &prefix, QQmlEngine *engine)
......@@ -210,7 +213,9 @@ void NodeInstanceMetaObject::createNewProperty(const QString &name)
//Updating cache
QQmlPropertyCache *oldParent = m_cache->parent();
QQmlEnginePrivate::get(m_context->engine())->cache(this)->invalidate(m_context->engine(), this);
m_cache->setParent(oldParent);
QQmlProperty property(myObject(), name, m_context);
Q_ASSERT(property.isValid());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment