forked from qt-creator/qt-creator
Qml2Puppet: Introduce QmlPrivateGate
The goal is to avoid direct usage of private API. Any access to private QML API is supposed to go through QmlPrivateGate. NodeInstanceMetaObject is moved into QmlPrivateGate and renamed to just MetaObject. Change-Id: Iba0b574605e455b01e7b86306ec3ca47be7b4e58 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
committed by
Thomas Hartmann
parent
514cf70615
commit
e0a3e25491
@@ -35,8 +35,6 @@
|
||||
|
||||
#include "dummycontextobject.h"
|
||||
|
||||
#include <nodeinstancemetaobject.h>
|
||||
|
||||
#include <propertyabstractcontainer.h>
|
||||
#include <propertybindingcontainer.h>
|
||||
#include <propertyvaluecontainer.h>
|
||||
@@ -45,6 +43,8 @@
|
||||
#include <commondefines.h>
|
||||
#include <nodeinstanceclientinterface.h>
|
||||
|
||||
#include <qmlprivategate.h>
|
||||
|
||||
#include <createinstancescommand.h>
|
||||
#include <changefileurlcommand.h>
|
||||
#include <clearscenecommand.h>
|
||||
@@ -830,12 +830,12 @@ void NodeInstanceServer::setInstancePropertyBinding(const PropertyBindingContain
|
||||
bool stateBindingWasUpdated = activeStateInstance().updateStateBinding(instance, name, expression);
|
||||
if (!stateBindingWasUpdated) {
|
||||
if (bindingContainer.isDynamic())
|
||||
Internal::NodeInstanceMetaObject::createNewDynamicProperty(instance.internalInstance(), name);
|
||||
Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance(), name);
|
||||
instance.setPropertyBinding(name, expression);
|
||||
}
|
||||
} else {
|
||||
if (bindingContainer.isDynamic())
|
||||
Internal::NodeInstanceMetaObject::createNewDynamicProperty(instance.internalInstance(), name);
|
||||
Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance(), name);
|
||||
instance.setPropertyBinding(name, expression);
|
||||
}
|
||||
}
|
||||
@@ -862,12 +862,12 @@ void NodeInstanceServer::setInstancePropertyVariant(const PropertyValueContainer
|
||||
bool stateValueWasUpdated = activeStateInstance().updateStateVariant(instance, name, value);
|
||||
if (!stateValueWasUpdated) {
|
||||
if (valueContainer.isDynamic())
|
||||
Internal::NodeInstanceMetaObject::createNewDynamicProperty(instance.internalInstance(), name);
|
||||
Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance(), name);
|
||||
instance.setPropertyVariant(name, value);
|
||||
}
|
||||
} else { //base state
|
||||
if (valueContainer.isDynamic())
|
||||
Internal::NodeInstanceMetaObject::createNewDynamicProperty(instance.internalInstance(), name);
|
||||
Internal::QmlPrivateGate::createNewDynamicProperty(instance.internalInstance(), name);
|
||||
instance.setPropertyVariant(name, value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user