Commit 5d87d4c4 authored by Thomas Hartmann's avatar Thomas Hartmann Committed by Marco Bubke

QmlDesigner.model: renaming in NodeSourceType

Change-Id: I958b99967da8ed81542de08b64334c88d688f755
Reviewed-on: http://codereview.qt.nokia.com/828Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarMarco Bubke <marco.bubke@nokia.com>
parent 9beba557
......@@ -146,7 +146,7 @@ void ComponentView::searchForComponentAndAddToList(const ModelNode &node)
foreach (const ModelNode &node, nodeList) {
if (node.nodeSourceType() == ModelNode::ComponentSource) {
if (node.nodeSourceType() == ModelNode::NodeWithComponentSource) {
if (!node.id().isEmpty()) {
QStandardItem *item = new QStandardItem(node.id());
item->setData(QVariant::fromValue(node), ModelNodeRole);
......@@ -186,7 +186,7 @@ void ComponentView::searchForComponentAndRemoveFromList(const ModelNode &node)
foreach (const ModelNode &childNode, nodeList) {
if (childNode.nodeSourceType() == ModelNode::ComponentSource) {
if (childNode.nodeSourceType() == ModelNode::NodeWithComponentSource) {
removeSingleNodeFromList(childNode);
}
}
......
......@@ -88,7 +88,7 @@ public:
const PropertyListType &propertyList = PropertyListType(),
const PropertyListType &auxPropertyList = PropertyListType(),
const QString &nodeSource = QString(),
ModelNode::NodeSourceType nodeSourceType = ModelNode::NoSource);
ModelNode::NodeSourceType nodeSourceType = ModelNode::NodeWithoutSource);
const ModelNode rootModelNode() const;
ModelNode rootModelNode();
......
......@@ -87,9 +87,9 @@ class CORESHARED_EXPORT ModelNode
public:
enum NodeSourceType {
NoSource = 0,
CustomParserSource = 1,
ComponentSource = 2
NodeWithoutSource = 0,
NodeWithCustomParserSource = 1,
NodeWithComponentSource = 2
};
ModelNode();
......
......@@ -94,7 +94,7 @@ ModelPrivate::ModelPrivate(Model *model) :
m_writeLock(false),
m_internalIdCounter(1)
{
m_rootInternalNode = createNode("QtQuick/Item", 1, 0, PropertyListType(), PropertyListType(), QString(), ModelNode::NoSource,true);
m_rootInternalNode = createNode("QtQuick/Item", 1, 0, PropertyListType(), PropertyListType(), QString(), ModelNode::NodeWithoutSource,true);
}
ModelPrivate::~ModelPrivate()
......
......@@ -82,13 +82,13 @@ static inline bool modelNodeIsComponent(const ModelNode &node)
if (node.metaInfo().isComponent())
return true;
if (node.nodeSourceType() == ModelNode::ComponentSource)
if (node.nodeSourceType() == ModelNode::NodeWithComponentSource)
return true;
if (checkIfNodeIsAView(node) &&
node.hasNodeProperty("delegate")) {
if (node.nodeProperty("delegate").modelNode().metaInfo().isComponent())
return true;
if (node.nodeProperty("delegate").modelNode().nodeSourceType() == ModelNode::ComponentSource)
if (node.nodeProperty("delegate").modelNode().nodeSourceType() == ModelNode::NodeWithComponentSource)
return true;
}
......@@ -131,11 +131,11 @@ static inline void openInlineComponent(const ModelNode &node)
if (!DesignDocumentController::instance())
return;
if (node.nodeSourceType() == ModelNode::ComponentSource)
if (node.nodeSourceType() == ModelNode::NodeWithComponentSource)
DesignDocumentController::instance()->changeCurrentModelTo(node);
if (checkIfNodeIsAView(node) &&
node.hasNodeProperty("delegate")) {
if (node.nodeProperty("delegate").modelNode().nodeSourceType() == ModelNode::ComponentSource)
if (node.nodeProperty("delegate").modelNode().nodeSourceType() == ModelNode::NodeWithComponentSource)
DesignDocumentController::instance()->changeCurrentModelTo(node.nodeProperty("delegate").modelNode());
}
}
......
......@@ -1187,12 +1187,12 @@ ModelNode TextToModelMerger::createModelNode(const QString &typeName,
nodeSource = componentSource;
}
ModelNode::NodeSourceType nodeSourceType = ModelNode::NoSource;
ModelNode::NodeSourceType nodeSourceType = ModelNode::NodeWithoutSource;
if (isComponentType(typeName) || isImplicitComponent)
nodeSourceType = ModelNode::ComponentSource;
nodeSourceType = ModelNode::NodeWithComponentSource;
else if (isCustomParserType(typeName))
nodeSourceType = ModelNode::CustomParserSource;
nodeSourceType = ModelNode::NodeWithCustomParserSource;
ModelNode newNode = m_rewriterView->createModelNode(typeName,
majorVersion,
......
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