forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user