forked from qt-creator/qt-creator
Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -115,7 +115,7 @@ void noAutoAdditionNotify(const QStringList &filePaths, const ProjectExplorer::P
|
||||
|
||||
}
|
||||
|
||||
CMakeInputsNode::CMakeInputsNode(const Utils::FileName &cmakeLists) :
|
||||
CMakeInputsNode::CMakeInputsNode(const Utils::FilePath &cmakeLists) :
|
||||
ProjectExplorer::ProjectNode(cmakeLists)
|
||||
{
|
||||
setPriority(Node::DefaultPriority - 10); // Bottom most!
|
||||
@@ -124,7 +124,7 @@ CMakeInputsNode::CMakeInputsNode(const Utils::FileName &cmakeLists) :
|
||||
setListInProject(false);
|
||||
}
|
||||
|
||||
CMakeListsNode::CMakeListsNode(const Utils::FileName &cmakeListPath) :
|
||||
CMakeListsNode::CMakeListsNode(const Utils::FilePath &cmakeListPath) :
|
||||
ProjectExplorer::ProjectNode(cmakeListPath)
|
||||
{
|
||||
static QIcon folderIcon = Core::FileIconProvider::directoryIcon(Constants::FILEOVERLAY_CMAKE);
|
||||
@@ -142,12 +142,12 @@ bool CMakeListsNode::supportsAction(ProjectExplorer::ProjectAction action, const
|
||||
return action == ProjectExplorer::ProjectAction::AddNewFile;
|
||||
}
|
||||
|
||||
Utils::optional<Utils::FileName> CMakeListsNode::visibleAfterAddFileAction() const
|
||||
Utils::optional<Utils::FilePath> CMakeListsNode::visibleAfterAddFileAction() const
|
||||
{
|
||||
return filePath().pathAppended("CMakeLists.txt");
|
||||
}
|
||||
|
||||
CMakeProjectNode::CMakeProjectNode(const Utils::FileName &directory) :
|
||||
CMakeProjectNode::CMakeProjectNode(const Utils::FilePath &directory) :
|
||||
ProjectExplorer::ProjectNode(directory)
|
||||
{
|
||||
setPriority(Node::DefaultProjectPriority + 1000);
|
||||
@@ -166,7 +166,7 @@ bool CMakeProjectNode::addFiles(const QStringList &filePaths, QStringList *)
|
||||
return true; // Return always true as autoadd is not supported!
|
||||
}
|
||||
|
||||
CMakeTargetNode::CMakeTargetNode(const Utils::FileName &directory, const QString &target) :
|
||||
CMakeTargetNode::CMakeTargetNode(const Utils::FilePath &directory, const QString &target) :
|
||||
ProjectExplorer::ProjectNode(directory)
|
||||
{
|
||||
m_target = target;
|
||||
@@ -176,7 +176,7 @@ CMakeTargetNode::CMakeTargetNode(const Utils::FileName &directory, const QString
|
||||
setIsProduct();
|
||||
}
|
||||
|
||||
QString CMakeTargetNode::generateId(const Utils::FileName &directory, const QString &target)
|
||||
QString CMakeTargetNode::generateId(const Utils::FilePath &directory, const QString &target)
|
||||
{
|
||||
return directory.toString() + "///::///" + target;
|
||||
}
|
||||
@@ -249,19 +249,19 @@ bool CMakeTargetNode::addFiles(const QStringList &filePaths, QStringList *)
|
||||
return true; // Return always true as autoadd is not supported!
|
||||
}
|
||||
|
||||
Utils::optional<Utils::FileName> CMakeTargetNode::visibleAfterAddFileAction() const
|
||||
Utils::optional<Utils::FilePath> CMakeTargetNode::visibleAfterAddFileAction() const
|
||||
{
|
||||
return filePath().pathAppended("CMakeLists.txt");
|
||||
}
|
||||
|
||||
void CMakeTargetNode::setTargetInformation(const QList<Utils::FileName> &artifacts,
|
||||
void CMakeTargetNode::setTargetInformation(const QList<Utils::FilePath> &artifacts,
|
||||
const QString &type)
|
||||
{
|
||||
m_tooltip = QCoreApplication::translate("CMakeTargetNode", "Target type: ") + type + "<br>";
|
||||
if (artifacts.isEmpty()) {
|
||||
m_tooltip += QCoreApplication::translate("CMakeTargetNode", "No build artifacts");
|
||||
} else {
|
||||
const QStringList tmp = Utils::transform(artifacts, &Utils::FileName::toUserOutput);
|
||||
const QStringList tmp = Utils::transform(artifacts, &Utils::FilePath::toUserOutput);
|
||||
m_tooltip += QCoreApplication::translate("CMakeTargetNode", "Build artifacts:") + "<br>"
|
||||
+ tmp.join("<br>");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user