QmlDesigner.NodeInstances: Cache qml meta types

Change-Id: Ied18ca8b31e3a17ee9e37aed030377148d272917
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Marco Bubke
2012-09-27 15:40:23 +02:00
parent 4d76f0db17
commit f6b80018db
2 changed files with 8 additions and 1 deletions
@@ -38,6 +38,7 @@
#include "qmlstatenodeinstance.h"
#include "anchorchangesnodeinstance.h"
#include "quickitemnodeinstance.h"
#include "nodeinstanceserver.h"
@@ -50,6 +51,7 @@
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QQuickItem>
#endif
#include <private/qqmlengine_p.h>
#include <QQmlEngine>
@@ -226,6 +228,8 @@ ServerNodeInstance ServerNodeInstance::create(NodeInstanceServer *nodeInstanceSe
object = Internal::ObjectNodeInstance::createPrimitive("QtQuick/Item", 1, 0, nodeInstanceServer->context());
#endif
QQmlEnginePrivate::get(nodeInstanceServer->engine())->cache(object->metaObject());
ServerNodeInstance instance(createInstance(object));
instance.internalInstance()->setNodeInstanceServer(nodeInstanceServer);