diff --git a/src/plugins/projectexplorer/projectnodes.cpp b/src/plugins/projectexplorer/projectnodes.cpp index 860a3478442..800ccfc9425 100644 --- a/src/plugins/projectexplorer/projectnodes.cpp +++ b/src/plugins/projectexplorer/projectnodes.cpp @@ -155,7 +155,7 @@ FolderNode *Node::parentFolderNode() const /*! The path of the file or folder in the filesystem the node represents. */ -Utils::FileName Node::path() const +const Utils::FileName &Node::path() const { return m_path; } diff --git a/src/plugins/projectexplorer/projectnodes.h b/src/plugins/projectexplorer/projectnodes.h index 64037a1cdc8..8e9f6533479 100644 --- a/src/plugins/projectexplorer/projectnodes.h +++ b/src/plugins/projectexplorer/projectnodes.h @@ -112,7 +112,7 @@ public: NodeType nodeType() const; ProjectNode *projectNode() const; // managing project FolderNode *parentFolderNode() const; // parent folder or project - Utils::FileName path() const; // file system path + const Utils::FileName &path() const; // file system path int line() const; virtual QString displayName() const; virtual QString tooltip() const; diff --git a/src/plugins/resourceeditor/resourcenode.cpp b/src/plugins/resourceeditor/resourcenode.cpp index d2dcb5fd239..541b8f5dc44 100644 --- a/src/plugins/resourceeditor/resourcenode.cpp +++ b/src/plugins/resourceeditor/resourcenode.cpp @@ -286,7 +286,7 @@ bool ResourceTopLevelNode::showInSimpleTree() const } ResourceFolderNode::ResourceFolderNode(const QString &prefix, const QString &lang, ResourceTopLevelNode *parent) - : ProjectExplorer::FolderNode(parent->path().appendPath(prefix)), + : ProjectExplorer::FolderNode(Utils::FileName(parent->path()).appendPath(prefix)), // TOOD Why add existing directory doesn't work m_topLevelNode(parent), m_prefix(prefix),