void NodeInstanceMetaObject::notifyPropertyChange(int id) { ObjectNodeInstance::Pointer objectNodeInstance = m_nodeInstance.toStrongRef(); if (objectNodeInstance && objectNodeInstance->nodeInstanceServer()) { if (id < type()->propertyOffset()) { objectNodeInstance->nodeInstanceServer()->notifyPropertyChange(objectNodeInstance->instanceId(), m_prefix + property(id).name()); } else { objectNodeInstance->nodeInstanceServer()->notifyPropertyChange(objectNodeInstance->instanceId(), m_prefix + name(id - type()->propertyOffset())); } } }
int NodeInstanceSignalSpy::qt_metacall(QMetaObject::Call call, int methodId, void **a) { if (call == QMetaObject::InvokeMetaMethod && methodId > QObject::staticMetaObject.methodCount()) { ObjectNodeInstance::Pointer nodeInstance = m_objectNodeInstance.toStrongRef(); if (nodeInstance && nodeInstance->nodeInstanceServer() && nodeInstance->isValid()) { nodeInstance->nodeInstanceServer()->notifyPropertyChange(nodeInstance->instanceId(), m_indexPropertyHash.value(methodId)); } } return QObject::qt_metacall(call, methodId, a); }
void ObjectNodeInstance::initialize(const ObjectNodeInstance::Pointer &objectNodeInstance) { initializePropertyWatcher(objectNodeInstance); QmlPrivateGate::registerNodeInstanceMetaObject(objectNodeInstance->object(), objectNodeInstance->nodeInstanceServer()->engine()); }