QmlPuppet: Remove dependency on ObjectNodeInstance in MetaInfo

MetaInfo cannot depend on ObjectNodeInstance.
I forward the QObject and the QmlEngine all the way through.
The commented code in metainfo.cpp is about defining a context
for the root item. The feature is basically unused, but we can bring
it back using a callback later.

Change-Id: I8f099b06c848e2faeaafc011ac6bd313192a64bd
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This commit is contained in:
Thomas Hartmann
2015-05-20 20:45:48 +02:00
parent c9eb75e2f8
commit fa6d623dfa
6 changed files with 35 additions and 44 deletions

View File

@@ -842,12 +842,12 @@ void NodeInstanceServer::setInstancePropertyBinding(const PropertyBindingContain
bool stateBindingWasUpdated = activeStateInstance().updateStateBinding(instance, name, expression);
if (!stateBindingWasUpdated) {
if (bindingContainer.isDynamic())
Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance(), name);
Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance()->object(), engine(), name);
instance.setPropertyBinding(name, expression);
}
} else {
if (bindingContainer.isDynamic())
Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance(), name);
Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance()->object(), engine(), name);
instance.setPropertyBinding(name, expression);
}
}
@@ -874,12 +874,12 @@ void NodeInstanceServer::setInstancePropertyVariant(const PropertyValueContainer
bool stateValueWasUpdated = activeStateInstance().updateStateVariant(instance, name, value);
if (!stateValueWasUpdated) {
if (valueContainer.isDynamic())
Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance(), name);
Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance()->object(), engine(), name);
instance.setPropertyVariant(name, value);
}
} else { //base state
if (valueContainer.isDynamic())
Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance(), name);
Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance()->object(), engine(), name);
instance.setPropertyVariant(name, value);
}