forked from qt-creator/qt-creator
ProjectExplorer: Remove Node::m_id
It was only used within cmake, in a role that is nowadays covered by buildKey. Change-Id: I4fd77c06a3bb8965db5235315cb017c7b548fbaa Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -109,18 +109,12 @@ void noAutoAdditionNotify(const QStringList &filePaths, const ProjectExplorer::P
|
||||
CMakeInputsNode::CMakeInputsNode(const Utils::FileName &cmakeLists) :
|
||||
ProjectExplorer::ProjectNode(cmakeLists)
|
||||
{
|
||||
setNodeId(generateId(cmakeLists));
|
||||
setPriority(Node::DefaultPriority - 10); // Bottom most!
|
||||
setDisplayName(QCoreApplication::translate("CMakeFilesProjectNode", "CMake Modules"));
|
||||
setIcon(QIcon(":/projectexplorer/images/session.png")); // TODO: Use a better icon!
|
||||
setListInProject(false);
|
||||
}
|
||||
|
||||
QByteArray CMakeInputsNode::generateId(const Utils::FileName &inputFile)
|
||||
{
|
||||
return inputFile.toString().toUtf8() + "/cmakeInputs";
|
||||
}
|
||||
|
||||
bool CMakeInputsNode::showInSimpleTree() const
|
||||
{
|
||||
return true;
|
||||
@@ -175,17 +169,16 @@ bool CMakeProjectNode::addFiles(const QStringList &filePaths, QStringList *)
|
||||
}
|
||||
|
||||
CMakeTargetNode::CMakeTargetNode(const Utils::FileName &directory, const QString &target) :
|
||||
ProjectExplorer::ProjectNode(directory)
|
||||
ProjectExplorer::ProjectNode(directory), m_target(target)
|
||||
{
|
||||
setNodeId(generateId(directory, target));
|
||||
setPriority(Node::DefaultProjectPriority + 900);
|
||||
setIcon(QIcon(":/projectexplorer/images/build.png")); // TODO: Use proper icon!
|
||||
setListInProject(false);
|
||||
}
|
||||
|
||||
QByteArray CMakeTargetNode::generateId(const Utils::FileName &directory, const QString &target)
|
||||
QString CMakeTargetNode::generateId(const Utils::FileName &directory, const QString &target)
|
||||
{
|
||||
return directory.toString().toUtf8() + "///::///" + target.toUtf8();
|
||||
return directory.toString() + "///::///" + target;
|
||||
}
|
||||
|
||||
bool CMakeTargetNode::showInSimpleTree() const
|
||||
@@ -200,7 +193,7 @@ QString CMakeTargetNode::tooltip() const
|
||||
|
||||
QString CMakeTargetNode::buildKey() const
|
||||
{
|
||||
return QString::fromUtf8(id());
|
||||
return generateId(filePath(), m_target);
|
||||
}
|
||||
|
||||
bool CMakeTargetNode::supportsAction(ProjectExplorer::ProjectAction action,
|
||||
|
||||
Reference in New Issue
Block a user