Commit acac9cb8 authored by Thomas Hartmann's avatar Thomas Hartmann Committed by Thomas Hartmann

QmlDesigner: Cleanup

Change-Id: I571325fd98ed555abc19f87ac8a164d7e0c76288
Reviewed-by: default avatarTim Jenssen <tim.jenssen@theqtcompany.com>
parent 94eff1dd
......@@ -125,7 +125,7 @@ NodeInstance &NodeInstance::operator=(const NodeInstance &other)
ModelNode NodeInstance::modelNode() const
{
if (d)
return d->modelNode;
return d->modelNode;
else
return ModelNode();
}
......@@ -170,7 +170,7 @@ void NodeInstance::setY(double y)
bool NodeInstance::hasAnchors() const
{
return hasAnchor("anchors.fill")
return hasAnchor("anchors.fill")
|| hasAnchor("anchors.centerIn")
|| hasAnchor("anchors.top")
|| hasAnchor("anchors.left")
......@@ -206,7 +206,7 @@ void NodeInstance::makeInvalid()
QRectF NodeInstance::boundingRect() const
{
if (isValid())
return d->boundingRect;
return d->boundingRect;
else
return QRectF();
}
......@@ -214,7 +214,7 @@ QRectF NodeInstance::boundingRect() const
QRectF NodeInstance::contentItemBoundingRect() const
{
if (isValid())
return d->contentItemBoundingRect;
return d->contentItemBoundingRect;
else
return QRectF();
}
......
......@@ -188,7 +188,7 @@ void NodeInstanceView::handleChrash()
if (elaspsedTimeSinceLastCrash > 2000)
restartProcess();
else
emit qmlPuppetCrashed();
emit qmlPuppetCrashed();
emitCustomNotification(QStringLiteral("puppet crashed"));
}
......
......@@ -353,7 +353,6 @@ QProcessEnvironment PuppetCreator::processEnvironment() const
else
environment.appendOrSet("QML2_IMPORT_PATH", m_model->importPaths().join(pathSep), pathSep);
}
return environment.toProcessEnvironment();
}
......
......@@ -109,7 +109,7 @@ const ModelNode AbstractView::rootModelNode() const
ModelNode AbstractView::rootModelNode()
{
Q_ASSERT(model());
return ModelNode(model()->d->rootNode(), model(), this);
return ModelNode(model()->d->rootNode(), model(), this);
}
/*!
......
......@@ -1836,7 +1836,7 @@ QString Model::pathForImport(const Import &import)
if (!rewriterView())
return QString();
return rewriterView()->pathForImport(import);
return rewriterView()->pathForImport(import);
}
QStringList Model::importPaths() const
......
......@@ -99,7 +99,7 @@ QmlItemNode QmlItemNode::createQmlItemNode(AbstractView *view, const ItemLibrary
NodeAbstractProperty parentProperty = parentQmlItemNode.defaultNodeAbstractProperty();
return QmlItemNode::createQmlItemNode(view, itemLibraryEntry, position, parentProperty);
return QmlItemNode::createQmlItemNode(view, itemLibraryEntry, position, parentProperty);
}
QmlItemNode QmlItemNode::createQmlItemNode(AbstractView *view, const ItemLibraryEntry &itemLibraryEntry, const QPointF &position, NodeAbstractProperty parentproperty)
......
......@@ -262,12 +262,12 @@ static inline QVariant convertDynamicPropertyValueToVariant(const QString &astVa
static bool isListElementType(const QmlDesigner::TypeName &type)
{
return type == "ListElement" || type == "QtQuick.ListElement" || type == "Qt.ListElement";
return type == "ListElement" || type == "QtQuick.ListElement" || type == "Qt.ListElement";
}
static bool isComponentType(const QmlDesigner::TypeName &type)
{
return type == "Component" || type == "Qt.Component" || type == "QtQuick.Component" || type == "<cpp>.QQmlComponent";
return type == "Component" || type == "Qt.Component" || type == "QtQuick.Component" || type == "<cpp>.QQmlComponent";
}
static bool isCustomParserType(const QString &type)
......@@ -281,12 +281,12 @@ static bool isCustomParserType(const QString &type)
static bool isPropertyChangesType(const QmlDesigner::TypeName &type)
{
return type == "PropertyChanges" || type == "QtQuick.PropertyChanges" || type == "Qt.PropertyChanges";
return type == "PropertyChanges" || type == "QtQuick.PropertyChanges" || type == "Qt.PropertyChanges";
}
static bool isConnectionsType(const QmlDesigner::TypeName &type)
{
return type == "Connections" || type == "QtQuick.Connections" || type == "Qt.Connections";
return type == "Connections" || type == "QtQuick.Connections" || type == "Qt.Connections";
}
static bool propertyIsComponentType(const QmlDesigner::NodeAbstractProperty &property, const QmlDesigner::TypeName &type, QmlDesigner::Model *model)
......
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