QmlDesigner: meta object fix

Change-Id: Ia5db0c5293eaf07d5141054f921a80987076532e
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Thomas Hartmann
2012-10-29 11:17:09 +01:00
parent 2e3e97c4ec
commit bd67bd8d63

View File

@@ -154,12 +154,14 @@ void NodeInstanceMetaObject::init(QObject *object, QQmlEngine *engine)
//create cache
cache = m_cache = QQmlEnginePrivate::get(engine)->cache(this);
cache->addref();
//If our parent is not a VMEMetaObject we just se the flag to false again
if (constructedMetaData(metaData))
QQmlData::get(object)->hasVMEMetaObject = false;
nodeInstanceMetaObjectList.insert(this, true);
hasAssignedMetaObjectData = true;
}
NodeInstanceMetaObject::NodeInstanceMetaObject(const ObjectNodeInstance::Pointer &nodeInstance, QQmlEngine *engine)
@@ -193,6 +195,7 @@ NodeInstanceMetaObject::NodeInstanceMetaObject(const ObjectNodeInstancePointer &
NodeInstanceMetaObject::~NodeInstanceMetaObject()
{
cache->release();
m_type->release();
nodeInstanceMetaObjectList.remove(this);