Commit b21b8a7a authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.NodeInstances: implement doComponentComplete()

We have to call classBegin() on creation.
parent a31ac153
...@@ -646,7 +646,7 @@ void NodeInstance::registerDeclarativeTypes() ...@@ -646,7 +646,7 @@ void NodeInstance::registerDeclarativeTypes()
void NodeInstance::doComponentComplete() void NodeInstance::doComponentComplete()
{ {
m_nodeInstance->doComponentComplete();
} }
QString NodeInstance::id() const QString NodeInstance::id() const
......
...@@ -80,6 +80,8 @@ QmlGraphicsItemNodeInstance::Pointer QmlGraphicsItemNodeInstance::create(const N ...@@ -80,6 +80,8 @@ QmlGraphicsItemNodeInstance::Pointer QmlGraphicsItemNodeInstance::create(const N
Pointer instance(new QmlGraphicsItemNodeInstance(qmlGraphicsItem, objectPair.second)); Pointer instance(new QmlGraphicsItemNodeInstance(qmlGraphicsItem, objectPair.second));
static_cast<QDeclarativeParserStatus*>(qmlGraphicsItem)->classBegin();
if (objectToBeWrapped) if (objectToBeWrapped)
instance->setDeleteHeldInstance(false); // the object isn't owned instance->setDeleteHeldInstance(false); // the object isn't owned
...@@ -288,8 +290,11 @@ void QmlGraphicsItemNodeInstance::resetVertical() ...@@ -288,8 +290,11 @@ void QmlGraphicsItemNodeInstance::resetVertical()
void QmlGraphicsItemNodeInstance::doComponentComplete() void QmlGraphicsItemNodeInstance::doComponentComplete()
{ {
if (qmlGraphicsItem()) if (qmlGraphicsItem()) {
if (static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(qmlGraphicsItem()))->componentComplete)
return;
static_cast<QDeclarativeParserStatus*>(qmlGraphicsItem())->componentComplete(); static_cast<QDeclarativeParserStatus*>(qmlGraphicsItem())->componentComplete();
}
} }
int QmlGraphicsItemNodeInstance::penWidth() const int QmlGraphicsItemNodeInstance::penWidth() const
......
Markdown is supported
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