Commit 0ecc1114 authored by Tim Jenssen's avatar Tim Jenssen

QmlDesigner: remove unnecessary spaces/lines

Change-Id: I867ab5afc82e67644b7004e97886b46250f5d3df
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 80bc7f79
......@@ -84,7 +84,7 @@ private:
ObjectNodeInstanceWeakPointer m_nodeInstance;
PropertyName m_prefix;
QPointer<QQmlContext> m_context;
QPointer<QQmlContext> m_context;
QQmlOpenMetaObjectType *m_type;
QScopedPointer<MetaPropertyData> m_data;
//QAbstractDynamicMetaObject *m_parent;
......
......@@ -120,7 +120,7 @@ NodeInstanceServer::~NodeInstanceServer()
{
}
QList<ServerNodeInstance> NodeInstanceServer::createInstances(const QVector<InstanceContainer> &containerVector)
QList<ServerNodeInstance> NodeInstanceServer::createInstances(const QVector<InstanceContainer> &containerVector)
{
Q_ASSERT(declarativeView() || quickView());
QList<ServerNodeInstance> instanceList;
......@@ -487,7 +487,7 @@ void NodeInstanceServer::setupDefaultDummyData()
refreshBindings();
}
QList<ServerNodeInstance> NodeInstanceServer::setupInstances(const CreateSceneCommand &command)
QList<ServerNodeInstance> NodeInstanceServer::setupInstances(const CreateSceneCommand &command)
{
QList<ServerNodeInstance> instanceList = createInstances(command.instances());
......
......@@ -961,7 +961,6 @@ void tweakObjects(QObject *object)
QObject *ObjectNodeInstance::createComponentWrap(const QString &nodeSource, const QByteArray &importCode, QQmlContext *context)
{
ComponentCompleteDisabler disableComponentComplete;
Q_UNUSED(disableComponentComplete)
QQmlComponent *component = new QQmlComponent(context->engine());
......@@ -969,18 +968,14 @@ QObject *ObjectNodeInstance::createComponentWrap(const QString &nodeSource, cons
QByteArray data(nodeSource.toUtf8());
data.prepend(importCode);
component->setData(data, context->baseUrl().resolved(QUrl("createComponent.qml")));
QObject *object = component;
tweakObjects(object);
QQmlEngine::setContextForObject(object, context);
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
return object;
}
//The component might also be shipped with Creator.
//To avoid trouble with import "." we use the component shipped with Creator.
static inline QString fixComponentPathForIncompatibleQt(const QString &componentPath)
......@@ -1034,12 +1029,11 @@ QObject *ObjectNodeInstance::createComponent(const QString &componentPath, QQmlC
QObject *ObjectNodeInstance::createComponent(const QUrl &componentUrl, QQmlContext *context)
{
ComponentCompleteDisabler disableComponentComplete;
Q_UNUSED(disableComponentComplete)
QQmlComponent component(context->engine(), componentUrl);
QObject *object = component.beginCreate(context);
QObject *object = component.beginCreate(context);
tweakObjects(object);
component.completeCreate();
......@@ -1057,7 +1051,6 @@ QObject *ObjectNodeInstance::createComponent(const QUrl &componentUrl, QQmlConte
QObject *ObjectNodeInstance::createCustomParserObject(const QString &nodeSource, const QByteArray &importCode, QQmlContext *context)
{
ComponentCompleteDisabler disableComponentComplete;
Q_UNUSED(disableComponentComplete)
QQmlComponent component(context->engine());
......@@ -1065,11 +1058,9 @@ QObject *ObjectNodeInstance::createCustomParserObject(const QString &nodeSource,
QByteArray data(nodeSource.toUtf8());
data.prepend(importCode);
component.setData(data, context->baseUrl().resolved(QUrl("createCustomParserObject.qml")));
QObject *object = component.beginCreate(context);
tweakObjects(object);
component.completeCreate();
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
return object;
......
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