QmlDesigner: remove DesignDocument::changeToExternalSubComponent()

This function did nothing but call EditorManager::openEditor(), so we can
call it directly instead. It was not used consistently anyway.

Change-Id: I639ef346164be9260e887faac5dc6651ccfd92c5
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
This commit is contained in:
Thomas Hartmann
2013-08-02 13:51:07 +02:00
parent b108f72bc7
commit 934291077c
3 changed files with 3 additions and 8 deletions

View File

@@ -102,13 +102,14 @@ static inline void openFileForComponent(const ModelNode &node)
if (node.metaInfo().isFileComponent()) {
//getWidthHeight(node, width, height);
getProperties(node, propertyHash);
currentDesignDocument()->changeToExternalSubComponent(node.metaInfo().componentFileName());
Core::EditorManager::openEditor(node.metaInfo().componentFileName(), Core::Id(), Core::EditorManager::DoNotMakeVisible);
} else if (node.metaInfo().isView() &&
node.hasNodeProperty("delegate") &&
node.nodeProperty("delegate").modelNode().metaInfo().isFileComponent()) {
//getWidthHeight(node, width, height);
getProperties(node, propertyHash);
currentDesignDocument()->changeToExternalSubComponent(node.nodeProperty("delegate").modelNode().metaInfo().componentFileName());
Core::EditorManager::openEditor(node.nodeProperty("delegate").modelNode().metaInfo().componentFileName(),
Core::Id(), Core::EditorManager::DoNotMakeVisible);
}
ModelNode rootModelNode = currentDesignDocument()->rewriterView()->rootModelNode();
applyProperties(rootModelNode, propertyHash);