Commit bbaf3b18 authored by Marco Bubke's avatar Marco Bubke Committed by Kai Koehne
Browse files

Check if the meta object is created

parent 3bdabea8
...@@ -185,6 +185,8 @@ void ObjectNodeInstance::initializePropertyWatcher(const ObjectNodeInstance::Poi ...@@ -185,6 +185,8 @@ void ObjectNodeInstance::initializePropertyWatcher(const ObjectNodeInstance::Poi
} }
} }
} }
} else {
qWarning() << "dynamic properties are not supported for components";
} }
m_signalSpy.setObjectNodeInstance(objectNodeInstance); m_signalSpy.setObjectNodeInstance(objectNodeInstance);
...@@ -780,6 +782,12 @@ static bool metaObjectHasNotPropertyName(NodeInstanceMetaObject *metaObject, con ...@@ -780,6 +782,12 @@ static bool metaObjectHasNotPropertyName(NodeInstanceMetaObject *metaObject, con
void ObjectNodeInstance::createDynamicProperty(const QString &name, const QString &/*typeName*/) void ObjectNodeInstance::createDynamicProperty(const QString &name, const QString &/*typeName*/)
{ {
if (m_metaObject == 0) {
qWarning() << "dynamic properties are not supported for components";
return;
}
if (metaObjectHasNotPropertyName(m_metaObject, name)) if (metaObjectHasNotPropertyName(m_metaObject, name))
m_metaObject->createNewProperty(name); m_metaObject->createNewProperty(name);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment