aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-05-28 13:49:26 +0200
committerhjk <hjk@qt.io>2019-05-28 12:23:26 +0000
commit473a741c9fcf09febba312464fab8385e2351181 (patch)
tree2d328a090993cb5c5fd34b43e9468bcbf7e4d4d0 /src/plugins/projectexplorer
parent4704f49fbb1201ebf10ab9dbaed0275ff25faba8 (diff)
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>
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r--src/plugins/projectexplorer/abi.cpp4
-rw-r--r--src/plugins/projectexplorer/abi.h4
-rw-r--r--src/plugins/projectexplorer/abstractprocessstep.cpp2
-rw-r--r--src/plugins/projectexplorer/abstractprocessstep.h2
-rw-r--r--src/plugins/projectexplorer/addrunconfigdialog.cpp6
-rw-r--r--src/plugins/projectexplorer/allprojectsfilter.cpp2
-rw-r--r--src/plugins/projectexplorer/allprojectsfind.cpp2
-rw-r--r--src/plugins/projectexplorer/baseprojectwizarddialog.cpp2
-rw-r--r--src/plugins/projectexplorer/buildconfiguration.cpp10
-rw-r--r--src/plugins/projectexplorer/buildconfiguration.h8
-rw-r--r--src/plugins/projectexplorer/buildinfo.h2
-rw-r--r--src/plugins/projectexplorer/buildtargetinfo.h6
-rw-r--r--src/plugins/projectexplorer/clangparser.cpp28
-rw-r--r--src/plugins/projectexplorer/currentprojectfilter.cpp2
-rw-r--r--src/plugins/projectexplorer/customexecutablerunconfiguration.cpp4
-rw-r--r--src/plugins/projectexplorer/customparser.cpp16
-rw-r--r--src/plugins/projectexplorer/customparser.h2
-rw-r--r--src/plugins/projectexplorer/customtoolchain.cpp18
-rw-r--r--src/plugins/projectexplorer/customtoolchain.h14
-rw-r--r--src/plugins/projectexplorer/deployablefile.cpp4
-rw-r--r--src/plugins/projectexplorer/deployablefile.h6
-rw-r--r--src/plugins/projectexplorer/deploymentdata.cpp2
-rw-r--r--src/plugins/projectexplorer/deploymentdata.h8
-rw-r--r--src/plugins/projectexplorer/devicesupport/devicemanager.cpp8
-rw-r--r--src/plugins/projectexplorer/devicesupport/devicemanager.h6
-rw-r--r--src/plugins/projectexplorer/devicesupport/sshsettingspage.cpp4
-rw-r--r--src/plugins/projectexplorer/editorconfiguration.cpp2
-rw-r--r--src/plugins/projectexplorer/extraabi.cpp2
-rw-r--r--src/plugins/projectexplorer/extracompiler.cpp38
-rw-r--r--src/plugins/projectexplorer/extracompiler.h44
-rw-r--r--src/plugins/projectexplorer/fileinsessionfinder.cpp10
-rw-r--r--src/plugins/projectexplorer/fileinsessionfinder.h2
-rw-r--r--src/plugins/projectexplorer/foldernavigationwidget.cpp56
-rw-r--r--src/plugins/projectexplorer/foldernavigationwidget.h12
-rw-r--r--src/plugins/projectexplorer/gccparser.cpp178
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.cpp88
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.h22
-rw-r--r--src/plugins/projectexplorer/gcctoolchainfactories.h10
-rw-r--r--src/plugins/projectexplorer/gnumakeparser.cpp38
-rw-r--r--src/plugins/projectexplorer/importwidget.cpp4
-rw-r--r--src/plugins/projectexplorer/importwidget.h6
-rw-r--r--src/plugins/projectexplorer/ioutputparser.cpp2
-rw-r--r--src/plugins/projectexplorer/ioutputparser.h2
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonkitspage.cpp2
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonprojectpage.cpp2
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp2
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp14
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h4
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp2
-rw-r--r--src/plugins/projectexplorer/kit.cpp8
-rw-r--r--src/plugins/projectexplorer/kit.h4
-rw-r--r--src/plugins/projectexplorer/kitinformation.cpp30
-rw-r--r--src/plugins/projectexplorer/kitinformation.h4
-rw-r--r--src/plugins/projectexplorer/kitmanager.cpp10
-rw-r--r--src/plugins/projectexplorer/kitmanager.h2
-rw-r--r--src/plugins/projectexplorer/kitmanagerconfigwidget.cpp6
-rw-r--r--src/plugins/projectexplorer/ldparser.cpp10
-rw-r--r--src/plugins/projectexplorer/linuxiccparser.cpp12
-rw-r--r--src/plugins/projectexplorer/makestep.cpp18
-rw-r--r--src/plugins/projectexplorer/makestep.h10
-rw-r--r--src/plugins/projectexplorer/msvcparser.cpp74
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.cpp34
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.h10
-rw-r--r--src/plugins/projectexplorer/osparser.cpp4
-rw-r--r--src/plugins/projectexplorer/outputparser_test.cpp2
-rw-r--r--src/plugins/projectexplorer/processparameters.cpp14
-rw-r--r--src/plugins/projectexplorer/processparameters.h20
-rw-r--r--src/plugins/projectexplorer/processstep.cpp4
-rw-r--r--src/plugins/projectexplorer/project.cpp56
-rw-r--r--src/plugins/projectexplorer/project.h16
-rw-r--r--src/plugins/projectexplorer/projectconfigurationaspects.cpp12
-rw-r--r--src/plugins/projectexplorer/projectconfigurationaspects.h6
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp38
-rw-r--r--src/plugins/projectexplorer/projectexplorer.h4
-rw-r--r--src/plugins/projectexplorer/projectexplorersettingspage.cpp2
-rw-r--r--src/plugins/projectexplorer/projectfilewizardextension.cpp2
-rw-r--r--src/plugins/projectexplorer/projectimporter.cpp10
-rw-r--r--src/plugins/projectexplorer/projectimporter.h14
-rw-r--r--src/plugins/projectexplorer/projectmanager.h8
-rw-r--r--src/plugins/projectexplorer/projectmodels.cpp18
-rw-r--r--src/plugins/projectexplorer/projectmodels.h2
-rw-r--r--src/plugins/projectexplorer/projectnodes.cpp44
-rw-r--r--src/plugins/projectexplorer/projectnodes.h42
-rw-r--r--src/plugins/projectexplorer/projecttree.cpp14
-rw-r--r--src/plugins/projectexplorer/projecttree.h6
-rw-r--r--src/plugins/projectexplorer/projecttreewidget.cpp6
-rw-r--r--src/plugins/projectexplorer/projecttreewidget.h6
-rw-r--r--src/plugins/projectexplorer/projectwindow.cpp2
-rw-r--r--src/plugins/projectexplorer/projectwizardpage.cpp2
-rw-r--r--src/plugins/projectexplorer/runconfiguration.cpp6
-rw-r--r--src/plugins/projectexplorer/runconfiguration.h6
-rw-r--r--src/plugins/projectexplorer/runconfigurationaspects.cpp20
-rw-r--r--src/plugins/projectexplorer/runconfigurationaspects.h16
-rw-r--r--src/plugins/projectexplorer/selectablefilesmodel.cpp54
-rw-r--r--src/plugins/projectexplorer/selectablefilesmodel.h44
-rw-r--r--src/plugins/projectexplorer/session.cpp22
-rw-r--r--src/plugins/projectexplorer/session.h4
-rw-r--r--src/plugins/projectexplorer/targetsetuppage.cpp10
-rw-r--r--src/plugins/projectexplorer/targetsetuppage.h4
-rw-r--r--src/plugins/projectexplorer/task.cpp12
-rw-r--r--src/plugins/projectexplorer/task.h8
-rw-r--r--src/plugins/projectexplorer/taskhub.cpp8
-rw-r--r--src/plugins/projectexplorer/taskhub.h2
-rw-r--r--src/plugins/projectexplorer/taskmodel.cpp2
-rw-r--r--src/plugins/projectexplorer/taskwindow.cpp2
-rw-r--r--src/plugins/projectexplorer/toolchain.cpp4
-rw-r--r--src/plugins/projectexplorer/toolchain.h12
-rw-r--r--src/plugins/projectexplorer/toolchainmanager.cpp4
-rw-r--r--src/plugins/projectexplorer/toolchainmanager.h4
-rw-r--r--src/plugins/projectexplorer/toolchainsettingsaccessor.cpp10
-rw-r--r--src/plugins/projectexplorer/treescanner.cpp14
-rw-r--r--src/plugins/projectexplorer/treescanner.h14
-rw-r--r--src/plugins/projectexplorer/userfileaccessor.cpp38
-rw-r--r--src/plugins/projectexplorer/userfileaccessor.h6
-rw-r--r--src/plugins/projectexplorer/xcodebuildparser.cpp10
115 files changed, 818 insertions, 818 deletions
diff --git a/src/plugins/projectexplorer/abi.cpp b/src/plugins/projectexplorer/abi.cpp
index a719bc3ee0..e4e4c13e64 100644
--- a/src/plugins/projectexplorer/abi.cpp
+++ b/src/plugins/projectexplorer/abi.cpp
@@ -983,7 +983,7 @@ Abi Abi::hostAbi()
}
//! Extract available ABIs from a binary using heuristics.
-Abis Abi::abisOfBinary(const Utils::FileName &path)
+Abis Abi::abisOfBinary(const Utils::FilePath &path)
{
Abis tmp;
if (path.isEmpty())
@@ -1233,7 +1233,7 @@ void ProjectExplorer::ProjectExplorerPlugin::testAbiOfBinary()
QFETCH(QString, file);
QFETCH(QStringList, abis);
- const Abis result = Abi::abisOfBinary(Utils::FileName::fromString(file));
+ const Abis result = Abi::abisOfBinary(Utils::FilePath::fromString(file));
QCOMPARE(result.count(), abis.count());
for (int i = 0; i < abis.count(); ++i)
QCOMPARE(result.at(i).toString(), abis.at(i));
diff --git a/src/plugins/projectexplorer/abi.h b/src/plugins/projectexplorer/abi.h
index 7097e03629..ddca225896 100644
--- a/src/plugins/projectexplorer/abi.h
+++ b/src/plugins/projectexplorer/abi.h
@@ -34,7 +34,7 @@
#include <vector>
-namespace Utils { class FileName; }
+namespace Utils { class FilePath; }
namespace ProjectExplorer {
@@ -160,7 +160,7 @@ public:
static Abi fromString(const QString &abiString);
static Abi hostAbi();
- static Abis abisOfBinary(const Utils::FileName &path);
+ static Abis abisOfBinary(const Utils::FilePath &path);
private:
diff --git a/src/plugins/projectexplorer/abstractprocessstep.cpp b/src/plugins/projectexplorer/abstractprocessstep.cpp
index 6073a168e6..106f58b006 100644
--- a/src/plugins/projectexplorer/abstractprocessstep.cpp
+++ b/src/plugins/projectexplorer/abstractprocessstep.cpp
@@ -432,7 +432,7 @@ void AbstractProcessStep::taskAdded(const Task &task, int linkedOutputLines, int
while (filePath.startsWith("../"))
filePath.remove(0, 3);
bool found = false;
- const Utils::FileNameList candidates
+ const Utils::FilePathList candidates
= d->m_fileFinder.findFile(QUrl::fromLocalFile(filePath), &found);
if (found && candidates.size() == 1)
editable.file = candidates.first();
diff --git a/src/plugins/projectexplorer/abstractprocessstep.h b/src/plugins/projectexplorer/abstractprocessstep.h
index df31a99eb1..b21a6bdb25 100644
--- a/src/plugins/projectexplorer/abstractprocessstep.h
+++ b/src/plugins/projectexplorer/abstractprocessstep.h
@@ -29,7 +29,7 @@
#include <QProcess>
-namespace Utils { class FileName; }
+namespace Utils { class FilePath; }
namespace ProjectExplorer {
class IOutputParser;
diff --git a/src/plugins/projectexplorer/addrunconfigdialog.cpp b/src/plugins/projectexplorer/addrunconfigdialog.cpp
index dacdbac678..647959eb15 100644
--- a/src/plugins/projectexplorer/addrunconfigdialog.cpp
+++ b/src/plugins/projectexplorer/addrunconfigdialog.cpp
@@ -54,7 +54,7 @@ class CandidateTreeItem : public TreeItem
{
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::AddRunConfigDialog)
public:
- CandidateTreeItem(const RunConfigurationCreationInfo &rci, const FileName &projectRoot)
+ CandidateTreeItem(const RunConfigurationCreationInfo &rci, const FilePath &projectRoot)
: m_creationInfo(rci), m_projectRoot(projectRoot)
{ }
@@ -69,7 +69,7 @@ private:
if (column == 0 && role == Qt::DisplayRole)
return m_creationInfo.displayName;
if (column == 1 && role == Qt::DisplayRole) {
- FileName displayPath = m_creationInfo.projectFilePath.relativeChildPath(m_projectRoot);
+ FilePath displayPath = m_creationInfo.projectFilePath.relativeChildPath(m_projectRoot);
if (displayPath.isEmpty()) {
displayPath = m_creationInfo.projectFilePath;
QTC_CHECK(displayPath.isEmpty());
@@ -80,7 +80,7 @@ private:
}
const RunConfigurationCreationInfo m_creationInfo;
- const FileName m_projectRoot;
+ const FilePath m_projectRoot;
};
class CandidatesModel : public TreeModel<TreeItem, CandidateTreeItem>
diff --git a/src/plugins/projectexplorer/allprojectsfilter.cpp b/src/plugins/projectexplorer/allprojectsfilter.cpp
index 24371ad4e1..ab17127d73 100644
--- a/src/plugins/projectexplorer/allprojectsfilter.cpp
+++ b/src/plugins/projectexplorer/allprojectsfilter.cpp
@@ -59,7 +59,7 @@ void AllProjectsFilter::prepareSearch(const QString &entry)
if (!fileIterator()) {
QStringList paths;
for (Project *project : SessionManager::projects())
- paths.append(Utils::transform(project->files(Project::AllFiles), &Utils::FileName::toString));
+ paths.append(Utils::transform(project->files(Project::AllFiles), &Utils::FilePath::toString));
Utils::sort(paths);
setFileIterator(new BaseFileFilter::ListIterator(paths));
}
diff --git a/src/plugins/projectexplorer/allprojectsfind.cpp b/src/plugins/projectexplorer/allprojectsfind.cpp
index aa0d7c6fbc..d41f21f1b7 100644
--- a/src/plugins/projectexplorer/allprojectsfind.cpp
+++ b/src/plugins/projectexplorer/allprojectsfind.cpp
@@ -88,7 +88,7 @@ Utils::FileIterator *AllProjectsFind::filesForProjects(const QStringList &nameFi
QTextCodec *projectCodec = config->useGlobalSettings()
? Core::EditorManager::defaultTextCodec()
: config->textCodec();
- const QStringList filteredFiles = filterFiles(Utils::transform(project->files(Project::AllFiles), &Utils::FileName::toString));
+ const QStringList filteredFiles = filterFiles(Utils::transform(project->files(Project::AllFiles), &Utils::FilePath::toString));
for (const QString &fileName : filteredFiles) {
QTextCodec *codec = openEditorEncodings.value(fileName);
if (!codec)
diff --git a/src/plugins/projectexplorer/baseprojectwizarddialog.cpp b/src/plugins/projectexplorer/baseprojectwizarddialog.cpp
index cb0734f226..14551d1d44 100644
--- a/src/plugins/projectexplorer/baseprojectwizarddialog.cpp
+++ b/src/plugins/projectexplorer/baseprojectwizarddialog.cpp
@@ -142,7 +142,7 @@ void BaseProjectWizardDialog::slotAccepted()
{
if (d->introPage->useAsDefaultPath()) {
// Store the path as default path for new projects if desired.
- Core::DocumentManager::setProjectsDirectory(Utils::FileName::fromString(path()));
+ Core::DocumentManager::setProjectsDirectory(Utils::FilePath::fromString(path()));
Core::DocumentManager::setUseProjectsDirectory(true);
}
}
diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp
index 45dee444cf..e267822b97 100644
--- a/src/plugins/projectexplorer/buildconfiguration.cpp
+++ b/src/plugins/projectexplorer/buildconfiguration.cpp
@@ -102,19 +102,19 @@ BuildConfiguration::BuildConfiguration(Target *target, Core::Id id)
});
}
-Utils::FileName BuildConfiguration::buildDirectory() const
+Utils::FilePath BuildConfiguration::buildDirectory() const
{
QString path = environment().expandVariables(m_buildDirectoryAspect->value().trimmed());
path = QDir::cleanPath(macroExpander()->expand(path));
- return Utils::FileName::fromString(QDir::cleanPath(QDir(target()->project()->projectDirectory().toString()).absoluteFilePath(path)));
+ return Utils::FilePath::fromString(QDir::cleanPath(QDir(target()->project()->projectDirectory().toString()).absoluteFilePath(path)));
}
-Utils::FileName BuildConfiguration::rawBuildDirectory() const
+Utils::FilePath BuildConfiguration::rawBuildDirectory() const
{
return m_buildDirectoryAspect->fileName();
}
-void BuildConfiguration::setBuildDirectory(const Utils::FileName &dir)
+void BuildConfiguration::setBuildDirectory(const Utils::FilePath &dir)
{
if (dir == m_buildDirectoryAspect->fileName())
return;
@@ -382,7 +382,7 @@ void BuildConfiguration::prependCompilerPathToEnvironment(Kit *k, Utils::Environ
if (!tc)
return;
- const Utils::FileName compilerDir = tc->compilerCommand().parentDir();
+ const Utils::FilePath compilerDir = tc->compilerCommand().parentDir();
if (!compilerDir.isEmpty())
env.prependOrSetPath(compilerDir.toString());
}
diff --git a/src/plugins/projectexplorer/buildconfiguration.h b/src/plugins/projectexplorer/buildconfiguration.h
index fb16fa0cd6..c9ba394946 100644
--- a/src/plugins/projectexplorer/buildconfiguration.h
+++ b/src/plugins/projectexplorer/buildconfiguration.h
@@ -51,9 +51,9 @@ protected:
explicit BuildConfiguration(Target *target, Core::Id id);
public:
- Utils::FileName buildDirectory() const;
- Utils::FileName rawBuildDirectory() const;
- void setBuildDirectory(const Utils::FileName &dir);
+ Utils::FilePath buildDirectory() const;
+ Utils::FilePath rawBuildDirectory() const;
+ void setBuildDirectory(const Utils::FilePath &dir);
virtual NamedWidget *createConfigWidget();
virtual QList<NamedWidget *> createSubConfigWidgets();
@@ -120,7 +120,7 @@ private:
QList<Utils::EnvironmentItem> m_userEnvironmentChanges;
QList<BuildStepList *> m_stepLists;
ProjectExplorer::BaseStringAspect *m_buildDirectoryAspect = nullptr;
- Utils::FileName m_lastEmmitedBuildDirectory;
+ Utils::FilePath m_lastEmmitedBuildDirectory;
mutable Utils::Environment m_cachedEnvironment;
QString m_configWidgetDisplayName;
bool m_configWidgetHasFrame = false;
diff --git a/src/plugins/projectexplorer/buildinfo.h b/src/plugins/projectexplorer/buildinfo.h
index e135959352..41dfd78180 100644
--- a/src/plugins/projectexplorer/buildinfo.h
+++ b/src/plugins/projectexplorer/buildinfo.h
@@ -46,7 +46,7 @@ public:
QString displayName;
QString typeName;
- Utils::FileName buildDirectory;
+ Utils::FilePath buildDirectory;
Core::Id kitId;
BuildConfiguration::BuildType buildType = BuildConfiguration::Unknown;
diff --git a/src/plugins/projectexplorer/buildtargetinfo.h b/src/plugins/projectexplorer/buildtargetinfo.h
index 1658ff54ad..28af0330a4 100644
--- a/src/plugins/projectexplorer/buildtargetinfo.h
+++ b/src/plugins/projectexplorer/buildtargetinfo.h
@@ -42,9 +42,9 @@ public:
QString displayName;
QString displayNameUniquifier;
- Utils::FileName targetFilePath;
- Utils::FileName projectFilePath;
- Utils::FileName workingDirectory;
+ Utils::FilePath targetFilePath;
+ Utils::FilePath projectFilePath;
+ Utils::FilePath workingDirectory;
bool isQtcRunnable = true;
bool usesTerminal = false;
diff --git a/src/plugins/projectexplorer/clangparser.cpp b/src/plugins/projectexplorer/clangparser.cpp
index ced5bda3a2..1859f25896 100644
--- a/src/plugins/projectexplorer/clangparser.cpp
+++ b/src/plugins/projectexplorer/clangparser.cpp
@@ -68,7 +68,7 @@ void ClangParser::stdError(const QString &line)
m_expectSnippet = true;
Task task(taskType(match.captured(3)),
match.captured(4),
- Utils::FileName(), /* filename */
+ Utils::FilePath(), /* filename */
-1, /* line */
Constants::TASK_CATEGORY_COMPILE);
newTask(task);
@@ -80,7 +80,7 @@ void ClangParser::stdError(const QString &line)
m_expectSnippet = true;
newTask(Task(Task::Unknown,
lne.trimmed(),
- Utils::FileName::fromUserInput(match.captured(2)), /* filename */
+ Utils::FilePath::fromUserInput(match.captured(2)), /* filename */
match.captured(3).toInt(), /* line */
Constants::TASK_CATEGORY_COMPILE));
return;
@@ -95,7 +95,7 @@ void ClangParser::stdError(const QString &line)
lineNo = match.captured(5).toInt(&ok);
Task task(taskType(match.captured(7)),
match.captured(8),
- Utils::FileName::fromUserInput(match.captured(1)), /* filename */
+ Utils::FilePath::fromUserInput(match.captured(1)), /* filename */
lineNo,
Core::Id(Constants::TASK_CATEGORY_COMPILE));
newTask(task);
@@ -107,7 +107,7 @@ void ClangParser::stdError(const QString &line)
m_expectSnippet = true;
Task task(Task::Error,
match.captured(1),
- Utils::FileName(),
+ Utils::FilePath(),
-1,
Core::Id(Constants::TASK_CATEGORY_COMPILE));
newTask(task);
@@ -164,7 +164,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
<< (Tasks()
<< Task(Task::Warning,
QLatin1String("argument unused during compilation: '-mthreads'"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
categoryCompile))
<< QString();
QTest::newRow("clang++ error")
@@ -174,7 +174,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
<< (Tasks()
<< Task(Task::Error,
QLatin1String("no input files [err_drv_no_input_files]"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
categoryCompile))
<< QString();
QTest::newRow("complex warning")
@@ -187,13 +187,13 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
<< (Tasks()
<< Task(Task::Unknown,
QLatin1String("In file included from ..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h:45:"),
- Utils::FileName::fromUserInput(QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h")), 45,
+ Utils::FilePath::fromUserInput(QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qnamespace.h")), 45,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("unknown attribute 'dllimport' ignored [-Wunknown-attributes]\n"
"class Q_CORE_EXPORT QSysInfo {\n"
" ^"),
- Utils::FileName::fromUserInput(QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qglobal.h")), 1425,
+ Utils::FilePath::fromUserInput(QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qglobal.h")), 1425,
categoryCompile))
<< QString();
QTest::newRow("note")
@@ -207,7 +207,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QLatin1String("instantiated from:\n"
"# define Q_CORE_EXPORT Q_DECL_IMPORT\n"
" ^"),
- Utils::FileName::fromUserInput(QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qglobal.h")), 1289,
+ Utils::FilePath::fromUserInput(QLatin1String("..\\..\\..\\QtSDK1.1\\Desktop\\Qt\\4.7.3\\mingw\\include/QtCore/qglobal.h")), 1289,
categoryCompile))
<< QString();
QTest::newRow("fatal error")
@@ -221,7 +221,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QLatin1String("'bits/c++config.h' file not found\n"
"#include <bits/c++config.h>\n"
" ^"),
- Utils::FileName::fromUserInput(QLatin1String("/usr/include/c++/4.6/utility")), 68,
+ Utils::FilePath::fromUserInput(QLatin1String("/usr/include/c++/4.6/utility")), 68,
categoryCompile))
<< QString();
@@ -236,7 +236,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
QLatin1String("?: has lower precedence than +; + will be evaluated first [-Wparentheses]\n"
" int x = option->rect.x() + horizontal ? 2 : 6;\n"
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^"),
- Utils::FileName::fromUserInput(QLatin1String("/home/code/src/creator/src/plugins/coreplugin/manhattanstyle.cpp")), 567,
+ Utils::FilePath::fromUserInput(QLatin1String("/home/code/src/creator/src/plugins/coreplugin/manhattanstyle.cpp")), 567,
categoryCompile))
<< QString();
QTest::newRow("code sign error")
@@ -248,11 +248,11 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
<< (Tasks()
<< Task(Task::Error,
QLatin1String("No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) were found."),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("code signing is required for product type 'Application' in SDK 'iOS 7.0'"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
categoryCompile))
<< QString();
QTest::newRow("moc note")
@@ -262,7 +262,7 @@ void ProjectExplorerPlugin::testClangOutputParser_data()
<< (Tasks()
<< Task(Task::Unknown,
QLatin1String("Note: No relevant classes found. No output generated."),
- Utils::FileName::fromUserInput(QLatin1String("/home/qtwebkithelpviewer.h")), 0,
+ Utils::FilePath::fromUserInput(QLatin1String("/home/qtwebkithelpviewer.h")), 0,
categoryCompile)
)
<< QString();
diff --git a/src/plugins/projectexplorer/currentprojectfilter.cpp b/src/plugins/projectexplorer/currentprojectfilter.cpp
index 13c0d308db..0e924eeb2a 100644
--- a/src/plugins/projectexplorer/currentprojectfilter.cpp
+++ b/src/plugins/projectexplorer/currentprojectfilter.cpp
@@ -58,7 +58,7 @@ void CurrentProjectFilter::prepareSearch(const QString &entry)
if (!fileIterator()) {
QStringList paths;
if (m_project)
- paths = Utils::transform(m_project->files(Project::AllFiles), &Utils::FileName::toString);
+ paths = Utils::transform(m_project->files(Project::AllFiles), &Utils::FilePath::toString);
setFileIterator(new BaseFileFilter::ListIterator(paths));
}
BaseFileFilter::prepareSearch(entry);
diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
index 562b7f6560..957b742474 100644
--- a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
+++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
@@ -145,7 +145,7 @@ CustomExecutableDialog::CustomExecutableDialog(RunConfiguration *rc)
void CustomExecutableDialog::accept()
{
- auto executable = FileName::fromString(m_executableChooser->path());
+ auto executable = FilePath::fromString(m_executableChooser->path());
m_rc->aspect<ExecutableAspect>()->setExecutable(executable);
copyAspect(&m_arguments, m_rc->aspect<ArgumentsAspect>());
copyAspect(&m_workingDirectory, m_rc->aspect<WorkingDirectoryAspect>());
@@ -251,7 +251,7 @@ bool CustomExecutableRunConfiguration::isConfigured() const
Runnable CustomExecutableRunConfiguration::runnable() const
{
- FileName workingDirectory =
+ FilePath workingDirectory =
aspect<WorkingDirectoryAspect>()->workingDirectory(macroExpander());
Runnable r;
diff --git a/src/plugins/projectexplorer/customparser.cpp b/src/plugins/projectexplorer/customparser.cpp
index dfdb71c4d4..c408dfc2c6 100644
--- a/src/plugins/projectexplorer/customparser.cpp
+++ b/src/plugins/projectexplorer/customparser.cpp
@@ -150,12 +150,12 @@ Core::Id CustomParser::id()
return Core::Id("ProjectExplorer.OutputParser.Custom");
}
-FileName CustomParser::absoluteFilePath(const QString &filePath) const
+FilePath CustomParser::absoluteFilePath(const QString &filePath) const
{
if (m_workingDirectory.isEmpty())
- return FileName::fromUserInput(filePath);
+ return FilePath::fromUserInput(filePath);
- return FileName::fromString(FileUtils::resolvePath(m_workingDirectory, filePath));
+ return FilePath::fromString(FileUtils::resolvePath(m_workingDirectory, filePath));
}
bool CustomParser::hasMatch(const QString &line, CustomParserExpression::CustomParserChannel channel,
@@ -171,7 +171,7 @@ bool CustomParser::hasMatch(const QString &line, CustomParserExpression::CustomP
if (!match.hasMatch())
return false;
- const FileName fileName = absoluteFilePath(match.captured(expression.fileNameCap()));
+ const FilePath fileName = absoluteFilePath(match.captured(expression.fileNameCap()));
const int lineNumber = match.captured(expression.lineNumberCap()).toInt();
const QString message = match.captured(expression.messageCap());
@@ -220,7 +220,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
const Core::Id categoryCompile = Constants::TASK_CATEGORY_COMPILE;
const QString simplePattern = "^([a-z]+\\.[a-z]+):(\\d+): error: ([^\\s].+)$";
- const FileName fileName = FileName::fromUserInput("main.c");
+ const FilePath fileName = FilePath::fromUserInput("main.c");
QTest::newRow("empty patterns")
<< QString::fromLatin1("Sometext")
@@ -272,7 +272,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
const QString pathPattern = "^([a-z\\./]+):(\\d+): error: ([^\\s].+)$";
QString workingDir = "/home/src/project";
- FileName expandedFileName = FileName::fromString("/home/src/project/main.c");
+ FilePath expandedFileName = FilePath::fromString("/home/src/project/main.c");
QTest::newRow("simple error with expanded path")
<< "main.c:9: error: `sfasdf' undeclared (first use this function)"
@@ -285,7 +285,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
<< Tasks{Task(Task::Error, message, expandedFileName, 9, categoryCompile)}
<< QString();
- expandedFileName = FileName::fromString("/home/src/project/subdir/main.c");
+ expandedFileName = FilePath::fromString("/home/src/project/subdir/main.c");
QTest::newRow("simple error with subdir path")
<< "subdir/main.c:9: error: `sfasdf' undeclared (first use this function)"
<< workingDir
@@ -432,7 +432,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers_data()
<< QString();
const QString unitTestError = "../LedDriver/LedDriverTest.c:63: FAIL: Expected 0x0080 Was 0xffff";
- const FileName unitTestFileName = FileName::fromUserInput("../LedDriver/LedDriverTest.c");
+ const FilePath unitTestFileName = FilePath::fromUserInput("../LedDriver/LedDriverTest.c");
const QString unitTestMessage = "Expected 0x0080 Was 0xffff";
const QString unitTestPattern = "^([^:]+):(\\d+): FAIL: ([^\\s].+)$";
const int unitTestLineNumber = 63;
diff --git a/src/plugins/projectexplorer/customparser.h b/src/plugins/projectexplorer/customparser.h
index b7c70d4759..dafb0e8da1 100644
--- a/src/plugins/projectexplorer/customparser.h
+++ b/src/plugins/projectexplorer/customparser.h
@@ -96,7 +96,7 @@ public:
static Core::Id id();
private:
- Utils::FileName absoluteFilePath(const QString &filePath) const;
+ Utils::FilePath absoluteFilePath(const QString &filePath) const;
bool hasMatch(const QString &line, CustomParserExpression::CustomParserChannel channel,
const CustomParserExpression &expression, Task::TaskType taskType);
bool parseLine(const QString &rawLine, CustomParserExpression::CustomParserChannel channel);
diff --git a/src/plugins/projectexplorer/customtoolchain.cpp b/src/plugins/projectexplorer/customtoolchain.cpp
index 1432a0e2dc..e1175963ea 100644
--- a/src/plugins/projectexplorer/customtoolchain.cpp
+++ b/src/plugins/projectexplorer/customtoolchain.cpp
@@ -176,7 +176,7 @@ ToolChain::BuiltInHeaderPathsRunner CustomToolChain::createBuiltInHeaderPathsRun
}
HeaderPaths CustomToolChain::builtInHeaderPaths(const QStringList &cxxFlags,
- const FileName &fileName) const
+ const FilePath &fileName) const
{
return createBuiltInHeaderPathsRunner()(cxxFlags, fileName.toString(), "");
}
@@ -184,9 +184,9 @@ HeaderPaths CustomToolChain::builtInHeaderPaths(const QStringList &cxxFlags,
void CustomToolChain::addToEnvironment(Environment &env) const
{
if (!m_compilerCommand.isEmpty()) {
- FileName path = m_compilerCommand.parentDir();
+ FilePath path = m_compilerCommand.parentDir();
env.prependOrSetPath(path.toString());
- FileName makePath = m_makeCommand.parentDir();
+ FilePath makePath = m_makeCommand.parentDir();
if (makePath != path)
env.prependOrSetPath(makePath.toString());
}
@@ -229,7 +229,7 @@ void CustomToolChain::setHeaderPaths(const QStringList &list)
toolChainUpdated();
}
-void CustomToolChain::setCompilerCommand(const FileName &path)
+void CustomToolChain::setCompilerCommand(const FilePath &path)
{
if (path == m_compilerCommand)
return;
@@ -237,12 +237,12 @@ void CustomToolChain::setCompilerCommand(const FileName &path)
toolChainUpdated();
}
-FileName CustomToolChain::compilerCommand() const
+FilePath CustomToolChain::compilerCommand() const
{
return m_compilerCommand;
}
-void CustomToolChain::setMakeCommand(const FileName &path)
+void CustomToolChain::setMakeCommand(const FilePath &path)
{
if (path == m_makeCommand)
return;
@@ -250,7 +250,7 @@ void CustomToolChain::setMakeCommand(const FileName &path)
toolChainUpdated();
}
-FileName CustomToolChain::makeCommand(const Environment &) const
+FilePath CustomToolChain::makeCommand(const Environment &) const
{
return m_makeCommand;
}
@@ -315,8 +315,8 @@ bool CustomToolChain::fromMap(const QVariantMap &data)
if (!ToolChain::fromMap(data))
return false;
- m_compilerCommand = FileName::fromString(data.value(QLatin1String(compilerCommandKeyC)).toString());
- m_makeCommand = FileName::fromString(data.value(QLatin1String(makeCommandKeyC)).toString());
+ m_compilerCommand = FilePath::fromString(data.value(QLatin1String(compilerCommandKeyC)).toString());
+ m_makeCommand = FilePath::fromString(data.value(QLatin1String(makeCommandKeyC)).toString());
m_targetAbi = Abi::fromString(data.value(QLatin1String(targetAbiKeyC)).toString());
const QStringList macros = data.value(QLatin1String(predefinedMacrosKeyC)).toStringList();
m_predefinedMacros = Macro::toMacros(macros.join('\n').toUtf8());
diff --git a/src/plugins/projectexplorer/customtoolchain.h b/src/plugins/projectexplorer/customtoolchain.h
index 9746271179..415cf89abd 100644
--- a/src/plugins/projectexplorer/customtoolchain.h
+++ b/src/plugins/projectexplorer/customtoolchain.h
@@ -80,7 +80,7 @@ public:
BuiltInHeaderPathsRunner createBuiltInHeaderPathsRunner() const override;
HeaderPaths builtInHeaderPaths(const QStringList &cxxFlags,
- const Utils::FileName &) const override;
+ const Utils::FilePath &) const override;
void addToEnvironment(Utils::Environment &env) const override;
QStringList suggestedMkspecList() const override;
IOutputParser *outputParser() const override;
@@ -94,10 +94,10 @@ public:
bool operator ==(const ToolChain &) const override;
- void setCompilerCommand(const Utils::FileName &);
- Utils::FileName compilerCommand() const override;
- void setMakeCommand(const Utils::FileName &);
- Utils::FileName makeCommand(const Utils::Environment &environment) const override;
+ void setCompilerCommand(const Utils::FilePath &);
+ Utils::FilePath compilerCommand() const override;
+ void setMakeCommand(const Utils::FilePath &);
+ Utils::FilePath makeCommand(const Utils::Environment &environment) const override;
void setCxx11Flags(const QStringList &);
const QStringList &cxx11Flags() const;
@@ -114,8 +114,8 @@ public:
private:
CustomToolChain();
- Utils::FileName m_compilerCommand;
- Utils::FileName m_makeCommand;
+ Utils::FilePath m_compilerCommand;
+ Utils::FilePath m_makeCommand;
Abi m_targetAbi;
Macros m_predefinedMacros;
diff --git a/src/plugins/projectexplorer/deployablefile.cpp b/src/plugins/projectexplorer/deployablefile.cpp
index 1d7b6132c1..d8ea6cd33a 100644
--- a/src/plugins/projectexplorer/deployablefile.cpp
+++ b/src/plugins/projectexplorer/deployablefile.cpp
@@ -34,10 +34,10 @@ using namespace Utils;
namespace ProjectExplorer {
DeployableFile::DeployableFile(const QString &localFilePath, const QString &remoteDir, Type type)
- : m_localFilePath(FileName::fromUserInput(localFilePath)), m_remoteDir(remoteDir), m_type(type)
+ : m_localFilePath(FilePath::fromUserInput(localFilePath)), m_remoteDir(remoteDir), m_type(type)
{ }
-DeployableFile::DeployableFile(const FileName &localFilePath, const QString &remoteDir, Type type)
+DeployableFile::DeployableFile(const FilePath &localFilePath, const QString &remoteDir, Type type)
: m_localFilePath(localFilePath), m_remoteDir(remoteDir), m_type(type)
{ }
diff --git a/src/plugins/projectexplorer/deployablefile.h b/src/plugins/projectexplorer/deployablefile.h
index 70d05c29e8..b1a6c6a1d6 100644
--- a/src/plugins/projectexplorer/deployablefile.h
+++ b/src/plugins/projectexplorer/deployablefile.h
@@ -45,10 +45,10 @@ public:
DeployableFile() = default;
DeployableFile(const QString &m_localFilePath, const QString &m_remoteDir,
Type type = TypeNormal);
- DeployableFile(const Utils::FileName &localFilePath, const QString &remoteDir,
+ DeployableFile(const Utils::FilePath &localFilePath, const QString &remoteDir,
Type type = TypeNormal);
- Utils::FileName localFilePath() const { return m_localFilePath; }
+ Utils::FilePath localFilePath() const { return m_localFilePath; }
QString remoteDirectory() const { return m_remoteDir; }
QString remoteFilePath() const;
@@ -57,7 +57,7 @@ public:
bool isExecutable() const;
private:
- Utils::FileName m_localFilePath;
+ Utils::FilePath m_localFilePath;
QString m_remoteDir;
Type m_type = TypeNormal;
};
diff --git a/src/plugins/projectexplorer/deploymentdata.cpp b/src/plugins/projectexplorer/deploymentdata.cpp
index c34b6a4044..7cdc4a1185 100644
--- a/src/plugins/projectexplorer/deploymentdata.cpp
+++ b/src/plugins/projectexplorer/deploymentdata.cpp
@@ -33,7 +33,7 @@
namespace ProjectExplorer {
-void DeploymentData::setLocalInstallRoot(const Utils::FileName &installRoot)
+void DeploymentData::setLocalInstallRoot(const Utils::FilePath &installRoot)
{
m_localInstallRoot = installRoot;
}
diff --git a/src/plugins/projectexplorer/deploymentdata.h b/src/plugins/projectexplorer/deploymentdata.h
index d9e05a1d83..e45427ebf8 100644
--- a/src/plugins/projectexplorer/deploymentdata.h
+++ b/src/plugins/projectexplorer/deploymentdata.h
@@ -39,7 +39,7 @@ enum class DeploymentKnowledge { Perfect, Approximative, Bad };
class PROJECTEXPLORER_EXPORT MakeInstallCommand
{
public:
- Utils::FileName command;
+ Utils::FilePath command;
QStringList arguments;
Utils::Environment environment;
};
@@ -50,8 +50,8 @@ public:
void setFileList(const QList<DeployableFile> &files) { m_files = files; }
QList<DeployableFile> allFiles() const { return m_files; }
- void setLocalInstallRoot(const Utils::FileName &installRoot);
- Utils::FileName localInstallRoot() const { return m_localInstallRoot; }
+ void setLocalInstallRoot(const Utils::FilePath &installRoot);
+ Utils::FilePath localInstallRoot() const { return m_localInstallRoot; }
void addFile(const DeployableFile &file);
void addFile(const QString &localFilePath, const QString &remoteDirectory,
@@ -66,7 +66,7 @@ public:
private:
QList<DeployableFile> m_files;
- Utils::FileName m_localInstallRoot;
+ Utils::FilePath m_localInstallRoot;
};
inline bool operator!=(const DeploymentData &d1, const DeploymentData &d2) { return !(d1 == d2); }
diff --git a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp
index 205752fe3d..cd6e7421aa 100644
--- a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp
+++ b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp
@@ -221,14 +221,14 @@ QVariantMap DeviceManager::toMap() const
return map;
}
-Utils::FileName DeviceManager::settingsFilePath(const QString &extension)
+Utils::FilePath DeviceManager::settingsFilePath(const QString &extension)
{
- return Utils::FileName::fromString(Core::ICore::userResourcePath() + extension);
+ return Utils::FilePath::fromString(Core::ICore::userResourcePath() + extension);
}
-Utils::FileName DeviceManager::systemSettingsFilePath(const QString &deviceFileRelativePath)
+Utils::FilePath DeviceManager::systemSettingsFilePath(const QString &deviceFileRelativePath)
{
- return Utils::FileName::fromString(Core::ICore::installerResourcePath()
+ return Utils::FilePath::fromString(Core::ICore::installerResourcePath()
+ deviceFileRelativePath);
}
diff --git a/src/plugins/projectexplorer/devicesupport/devicemanager.h b/src/plugins/projectexplorer/devicesupport/devicemanager.h
index bd9c2b606e..6f286845dd 100644
--- a/src/plugins/projectexplorer/devicesupport/devicemanager.h
+++ b/src/plugins/projectexplorer/devicesupport/devicemanager.h
@@ -33,7 +33,7 @@
#include <memory>
-namespace Utils { class FileName; }
+namespace Utils { class FilePath; }
namespace ProjectExplorer {
class IDevice;
@@ -96,8 +96,8 @@ private:
static void replaceInstance();
static void removeClonedInstance();
- static Utils::FileName settingsFilePath(const QString &extension);
- static Utils::FileName systemSettingsFilePath(const QString &deviceFileRelativePath);
+ static Utils::FilePath settingsFilePath(const QString &extension);
+ static Utils::FilePath systemSettingsFilePath(const QString &deviceFileRelativePath);
static void copy(const DeviceManager *source, DeviceManager *target, bool deep);
const std::unique_ptr<Internal::DeviceManagerPrivate> d;
diff --git a/src/plugins/projectexplorer/devicesupport/sshsettingspage.cpp b/src/plugins/projectexplorer/devicesupport/sshsettingspage.cpp
index 32b6b3e83e..152467c93e 100644
--- a/src/plugins/projectexplorer/devicesupport/sshsettingspage.cpp
+++ b/src/plugins/projectexplorer/devicesupport/sshsettingspage.cpp
@@ -58,7 +58,7 @@ private:
void setupSftpPathChooser();
void setupAskpassPathChooser();
void setupKeygenPathChooser();
- void setupPathChooser(PathChooser &chooser, const FileName &initialPath, bool &changedFlag);
+ void setupPathChooser(PathChooser &chooser, const FilePath &initialPath, bool &changedFlag);
void updateCheckboxEnabled();
void updateSpinboxEnabled();
@@ -170,7 +170,7 @@ void SshSettingsWidget::setupKeygenPathChooser()
setupPathChooser(m_keygenChooser, SshSettings::keygenFilePath(), m_keygenPathChanged);
}
-void SshSettingsWidget::setupPathChooser(PathChooser &chooser, const FileName &initialPath,
+void SshSettingsWidget::setupPathChooser(PathChooser &chooser, const FilePath &initialPath,
bool &changedFlag)
{
chooser.setExpectedKind(PathChooser::ExistingCommand);
diff --git a/src/plugins/projectexplorer/editorconfiguration.cpp b/src/plugins/projectexplorer/editorconfiguration.cpp
index 43f7b79c69..40e08d368e 100644
--- a/src/plugins/projectexplorer/editorconfiguration.cpp
+++ b/src/plugins/projectexplorer/editorconfiguration.cpp
@@ -395,7 +395,7 @@ TabSettings actualTabSettings(const QString &fileName,
{
if (baseTextdocument)
return baseTextdocument->tabSettings();
- if (Project *project = SessionManager::projectForFile(Utils::FileName::fromString(fileName)))
+ if (Project *project = SessionManager::projectForFile(Utils::FilePath::fromString(fileName)))
return project->editorConfiguration()->codeStyle()->tabSettings();
return TextEditorSettings::codeStyle()->tabSettings();
}
diff --git a/src/plugins/projectexplorer/extraabi.cpp b/src/plugins/projectexplorer/extraabi.cpp
index a1da2193fd..434994125c 100644
--- a/src/plugins/projectexplorer/extraabi.cpp
+++ b/src/plugins/projectexplorer/extraabi.cpp
@@ -65,7 +65,7 @@ AbiFlavorAccessor::AbiFlavorAccessor() :
QCoreApplication::translate("ProjectExplorer::ToolChainManager", "ABI"),
Core::Constants::IDE_DISPLAY_NAME)
{
- setBaseFilePath(FileName::fromString(Core::ICore::installerResourcePath() + "/abi.xml"));
+ setBaseFilePath(FilePath::fromString(Core::ICore::installerResourcePath() + "/abi.xml"));
addVersionUpgrader(std::make_unique<AbiFlavorUpgraderV0>());
}
diff --git a/src/plugins/projectexplorer/extracompiler.cpp b/src/plugins/projectexplorer/extracompiler.cpp
index 85fabdf623..adcc8f180e 100644
--- a/src/plugins/projectexplorer/extracompiler.cpp
+++ b/src/plugins/projectexplorer/extracompiler.cpp
@@ -57,7 +57,7 @@ class ExtraCompilerPrivate
{
public:
const Project *project;
- Utils::FileName source;
+ Utils::FilePath source;
FileNameToContentsHash contents;
Tasks issues;
QDateTime compileTime;
@@ -70,13 +70,13 @@ public:
void updateIssues();
};
-ExtraCompiler::ExtraCompiler(const Project *project, const Utils::FileName &source,
- const Utils::FileNameList &targets, QObject *parent) :
+ExtraCompiler::ExtraCompiler(const Project *project, const Utils::FilePath &source,
+ const Utils::FilePathList &targets, QObject *parent) :
QObject(parent), d(std::make_unique<ExtraCompilerPrivate>())
{
d->project = project;
d->source = source;
- foreach (const Utils::FileName &target, targets)
+ foreach (const Utils::FilePath &target, targets)
d->contents.insert(target, QByteArray());
d->timer.setSingleShot(true);
@@ -104,7 +104,7 @@ ExtraCompiler::ExtraCompiler(const Project *project, const Utils::FileName &sour
// Use existing target files, where possible. Otherwise run the compiler.
QDateTime sourceTime = d->source.toFileInfo().lastModified();
- foreach (const Utils::FileName &target, targets) {
+ foreach (const Utils::FilePath &target, targets) {
QFileInfo targetFileInfo(target.toFileInfo());
if (!targetFileInfo.exists()) {
d->dirty = true;
@@ -136,22 +136,22 @@ const Project *ExtraCompiler::project() const
return d->project;
}
-Utils::FileName ExtraCompiler::source() const
+Utils::FilePath ExtraCompiler::source() const
{
return d->source;
}
-QByteArray ExtraCompiler::content(const Utils::FileName &file) const
+QByteArray ExtraCompiler::content(const Utils::FilePath &file) const
{
return d->contents.value(file);
}
-Utils::FileNameList ExtraCompiler::targets() const
+Utils::FilePathList ExtraCompiler::targets() const
{
return d->contents.keys();
}
-void ExtraCompiler::forEachTarget(std::function<void (const Utils::FileName &)> func)
+void ExtraCompiler::forEachTarget(std::function<void (const Utils::FilePath &)> func)
{
for (auto it = d->contents.constBegin(), end = d->contents.constEnd(); it != end; ++it)
func(it.key());
@@ -183,7 +183,7 @@ void ExtraCompiler::onTargetsBuilt(Project *project)
if (d->compileTime.isValid() && d->compileTime >= sourceTime)
return;
- forEachTarget([&](const Utils::FileName &target) {
+ forEachTarget([&](const Utils::FilePath &target) {
QFileInfo fi(target.toFileInfo());
QDateTime generateTime = fi.exists() ? fi.lastModified() : QDateTime();
if (generateTime.isValid() && (generateTime > sourceTime)) {
@@ -299,7 +299,7 @@ void ExtraCompilerPrivate::updateIssues()
widget->setExtraSelections(TextEditor::TextEditorWidget::CodeWarningsSelection, selections);
}
-void ExtraCompiler::setContent(const Utils::FileName &file, const QByteArray &contents)
+void ExtraCompiler::setContent(const Utils::FilePath &file, const QByteArray &contents)
{
auto it = d->contents.find(file);
if (it != d->contents.end()) {
@@ -322,8 +322,8 @@ ExtraCompilerFactory::~ExtraCompilerFactory()
}
void ExtraCompilerFactory::annouceCreation(const Project *project,
- const Utils::FileName &source,
- const Utils::FileNameList &targets)
+ const Utils::FilePath &source,
+ const Utils::FilePathList &targets)
{
for (ExtraCompilerFactoryObserver *observer : *observers)
observer->newExtraCompiler(project, source, targets);
@@ -334,8 +334,8 @@ QList<ExtraCompilerFactory *> ExtraCompilerFactory::extraCompilerFactories()
return *factories();
}
-ProcessExtraCompiler::ProcessExtraCompiler(const Project *project, const Utils::FileName &source,
- const Utils::FileNameList &targets, QObject *parent) :
+ProcessExtraCompiler::ProcessExtraCompiler(const Project *project, const Utils::FilePath &source,
+ const Utils::FilePathList &targets, QObject *parent) :
ExtraCompiler(project, source, targets, parent)
{ }
@@ -353,7 +353,7 @@ void ProcessExtraCompiler::run(const QByteArray &sourceContents)
runImpl(contents);
}
-void ProcessExtraCompiler::run(const Utils::FileName &fileName)
+void ProcessExtraCompiler::run(const Utils::FilePath &fileName)
{
ContentProvider contents = [fileName]() {
QFile file(fileName.toString());
@@ -364,9 +364,9 @@ void ProcessExtraCompiler::run(const Utils::FileName &fileName)
runImpl(contents);
}
-Utils::FileName ProcessExtraCompiler::workingDirectory() const
+Utils::FilePath ProcessExtraCompiler::workingDirectory() const
{
- return Utils::FileName();
+ return Utils::FilePath();
}
QStringList ProcessExtraCompiler::arguments() const
@@ -403,7 +403,7 @@ void ProcessExtraCompiler::runImpl(const ContentProvider &provider)
void ProcessExtraCompiler::runInThread(
QFutureInterface<FileNameToContentsHash> &futureInterface,
- const Utils::FileName &cmd, const Utils::FileName &workDir,
+ const Utils::FilePath &cmd, const Utils::FilePath &workDir,
const QStringList &args, const ContentProvider &provider,
const Utils::Environment &env)
{
diff --git a/src/plugins/projectexplorer/extracompiler.h b/src/plugins/projectexplorer/extracompiler.h
index d5732470d4..ba9c6774f7 100644
--- a/src/plugins/projectexplorer/extracompiler.h
+++ b/src/plugins/projectexplorer/extracompiler.h
@@ -47,27 +47,27 @@ QT_FORWARD_DECLARE_CLASS(QThreadPool);
namespace ProjectExplorer {
class ExtraCompilerPrivate;
-using FileNameToContentsHash = QHash<Utils::FileName, QByteArray>;
+using FileNameToContentsHash = QHash<Utils::FilePath, QByteArray>;
class PROJECTEXPLORER_EXPORT ExtraCompiler : public QObject
{
Q_OBJECT
public:
- ExtraCompiler(const Project *project, const Utils::FileName &source,
- const Utils::FileNameList &targets, QObject *parent = nullptr);
+ ExtraCompiler(const Project *project, const Utils::FilePath &source,
+ const Utils::FilePathList &targets, QObject *parent = nullptr);
~ExtraCompiler() override;
const Project *project() const;
- Utils::FileName source() const;
+ Utils::FilePath source() const;
// You can set the contents from the outside. This is done if the file has been (re)created by
// the regular build process.
- void setContent(const Utils::FileName &file, const QByteArray &content);
- QByteArray content(const Utils::FileName &file) const;
+ void setContent(const Utils::FilePath &file, const QByteArray &content);
+ QByteArray content(const Utils::FilePath &file) const;
- Utils::FileNameList targets() const;
- void forEachTarget(std::function<void(const Utils::FileName &)> func);
+ Utils::FilePathList targets() const;
+ void forEachTarget(std::function<void(const Utils::FilePath &)> func);
void setCompileTime(const QDateTime &time);
QDateTime compileTime() const;
@@ -75,7 +75,7 @@ public:
static QThreadPool *extraCompilerThreadPool();
signals:
- void contentsChanged(const Utils::FileName &file);
+ void contentsChanged(const Utils::FilePath &file);
protected:
Utils::Environment buildEnvironment() const;
@@ -88,7 +88,7 @@ private:
void setDirty();
// This method may not block!
virtual void run(const QByteArray &sourceContent) = 0;
- virtual void run(const Utils::FileName &file) = 0;
+ virtual void run(const Utils::FilePath &file) = 0;
const std::unique_ptr<ExtraCompilerPrivate> d;
};
@@ -98,8 +98,8 @@ class PROJECTEXPLORER_EXPORT ProcessExtraCompiler : public ExtraCompiler
Q_OBJECT
public:
- ProcessExtraCompiler(const Project *project, const Utils::FileName &source,
- const Utils::FileNameList &targets, QObject *parent = nullptr);
+ ProcessExtraCompiler(const Project *project, const Utils::FilePath &source,
+ const Utils::FilePathList &targets, QObject *parent = nullptr);
~ProcessExtraCompiler() override;
protected:
@@ -109,11 +109,11 @@ protected:
// * prepareToRun returns true
// * The process is not yet running
void run(const QByteArray &sourceContents) override;
- void run(const Utils::FileName &fileName) override;
+ void run(const Utils::FilePath &fileName) override;
// Information about the process to run:
- virtual Utils::FileName workingDirectory() const;
- virtual Utils::FileName command() const = 0;
+ virtual Utils::FilePath workingDirectory() const;
+ virtual Utils::FilePath command() const = 0;
virtual QStringList arguments() const;
virtual bool prepareToRun(const QByteArray &sourceContents);
@@ -129,7 +129,7 @@ private:
using ContentProvider = std::function<QByteArray()>;
void runImpl(const ContentProvider &sourceContents);
void runInThread(QFutureInterface<FileNameToContentsHash> &futureInterface,
- const Utils::FileName &cmd, const Utils::FileName &workDir,
+ const Utils::FilePath &cmd, const Utils::FilePath &workDir,
const QStringList &args, const ContentProvider &provider,
const Utils::Environment &env);
void cleanUp();
@@ -146,8 +146,8 @@ protected:
~ExtraCompilerFactoryObserver();
virtual void newExtraCompiler(const Project *project,
- const Utils::FileName &source,
- const Utils::FileNameList &targets)
+ const Utils::FilePath &source,
+ const Utils::FilePathList &targets)
= 0;
};
@@ -162,13 +162,13 @@ public:
virtual QString sourceTag() const = 0;
virtual ExtraCompiler *create(const Project *project,
- const Utils::FileName &source,
- const Utils::FileNameList &targets)
+ const Utils::FilePath &source,
+ const Utils::FilePathList &targets)
= 0;
void annouceCreation(const Project *project,
- const Utils::FileName &source,
- const Utils::FileNameList &targets);
+ const Utils::FilePath &source,
+ const Utils::FilePathList &targets);
static QList<ExtraCompilerFactory *> extraCompilerFactories();
};
diff --git a/src/plugins/projectexplorer/fileinsessionfinder.cpp b/src/plugins/projectexplorer/fileinsessionfinder.cpp
index 667cbdd22e..e4c62e405f 100644
--- a/src/plugins/projectexplorer/fileinsessionfinder.cpp
+++ b/src/plugins/projectexplorer/fileinsessionfinder.cpp
@@ -42,7 +42,7 @@ class FileInSessionFinder : public QObject
public:
FileInSessionFinder();
- FileNameList doFindFile(const FileName &filePath);
+ FilePathList doFindFile(const FilePath &filePath);
void invalidateFinder() { m_finderIsUpToDate = false; }
private:
@@ -64,13 +64,13 @@ FileInSessionFinder::FileInSessionFinder()
});
}
-FileNameList FileInSessionFinder::doFindFile(const FileName &filePath)
+FilePathList FileInSessionFinder::doFindFile(const FilePath &filePath)
{
if (!m_finderIsUpToDate) {
m_finder.setProjectDirectory(SessionManager::startupProject()
? SessionManager::startupProject()->projectDirectory()
- : FileName());
- FileNameList allFiles;
+ : FilePath());
+ FilePathList allFiles;
for (const Project * const p : SessionManager::projects())
allFiles << p->files(Project::AllFiles);
m_finder.setProjectFiles(allFiles);
@@ -79,7 +79,7 @@ FileNameList FileInSessionFinder::doFindFile(const FileName &filePath)
return m_finder.findFile(QUrl::fromLocalFile(filePath.toString()));
}
-FileNameList findFileInSession(const FileName &filePath)
+FilePathList findFileInSession(const FilePath &filePath)
{
static FileInSessionFinder finder;
return finder.doFindFile(filePath);
diff --git a/src/plugins/projectexplorer/fileinsessionfinder.h b/src/plugins/projectexplorer/fileinsessionfinder.h
index 4f08e67d93..f14b3708f3 100644
--- a/src/plugins/projectexplorer/fileinsessionfinder.h
+++ b/src/plugins/projectexplorer/fileinsessionfinder.h
@@ -30,7 +30,7 @@
namespace ProjectExplorer {
namespace Internal {
-Utils::FileNameList findFileInSession(const Utils::FileName &filePath);
+Utils::FilePathList findFileInSession(const Utils::FilePath &filePath);
} // namespace Internal
} // namespace ProjectExplorer
diff --git a/src/plugins/projectexplorer/foldernavigationwidget.cpp b/src/plugins/projectexplorer/foldernavigationwidget.cpp
index 9bcde3a6eb..6ff9c9719a 100644
--- a/src/plugins/projectexplorer/foldernavigationwidget.cpp
+++ b/src/plugins/projectexplorer/foldernavigationwidget.cpp
@@ -168,7 +168,7 @@ bool FolderSortProxyModel::lessThan(const QModelIndex &source_left, const QModel
}
const QString leftName = src->data(source_left, QFileSystemModel::FileNameRole).toString();
const QString rightName = src->data(source_right, QFileSystemModel::FileNameRole).toString();
- return Utils::FileName::fromString(leftName) < Utils::FileName::fromString(rightName);
+ return Utils::FilePath::fromString(leftName) < Utils::FilePath::fromString(rightName);
}
FolderNavigationModel::FolderNavigationModel(QObject *parent) : QFileSystemModel(parent)
@@ -196,8 +196,8 @@ Qt::ItemFlags FolderNavigationModel::flags(const QModelIndex &index) const
return QFileSystemModel::flags(index);
}
-static QVector<FolderNode *> renamableFolderNodes(const Utils::FileName &before,
- const Utils::FileName &after)
+static QVector<FolderNode *> renamableFolderNodes(const Utils::FilePath &before,
+ const Utils::FilePath &after)
{
QVector<FolderNode *> folderNodes;
ProjectTree::forEachNode([&](Node *node) {
@@ -236,8 +236,8 @@ bool FolderNavigationModel::setData(const QModelIndex &index, const QVariant &va
if (success && fileInfo(index).isFile()) {
Core::DocumentManager::renamedFile(beforeFilePath, afterFilePath);
const QVector<FolderNode *> folderNodes
- = renamableFolderNodes(Utils::FileName::fromString(beforeFilePath),
- Utils::FileName::fromString(afterFilePath));
+ = renamableFolderNodes(Utils::FilePath::fromString(beforeFilePath),
+ Utils::FilePath::fromString(afterFilePath));
QVector<FolderNode *> failedNodes;
for (FolderNode *folder : folderNodes) {
if (!folder->renameFile(beforeFilePath, afterFilePath))
@@ -383,7 +383,7 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent) : QWidget(parent
this,
[this](const QModelIndex &index) {
const QModelIndex sourceIndex = m_sortProxyModel->mapToSource(index);
- const auto filePath = Utils::FileName::fromString(
+ const auto filePath = Utils::FilePath::fromString(
m_fileSystemModel->filePath(sourceIndex));
// QTimer::singleShot only posts directly onto the event loop if you use the SLOT("...")
// notation, so using a singleShot with a lambda would flicker
@@ -391,9 +391,9 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent) : QWidget(parent
QMetaObject::invokeMethod(this,
"setCrumblePath",
Qt::QueuedConnection,
- Q_ARG(Utils::FileName, filePath));
+ Q_ARG(Utils::FilePath, filePath));
});
- connect(m_crumbLabel, &Utils::FileCrumbLabel::pathClicked, [this](const Utils::FileName &path) {
+ connect(m_crumbLabel, &Utils::FileCrumbLabel::pathClicked, [this](const Utils::FilePath &path) {
const QModelIndex rootIndex = m_sortProxyModel->mapToSource(m_listView->rootIndex());
const QModelIndex fileIndex = m_fileSystemModel->index(path.toString());
if (!isChildOf(fileIndex, rootIndex))
@@ -422,7 +422,7 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent) : QWidget(parent
QOverload<int>::of(&QComboBox::currentIndexChanged),
this,
[this](int index) {
- const auto directory = m_rootSelector->itemData(index).value<Utils::FileName>();
+ const auto directory = m_rootSelector->itemData(index).value<Utils::FilePath>();
m_rootSelector->setToolTip(directory.toString());
setRootDirectory(directory);
const QModelIndex rootIndex = m_sortProxyModel->mapToSource(m_listView->rootIndex());
@@ -512,8 +512,8 @@ void FolderNavigationWidget::addNewItem()
const QModelIndex current = m_sortProxyModel->mapToSource(m_listView->currentIndex());
if (!current.isValid())
return;
- const auto filePath = Utils::FileName::fromString(m_fileSystemModel->filePath(current));
- const Utils::FileName path = filePath.toFileInfo().isDir() ? filePath : filePath.parentDir();
+ const auto filePath = Utils::FilePath::fromString(m_fileSystemModel->filePath(current));
+ const Utils::FilePath path = filePath.toFileInfo().isDir() ? filePath : filePath.parentDir();
Core::ICore::showNewItemDialog(ProjectExplorerPlugin::tr("New File", "Title of dialog"),
Utils::filtered(Core::IWizardFactory::allWizardFactories(),
Utils::equal(&Core::IWizardFactory::kind,
@@ -528,7 +528,7 @@ void FolderNavigationWidget::editCurrentItem()
m_listView->edit(current);
}
-static QVector<FolderNode *> removableFolderNodes(const Utils::FileName &filePath)
+static QVector<FolderNode *> removableFolderNodes(const Utils::FilePath &filePath)
{
QVector<FolderNode *> folderNodes;
ProjectTree::forEachNode([&](Node *node) {
@@ -552,7 +552,7 @@ void FolderNavigationWidget::removeCurrentItem()
dialog.setDeleteFileVisible(false);
if (dialog.exec() == QDialog::Accepted) {
const QVector<FolderNode *> folderNodes = removableFolderNodes(
- Utils::FileName::fromString(filePath));
+ Utils::FilePath::fromString(filePath));
const QVector<FolderNode *> failedNodes = Utils::filtered(folderNodes,
[filePath](FolderNode *folder) {
return !folder->removeFiles(
@@ -606,19 +606,19 @@ void FolderNavigationWidget::handleCurrentEditorChanged(Core::IEditor *editor)
if (!m_autoSync || !editor || editor->document()->filePath().isEmpty()
|| editor->document()->isTemporary())
return;
- const Utils::FileName filePath = editor->document()->filePath();
+ const Utils::FilePath filePath = editor->document()->filePath();
if (m_rootAutoSync)
selectBestRootForFile(filePath);
selectFile(filePath);
}
-void FolderNavigationWidget::selectBestRootForFile(const Utils::FileName &filePath)
+void FolderNavigationWidget::selectBestRootForFile(const Utils::FilePath &filePath)
{
const int bestRootIndex = bestRootForFile(filePath);
m_rootSelector->setCurrentIndex(bestRootIndex);
}
-void FolderNavigationWidget::selectFile(const Utils::FileName &filePath)
+void FolderNavigationWidget::selectFile(const Utils::FilePath &filePath)
{
const QModelIndex fileIndex = m_sortProxyModel->mapFromSource(
m_fileSystemModel->index(filePath.toString()));
@@ -642,19 +642,19 @@ void FolderNavigationWidget::selectFile(const Utils::FileName &filePath)
}
}
-void FolderNavigationWidget::setRootDirectory(const Utils::FileName &directory)
+void FolderNavigationWidget::setRootDirectory(const Utils::FilePath &directory)
{
const QModelIndex index = m_sortProxyModel->mapFromSource(
m_fileSystemModel->setRootPath(directory.toString()));
m_listView->setRootIndex(index);
}
-int FolderNavigationWidget::bestRootForFile(const Utils::FileName &filePath)
+int FolderNavigationWidget::bestRootForFile(const Utils::FilePath &filePath)
{
int index = 0; // Computer is default
int commonLength = 0;
for (int i = 1; i < m_rootSelector->count(); ++i) {
- const auto root = m_rootSelector->itemData(i).value<Utils::FileName>();
+ const auto root = m_rootSelector->itemData(i).value<Utils::FilePath>();
if (filePath.isChildOf(root) && root.toString().size() > commonLength) {
index = i;
commonLength = root.toString().size();
@@ -697,12 +697,12 @@ void FolderNavigationWidget::createNewFolder(const QModelIndex &parent)
static const QString baseName = tr("New Folder");
// find non-existing name
const QDir dir(m_fileSystemModel->filePath(parent));
- const QSet<Utils::FileName> existingItems
+ const QSet<Utils::FilePath> existingItems
= Utils::transform<QSet>(dir.entryList({baseName + '*'}, QDir::AllEntries),
[](const QString &entry) {
- return Utils::FileName::fromString(entry);
+ return Utils::FilePath::fromString(entry);
});
- const Utils::FileName name = Utils::makeUniquelyNumbered(Utils::FileName::fromString(baseName),
+ const Utils::FilePath name = Utils::makeUniquelyNumbered(Utils::FilePath::fromString(baseName),
existingItems);
// create directory and edit
const QModelIndex index = m_sortProxyModel->mapFromSource(
@@ -713,7 +713,7 @@ void FolderNavigationWidget::createNewFolder(const QModelIndex &parent)
m_listView->edit(index);
}
-void FolderNavigationWidget::setCrumblePath(const Utils::FileName &filePath)
+void FolderNavigationWidget::setCrumblePath(const Utils::FilePath &filePath)
{
const QModelIndex index = m_fileSystemModel->index(filePath.toString());
const int width = m_crumbLabel->width();
@@ -752,9 +752,9 @@ void FolderNavigationWidget::contextMenuEvent(QContextMenuEvent *ev)
QAction *actionOpenAsProject = nullptr;
QAction *newFolder = nullptr;
const bool isDir = m_fileSystemModel->isDir(current);
- const Utils::FileName filePath = hasCurrentItem ? Utils::FileName::fromString(
+ const Utils::FilePath filePath = hasCurrentItem ? Utils::FilePath::fromString(
m_fileSystemModel->filePath(current))
- : Utils::FileName();
+ : Utils::FilePath();
if (hasCurrentItem) {
const QString fileName = m_fileSystemModel->fileName(current);
if (isDir) {
@@ -763,7 +763,7 @@ void FolderNavigationWidget::contextMenuEvent(QContextMenuEvent *ev)
actionOpenProjects->setEnabled(false);
} else {
actionOpenFile = menu.addAction(tr("Open \"%1\"").arg(fileName));
- if (ProjectExplorerPlugin::isProjectFile(Utils::FileName::fromString(fileName)))
+ if (ProjectExplorerPlugin::isProjectFile(Utils::FilePath::fromString(fileName)))
actionOpenAsProject = menu.addAction(tr("Open Project \"%1\"").arg(fileName));
}
}
@@ -866,12 +866,12 @@ FolderNavigationWidgetFactory::FolderNavigationWidgetFactory()
insertRootDirectory({QLatin1String("A.Computer"),
0 /*sortValue*/,
FolderNavigationWidget::tr("Computer"),
- Utils::FileName(),
+ Utils::FilePath(),
Icons::DESKTOP_DEVICE_SMALL.icon()});
insertRootDirectory({QLatin1String("A.Home"),
10 /*sortValue*/,
FolderNavigationWidget::tr("Home"),
- Utils::FileName::fromString(QDir::homePath()),
+ Utils::FilePath::fromString(QDir::homePath()),
Utils::Icons::HOME.icon()});
updateProjectsDirectoryRoot();
connect(Core::DocumentManager::instance(),
diff --git a/src/plugins/projectexplorer/foldernavigationwidget.h b/src/plugins/projectexplorer/foldernavigationwidget.h
index b741de7cfe..b6268b66d6 100644
--- a/src/plugins/projectexplorer/foldernavigationwidget.h
+++ b/src/plugins/projectexplorer/foldernavigationwidget.h
@@ -63,7 +63,7 @@ public:
QString id;
int sortValue;
QString displayName;
- Utils::FileName path;
+ Utils::FilePath path;
QIcon icon;
};
@@ -119,17 +119,17 @@ protected:
void contextMenuEvent(QContextMenuEvent *ev) override;
private slots:
- void setCrumblePath(const Utils::FileName &filePath);
+ void setCrumblePath(const Utils::FilePath &filePath);
private:
bool rootAutoSynchronization() const;
void setRootAutoSynchronization(bool sync);
void setHiddenFilesFilter(bool filter);
- void selectBestRootForFile(const Utils::FileName &filePath);
+ void selectBestRootForFile(const Utils::FilePath &filePath);
void handleCurrentEditorChanged(Core::IEditor *editor);
- void selectFile(const Utils::FileName &filePath);
- void setRootDirectory(const Utils::FileName &directory);
- int bestRootForFile(const Utils::FileName &filePath);
+ void selectFile(const Utils::FilePath &filePath);
+ void setRootDirectory(const Utils::FilePath &directory);
+ int bestRootForFile(const Utils::FilePath &filePath);
void openItem(const QModelIndex &index);
QStringList projectsInDirectory(const QModelIndex &index) const;
void openProjectsInDirectory(const QModelIndex &index);
diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp
index 6f18cf6c54..fff0606889 100644
--- a/src/plugins/projectexplorer/gccparser.cpp
+++ b/src/plugins/projectexplorer/gccparser.cpp
@@ -77,7 +77,7 @@ void GccParser::stdError(const QString &line)
lne == QLatin1String("* cpp failed")) {
newTask(Task(Task::Error,
lne /* description */,
- Utils::FileName() /* filename */,
+ Utils::FilePath() /* filename */,
-1 /* linenumber */,
Constants::TASK_CATEGORY_COMPILE));
return;
@@ -93,7 +93,7 @@ void GccParser::stdError(const QString &line)
} else if (description.startsWith(QLatin1String("fatal: "))) {
description = description.mid(7);
}
- Task task(type, description, Utils::FileName(), /* filename */
+ Task task(type, description, Utils::FilePath(), /* filename */
-1, /* line */ Constants::TASK_CATEGORY_COMPILE);
newTask(task);
return;
@@ -101,7 +101,7 @@ void GccParser::stdError(const QString &line)
match = m_regExp.match(lne);
if (match.hasMatch()) {
- Utils::FileName filename = Utils::FileName::fromUserInput(match.captured(1));
+ Utils::FilePath filename = Utils::FilePath::fromUserInput(match.captured(1));
int lineno = match.captured(3).toInt();
Task::TaskType type = Task::Unknown;
QString description = match.captured(8);
@@ -125,7 +125,7 @@ void GccParser::stdError(const QString &line)
if (match.hasMatch()) {
newTask(Task(Task::Unknown,
lne.trimmed() /* description */,
- Utils::FileName::fromUserInput(match.captured(1)) /* filename */,
+ Utils::FilePath::fromUserInput(match.captured(1)) /* filename */,
match.captured(3).toInt() /* linenumber */,
Constants::TASK_CATEGORY_COMPILE));
return;
@@ -230,15 +230,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Unknown,
QLatin1String("In function `int main(int, char**)':"),
- Utils::FileName::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("`sfasdf' undeclared (first use this function)"),
- Utils::FileName::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), 9,
+ Utils::FilePath::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), 9,
categoryCompile)
<< Task(Task::Error,
QLatin1String("(Each undeclared identifier is reported only once for each function it appears in.)"),
- Utils::FileName::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), 9,
+ Utils::FilePath::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), 9,
categoryCompile)
)
<< QString();
@@ -249,7 +249,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Warning,
QLatin1String("inline function `QDebug qDebug()' used but never defined"),
- Utils::FileName::fromUserInput(QLatin1String("/src/corelib/global/qglobal.h")), 1635,
+ Utils::FilePath::fromUserInput(QLatin1String("/src/corelib/global/qglobal.h")), 1635,
categoryCompile))
<< QString();
QTest::newRow("warning")
@@ -258,7 +258,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< QString() << QString()
<< (Tasks() << Task(Task::Warning,
QLatin1String("Some warning"),
- Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 7,
+ Utils::FilePath::fromUserInput(QLatin1String("main.cpp")), 7,
categoryCompile))
<< QString();
QTest::newRow("GCCE #error")
@@ -268,7 +268,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
QLatin1String("#error Symbian error"),
- Utils::FileName::fromUserInput(QLatin1String("C:\\temp\\test\\untitled8\\main.cpp")), 7,
+ Utils::FilePath::fromUserInput(QLatin1String("C:\\temp\\test\\untitled8\\main.cpp")), 7,
categoryCompile))
<< QString();
// Symbian reports #warning(s) twice (using different syntax).
@@ -279,7 +279,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Warning,
QLatin1String("#warning Symbian warning"),
- Utils::FileName::fromUserInput(QLatin1String("C:\\temp\\test\\untitled8\\main.cpp")), 8,
+ Utils::FilePath::fromUserInput(QLatin1String("C:\\temp\\test\\untitled8\\main.cpp")), 8,
categoryCompile))
<< QString();
QTest::newRow("GCCE #warning2")
@@ -289,7 +289,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Warning,
QLatin1String("#warning Symbian warning"),
- Utils::FileName::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), 8,
+ Utils::FilePath::fromUserInput(QLatin1String("/temp/test/untitled8/main.cpp")), 8,
categoryCompile))
<< QString();
QTest::newRow("Undefined reference (debug)")
@@ -301,15 +301,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Unknown,
QLatin1String("In function `main':"),
- Utils::FileName::fromUserInput(QLatin1String("main.o")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("main.o")), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("undefined reference to `MainWindow::doSomething()'"),
- Utils::FileName::fromUserInput(QLatin1String("C:\\temp\\test\\untitled8/main.cpp")), 8,
+ Utils::FilePath::fromUserInput(QLatin1String("C:\\temp\\test\\untitled8/main.cpp")), 8,
categoryCompile)
<< Task(Task::Error,
QLatin1String("collect2: ld returned 1 exit status"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
categoryCompile)
)
<< QString();
@@ -322,15 +322,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Unknown,
QLatin1String("In function `main':"),
- Utils::FileName::fromUserInput(QLatin1String("main.o")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("main.o")), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("undefined reference to `MainWindow::doSomething()'"),
- Utils::FileName::fromUserInput(QLatin1String("C:\\temp\\test\\untitled8/main.cpp")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("C:\\temp\\test\\untitled8/main.cpp")), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("collect2: ld returned 1 exit status"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
categoryCompile)
)
<< QString();
@@ -341,7 +341,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
QLatin1String("file not recognized: File format not recognized"),
- Utils::FileName::fromUserInput(QLatin1String("c:\\Qt\\4.6\\lib/QtGuid4.dll")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("c:\\Qt\\4.6\\lib/QtGuid4.dll")), -1,
categoryCompile))
<< QString();
QTest::newRow("Invalid rpath")
@@ -351,7 +351,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
QLatin1String("/usr/local/lib: No such file or directory"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
categoryCompile))
<< QString();
@@ -364,15 +364,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Unknown,
QLatin1String("In member function 'void Debugger::Internal::GdbEngine::handleBreakInsert2(const Debugger::Internal::GdbResponse&)':"),
- Utils::FileName::fromUserInput(QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp")), -1,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("unused variable 'index'"),
- Utils::FileName::fromUserInput(QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp")), 2114,
+ Utils::FilePath::fromUserInput(QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp")), 2114,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("unused variable 'handler'"),
- Utils::FileName::fromUserInput(QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp")), 2115,
+ Utils::FilePath::fromUserInput(QLatin1String("../../../../master/src/plugins/debugger/gdb/gdbengine.cpp")), 2115,
categoryCompile))
<< QString();
QTest::newRow("gnumakeparser.cpp errors")
@@ -384,15 +384,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Unknown,
QLatin1String("In member function 'void ProjectExplorer::ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()':"),
- Utils::FileName::fromUserInput(QLatin1String("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp")), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("expected primary-expression before ':' token"),
- Utils::FileName::fromUserInput(QLatin1String("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp")), 264,
+ Utils::FilePath::fromUserInput(QLatin1String("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp")), 264,
categoryCompile)
<< Task(Task::Error,
QLatin1String("expected ';' before ':' token"),
- Utils::FileName::fromUserInput(QLatin1String("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp")), 264,
+ Utils::FilePath::fromUserInput(QLatin1String("/home/code/src/creator/src/plugins/projectexplorer/gnumakeparser.cpp")), 264,
categoryCompile))
<< QString();
QTest::newRow("distcc error(QTCREATORBUG-904)")
@@ -410,7 +410,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Warning,
QLatin1String("Core::IEditor* QVariant::value<Core::IEditor*>() const has different visibility (hidden) in .obj/debug-shared/openeditorsview.o and (default) in .obj/debug-shared/editormanager.o"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
categoryCompile))
<< QString();
QTest::newRow("ld fatal")
@@ -420,7 +420,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Error,
QLatin1String("Symbol referencing errors. No output written to testproject"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
categoryCompile))
<< QString();
QTest::newRow("Teambuilder issues")
@@ -436,7 +436,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Unknown,
QLatin1String("initialized from here"),
- Utils::FileName::fromUserInput(QLatin1String("/home/dev/creator/share/qtcreator/debugger/dumper.cpp")), 1079,
+ Utils::FilePath::fromUserInput(QLatin1String("/home/dev/creator/share/qtcreator/debugger/dumper.cpp")), 1079,
categoryCompile))
<< QString();
QTest::newRow("static member function")
@@ -447,11 +447,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Unknown,
QLatin1String("In static member function 'static std::_Rb_tree_node_base* std::_Rb_global<_Dummy>::_Rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*&, std::_Rb_tree_node_base*&, std::_Rb_tree_node_base*&)':"),
- Utils::FileName::fromUserInput(QLatin1String("/Qt/4.6.2-Symbian/s60sdk/epoc32/include/stdapis/stlport/stl/_tree.c")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("/Qt/4.6.2-Symbian/s60sdk/epoc32/include/stdapis/stlport/stl/_tree.c")), -1,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("suggest explicit braces to avoid ambiguous 'else'"),
- Utils::FileName::fromUserInput(QLatin1String("/Qt/4.6.2-Symbian/s60sdk/epoc32/include/stdapis/stlport/stl/_tree.c")), 194,
+ Utils::FilePath::fromUserInput(QLatin1String("/Qt/4.6.2-Symbian/s60sdk/epoc32/include/stdapis/stlport/stl/_tree.c")), 194,
categoryCompile))
<< QString();
QTest::newRow("rm false positive")
@@ -467,7 +467,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Error,
QLatin1String("cannot find -ldoesnotexist"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
categoryCompile))
<< QString();
QTest::newRow("In function")
@@ -479,15 +479,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Unknown,
QLatin1String("In function void foo(i) [with i = double]:"),
- Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), -1,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("instantiated from here"),
- Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 22,
+ Utils::FilePath::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 22,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("unused variable c"),
- Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 8,
+ Utils::FilePath::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 8,
categoryCompile))
<< QString();
QTest::newRow("instanciated from here")
@@ -497,7 +497,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Unknown,
QLatin1String("instantiated from here"),
- Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 10,
+ Utils::FilePath::fromUserInput(QLatin1String("main.cpp")), 10,
categoryCompile))
<< QString();
QTest::newRow("In constructor")
@@ -507,7 +507,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Unknown,
QLatin1String("In constructor 'Find::BaseTextFind::BaseTextFind(QTextEdit*)':"),
- Utils::FileName::fromUserInput(QLatin1String("/dev/creator/src/plugins/find/basetextfind.h")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("/dev/creator/src/plugins/find/basetextfind.h")), -1,
categoryCompile))
<< QString();
@@ -522,23 +522,23 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Unknown,
QLatin1String("At global scope:"),
- Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), -1,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("In instantiation of void bar(i) [with i = double]:"),
- Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), -1,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("instantiated from void foo(i) [with i = double]"),
- Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 8,
+ Utils::FilePath::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 8,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("instantiated from here"),
- Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 22,
+ Utils::FilePath::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 22,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("unused parameter v"),
- Utils::FileName::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 5,
+ Utils::FilePath::fromUserInput(QLatin1String("../../scriptbug/main.cpp")), 5,
categoryCompile))
<< QString();
@@ -549,7 +549,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Error,
QLatin1String("test.moc: No such file or directory"),
- Utils::FileName::fromUserInput(QLatin1String("/home/code/test.cpp")), 54,
+ Utils::FilePath::fromUserInput(QLatin1String("/home/code/test.cpp")), 54,
categoryCompile))
<< QString();
@@ -563,19 +563,19 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Unknown,
QLatin1String("In function `QPlotAxis':"),
- Utils::FileName::fromUserInput(QLatin1String("debug/qplotaxis.o")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("debug/qplotaxis.o")), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("undefined reference to `vtable for QPlotAxis'"),
- Utils::FileName::fromUserInput(QLatin1String("M:\\Development\\x64\\QtPlot/qplotaxis.cpp")), 26,
+ Utils::FilePath::fromUserInput(QLatin1String("M:\\Development\\x64\\QtPlot/qplotaxis.cpp")), 26,
categoryCompile)
<< Task(Task::Error,
QLatin1String("undefined reference to `vtable for QPlotAxis'"),
- Utils::FileName::fromUserInput(QLatin1String("M:\\Development\\x64\\QtPlot/qplotaxis.cpp")), 26,
+ Utils::FilePath::fromUserInput(QLatin1String("M:\\Development\\x64\\QtPlot/qplotaxis.cpp")), 26,
categoryCompile)
<< Task(Task::Error,
QLatin1String("collect2: ld returned 1 exit status"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
categoryCompile))
<< QString();
@@ -590,23 +590,23 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Unknown,
QLatin1String("In member function typename _Vector_base<_Tp, _Alloc>::_Tp_alloc_type::const_reference Vector<_Tp, _Alloc>::at(int) [with _Tp = Point, _Alloc = Allocator<Point>]:"),
- Utils::FileName::fromUserInput(QLatin1String("../stl/main.cpp")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("../stl/main.cpp")), -1,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("instantiated from here"),
- Utils::FileName::fromUserInput(QLatin1String("../stl/main.cpp")), 38,
+ Utils::FilePath::fromUserInput(QLatin1String("../stl/main.cpp")), 38,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("returning reference to temporary"),
- Utils::FileName::fromUserInput(QLatin1String("../stl/main.cpp")), 31,
+ Utils::FilePath::fromUserInput(QLatin1String("../stl/main.cpp")), 31,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("At global scope:"),
- Utils::FileName::fromUserInput(QLatin1String("../stl/main.cpp")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("../stl/main.cpp")), -1,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("unused parameter index"),
- Utils::FileName::fromUserInput(QLatin1String("../stl/main.cpp")), 31,
+ Utils::FilePath::fromUserInput(QLatin1String("../stl/main.cpp")), 31,
categoryCompile))
<< QString();
@@ -620,19 +620,19 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Unknown,
QLatin1String("In file included from C:/Symbian_SDK/epoc32/include/e32cmn.h:6792,"),
- Utils::FileName::fromUserInput(QLatin1String("C:/Symbian_SDK/epoc32/include/e32cmn.h")), 6792,
+ Utils::FilePath::fromUserInput(QLatin1String("C:/Symbian_SDK/epoc32/include/e32cmn.h")), 6792,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("from C:/Symbian_SDK/epoc32/include/e32std.h:25,"),
- Utils::FileName::fromUserInput(QLatin1String("C:/Symbian_SDK/epoc32/include/e32std.h")), 25,
+ Utils::FilePath::fromUserInput(QLatin1String("C:/Symbian_SDK/epoc32/include/e32std.h")), 25,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("In member function 'SSecureId::operator const TSecureId&() const':"),
- Utils::FileName::fromUserInput(QLatin1String("C:/Symbian_SDK/epoc32/include/e32cmn.inl")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("C:/Symbian_SDK/epoc32/include/e32cmn.inl")), -1,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("returning reference to temporary"),
- Utils::FileName::fromUserInput(QLatin1String("C:/Symbian_SDK/epoc32/include/e32cmn.inl")), 7094,
+ Utils::FilePath::fromUserInput(QLatin1String("C:/Symbian_SDK/epoc32/include/e32cmn.inl")), 7094,
categoryCompile))
<< QString();
@@ -643,7 +643,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Unknown,
QLatin1String("At top level:"),
- Utils::FileName::fromUserInput(QLatin1String("../../../src/XmlUg/targetdelete.c")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("../../../src/XmlUg/targetdelete.c")), -1,
categoryCompile))
<< QString();
@@ -656,15 +656,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Unknown,
QLatin1String("In file included from /Symbian/SDK/EPOC32/INCLUDE/GCCE/GCCE.h:15,"),
- Utils::FileName::fromUserInput(QLatin1String("/Symbian/SDK/EPOC32/INCLUDE/GCCE/GCCE.h")), 15,
+ Utils::FilePath::fromUserInput(QLatin1String("/Symbian/SDK/EPOC32/INCLUDE/GCCE/GCCE.h")), 15,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("from <command line>:26:"),
- Utils::FileName::fromUserInput(QLatin1String("<command line>")), 26,
+ Utils::FilePath::fromUserInput(QLatin1String("<command line>")), 26,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("no newline at end of file"),
- Utils::FileName::fromUserInput(QLatin1String("/Symbian/SDK/epoc32/include/variant/Symbian_OS.hrh")), 1134,
+ Utils::FilePath::fromUserInput(QLatin1String("/Symbian/SDK/epoc32/include/variant/Symbian_OS.hrh")), 1134,
categoryCompile))
<< QString();
@@ -675,7 +675,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Error,
QLatin1String("undefined reference to `MainWindow::doSomething()'"),
- Utils::FileName::fromUserInput(QLatin1String("main.cpp")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("main.cpp")), -1,
categoryCompile))
<< QString();
@@ -687,11 +687,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Unknown,
QLatin1String("In member function 'ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::evaluateConditionalFunction(const ProString&, const ProStringList&)':"),
- Utils::FileName::fromUserInput(QLatin1String("../../../src/shared/proparser/profileevaluator.cpp")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("../../../src/shared/proparser/profileevaluator.cpp")), -1,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("case value '0' not in enumerated type 'ProFileEvaluator::Private::TestFunc'"),
- Utils::FileName::fromUserInput(QLatin1String("../../../src/shared/proparser/profileevaluator.cpp")), 2817,
+ Utils::FilePath::fromUserInput(QLatin1String("../../../src/shared/proparser/profileevaluator.cpp")), 2817,
categoryCompile))
<< QString();
@@ -703,11 +703,11 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Unknown,
QLatin1String("In file included from <command-line>:0:0:"),
- Utils::FileName::fromUserInput(QLatin1String("<command-line>")), 0,
+ Utils::FilePath::fromUserInput(QLatin1String("<command-line>")), 0,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("\"STUPID_DEFINE\" redefined"),
- Utils::FileName::fromUserInput(QLatin1String("./mw.h")), 4,
+ Utils::FilePath::fromUserInput(QLatin1String("./mw.h")), 4,
categoryCompile))
<< QString();
QTest::newRow("instanciation with line:column info")
@@ -719,15 +719,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Unknown,
QLatin1String("In function 'void UnitTest::CheckEqual(UnitTest::TestResults&, const Expected&, const Actual&, const UnitTest::TestDetails&) [with Expected = unsigned int, Actual = int]':"),
- Utils::FileName::fromUserInput(QLatin1String("file.h")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("file.h")), -1,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("instantiated from here"),
- Utils::FileName::fromUserInput(QLatin1String("file.cpp")), 87,
+ Utils::FilePath::fromUserInput(QLatin1String("file.cpp")), 87,
categoryCompile)
<< Task(Task::Warning,
QLatin1String("comparison between signed and unsigned integer expressions [-Wsign-compare]"),
- Utils::FileName::fromUserInput(QLatin1String("file.h")), 21,
+ Utils::FilePath::fromUserInput(QLatin1String("file.h")), 21,
categoryCompile))
<< QString();
QTest::newRow("linker error") // QTCREATORBUG-3107
@@ -737,7 +737,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Error,
QLatin1String("undefined reference to `CNS5kINSPacket::SOH_BYTE'"),
- Utils::FileName::fromUserInput(QLatin1String("cns5k_ins_parser_tests.cpp")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("cns5k_ins_parser_tests.cpp")), -1,
categoryCompile))
<< QString();
@@ -748,7 +748,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Warning,
QLatin1String("The name 'pushButton' (QPushButton) is already in use, defaulting to 'pushButton1'."),
- Utils::FileName::fromUserInput(QLatin1String("mainwindow.ui")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("mainwindow.ui")), -1,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
@@ -759,7 +759,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Warning,
QLatin1String("warning: feupdateenv is not implemented and will always fail"),
- Utils::FileName::fromUserInput(QLatin1String("libimf.so")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("libimf.so")), -1,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
@@ -773,13 +773,13 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Unknown,
QLatin1String("In file included from /home/code/src/creator/src/libs/extensionsystem/pluginerrorview.cpp:31:0:"),
- Utils::FileName::fromUserInput(QLatin1String("/home/code/src/creator/src/libs/extensionsystem/pluginerrorview.cpp")), 31,
+ Utils::FilePath::fromUserInput(QLatin1String("/home/code/src/creator/src/libs/extensionsystem/pluginerrorview.cpp")), 31,
categoryCompile)
<< Task(Task::Error,
QLatin1String("QtGui/QAction: No such file or directory\n"
" #include <QtGui/QAction>\n"
" ^"),
- Utils::FileName::fromUserInput(QLatin1String(".uic/ui_pluginerrorview.h")), 14,
+ Utils::FilePath::fromUserInput(QLatin1String(".uic/ui_pluginerrorview.h")), 14,
categoryCompile))
<< QString();
@@ -794,23 +794,23 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< ( Tasks()
<< Task(Task::Unknown,
QLatin1String("In file included from /usr/include/qt4/QtCore/QString:1:0,"),
- Utils::FileName::fromUserInput(QLatin1String("/usr/include/qt4/QtCore/QString")), 1,
+ Utils::FilePath::fromUserInput(QLatin1String("/usr/include/qt4/QtCore/QString")), 1,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("from main.cpp:3:"),
- Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 3,
+ Utils::FilePath::fromUserInput(QLatin1String("main.cpp")), 3,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("In function 'void foo()':"),
- Utils::FileName::fromUserInput(QLatin1String("/usr/include/qt4/QtCore/qstring.h")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("/usr/include/qt4/QtCore/qstring.h")), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("'QString::QString(const char*)' is private"),
- Utils::FileName::fromUserInput(QLatin1String("/usr/include/qt4/QtCore/qstring.h")), 597,
+ Utils::FilePath::fromUserInput(QLatin1String("/usr/include/qt4/QtCore/qstring.h")), 597,
categoryCompile)
<< Task(Task::Error,
QLatin1String("within this context"),
- Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 7,
+ Utils::FilePath::fromUserInput(QLatin1String("main.cpp")), 7,
categoryCompile))
<< QString();
@@ -824,19 +824,19 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Unknown,
QLatin1String("In function `foo()':"),
- Utils::FileName::fromUserInput(QLatin1String("foo.o")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("foo.o")), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("multiple definition of `foo()'"),
- Utils::FileName::fromUserInput(QLatin1String("/home/user/test/foo.cpp")), 2,
+ Utils::FilePath::fromUserInput(QLatin1String("/home/user/test/foo.cpp")), 2,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("first defined here"),
- Utils::FileName::fromUserInput(QLatin1String("/home/user/test/bar.cpp")), 4,
+ Utils::FilePath::fromUserInput(QLatin1String("/home/user/test/bar.cpp")), 4,
categoryCompile)
<< Task(Task::Error,
QLatin1String("collect2: error: ld returned 1 exit status"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
categoryCompile)
)
<< QString();
@@ -850,15 +850,15 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
QLatin1String("multiple definition of `foo'"),
- Utils::FileName::fromUserInput(QLatin1String("foo.o")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("foo.o")), -1,
categoryCompile)
<< Task(Task::Unknown,
QLatin1String("first defined here"),
- Utils::FileName::fromUserInput(QLatin1String("bar.o")), -1,
+ Utils::FilePath::fromUserInput(QLatin1String("bar.o")), -1,
categoryCompile)
<< Task(Task::Error,
QLatin1String("collect2: error: ld returned 1 exit status"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
categoryCompile)
)
<< QString();
@@ -870,7 +870,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
QLatin1String("error: undefined reference to 'llvm::DisableABIBreakingChecks'"),
- Utils::FileName::fromString("gtest-clang-printing.cpp"), -1,
+ Utils::FilePath::fromString("gtest-clang-printing.cpp"), -1,
categoryCompile)
)
<< QString();
@@ -882,7 +882,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Warning,
QLatin1String("file: lib/libtest.a(Test0.cpp.o) has no symbols"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
categoryCompile)
)
<< QString();
@@ -893,7 +893,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Warning,
QLatin1String("file: lib/libtest.a(Test0.cpp.o) has no symbols"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
categoryCompile)
)
<< QString();
@@ -904,7 +904,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< (Tasks()
<< Task(Task::Unknown,
QLatin1String("Note: No relevant classes found. No output generated."),
- Utils::FileName::fromUserInput(QLatin1String("/home/qtwebkithelpviewer.h")), 0,
+ Utils::FilePath::fromUserInput(QLatin1String("/home/qtwebkithelpviewer.h")), 0,
categoryCompile)
)
<< QString();
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp
index f88a980cf5..a48b21fe7a 100644
--- a/src/plugins/projectexplorer/gcctoolchain.cpp
+++ b/src/plugins/projectexplorer/gcctoolchain.cpp
@@ -77,7 +77,7 @@ static const char supportedAbisKeyC[] = "ProjectExplorer.GccToolChain.SupportedA
static const char parentToolChainIdKeyC[] = "ProjectExplorer.ClangToolChain.ParentToolChainId";
static const char binaryRegexp[] = "(?:^|-|\\b)(?:gcc|g\\+\\+|clang(?:\\+\\+)?)(?:-([\\d.]+))?$";
-static QByteArray runGcc(const FileName &gcc, const QStringList &arguments, const QStringList &env)
+static QByteArray runGcc(const FilePath &gcc, const QStringList &arguments, const QStringList &env)
{
if (gcc.isEmpty() || !gcc.toFileInfo().isExecutable())
return QByteArray();
@@ -98,7 +98,7 @@ static QByteArray runGcc(const FileName &gcc, const QStringList &arguments, cons
return response.allOutput().toUtf8();
}
-static ProjectExplorer::Macros gccPredefinedMacros(const FileName &gcc,
+static ProjectExplorer::Macros gccPredefinedMacros(const FilePath &gcc,
const QStringList &args,
const QStringList &env)
{
@@ -124,7 +124,7 @@ static ProjectExplorer::Macros gccPredefinedMacros(const FileName &gcc,
return predefinedMacros;
}
-HeaderPaths GccToolChain::gccHeaderPaths(const FileName &gcc, const QStringList &arguments,
+HeaderPaths GccToolChain::gccHeaderPaths(const FilePath &gcc, const QStringList &arguments,
const QStringList &env)
{
HeaderPaths builtInHeaderPaths;
@@ -207,7 +207,7 @@ static Abis guessGccAbi(const QString &m, const ProjectExplorer::Macros &macros)
}
-static GccToolChain::DetectedAbisResult guessGccAbi(const FileName &path, const QStringList &env,
+static GccToolChain::DetectedAbisResult guessGccAbi(const FilePath &path, const QStringList &env,
const ProjectExplorer::Macros &macros,
const QStringList &extraArgs = QStringList())
{
@@ -222,7 +222,7 @@ static GccToolChain::DetectedAbisResult guessGccAbi(const FileName &path, const
return GccToolChain::DetectedAbisResult(guessGccAbi(machine, macros), machine);
}
-static QString gccVersion(const FileName &path, const QStringList &env)
+static QString gccVersion(const FilePath &path, const QStringList &env)
{
QStringList arguments("-dumpversion");
return QString::fromLocal8Bit(runGcc(path, arguments, env)).trimmed();
@@ -240,7 +240,7 @@ GccToolChain::GccToolChain(Core::Id typeId) :
ToolChain(typeId)
{ }
-void GccToolChain::setCompilerCommand(const FileName &path)
+void GccToolChain::setCompilerCommand(const FilePath &path)
{
if (path == m_compilerCommand)
return;
@@ -341,7 +341,7 @@ static bool isNetworkCompiler(const QString &dirPath)
return dirPath.contains("icecc") || dirPath.contains("distcc");
}
-static Utils::FileName findLocalCompiler(const Utils::FileName &compilerPath,
+static Utils::FilePath findLocalCompiler(const Utils::FilePath &compilerPath,
const Environment &env)
{
// Find the "real" compiler if icecc, distcc or similar are in use. Ignore ccache, since that
@@ -353,13 +353,13 @@ static Utils::FileName findLocalCompiler(const Utils::FileName &compilerPath,
return compilerPath;
// Filter out network compilers
- const FileNameList pathComponents = Utils::filtered(env.path(), [] (const FileName &dirPath) {
+ const FilePathList pathComponents = Utils::filtered(env.path(), [] (const FilePath &dirPath) {
return !isNetworkCompiler(dirPath.toString());
});
// This effectively searches the PATH twice, once via pathComponents and once via PATH itself:
// searchInPath filters duplicates, so that will not hurt.
- const Utils::FileName path = env.searchInPath(compilerPath.fileName(), pathComponents);
+ const Utils::FilePath path = env.searchInPath(compilerPath.fileName(), pathComponents);
return path.isEmpty() ? compilerPath : path;
}
@@ -369,7 +369,7 @@ ToolChain::MacroInspectionRunner GccToolChain::createMacroInspectionRunner() con
// Using a clean environment breaks ccache/distcc/etc.
Environment env = Environment::systemEnvironment();
addToEnvironment(env);
- const Utils::FileName compilerCommand = m_compilerCommand;
+ const Utils::FilePath compilerCommand = m_compilerCommand;
const QStringList platformCodeGenFlags = m_platformCodeGenFlags;
OptionsReinterpreter reinterpretOptions = m_optionsReinterpreter;
QTC_CHECK(reinterpretOptions);
@@ -561,7 +561,7 @@ void GccToolChain::initExtraHeaderPathsFunction(ExtraHeaderPathsFunction &&extra
}
HeaderPaths GccToolChain::builtInHeaderPaths(const Utils::Environment &env,
- const Utils::FileName &compilerCommand,
+ const Utils::FilePath &compilerCommand,
const QStringList &platformCodeGenFlags,
OptionsReinterpreter reinterpretOptions,
HeaderPathsCache headerCache,
@@ -631,7 +631,7 @@ ToolChain::BuiltInHeaderPathsRunner GccToolChain::createBuiltInHeaderPathsRunner
}
HeaderPaths GccToolChain::builtInHeaderPaths(const QStringList &flags,
- const FileName &sysRootPath) const
+ const FilePath &sysRootPath) const
{
return createBuiltInHeaderPathsRunner()(flags,
sysRootPath.isEmpty() ? sysRoot()
@@ -639,9 +639,9 @@ HeaderPaths GccToolChain::builtInHeaderPaths(const QStringList &flags,
originalTargetTriple());
}
-void GccToolChain::addCommandPathToEnvironment(const FileName &command, Environment &env)
+void GccToolChain::addCommandPathToEnvironment(const FilePath &command, Environment &env)
{
- const Utils::FileName compilerDir = command.parentDir();
+ const Utils::FilePath compilerDir = command.parentDir();
if (!compilerDir.isEmpty())
env.prependOrSetPath(compilerDir.toString());
}
@@ -692,10 +692,10 @@ QStringList GccToolChain::suggestedMkspecList() const
return {};
}
-FileName GccToolChain::makeCommand(const Environment &environment) const
+FilePath GccToolChain::makeCommand(const Environment &environment) const
{
- const FileName tmp = environment.searchInPath("make");
- return tmp.isEmpty() ? FileName::fromString("make") : tmp;
+ const FilePath tmp = environment.searchInPath("make");
+ return tmp.isEmpty() ? FilePath::fromString("make") : tmp;
}
IOutputParser *GccToolChain::outputParser() const
@@ -703,7 +703,7 @@ IOutputParser *GccToolChain::outputParser() const
return new GccParser;
}
-void GccToolChain::resetToolChain(const FileName &path)
+void GccToolChain::resetToolChain(const FilePath &path)
{
bool resetDisplayName = (displayName() == defaultDisplayName());
@@ -728,7 +728,7 @@ void GccToolChain::resetToolChain(const FileName &path)
toolChainUpdated();
}
-FileName GccToolChain::compilerCommand() const
+FilePath GccToolChain::compilerCommand() const
{
return m_compilerCommand;
}
@@ -789,7 +789,7 @@ bool GccToolChain::fromMap(const QVariantMap &data)
if (!ToolChain::fromMap(data))
return false;
- m_compilerCommand = FileName::fromString(data.value(compilerCommandKeyC).toString());
+ m_compilerCommand = FilePath::fromString(data.value(compilerCommandKeyC).toString());
m_platformCodeGenFlags = data.value(compilerPlatformCodeGenFlagsKeyC).toStringList();
m_platformLinkerFlags = data.value(compilerPlatformLinkerFlagsKeyC).toStringList();
const QString targetAbiString = data.value(targetAbiKeyC).toString();
@@ -887,7 +887,7 @@ QList<ToolChain *> GccToolChainFactory::autoDetect(const QList<ToolChain *> &alr
return tcs;
}
-QList<ToolChain *> GccToolChainFactory::autoDetect(const FileName &compilerPath, const Core::Id &language)
+QList<ToolChain *> GccToolChainFactory::autoDetect(const FilePath &compilerPath, const Core::Id &language)
{
const QString fileName = compilerPath.fileName();
if ((language == Constants::C_LANGUAGE_ID && (fileName.startsWith("gcc")
@@ -905,14 +905,14 @@ QList<ToolChain *> GccToolChainFactory::autoDetectToolchains(
const Core::Id requiredTypeId, const QList<ToolChain *> &alreadyKnown,
const ToolchainChecker &checker)
{
- FileNameList compilerPaths;
+ FilePathList compilerPaths;
QFileInfo fi(compilerName);
if (fi.isAbsolute()) {
if (fi.isFile())
- compilerPaths << FileName::fromString(compilerName);
+ compilerPaths << FilePath::fromString(compilerName);
} else {
- const FileNameList searchPaths = Environment::systemEnvironment().path();
- for (const FileName &dir : searchPaths) {
+ const FilePathList searchPaths = Environment::systemEnvironment().path();
+ for (const FilePath &dir : searchPaths) {
static const QRegularExpression regexp(binaryRegexp);
QDir binDir(dir.toString());
QStringList nameFilters(compilerName);
@@ -935,7 +935,7 @@ QList<ToolChain *> GccToolChainFactory::autoDetectToolchains(
!regexp.match(QFileInfo(fileName).completeBaseName()).hasMatch()) {
continue;
}
- compilerPaths << FileName::fromString(binDir.filePath(fileName));
+ compilerPaths << FilePath::fromString(binDir.filePath(fileName));
}
}
}
@@ -951,7 +951,7 @@ QList<ToolChain *> GccToolChainFactory::autoDetectToolchains(
return true;
});
QList<ToolChain *> result;
- for (const FileName &compilerPath : compilerPaths) {
+ for (const FilePath &compilerPath : compilerPaths) {
bool alreadyExists = false;
for (ToolChain * const existingTc : existingCandidates) {
// We have a match if the existing toolchain ultimately refers to the same file
@@ -960,7 +960,7 @@ QList<ToolChain *> GccToolChainFactory::autoDetectToolchains(
// - clang++ is often a soft link to clang, but behaves differently.
// - ccache and icecc also create soft links that must not be followed here.
bool existingTcMatches = false;
- const FileName existingCommand = existingTc->compilerCommand();
+ const FilePath existingCommand = existingTc->compilerCommand();
if ((requiredTypeId == Constants::CLANG_TOOLCHAIN_TYPEID
&& language == Constants::CXX_LANGUAGE_ID
&& !existingCommand.fileName().contains("clang++"))
@@ -990,7 +990,7 @@ QList<ToolChain *> GccToolChainFactory::autoDetectToolchains(
return result;
}
-QList<ToolChain *> GccToolChainFactory::autoDetectToolChain(const FileName &compilerPath,
+QList<ToolChain *> GccToolChainFactory::autoDetectToolChain(const FilePath &compilerPath,
const Core::Id language,
const ToolchainChecker &checker)
{
@@ -998,7 +998,7 @@ QList<ToolChain *> GccToolChainFactory::autoDetectToolChain(const FileName &comp
Environment systemEnvironment = Environment::systemEnvironment();
GccToolChain::addCommandPathToEnvironment(compilerPath, systemEnvironment);
- const FileName localCompilerPath = findLocalCompiler(compilerPath, systemEnvironment);
+ const FilePath localCompilerPath = findLocalCompiler(compilerPath, systemEnvironment);
Macros macros
= gccPredefinedMacros(localCompilerPath, gccPredefinedMacrosOptions(language),
systemEnvironment.toStringList());
@@ -1154,7 +1154,7 @@ void GccToolChainConfigWidget::handleCompilerCommandChange()
bool haveCompiler = false;
Abi currentAbi = m_abiWidget->currentAbi();
bool customAbi = m_abiWidget->isCustomAbi() && m_abiWidget->isEnabled();
- FileName path = m_compilerCommand->fileName();
+ FilePath path = m_compilerCommand->fileName();
Abis abiList;
if (!path.isEmpty()) {
@@ -1166,7 +1166,7 @@ void GccToolChainConfigWidget::handleCompilerCommandChange()
GccToolChain::addCommandPathToEnvironment(path, env);
QStringList args = gccPredefinedMacrosOptions(Constants::CXX_LANGUAGE_ID)
+ splitString(m_platformCodeGenFlagsLineEdit->text());
- const FileName localCompilerPath = findLocalCompiler(path, env);
+ const FilePath localCompilerPath = findLocalCompiler(path, env);
m_macros = gccPredefinedMacros(localCompilerPath, args, env.toStringList());
abiList = guessGccAbi(localCompilerPath, env.toStringList(), m_macros,
splitString(m_platformCodeGenFlagsLineEdit->text())).supportedAbis;
@@ -1287,18 +1287,18 @@ QString ClangToolChain::typeDisplayName() const
return ClangToolChainFactory::tr("Clang");
}
-FileName ClangToolChain::makeCommand(const Environment &environment) const
+FilePath ClangToolChain::makeCommand(const Environment &environment) const
{
const QStringList makes
= HostOsInfo::isWindowsHost() ? QStringList({"mingw32-make.exe", "make.exe"}) : QStringList({"make"});
- FileName tmp;
+ FilePath tmp;
for (const QString &make : makes) {
tmp = environment.searchInPath(make);
if (!tmp.isEmpty())
return tmp;
}
- return FileName::fromString(makes.first());
+ return FilePath::fromString(makes.first());
}
/**
@@ -1367,7 +1367,7 @@ QString ClangToolChain::sysRoot() const
if (!parentTC)
return QString();
- const FileName mingwCompiler = parentTC->compilerCommand();
+ const FilePath mingwCompiler = parentTC->compilerCommand();
return mingwCompiler.parentDir().parentDir().toString();
}
@@ -1455,9 +1455,9 @@ QList<ToolChain *> ClangToolChainFactory::autoDetect(const QList<ToolChain *> &a
Constants::CLANG_TOOLCHAIN_TYPEID, alreadyKnown));
known.append(tcs);
- const FileName compilerPath = FileName::fromString(Core::ICore::clangExecutable(CLANG_BINDIR));
+ const FilePath compilerPath = FilePath::fromString(Core::ICore::clangExecutable(CLANG_BINDIR));
if (!compilerPath.isEmpty()) {
- const FileName clang = compilerPath.parentDir().pathAppended(
+ const FilePath clang = compilerPath.parentDir().pathAppended(
HostOsInfo::withExecutableSuffix("clang"));
tcs.append(autoDetectToolchains(clang.toString(), DetectVariants::No,
Constants::C_LANGUAGE_ID, Constants::CLANG_TOOLCHAIN_TYPEID,
@@ -1467,7 +1467,7 @@ QList<ToolChain *> ClangToolChainFactory::autoDetect(const QList<ToolChain *> &a
return tcs;
}
-QList<ToolChain *> ClangToolChainFactory::autoDetect(const FileName &compilerPath, const Core::Id &language)
+QList<ToolChain *> ClangToolChainFactory::autoDetect(const FilePath &compilerPath, const Core::Id &language)
{
const QString fileName = compilerPath.fileName();
if ((language == Constants::C_LANGUAGE_ID && fileName.startsWith("clang") && !fileName.startsWith("clang++"))
@@ -1613,18 +1613,18 @@ QStringList MingwToolChain::suggestedMkspecList() const
return {};
}
-FileName MingwToolChain::makeCommand(const Environment &environment) const
+FilePath MingwToolChain::makeCommand(const Environment &environment) const
{
const QStringList makes
= HostOsInfo::isWindowsHost() ? QStringList({"mingw32-make.exe", "make.exe"}) : QStringList({"make"});
- FileName tmp;
+ FilePath tmp;
foreach (const QString &make, makes) {
tmp = environment.searchInPath(make);
if (!tmp.isEmpty())
return tmp;
}
- return FileName::fromString(makes.first());
+ return FilePath::fromString(makes.first());
}
// --------------------------------------------------------------------------
@@ -1654,7 +1654,7 @@ QList<ToolChain *> MingwToolChainFactory::autoDetect(const QList<ToolChain *> &a
return result;
}
-QList<ToolChain *> MingwToolChainFactory::autoDetect(const FileName &compilerPath, const Core::Id &language)
+QList<ToolChain *> MingwToolChainFactory::autoDetect(const FilePath &compilerPath, const Core::Id &language)
{
const QString fileName = compilerPath.fileName();
if ((language == Constants::C_LANGUAGE_ID && (fileName.startsWith("gcc")
@@ -1734,7 +1734,7 @@ QList<ToolChain *> LinuxIccToolChainFactory::autoDetect(const QList<ToolChain *>
return result;
}
-QList<ToolChain *> LinuxIccToolChainFactory::autoDetect(const FileName &compilerPath, const Core::Id &language)
+QList<ToolChain *> LinuxIccToolChainFactory::autoDetect(const FilePath &compilerPath, const Core::Id &language)
{
const QString fileName = compilerPath.fileName();
if ((language == Constants::CXX_LANGUAGE_ID && fileName.startsWith("icpc")) ||
diff --git a/src/plugins/projectexplorer/gcctoolchain.h b/src/plugins/projectexplorer/gcctoolchain.h
index 695a322608..240ae34247 100644
--- a/src/plugins/projectexplorer/gcctoolchain.h
+++ b/src/plugins/projectexplorer/gcctoolchain.h
@@ -85,10 +85,10 @@ public:
BuiltInHeaderPathsRunner createBuiltInHeaderPathsRunner() const override;
HeaderPaths builtInHeaderPaths(const QStringList &flags,
- const Utils::FileName &sysRootPath) const override;
+ const Utils::FilePath &sysRootPath) const override;
void addToEnvironment(Utils::Environment &env) const override;
- Utils::FileName makeCommand(const Utils::Environment &environment) const override;
+ Utils::FilePath makeCommand(const Utils::Environment &environment) const override;
QStringList suggestedMkspecList() const override;
IOutputParser *outputParser() const override;
@@ -99,15 +99,15 @@ public:
bool operator ==(const ToolChain &) const override;
- void resetToolChain(const Utils::FileName &);
- Utils::FileName compilerCommand() const override;
+ void resetToolChain(const Utils::FilePath &);
+ Utils::FilePath compilerCommand() const override;
void setPlatformCodeGenFlags(const QStringList &);
QStringList extraCodeModelFlags() const override;
QStringList platformCodeGenFlags() const;
void setPlatformLinkerFlags(const QStringList &);
QStringList platformLinkerFlags() const;
- static void addCommandPathToEnvironment(const Utils::FileName &command, Utils::Environment &env);
+ static void addCommandPathToEnvironment(const Utils::FilePath &command, Utils::Environment &env);
class DetectedAbisResult {
public:
@@ -125,7 +125,7 @@ protected:
using CacheItem = QPair<QStringList, Macros>;
using GccCache = QVector<CacheItem>;
- void setCompilerCommand(const Utils::FileName &path);
+ void setCompilerCommand(const Utils::FilePath &path);
void setSupportedAbis(const Abis &abis);
void setOriginalTargetTriple(const QString &targetTriple);
void setMacroCache(const QStringList &allCxxflags, const Macros &macroCache) const;
@@ -146,7 +146,7 @@ protected:
void initExtraHeaderPathsFunction(ExtraHeaderPathsFunction &&extraHeaderPathsFunction) const;
static HeaderPaths builtInHeaderPaths(const Utils::Environment &env,
- const Utils::FileName &compilerCommand,
+ const Utils::FilePath &compilerCommand,
const QStringList &platformCodeGenFlags,
OptionsReinterpreter reinterpretOptions,
HeaderPathsCache headerCache,
@@ -156,7 +156,7 @@ protected:
const QString &sysRoot,
const QString &originalTargetTriple);
- static HeaderPaths gccHeaderPaths(const Utils::FileName &gcc, const QStringList &args,
+ static HeaderPaths gccHeaderPaths(const Utils::FilePath &gcc, const QStringList &args,
const QStringList &env);
class WarningFlagAdder
@@ -184,7 +184,7 @@ private:
OptionsReinterpreter reinterpretOptions);
protected:
- Utils::FileName m_compilerCommand;
+ Utils::FilePath m_compilerCommand;
QStringList m_platformCodeGenFlags;
QStringList m_platformLinkerFlags;
@@ -215,7 +215,7 @@ public:
~ClangToolChain() override;
QString typeDisplayName() const override;
- Utils::FileName makeCommand(const Utils::Environment &environment) const override;
+ Utils::FilePath makeCommand(const Utils::Environment &environment) const override;
Utils::LanguageExtensions languageExtensions(const QStringList &cxxflags) const override;
WarningFlags warningFlags(const QStringList &cflags) const override;
@@ -257,7 +257,7 @@ class PROJECTEXPLORER_EXPORT MingwToolChain : public GccToolChain
{
public:
QString typeDisplayName() const override;
- Utils::FileName makeCommand(const Utils::Environment &environment) const override;
+ Utils::FilePath makeCommand(const Utils::Environment &environment) const override;
QStringList suggestedMkspecList() const override;
diff --git a/src/plugins/projectexplorer/gcctoolchainfactories.h b/src/plugins/projectexplorer/gcctoolchainfactories.h
index 90d76ea734..e33ebcaa03 100644
--- a/src/plugins/projectexplorer/gcctoolchainfactories.h
+++ b/src/plugins/projectexplorer/gcctoolchainfactories.h
@@ -55,7 +55,7 @@ public:
GccToolChainFactory();
QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown) override;
- QList<ToolChain *> autoDetect(const Utils::FileName &compilerPath, const Core::Id &language) override;
+ QList<ToolChain *> autoDetect(const Utils::FilePath &compilerPath, const Core::Id &language) override;
protected:
enum class DetectVariants { Yes, No };
@@ -65,7 +65,7 @@ protected:
const Core::Id requiredTypeId, const QList<ToolChain *> &alreadyKnown,
const ToolchainChecker &checker = {});
QList<ToolChain *> autoDetectToolChain(
- const Utils::FileName &compilerPath, const Core::Id language,
+ const Utils::FilePath &compilerPath, const Core::Id language,
const ToolchainChecker &checker = {});
};
@@ -138,7 +138,7 @@ public:
ClangToolChainFactory();
QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown) override;
- QList<ToolChain *> autoDetect(const Utils::FileName &compilerPath, const Core::Id &language) final;
+ QList<ToolChain *> autoDetect(const Utils::FilePath &compilerPath, const Core::Id &language) final;
};
// --------------------------------------------------------------------------
@@ -153,7 +153,7 @@ public:
MingwToolChainFactory();
QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown) override;
- QList<ToolChain *> autoDetect(const Utils::FileName &compilerPath, const Core::Id &language) final;
+ QList<ToolChain *> autoDetect(const Utils::FilePath &compilerPath, const Core::Id &language) final;
};
// --------------------------------------------------------------------------
@@ -168,7 +168,7 @@ public:
LinuxIccToolChainFactory();
QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown) override;
- QList<ToolChain *> autoDetect(const Utils::FileName &compilerPath, const Core::Id &language) final;
+ QList<ToolChain *> autoDetect(const Utils::FilePath &compilerPath, const Core::Id &language) final;
};
} // namespace Internal
diff --git a/src/plugins/projectexplorer/gnumakeparser.cpp b/src/plugins/projectexplorer/gnumakeparser.cpp
index 12eb8823b3..dc14301117 100644
--- a/src/plugins/projectexplorer/gnumakeparser.cpp
+++ b/src/plugins/projectexplorer/gnumakeparser.cpp
@@ -133,7 +133,7 @@ void GnuMakeParser::stdError(const QString &line)
++m_fatalErrorCount;
if (!m_suppressIssues) {
taskAdded(Task(res.type, res.description,
- Utils::FileName::fromUserInput(match.captured(1)) /* filename */,
+ Utils::FilePath::fromUserInput(match.captured(1)) /* filename */,
match.captured(4).toInt(), /* line */
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)), 1, 0);
}
@@ -147,7 +147,7 @@ void GnuMakeParser::stdError(const QString &line)
++m_fatalErrorCount;
if (!m_suppressIssues) {
Task task = Task(res.type, res.description,
- Utils::FileName() /* filename */, -1, /* line */
+ Utils::FilePath() /* filename */, -1, /* line */
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
taskAdded(task, 1, 0);
}
@@ -190,7 +190,7 @@ void GnuMakeParser::taskAdded(const Task &task, int linkedLines, int skippedLine
}
}
if (possibleFiles.size() == 1)
- editable.file = Utils::FileName::fromFileInfo(possibleFiles.first());
+ editable.file = Utils::FilePath::fromFileInfo(possibleFiles.first());
// Let the Makestep apply additional heuristics (based on
// files in ther project) if we cannot uniquely
// identify the file!
@@ -297,7 +297,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (Tasks()
<< Task(Task::Error,
QString::fromLatin1("No rule to make target `hello.c', needed by `hello.o'. Stop."),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
@@ -311,7 +311,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (Tasks()
<< Task(Task::Error,
QString::fromLatin1("[.obj/debug-shared/gnumakeparser.o] Error 1"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
@@ -323,7 +323,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (Tasks()
<< Task(Task::Error,
QString::fromLatin1("missing separator (did you mean TAB instead of 8 spaces?). Stop."),
- Utils::FileName::fromUserInput(QLatin1String("Makefile")), 360,
+ Utils::FilePath::fromUserInput(QLatin1String("Makefile")), 360,
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
@@ -336,7 +336,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (Tasks()
<< Task(Task::Error,
QString::fromLatin1("[debug/qplotaxis.o] Error 1"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
@@ -348,7 +348,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (Tasks()
<< Task(Task::Error,
QString::fromLatin1("[dynlib.inst] Error -1073741819"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
@@ -360,7 +360,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (Tasks()
<< Task(Task::Warning,
QString::fromLatin1("jobserver unavailable: using -j1. Add `+' to parent make rule."),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
@@ -380,7 +380,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (Tasks()
<< Task(Task::Error,
QString::fromLatin1("[sis] Error 2"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
@@ -392,7 +392,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (Tasks()
<< Task(Task::Error,
QString::fromLatin1("g++: Command not found"),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
@@ -404,7 +404,7 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
<< (Tasks()
<< Task(Task::Warning,
QString::fromLatin1("overriding commands for target `xxxx.app/Contents/Info.plist'"),
- Utils::FileName::fromString(QLatin1String("Makefile")), 794,
+ Utils::FilePath::fromString(QLatin1String("Makefile")), 794,
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
@@ -467,12 +467,12 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()
<< QStringList()
<< Task(Task::Error,
QLatin1String("no filename, no mangling"),
- Utils::FileName(),
+ Utils::FilePath(),
-1,
Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Error,
QLatin1String("no filename, no mangling"),
- Utils::FileName(),
+ Utils::FilePath(),
-1,
Constants::TASK_CATEGORY_COMPILE);
QTest::newRow("no mangling")
@@ -480,12 +480,12 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()
<< QStringList()
<< Task(Task::Error,
QLatin1String("unknown filename, no mangling"),
- Utils::FileName::fromUserInput(QLatin1String("some/path/unknown.cpp")),
+ Utils::FilePath::fromUserInput(QLatin1String("some/path/unknown.cpp")),
-1,
Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Error,
QLatin1String("unknown filename, no mangling"),
- Utils::FileName::fromUserInput(QLatin1String("some/path/unknown.cpp")),
+ Utils::FilePath::fromUserInput(QLatin1String("some/path/unknown.cpp")),
-1,
Constants::TASK_CATEGORY_COMPILE);
QTest::newRow("find file")
@@ -493,12 +493,12 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling_data()
<< QStringList("test")
<< Task(Task::Error,
QLatin1String("mangling"),
- Utils::FileName::fromUserInput(QLatin1String("file.cpp")),
+ Utils::FilePath::fromUserInput(QLatin1String("file.cpp")),
10,
Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Error,
QLatin1String("mangling"),
- Utils::FileName::fromUserInput(QLatin1String("$TMPDIR/test/file.cpp")),
+ Utils::FilePath::fromUserInput(QLatin1String("$TMPDIR/test/file.cpp")),
10,
Constants::TASK_CATEGORY_COMPILE);
}
@@ -541,7 +541,7 @@ void ProjectExplorerPlugin::testGnuMakeParserTaskMangling()
// fix up output task file:
QString filePath = outputTask.file.toString();
if (filePath.startsWith(QLatin1String("$TMPDIR/")))
- outputTask.file = Utils::FileName::fromString(filePath.replace(QLatin1String("$TMPDIR/"), tempdir));
+ outputTask.file = Utils::FilePath::fromString(filePath.replace(QLatin1String("$TMPDIR/"), tempdir));
// test mangling:
testbench.testTaskMangling(inputTask, outputTask);
diff --git a/src/plugins/projectexplorer/importwidget.cpp b/src/plugins/projectexplorer/importwidget.cpp
index d9bd629179..369e59b60b 100644
--- a/src/plugins/projectexplorer/importwidget.cpp
+++ b/src/plugins/projectexplorer/importwidget.cpp
@@ -64,7 +64,7 @@ ImportWidget::ImportWidget(QWidget *parent) :
detailsWidget->setWidget(widget);
}
-void ImportWidget::setCurrentDirectory(const Utils::FileName &dir)
+void ImportWidget::setCurrentDirectory(const Utils::FilePath &dir)
{
m_pathChooser->setBaseFileName(dir);
m_pathChooser->setFileName(dir);
@@ -72,7 +72,7 @@ void ImportWidget::setCurrentDirectory(const Utils::FileName &dir)
void ImportWidget::handleImportRequest()
{
- Utils::FileName dir = m_pathChooser->fileName();
+ Utils::FilePath dir = m_pathChooser->fileName();
emit importFrom(dir);
m_pathChooser->setFileName(m_pathChooser->baseFileName());
diff --git a/src/plugins/projectexplorer/importwidget.h b/src/plugins/projectexplorer/importwidget.h
index 9a55f64e1b..b9ecdd16ac 100644
--- a/src/plugins/projectexplorer/importwidget.h
+++ b/src/plugins/projectexplorer/importwidget.h
@@ -29,7 +29,7 @@
namespace Utils {
class PathChooser;
-class FileName;
+class FilePath;
} // namespace Utils
namespace ProjectExplorer {
@@ -42,10 +42,10 @@ class ImportWidget : public QWidget
public:
explicit ImportWidget(QWidget *parent = nullptr);
- void setCurrentDirectory(const Utils::FileName &dir);
+ void setCurrentDirectory(const Utils::FilePath &dir);
signals:
- void importFrom(const Utils::FileName &dir);
+ void importFrom(const Utils::FilePath &dir);
private:
void handleImportRequest();
diff --git a/src/plugins/projectexplorer/ioutputparser.cpp b/src/plugins/projectexplorer/ioutputparser.cpp
index 112bac4a22..8dd6d99264 100644
--- a/src/plugins/projectexplorer/ioutputparser.cpp
+++ b/src/plugins/projectexplorer/ioutputparser.cpp
@@ -207,7 +207,7 @@ void IOutputParser::setWorkingDirectory(const QString &workingDirectory)
m_parser->setWorkingDirectory(workingDirectory);
}
-void IOutputParser::setWorkingDirectory(const Utils::FileName &fn)
+void IOutputParser::setWorkingDirectory(const Utils::FilePath &fn)
{
setWorkingDirectory(fn.toString());
}
diff --git a/src/plugins/projectexplorer/ioutputparser.h b/src/plugins/projectexplorer/ioutputparser.h
index 91fbc4c30d..1872461cbb 100644
--- a/src/plugins/projectexplorer/ioutputparser.h
+++ b/src/plugins/projectexplorer/ioutputparser.h
@@ -53,7 +53,7 @@ public:
virtual bool hasFatalErrors() const;
virtual void setWorkingDirectory(const QString &workingDirectory);
- void setWorkingDirectory(const Utils::FileName &fn);
+ void setWorkingDirectory(const Utils::FilePath &fn);
void flush(); // flush out pending tasks
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonkitspage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonkitspage.cpp
index 5faa5c3642..7501521be7 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonkitspage.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonkitspage.cpp
@@ -107,7 +107,7 @@ void JsonKitsPage::setupProjectFiles(const JsonWizard::GeneratorFiles &files)
const QFileInfo fi(f.file.path());
const QString path = fi.absoluteFilePath();
Project *project = ProjectManager::openProject(Utils::mimeTypeForFile(fi),
- Utils::FileName::fromString(path));
+ Utils::FilePath::fromString(path));
if (project) {
if (setupProject(project))
project->saveSettings();
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonprojectpage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonprojectpage.cpp
index 45f332a2de..fcddd7ffd8 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonprojectpage.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonprojectpage.cpp
@@ -52,7 +52,7 @@ bool JsonProjectPage::validatePage()
{
if (isComplete() && useAsDefaultPath()) {
// Store the path as default path for new projects if desired.
- Core::DocumentManager::setProjectsDirectory(Utils::FileName::fromString(path()));
+ Core::DocumentManager::setProjectsDirectory(Utils::FilePath::fromString(path()));
Core::DocumentManager::setUseProjectsDirectory(true);
}
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp
index 6939d0863e..a1d9c7d6f0 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp
@@ -503,7 +503,7 @@ void JsonWizard::openProjectForNode(Node *node)
QTC_ASSERT(projNode, return);
- Utils::optional<FileName> projFilePath = projNode->visibleAfterAddFileAction();
+ Utils::optional<FilePath> projFilePath = projNode->visibleAfterAddFileAction();
if (projFilePath && !Core::EditorManager::openEditor(projFilePath.value().toString())) {
auto errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard",
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp
index 6acc26a10e..530ace9ca7 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp
@@ -211,7 +211,7 @@ QList<Core::IWizardFactory *> JsonWizardFactory::createWizardFactories()
const QString wizardFileName = QLatin1String(WIZARD_FILE);
QList <Core::IWizardFactory *> result;
- foreach (const Utils::FileName &path, searchPaths()) {
+ foreach (const Utils::FilePath &path, searchPaths()) {
if (path.isEmpty())
continue;
@@ -334,20 +334,20 @@ static QStringList environmentTemplatesPaths()
return paths;
}
-Utils::FileNameList &JsonWizardFactory::searchPaths()
+Utils::FilePathList &JsonWizardFactory::searchPaths()
{
- static Utils::FileNameList m_searchPaths = Utils::FileNameList()
- << Utils::FileName::fromString(Core::ICore::userResourcePath() + QLatin1Char('/') +
+ static Utils::FilePathList m_searchPaths = Utils::FilePathList()
+ << Utils::FilePath::fromString(Core::ICore::userResourcePath() + QLatin1Char('/') +
QLatin1String(WIZARD_PATH))
- << Utils::FileName::fromString(Core::ICore::resourcePath() + QLatin1Char('/') +
+ << Utils::FilePath::fromString(Core::ICore::resourcePath() + QLatin1Char('/') +
QLatin1String(WIZARD_PATH));
for (const QString &environmentTemplateDirName : environmentTemplatesPaths())
- m_searchPaths << Utils::FileName::fromString(environmentTemplateDirName);
+ m_searchPaths << Utils::FilePath::fromString(environmentTemplateDirName);
return m_searchPaths;
}
-void JsonWizardFactory::addWizardPath(const Utils::FileName &path)
+void JsonWizardFactory::addWizardPath(const Utils::FilePath &path)
{
searchPaths().append(path);
}
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h
index 06af1ebae8..5573bb2979 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h
@@ -55,7 +55,7 @@ class PROJECTEXPLORER_EXPORT JsonWizardFactory : public Core::IWizardFactory
public:
// Add search paths for wizard.json files. All subdirs are going to be checked.
- static void addWizardPath(const Utils::FileName &path);
+ static void addWizardPath(const Utils::FilePath &path);
// actual interface of the wizard factory:
class Generator {
@@ -96,7 +96,7 @@ private:
static QList<IWizardFactory *> createWizardFactories();
static JsonWizardFactory *createWizardFactory(const QVariantMap &data, const QDir &baseDir,
QString *errorMessage);
- static Utils::FileNameList &searchPaths();
+ static Utils::FilePathList &searchPaths();
static void setVerbose(int level);
static int verbose();
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp
index e0a06c824e..cf84f8b5e4 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp
@@ -98,7 +98,7 @@ bool JsonWizardGenerator::formatFile(const JsonWizard *wizard, GeneratedFile *fi
Indenter *indenter = nullptr;
if (factory) {
indenter = factory->createIndenter(&doc);
- indenter->setFileName(Utils::FileName::fromString(file->path()));
+ indenter->setFileName(Utils::FilePath::fromString(file->path()));
}
if (!indenter)
indenter = new NormalIndenter(&doc);
diff --git a/src/plugins/projectexplorer/kit.cpp b/src/plugins/projectexplorer/kit.cpp
index 670c2eb801..7f58bf4a13 100644
--- a/src/plugins/projectexplorer/kit.cpp
+++ b/src/plugins/projectexplorer/kit.cpp
@@ -123,7 +123,7 @@ public:
bool m_hasValidityInfo = false;
bool m_mustNotify = false;
QIcon m_cachedIcon;
- FileName m_iconPath;
+ FilePath m_iconPath;
Id m_deviceTypeForIcon;
QHash<Id, QVariant> m_data;
@@ -162,7 +162,7 @@ Kit::Kit(const QVariantMap &data) :
d->m_unexpandedDisplayName = data.value(QLatin1String(DISPLAYNAME_KEY),
d->m_unexpandedDisplayName).toString();
d->m_fileSystemFriendlyName = data.value(QLatin1String(FILESYSTEMFRIENDLYNAME_KEY)).toString();
- d->m_iconPath = FileName::fromString(data.value(QLatin1String(ICON_KEY),
+ d->m_iconPath = FilePath::fromString(data.value(QLatin1String(ICON_KEY),
d->m_iconPath.toString()).toString());
d->m_deviceTypeForIcon = Id::fromSetting(data.value(DEVICE_TYPE_FOR_ICON_KEY));
const auto it = data.constFind(IRRELEVANT_ASPECTS_KEY);
@@ -400,12 +400,12 @@ QIcon Kit::icon() const
return d->m_cachedIcon;
}
-FileName Kit::iconPath() const
+FilePath Kit::iconPath() const
{
return d->m_iconPath;
}
-void Kit::setIconPath(const FileName &path)
+void Kit::setIconPath(const FilePath &path)
{
if (d->m_iconPath == path)
return;
diff --git a/src/plugins/projectexplorer/kit.h b/src/plugins/projectexplorer/kit.h
index 935db0aa8b..9f0fc91623 100644
--- a/src/plugins/projectexplorer/kit.h
+++ b/src/plugins/projectexplorer/kit.h
@@ -97,8 +97,8 @@ public:
int weight() const;
QIcon icon() const;
- Utils::FileName iconPath() const;
- void setIconPath(const Utils::FileName &path);
+ Utils::FilePath iconPath() const;
+ void setIconPath(const Utils::FilePath &path);
void setDeviceTypeForIcon(Core::Id deviceType);
QList<Core::Id> allKeys() const;
diff --git a/src/plugins/projectexplorer/kitinformation.cpp b/src/plugins/projectexplorer/kitinformation.cpp
index ed3be721e0..4ca258df1a 100644
--- a/src/plugins/projectexplorer/kitinformation.cpp
+++ b/src/plugins/projectexplorer/kitinformation.cpp
@@ -125,7 +125,7 @@ SysRootKitAspect::SysRootKitAspect()
Tasks SysRootKitAspect::validate(const Kit *k) const
{
Tasks result;
- const Utils::FileName dir = SysRootKitAspect::sysRoot(k);
+ const Utils::FilePath dir = SysRootKitAspect::sysRoot(k);
if (dir.isEmpty())
return result;
@@ -136,13 +136,13 @@ Tasks SysRootKitAspect::validate(const Kit *k) const
if (!fi.exists()) {
result << Task(Task::Warning, tr("Sys Root \"%1\" does not exist in the file system.").arg(dir.toUserOutput()),
- Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
+ Utils::FilePath(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
} else if (!fi.isDir()) {
result << Task(Task::Warning, tr("Sys Root \"%1\" is not a directory.").arg(dir.toUserOutput()),
- Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
+ Utils::FilePath(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
} else if (QDir(dir.toString()).entryList(QDir::AllEntries | QDir::NoDotAndDotDot).isEmpty()) {
result << Task(Task::Warning, tr("Sys Root \"%1\" is empty.").arg(dir.toUserOutput()),
- Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
+ Utils::FilePath(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
}
return result;
}
@@ -173,23 +173,23 @@ Core::Id SysRootKitAspect::id()
return "PE.Profile.SysRoot";
}
-Utils::FileName SysRootKitAspect::sysRoot(const Kit *k)
+Utils::FilePath SysRootKitAspect::sysRoot(const Kit *k)
{
if (!k)
- return Utils::FileName();
+ return Utils::FilePath();
if (!k->value(SysRootKitAspect::id()).toString().isEmpty())
- return Utils::FileName::fromString(k->value(SysRootKitAspect::id()).toString());
+ return Utils::FilePath::fromString(k->value(SysRootKitAspect::id()).toString());
for (ToolChain *tc : ToolChainKitAspect::toolChains(k)) {
if (!tc->sysRoot().isEmpty())
- return Utils::FileName::fromString(tc->sysRoot());
+ return Utils::FilePath::fromString(tc->sysRoot());
}
- return Utils::FileName();
+ return Utils::FilePath();
}
-void SysRootKitAspect::setSysRoot(Kit *k, const Utils::FileName &v)
+void SysRootKitAspect::setSysRoot(Kit *k, const Utils::FilePath &v)
{
if (!k)
return;
@@ -376,7 +376,7 @@ Tasks ToolChainKitAspect::validate(const Kit *k) const
const QList<ToolChain*> tcList = toolChains(k);
if (tcList.isEmpty()) {
result << Task(Task::Warning, ToolChainKitAspect::msgNoToolChainInTarget(),
- Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
+ Utils::FilePath(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
} else {
QSet<Abi> targetAbis;
foreach (ToolChain *tc, tcList) {
@@ -386,7 +386,7 @@ Tasks ToolChainKitAspect::validate(const Kit *k) const
if (targetAbis.count() != 1) {
result << Task(Task::Error, tr("Compilers produce code for different ABIs: %1")
.arg(Utils::transform(targetAbis, &Abi::toString).toList().join(", ")),
- Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
+ Utils::FilePath(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
}
}
return result;
@@ -977,10 +977,10 @@ Tasks DeviceKitAspect::validate(const Kit *k) const
Tasks result;
if (dev.isNull())
result.append(Task(Task::Warning, tr("No device set."),
- Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Utils::FilePath(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
else if (!dev->isCompatibleWith(k))
result.append(Task(Task::Error, tr("Device is incompatible with this kit."),
- Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Utils::FilePath(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
return result;
}
@@ -1242,7 +1242,7 @@ Tasks EnvironmentKitAspect::validate(const Kit *k) const
const QVariant variant = k->value(EnvironmentKitAspect::id());
if (!variant.isNull() && !variant.canConvert(QVariant::List)) {
result.append(Task(Task::Error, tr("The environment setting value is invalid."),
- Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
+ Utils::FilePath(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
}
return result;
}
diff --git a/src/plugins/projectexplorer/kitinformation.h b/src/plugins/projectexplorer/kitinformation.h
index 104d3a1eb2..037b4b9394 100644
--- a/src/plugins/projectexplorer/kitinformation.h
+++ b/src/plugins/projectexplorer/kitinformation.h
@@ -56,8 +56,8 @@ public:
void addToMacroExpander(Kit *kit, Utils::MacroExpander *expander) const override;
static Core::Id id();
- static Utils::FileName sysRoot(const Kit *k);
- static void setSysRoot(Kit *k, const Utils::FileName &v);
+ static Utils::FilePath sysRoot(const Kit *k);
+ static void setSysRoot(Kit *k, const Utils::FilePath &v);
};
// --------------------------------------------------------------------------
diff --git a/src/plugins/projectexplorer/kitmanager.cpp b/src/plugins/projectexplorer/kitmanager.cpp
index 94353071be..91d04b6f5d 100644
--- a/src/plugins/projectexplorer/kitmanager.cpp
+++ b/src/plugins/projectexplorer/kitmanager.cpp
@@ -61,7 +61,7 @@ public:
std::vector<std::unique_ptr<Kit>> kits;
};
-static KitList restoreKitsHelper(const Utils::FileName &fileName);
+static KitList restoreKitsHelper(const Utils::FilePath &fileName);
namespace Internal {
@@ -72,9 +72,9 @@ const char KIT_DEFAULT_KEY[] = "Profile.Default";
const char KIT_IRRELEVANT_ASPECTS_KEY[] = "Kit.IrrelevantAspects";
const char KIT_FILENAME[] = "/profiles.xml";
-static FileName settingsFileName()
+static FilePath settingsFileName()
{
- return FileName::fromString(ICore::userResourcePath() + KIT_FILENAME);
+ return FilePath::fromString(ICore::userResourcePath() + KIT_FILENAME);
}
// --------------------------------------------------------------------------
@@ -184,7 +184,7 @@ void KitManager::restoreKits()
// read all kits from SDK
{
KitList system = restoreKitsHelper
- (FileName::fromString(ICore::installerResourcePath() + KIT_FILENAME));
+ (FilePath::fromString(ICore::installerResourcePath() + KIT_FILENAME));
// SDK kits need to get updated with the user-provided extra settings:
for (auto &current : system.kits) {
@@ -397,7 +397,7 @@ QList<Kit *> KitManager::sortKits(const QList<Kit *> &kits)
return Utils::transform(sortList, &QPair<QString, Kit *>::second);
}
-static KitList restoreKitsHelper(const FileName &fileName)
+static KitList restoreKitsHelper(const FilePath &fileName)
{
KitList result;
diff --git a/src/plugins/projectexplorer/kitmanager.h b/src/plugins/projectexplorer/kitmanager.h
index d1ad022dfc..4cc80230c6 100644
--- a/src/plugins/projectexplorer/kitmanager.h
+++ b/src/plugins/projectexplorer/kitmanager.h
@@ -44,7 +44,7 @@ QT_END_NAMESPACE
namespace Utils {
class Environment;
-class FileName;
+class FilePath;
class MacroExpander;
} // namespace Utils
diff --git a/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp
index f032073665..bcf5c472b8 100644
--- a/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp
+++ b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp
@@ -213,7 +213,7 @@ QString KitManagerConfigWidget::validityMessage() const
{
Tasks tmp;
if (!m_hasUniqueName) {
- tmp.append(Task(Task::Warning, tr("Display name is not unique."), Utils::FileName(), -1,
+ tmp.append(Task(Task::Warning, tr("Display name is not unique."), Utils::FilePath(), -1,
ProjectExplorer::Constants::TASK_CATEGORY_COMPILE));
}
return m_modifiedKit->toHtml(tmp);
@@ -349,7 +349,7 @@ void KitManagerConfigWidget::setIcon()
if (icon.isNull())
return;
m_iconButton->setIcon(icon);
- m_modifiedKit->setIconPath(Utils::FileName::fromString(path));
+ m_modifiedKit->setIconPath(Utils::FilePath::fromString(path));
emit dirty();
});
iconMenu.exec(mapToGlobal(m_iconButton->pos()));
@@ -357,7 +357,7 @@ void KitManagerConfigWidget::setIcon()
void KitManagerConfigWidget::resetIcon()
{
- m_modifiedKit->setIconPath(Utils::FileName());
+ m_modifiedKit->setIconPath(Utils::FilePath());
emit dirty();
}
diff --git a/src/plugins/projectexplorer/ldparser.cpp b/src/plugins/projectexplorer/ldparser.cpp
index 6da77cee9c..9ce56bf7dd 100644
--- a/src/plugins/projectexplorer/ldparser.cpp
+++ b/src/plugins/projectexplorer/ldparser.cpp
@@ -68,7 +68,7 @@ void LdParser::stdError(const QString &line)
if (lne.startsWith(QLatin1String("collect2:"))) {
Task task = Task(Task::Error,
lne /* description */,
- Utils::FileName() /* filename */,
+ Utils::FilePath() /* filename */,
-1 /* linenumber */,
Constants::TASK_CATEGORY_COMPILE);
emit addTask(task, 1);
@@ -79,7 +79,7 @@ void LdParser::stdError(const QString &line)
if (match.hasMatch()) {
QString description = match.captured(2);
Task task(Task::Warning, description,
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
Constants::TASK_CATEGORY_COMPILE);
emit addTask(task, 1);
return;
@@ -95,7 +95,7 @@ void LdParser::stdError(const QString &line)
} else if (description.startsWith(QLatin1String("fatal: "))) {
description = description.mid(7);
}
- Task task(type, description, Utils::FileName() /* filename */, -1 /* line */,
+ Task task(type, description, Utils::FilePath() /* filename */, -1 /* line */,
Constants::TASK_CATEGORY_COMPILE);
emit addTask(task, 1);
return;
@@ -107,12 +107,12 @@ void LdParser::stdError(const QString &line)
int lineno = match.captured(7).toInt(&ok);
if (!ok)
lineno = -1;
- Utils::FileName filename = Utils::FileName::fromUserInput(match.captured(1));
+ Utils::FilePath filename = Utils::FilePath::fromUserInput(match.captured(1));
const QString sourceFileName = match.captured(4);
if (!sourceFileName.isEmpty()
&& !sourceFileName.startsWith(QLatin1String("(.text"))
&& !sourceFileName.startsWith(QLatin1String("(.data"))) {
- filename = Utils::FileName::fromUserInput(sourceFileName);
+ filename = Utils::FilePath::fromUserInput(sourceFileName);
}
QString description = match.captured(8).trimmed();
Task::TaskType type = Task::Error;
diff --git a/src/plugins/projectexplorer/linuxiccparser.cpp b/src/plugins/projectexplorer/linuxiccparser.cpp
index 22682a2688..6572f47d66 100644
--- a/src/plugins/projectexplorer/linuxiccparser.cpp
+++ b/src/plugins/projectexplorer/linuxiccparser.cpp
@@ -81,7 +81,7 @@ void LinuxIccParser::stdError(const QString &line)
else if (category == QLatin1String("warning"))
type = Task::Warning;
m_temporary = Task(type, m_firstLine.cap(6).trimmed(),
- Utils::FileName::fromUserInput(m_firstLine.cap(1)),
+ Utils::FilePath::fromUserInput(m_firstLine.cap(1)),
m_firstLine.cap(2).toInt(),
Constants::TASK_CATEGORY_COMPILE);
@@ -172,7 +172,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
QLatin1String("identifier \"f\" is undefined\nf(0);"),
- Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 13,
+ Utils::FilePath::fromUserInput(QLatin1String("main.cpp")), 13,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
@@ -188,7 +188,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
QLatin1String("identifier \"f\" is undefined\nf(0);"),
- Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 13,
+ Utils::FilePath::fromUserInput(QLatin1String("main.cpp")), 13,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
@@ -203,7 +203,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
QLatin1String("function \"AClass::privatefunc\" (declared at line 4 of \"main.h\") is inaccessible\nb.privatefunc();"),
- Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 53,
+ Utils::FilePath::fromUserInput(QLatin1String("main.cpp")), 53,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
@@ -217,7 +217,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< (Tasks()
<< Task(Task::Warning,
QLatin1String("use of \"=\" where \"==\" may have been intended\nwhile (a = true)"),
- Utils::FileName::fromUserInput(QLatin1String("main.cpp")), 41,
+ Utils::FilePath::fromUserInput(QLatin1String("main.cpp")), 41,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
QTest::newRow("moc note")
@@ -227,7 +227,7 @@ void ProjectExplorerPlugin::testLinuxIccOutputParsers_data()
<< (Tasks()
<< Task(Task::Unknown,
QLatin1String("Note: No relevant classes found. No output generated."),
- Utils::FileName::fromUserInput(QLatin1String("/home/qtwebkithelpviewer.h")), 0,
+ Utils::FilePath::fromUserInput(QLatin1String("/home/qtwebkithelpviewer.h")), 0,
Constants::TASK_CATEGORY_COMPILE)
)
<< QString();
diff --git a/src/plugins/projectexplorer/makestep.cpp b/src/plugins/projectexplorer/makestep.cpp
index e6b19c93bd..fecaacc89c 100644
--- a/src/plugins/projectexplorer/makestep.cpp
+++ b/src/plugins/projectexplorer/makestep.cpp
@@ -79,7 +79,7 @@ bool MakeStep::init()
if (!bc)
emit addTask(Task::buildConfigurationMissingTask());
- const FileName make = effectiveMakeCommand();
+ const FilePath make = effectiveMakeCommand();
if (make.isEmpty())
emit addTask(makeCommandMissingTask());
@@ -143,14 +143,14 @@ static const QList<ToolChain *> preferredToolChains(const Kit *kit)
return tcs;
}
-FileName MakeStep::defaultMakeCommand() const
+FilePath MakeStep::defaultMakeCommand() const
{
BuildConfiguration *bc = buildConfiguration();
if (!bc)
return {};
const Utils::Environment env = environment(bc);
for (const ToolChain *tc : preferredToolChains(target()->kit())) {
- FileName make = tc->makeCommand(env);
+ FilePath make = tc->makeCommand(env);
if (!make.isEmpty())
return make;
}
@@ -166,7 +166,7 @@ Task MakeStep::makeCommandMissingTask()
{
return Task(Task::Error,
msgNoMakeCommand(),
- Utils::FileName(),
+ Utils::FilePath(),
-1,
Constants::TASK_CATEGORY_BUILDSYSTEM);
}
@@ -260,7 +260,7 @@ Utils::Environment MakeStep::environment(BuildConfiguration *bc) const
return env;
}
-void MakeStep::setMakeCommand(const FileName &command)
+void MakeStep::setMakeCommand(const FilePath &command)
{
m_makeCommand = command;
}
@@ -286,7 +286,7 @@ bool MakeStep::fromMap(const QVariantMap &map)
{
m_buildTargets = map.value(id().withSuffix(BUILD_TARGETS_SUFFIX).toString()).toStringList();
m_makeArguments = map.value(id().withSuffix(MAKE_ARGUMENTS_SUFFIX).toString()).toString();
- m_makeCommand = FileName::fromString(
+ m_makeCommand = FilePath::fromString(
map.value(id().withSuffix(MAKE_COMMAND_SUFFIX).toString()).toString());
m_clean = map.value(id().withSuffix(CLEAN_SUFFIX).toString()).toBool();
m_overrideMakeflags = map.value(id().withSuffix(OVERRIDE_MAKEFLAGS_SUFFIX).toString(), false).toBool();
@@ -325,12 +325,12 @@ void MakeStep::setUserArguments(const QString &args)
m_makeArguments = args;
}
-FileName MakeStep::makeCommand() const
+FilePath MakeStep::makeCommand() const
{
return m_makeCommand;
}
-FileName MakeStep::effectiveMakeCommand() const
+FilePath MakeStep::effectiveMakeCommand() const
{
if (!m_makeCommand.isEmpty())
return m_makeCommand;
@@ -505,7 +505,7 @@ void MakeStepConfigWidget::itemChanged(QListWidgetItem *item)
void MakeStepConfigWidget::makeLineEditTextEdited()
{
- m_makeStep->setMakeCommand(FileName::fromString(m_ui->makeLineEdit->rawPath()));
+ m_makeStep->setMakeCommand(FilePath::fromString(m_ui->makeLineEdit->rawPath()));
updateDetails();
}
diff --git a/src/plugins/projectexplorer/makestep.h b/src/plugins/projectexplorer/makestep.h
index 5cee91237a..e44b52851e 100644
--- a/src/plugins/projectexplorer/makestep.h
+++ b/src/plugins/projectexplorer/makestep.h
@@ -58,16 +58,16 @@ public:
QString allArguments() const;
QString userArguments() const;
void setUserArguments(const QString &args);
- Utils::FileName makeCommand() const;
- void setMakeCommand(const Utils::FileName &command);
- Utils::FileName effectiveMakeCommand() const;
+ Utils::FilePath makeCommand() const;
+ void setMakeCommand(const Utils::FilePath &command);
+ Utils::FilePath effectiveMakeCommand() const;
void setClean(bool clean);
bool isClean() const;
static QString defaultDisplayName();
- Utils::FileName defaultMakeCommand() const;
+ Utils::FilePath defaultMakeCommand() const;
static QString msgNoMakeCommand();
static Task makeCommandMissingTask();
@@ -93,7 +93,7 @@ private:
QStringList m_buildTargets;
QStringList m_availableTargets;
QString m_makeArguments;
- Utils::FileName m_makeCommand;
+ Utils::FilePath m_makeCommand;
int m_userJobCount = 4;
bool m_overrideMakeflags = false;
bool m_clean = false;
diff --git a/src/plugins/projectexplorer/msvcparser.cpp b/src/plugins/projectexplorer/msvcparser.cpp
index 4fe6a379e8..2d3095c168 100644
--- a/src/plugins/projectexplorer/msvcparser.cpp
+++ b/src/plugins/projectexplorer/msvcparser.cpp
@@ -35,11 +35,11 @@ using namespace Utils;
// As of MSVC 2015: "foo.cpp(42) :" -> "foo.cpp(42):"
static const char FILE_POS_PATTERN[] = "^(?:\\d+>)?(cl|LINK|.+[^ ]) ?: ";
-static QPair<FileName, int> parseFileName(const QString &input)
+static QPair<FilePath, int> parseFileName(const QString &input)
{
QString fileName = input;
if (fileName.startsWith("LINK") || fileName.startsWith("cl"))
- return qMakePair(FileName(), -1);
+ return qMakePair(FilePath(), -1);
// Extract linenumber (if it is there):
int linenumber = -1;
@@ -59,7 +59,7 @@ static QPair<FileName, int> parseFileName(const QString &input)
}
}
const QString normalized = FileUtils::normalizePathName(fileName);
- return qMakePair(FileName::fromUserInput(normalized), linenumber);
+ return qMakePair(FilePath::fromUserInput(normalized), linenumber);
}
using namespace ProjectExplorer;
@@ -78,7 +78,7 @@ static bool handleNmakeJomMessage(const QString &line, Task *task)
*task = Task(Task::Error,
line.mid(matchLength).trimmed(), /* description */
- FileName(), /* fileName */
+ FilePath(), /* fileName */
-1, /* linenumber */
Constants::TASK_CATEGORY_COMPILE);
return true;
@@ -146,7 +146,7 @@ void MsvcParser::stdOutput(const QString &line)
if (!match.captured(1).isEmpty())
description.chop(1); // Remove trailing quote
m_lastTask = Task(Task::Unknown, description,
- FileName::fromUserInput(match.captured(2)), /* fileName */
+ FilePath::fromUserInput(match.captured(2)), /* fileName */
match.captured(3).toInt(), /* linenumber */
Constants::TASK_CATEGORY_COMPILE);
m_lines = 1;
@@ -178,7 +178,7 @@ bool MsvcParser::processCompileLine(const QString &line)
QRegularExpressionMatch match = m_compileRegExp.match(line);
if (match.hasMatch()) {
- QPair<FileName, int> position = parseFileName(match.captured(1));
+ QPair<FilePath, int> position = parseFileName(match.captured(1));
m_lastTask = Task(taskType(match.captured(2)),
match.captured(3) + match.captured(4).trimmed(), // description
position.first, position.second,
@@ -261,7 +261,7 @@ void ClangClParser::stdError(const QString &lineIn)
QRegularExpressionMatch match = m_compileRegExp.match(line);
if (match.hasMatch()) {
doFlush();
- const QPair<FileName, int> position = parseFileName(match.captured(1));
+ const QPair<FilePath, int> position = parseFileName(match.captured(1));
m_lastTask = Task(taskType(match.captured(2)), match.captured(3).trimmed(),
position.first, position.second,
Constants::TASK_CATEGORY_COMPILE);
@@ -328,7 +328,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
"C4716: 'findUnresolvedModule' : must return a value",
- FileName::fromUserInput("qmlstandalone\\main.cpp"), 54,
+ FilePath::fromUserInput("qmlstandalone\\main.cpp"), 54,
Constants::TASK_CATEGORY_COMPILE))
<< "";
@@ -339,7 +339,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
"C4716: 'findUnresolvedModule' : must return a value",
- FileName::fromUserInput("qmlstandalone\\main.cpp"), 54,
+ FilePath::fromUserInput("qmlstandalone\\main.cpp"), 54,
Constants::TASK_CATEGORY_COMPILE))
<< "";
@@ -350,7 +350,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
"C4716: 'findUnresolvedModule' : must return a value",
- FileName::fromUserInput("qmlstandalone\\main.cpp"), 54,
+ FilePath::fromUserInput("qmlstandalone\\main.cpp"), 54,
Constants::TASK_CATEGORY_COMPILE))
<< "";
@@ -361,7 +361,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Warning,
"C4100: 'something' : unreferenced formal parameter",
- FileName::fromUserInput("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp"), 69,
+ FilePath::fromUserInput("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp"), 69,
Constants::TASK_CATEGORY_COMPILE))
<< "";
@@ -373,7 +373,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Warning,
"C4100: 'something' : unreferenced formal parameter",
- FileName::fromUserInput("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp"), 69,
+ FilePath::fromUserInput("x:\\src\\plugins\\projectexplorer\\msvcparser.cpp"), 69,
Constants::TASK_CATEGORY_COMPILE))
<< "";
@@ -385,11 +385,11 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Warning,
"C4099: 'TextEditor::CompletionItem' : type name first seen using 'struct' now seen using 'class'",
- FileName::fromUserInput("x:\\src\\plugins\\texteditor\\icompletioncollector.h"), 50,
+ FilePath::fromUserInput("x:\\src\\plugins\\texteditor\\icompletioncollector.h"), 50,
Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Unknown,
"see declaration of 'TextEditor::CompletionItem'",
- FileName::fromUserInput("x:\\src\\plugins\\texteditor\\completionsupport.h"), 39,
+ FilePath::fromUserInput("x:\\src\\plugins\\texteditor\\completionsupport.h"), 39,
Constants::TASK_CATEGORY_COMPILE))
<< "";
@@ -401,11 +401,11 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Warning,
"C4099: 'TextEditor::CompletionItem' : type name first seen using 'struct' now seen using 'class'",
- FileName::fromUserInput("x:\\src\\plugins\\texteditor\\icompletioncollector.h"), 50,
+ FilePath::fromUserInput("x:\\src\\plugins\\texteditor\\icompletioncollector.h"), 50,
Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Unknown,
"see declaration of 'TextEditor::CompletionItem'",
- FileName::fromUserInput("x:\\src\\plugins\\texteditor\\completionsupport.h"), 39,
+ FilePath::fromUserInput("x:\\src\\plugins\\texteditor\\completionsupport.h"), 39,
Constants::TASK_CATEGORY_COMPILE))
<< "";
@@ -416,7 +416,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
"LNK1146: no argument specified with option '/LIBPATH:'",
- FileName(), -1,
+ FilePath(), -1,
Constants::TASK_CATEGORY_COMPILE))
<< "";
@@ -428,7 +428,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Warning,
"D9002 : ignoring unknown option '-fopenmp'",
- FileName(), -1,
+ FilePath(), -1,
Constants::TASK_CATEGORY_COMPILE))
<< "";
QTest::newRow("complex error")
@@ -448,7 +448,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
" _Traits=std::_Tmap_traits<int,double,std::less<int>,std::allocator<std::pair<const int,double>>,false>\n"
"]\n"
"No constructor could take the source type, or constructor overload resolution was ambiguous",
- FileName::fromUserInput("..\\untitled\\main.cpp"), 19,
+ FilePath::fromUserInput("..\\untitled\\main.cpp"), 19,
Constants::TASK_CATEGORY_COMPILE))
<< "";
QTest::newRow("Linker error 1")
@@ -458,7 +458,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
"LNK2019: unresolved external symbol \"public: void __thiscall Data::doit(void)\" (?doit@Data@@QAEXXZ) referenced in function _main",
- FileName::fromUserInput("main.obj"), -1,
+ FilePath::fromUserInput("main.obj"), -1,
Constants::TASK_CATEGORY_COMPILE))
<< "";
QTest::newRow("Linker error 2")
@@ -468,7 +468,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
"LNK1120: 1 unresolved externals",
- FileName::fromUserInput("debug\\Experimentation.exe"), -1,
+ FilePath::fromUserInput("debug\\Experimentation.exe"), -1,
Constants::TASK_CATEGORY_COMPILE))
<< "";
@@ -479,7 +479,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
"dependent '..\\..\\..\\..\\creator-2.5\\src\\plugins\\coreplugin\\ifile.h' does not exist.",
- FileName(), -1,
+ FilePath(), -1,
Constants::TASK_CATEGORY_COMPILE))
<< "";
QTest::newRow("jom error")
@@ -489,7 +489,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
"dependent 'main.cpp' does not exist.",
- FileName(), -1,
+ FilePath(), -1,
Constants::TASK_CATEGORY_COMPILE))
<< "";
@@ -507,11 +507,11 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Warning,
"C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'",
- FileName::fromUserInput("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility"), 2227,
+ FilePath::fromUserInput("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility"), 2227,
Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Unknown,
"see declaration of 'std::_Copy_impl'",
- FileName::fromUserInput("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility"), 2212,
+ FilePath::fromUserInput("c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE\\xutility"), 2212,
Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Unknown,
"see reference to function template instantiation '_OutIt std::copy<const unsigned char*,unsigned short*>(_InIt,_InIt,_OutIt)' being compiled\n"
@@ -520,7 +520,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
" _OutIt=unsigned short *,\n"
" _InIt=const unsigned char *\n"
"]",
- FileName::fromUserInput("symbolgroupvalue.cpp"), 2314,
+ FilePath::fromUserInput("symbolgroupvalue.cpp"), 2314,
Constants::TASK_CATEGORY_COMPILE))
<< "";
@@ -533,15 +533,15 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
"C2872: 'UINT64' : ambiguous symbol",
- FileName::fromUserInput("D:\\Project\\file.h"), 98,
+ FilePath::fromUserInput("D:\\Project\\file.h"), 98,
Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Unknown,
"could be unsigned __int64 UINT64",
- FileName::fromUserInput("C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\include\\basetsd.h"), 83,
+ FilePath::fromUserInput("C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\include\\basetsd.h"), 83,
Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Unknown,
"or Types::UINT64",
- FileName::fromUserInput("D:\\Project\\types.h"), 71,
+ FilePath::fromUserInput("D:\\Project\\types.h"), 71,
Constants::TASK_CATEGORY_COMPILE))
<< "";
QTest::newRow("ignore moc note")
@@ -559,11 +559,11 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Error,
"C2733: 'func': second C linkage of overloaded function not allowed",
- FileName::fromUserInput("main.cpp"), 7,
+ FilePath::fromUserInput("main.cpp"), 7,
Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Unknown,
"see declaration of 'func'",
- FileName::fromUserInput("main.cpp"), 6,
+ FilePath::fromUserInput("main.cpp"), 6,
Constants::TASK_CATEGORY_COMPILE))
<< "";
@@ -574,7 +574,7 @@ void ProjectExplorerPlugin::testMsvcOutputParsers_data()
<< (Tasks()
<< Task(Task::Warning,
QString::fromUtf8("D9025: переопределение \"/MDd\" на \"/MTd\""),
- FileName(), -1, Constants::TASK_CATEGORY_COMPILE))
+ FilePath(), -1, Constants::TASK_CATEGORY_COMPILE))
<< "";
}
@@ -645,19 +645,19 @@ void ProjectExplorerPlugin::testClangClOutputParsers_data()
<< "" << expectedStderr
<< (Tasks()
<< Task(Task::Warning, warning1.trimmed(),
- FileName::fromUserInput("./qwindowseglcontext.h"), 282,
+ FilePath::fromUserInput("./qwindowseglcontext.h"), 282,
Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Warning, warning2.trimmed(),
- FileName::fromUserInput(".\\qwindowsclipboard.cpp"), 60,
+ FilePath::fromUserInput(".\\qwindowsclipboard.cpp"), 60,
Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Warning, warning3.trimmed(),
- FileName::fromUserInput(".\\qwindowsclipboard.cpp"), 61,
+ FilePath::fromUserInput(".\\qwindowsclipboard.cpp"), 61,
Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Error, expectedError1,
- FileName::fromUserInput(".\\qwindowsgdinativeinterface.cpp"), 48,
+ FilePath::fromUserInput(".\\qwindowsgdinativeinterface.cpp"), 48,
Constants::TASK_CATEGORY_COMPILE)
<< Task(Task::Error, error2.trimmed(),
- FileName::fromUserInput(".\\qwindowsgdinativeinterface.cpp"), 51,
+ FilePath::fromUserInput(".\\qwindowsgdinativeinterface.cpp"), 51,
Constants::TASK_CATEGORY_COMPILE))
<< "";
}
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index 25fef49f1e..350ee1a55d 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -613,7 +613,7 @@ Macros MsvcToolChain::msvcPredefinedMacros(const QStringList &cxxflags,
cpp.setEnvironment(env.toStringList());
cpp.setWorkingDirectory(Utils::TemporaryDirectory::masterDirectoryPath());
QStringList arguments;
- const Utils::FileName binary = env.searchInPath(QLatin1String("cl.exe"));
+ const Utils::FilePath binary = env.searchInPath(QLatin1String("cl.exe"));
if (binary.isEmpty()) {
qWarning("%s: The compiler binary cl.exe could not be found in the path.", Q_FUNC_INFO);
return predefinedMacros;
@@ -1180,7 +1180,7 @@ ToolChain::BuiltInHeaderPathsRunner MsvcToolChain::createBuiltInHeaderPathsRunne
}
HeaderPaths MsvcToolChain::builtInHeaderPaths(const QStringList &cxxflags,
- const Utils::FileName &sysRoot) const
+ const Utils::FilePath &sysRoot) const
{
return createBuiltInHeaderPathsRunner()(cxxflags, sysRoot.toString(), "");
}
@@ -1210,17 +1210,17 @@ static QString wrappedMakeCommand(const QString &command)
return wrapperPath;
}
-FileName MsvcToolChain::makeCommand(const Environment &environment) const
+FilePath MsvcToolChain::makeCommand(const Environment &environment) const
{
bool useJom = ProjectExplorerPlugin::projectExplorerSettings().useJom;
const QString jom("jom.exe");
const QString nmake("nmake.exe");
- Utils::FileName tmp;
+ Utils::FilePath tmp;
- FileName command;
+ FilePath command;
if (useJom) {
tmp = environment.searchInPath(jom,
- {Utils::FileName::fromString(
+ {Utils::FilePath::fromString(
QCoreApplication::applicationDirPath())});
if (!tmp.isEmpty())
command = tmp;
@@ -1233,15 +1233,15 @@ FileName MsvcToolChain::makeCommand(const Environment &environment) const
}
if (command.isEmpty())
- command = FileName::fromString(useJom ? jom : nmake);
+ command = FilePath::fromString(useJom ? jom : nmake);
if (environment.hasKey("VSLANG"))
- return FileName::fromString(wrappedMakeCommand(command.toString()));
+ return FilePath::fromString(wrappedMakeCommand(command.toString()));
return command;
}
-Utils::FileName MsvcToolChain::compilerCommand() const
+Utils::FilePath MsvcToolChain::compilerCommand() const
{
return m_compilerCommand;
}
@@ -1252,7 +1252,7 @@ void MsvcToolChain::rescanForCompiler()
addToEnvironment(env);
m_compilerCommand
- = env.searchInPath(QLatin1String("cl.exe"), {}, [](const Utils::FileName &name) {
+ = env.searchInPath(QLatin1String("cl.exe"), {}, [](const Utils::FilePath &name) {
QDir dir(QDir::cleanPath(name.toFileInfo().absolutePath() + QStringLiteral("/..")));
do {
if (QFile::exists(dir.absoluteFilePath(QStringLiteral("vcvarsall.bat")))
@@ -1518,7 +1518,7 @@ void ClangClToolChainConfigWidget::setFromClangClToolChain()
if (clangClToolChain->isAutoDetected())
m_llvmDirLabel->setText(QDir::toNativeSeparators(clangClToolChain->clangPath()));
else
- m_compilerCommand->setFileName(Utils::FileName::fromString(clangClToolChain->clangPath()));
+ m_compilerCommand->setFileName(Utils::FilePath::fromString(clangClToolChain->clangPath()));
}
static const MsvcToolChain *findMsvcToolChain(unsigned char wordWidth, Abi::OSFlavor flavor)
@@ -1627,7 +1627,7 @@ static QString compilerFromPath(const QString &path)
void ClangClToolChainConfigWidget::applyImpl()
{
- Utils::FileName clangClPath = m_compilerCommand->fileName();
+ Utils::FilePath clangClPath = m_compilerCommand->fileName();
auto clangClToolChain = static_cast<ClangClToolChain *>(toolChain());
clangClToolChain->setClangPath(clangClPath.toString());
@@ -1695,9 +1695,9 @@ void ClangClToolChain::addToEnvironment(Utils::Environment &env) const
env.prependOrSetPath(path.canonicalPath());
}
-Utils::FileName ClangClToolChain::compilerCommand() const
+Utils::FilePath ClangClToolChain::compilerCommand() const
{
- return Utils::FileName::fromString(m_clangPath);
+ return Utils::FilePath::fromString(m_clangPath);
}
QString ClangClToolChain::typeDisplayName() const
@@ -2020,7 +2020,7 @@ QList<ToolChain *> ClangClToolChainFactory::autoDetect(const QList<ToolChain *>
QString qtCreatorsClang = Core::ICore::clangExecutable(CLANG_BINDIR);
if (!qtCreatorsClang.isEmpty()) {
- qtCreatorsClang = Utils::FileName::fromString(qtCreatorsClang)
+ qtCreatorsClang = Utils::FilePath::fromString(qtCreatorsClang)
.parentDir()
.pathAppended("clang-cl.exe")
.toString();
@@ -2039,7 +2039,7 @@ QList<ToolChain *> ClangClToolChainFactory::autoDetect(const QList<ToolChain *>
}
const Utils::Environment systemEnvironment = Utils::Environment::systemEnvironment();
- const Utils::FileName clangClPath = systemEnvironment.searchInPath("clang-cl");
+ const Utils::FilePath clangClPath = systemEnvironment.searchInPath("clang-cl");
if (!clangClPath.isEmpty())
results.append(detectClangClToolChainInPath(clangClPath.toString(), known, ""));
@@ -2104,7 +2104,7 @@ Utils::optional<QString> MsvcToolChain::generateEnvironmentSettings(const Utils:
runEnv.unset(QLatin1String("ORIGINALPATH"));
run.setEnvironment(runEnv.toStringList());
run.setTimeoutS(30);
- Utils::FileName cmdPath = Utils::FileName::fromUserInput(
+ Utils::FilePath cmdPath = Utils::FilePath::fromUserInput(
QString::fromLocal8Bit(qgetenv("COMSPEC")));
if (cmdPath.isEmpty())
cmdPath = env.searchInPath(QLatin1String("cmd.exe"));
diff --git a/src/plugins/projectexplorer/msvctoolchain.h b/src/plugins/projectexplorer/msvctoolchain.h
index 0dbe9e475d..bc0adb00ba 100644
--- a/src/plugins/projectexplorer/msvctoolchain.h
+++ b/src/plugins/projectexplorer/msvctoolchain.h
@@ -86,11 +86,11 @@ public:
WarningFlags warningFlags(const QStringList &cflags) const override;
BuiltInHeaderPathsRunner createBuiltInHeaderPathsRunner() const override;
HeaderPaths builtInHeaderPaths(const QStringList &cxxflags,
- const Utils::FileName &sysRoot) const override;
+ const Utils::FilePath &sysRoot) const override;
void addToEnvironment(Utils::Environment &env) const override;
- Utils::FileName makeCommand(const Utils::Environment &environment) const override;
- Utils::FileName compilerCommand() const override;
+ Utils::FilePath makeCommand(const Utils::Environment &environment) const override;
+ Utils::FilePath compilerCommand() const override;
IOutputParser *outputParser() const override;
QString varsBatArg() const { return m_varsBatArg; }
@@ -164,7 +164,7 @@ private:
mutable Utils::Environment m_lastEnvironment; // Last checked 'incoming' environment.
mutable Utils::Environment m_resultEnvironment; // Resulting environment for VC
- Utils::FileName m_compilerCommand;
+ Utils::FilePath m_compilerCommand;
protected:
Abi m_abi;
@@ -184,7 +184,7 @@ public:
QString typeDisplayName() const override;
QStringList suggestedMkspecList() const override;
void addToEnvironment(Utils::Environment &env) const override;
- Utils::FileName compilerCommand() const override;
+ Utils::FilePath compilerCommand() const override;
IOutputParser *outputParser() const override;
QVariantMap toMap() const override;
bool fromMap(const QVariantMap &data) override;
diff --git a/src/plugins/projectexplorer/osparser.cpp b/src/plugins/projectexplorer/osparser.cpp
index 9190f45d73..ecbef759ef 100644
--- a/src/plugins/projectexplorer/osparser.cpp
+++ b/src/plugins/projectexplorer/osparser.cpp
@@ -41,7 +41,7 @@ void OsParser::stdError(const QString &line)
if (Utils::HostOsInfo::isLinuxHost()) {
const QString trimmed = line.trimmed();
if (trimmed.contains(QLatin1String(": error while loading shared libraries:"))) {
- emit addTask(Task(Task::Error, trimmed, Utils::FileName(), -1,
+ emit addTask(Task(Task::Error, trimmed, Utils::FilePath(), -1,
Constants::TASK_CATEGORY_COMPILE));
}
}
@@ -55,7 +55,7 @@ void OsParser::stdOutput(const QString &line)
if (trimmed == QLatin1String("The process cannot access the file because it is being used by another process.")) {
emit addTask(Task(Task::Error, tr("The process cannot access the file because it is being used by another process.\n"
"Please close all running instances of your application before starting a build."),
- Utils::FileName(), -1, Constants::TASK_CATEGORY_COMPILE));
+ Utils::FilePath(), -1, Constants::TASK_CATEGORY_COMPILE));
m_hasFatalError = true;
}
}
diff --git a/src/plugins/projectexplorer/outputparser_test.cpp b/src/plugins/projectexplorer/outputparser_test.cpp
index ee7207f05f..765a087650 100644
--- a/src/plugins/projectexplorer/outputparser_test.cpp
+++ b/src/plugins/projectexplorer/outputparser_test.cpp
@@ -32,7 +32,7 @@
namespace ProjectExplorer {
-static inline QByteArray msgFileComparisonFail(const Utils::FileName &f1, const Utils::FileName &f2)
+static inline QByteArray msgFileComparisonFail(const Utils::FilePath &f1, const Utils::FilePath &f2)
{
const QString result = '"' + f1.toUserOutput() + "\" != \"" + f2.toUserOutput() + '"';
return result.toLocal8Bit();
diff --git a/src/plugins/projectexplorer/processparameters.cpp b/src/plugins/projectexplorer/processparameters.cpp
index 6381c028c7..350aa7c90f 100644
--- a/src/plugins/projectexplorer/processparameters.cpp
+++ b/src/plugins/projectexplorer/processparameters.cpp
@@ -58,7 +58,7 @@ ProcessParameters::ProcessParameters() :
Sets the executable to run.
*/
-void ProcessParameters::setCommand(const Utils::FileName &cmd)
+void ProcessParameters::setCommand(const Utils::FilePath &cmd)
{
m_command = cmd;
m_effectiveCommand.clear();
@@ -80,7 +80,7 @@ void ProcessParameters::setArguments(const QString &arguments)
Should be called from init().
*/
-void ProcessParameters::setWorkingDirectory(const FileName &workingDirectory)
+void ProcessParameters::setWorkingDirectory(const FilePath &workingDirectory)
{
m_workingDirectory = workingDirectory;
m_effectiveWorkingDirectory.clear();
@@ -105,14 +105,14 @@ void ProcessParameters::setWorkingDirectory(const FileName &workingDirectory)
Gets the fully expanded working directory.
*/
-FileName ProcessParameters::effectiveWorkingDirectory() const
+FilePath ProcessParameters::effectiveWorkingDirectory() const
{
if (m_effectiveWorkingDirectory.isEmpty()) {
QString wds = m_workingDirectory.toString();
if (m_macroExpander)
wds = m_macroExpander->expand(wds);
m_effectiveWorkingDirectory
- = FileName::fromString(QDir::cleanPath(m_environment.expandVariables(wds)));
+ = FilePath::fromString(QDir::cleanPath(m_environment.expandVariables(wds)));
}
return m_effectiveWorkingDirectory;
}
@@ -121,10 +121,10 @@ FileName ProcessParameters::effectiveWorkingDirectory() const
Gets the fully expanded command name to run.
*/
-FileName ProcessParameters::effectiveCommand() const
+FilePath ProcessParameters::effectiveCommand() const
{
if (m_effectiveCommand.isEmpty()) {
- FileName cmd = m_command;
+ FilePath cmd = m_command;
if (m_macroExpander)
cmd = m_macroExpander->expand(cmd);
m_effectiveCommand =
@@ -162,7 +162,7 @@ QString ProcessParameters::prettyCommand() const
QString cmd = m_command.toString();
if (m_macroExpander)
cmd = m_macroExpander->expand(cmd);
- return Utils::FileName::fromString(cmd).fileName();
+ return Utils::FilePath::fromString(cmd).fileName();
}
QString ProcessParameters::prettyArguments() const
diff --git a/src/plugins/projectexplorer/processparameters.h b/src/plugins/projectexplorer/processparameters.h
index ca19245153..3e08e6bb85 100644
--- a/src/plugins/projectexplorer/processparameters.h
+++ b/src/plugins/projectexplorer/processparameters.h
@@ -40,14 +40,14 @@ class PROJECTEXPLORER_EXPORT ProcessParameters
public:
ProcessParameters();
- void setCommand(const Utils::FileName &cmd);
- Utils::FileName command() const { return m_command; }
+ void setCommand(const Utils::FilePath &cmd);
+ Utils::FilePath command() const { return m_command; }
void setArguments(const QString &arguments);
QString arguments() const { return m_arguments; }
- void setWorkingDirectory(const Utils::FileName &workingDirectory);
- Utils::FileName workingDirectory() const { return m_workingDirectory; }
+ void setWorkingDirectory(const Utils::FilePath &workingDirectory);
+ Utils::FilePath workingDirectory() const { return m_workingDirectory; }
void setEnvironment(const Utils::Environment &env) { m_environment = env; }
Utils::Environment environment() const { return m_environment; }
@@ -56,9 +56,9 @@ public:
Utils::MacroExpander *macroExpander() const { return m_macroExpander; }
/// Get the fully expanded working directory:
- Utils::FileName effectiveWorkingDirectory() const;
+ Utils::FilePath effectiveWorkingDirectory() const;
/// Get the fully expanded command name to run:
- Utils::FileName effectiveCommand() const;
+ Utils::FilePath effectiveCommand() const;
/// Get the fully expanded arguments to use:
QString effectiveArguments() const;
@@ -72,14 +72,14 @@ public:
void resolveAll();
private:
- Utils::FileName m_workingDirectory;
- Utils::FileName m_command;
+ Utils::FilePath m_workingDirectory;
+ Utils::FilePath m_command;
QString m_arguments;
Utils::Environment m_environment;
Utils::MacroExpander *m_macroExpander;
- mutable Utils::FileName m_effectiveWorkingDirectory;
- mutable Utils::FileName m_effectiveCommand;
+ mutable Utils::FilePath m_effectiveWorkingDirectory;
+ mutable Utils::FilePath m_effectiveCommand;
mutable QString m_effectiveArguments;
mutable bool m_commandMissing;
};
diff --git a/src/plugins/projectexplorer/processstep.cpp b/src/plugins/projectexplorer/processstep.cpp
index 51ca66dbac..231cb831bb 100644
--- a/src/plugins/projectexplorer/processstep.cpp
+++ b/src/plugins/projectexplorer/processstep.cpp
@@ -93,8 +93,8 @@ void ProcessStep::setupProcessParameters(ProcessParameters *pp)
pp->setMacroExpander(bc ? bc->macroExpander() : Utils::globalMacroExpander());
pp->setEnvironment(bc ? bc->environment() : Utils::Environment::systemEnvironment());
- pp->setWorkingDirectory(Utils::FileName::fromString(workingDirectory));
- pp->setCommand(Utils::FileName::fromString(command));
+ pp->setWorkingDirectory(Utils::FilePath::fromString(workingDirectory));
+ pp->setCommand(Utils::FilePath::fromString(command));
pp->setArguments(arguments);
pp->resolveAll();
}
diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp
index 9bae7c339a..16ae9a38dc 100644
--- a/src/plugins/projectexplorer/project.cpp
+++ b/src/plugins/projectexplorer/project.cpp
@@ -115,7 +115,7 @@ const Project::NodeMatcher Project::GeneratedFiles = [](const Node *node) {
// ProjectDocument:
// --------------------------------------------------------------------
-ProjectDocument::ProjectDocument(const QString &mimeType, const Utils::FileName &fileName,
+ProjectDocument::ProjectDocument(const QString &mimeType, const Utils::FilePath &fileName,
const ProjectDocument::ProjectCallback &callback) :
m_callback(callback)
{
@@ -152,7 +152,7 @@ bool ProjectDocument::reload(QString *errorString, Core::IDocument::ReloadFlag f
class ProjectPrivate
{
public:
- ProjectPrivate(const QString &mimeType, const Utils::FileName &fileName,
+ ProjectPrivate(const QString &mimeType, const Utils::FilePath &fileName,
const ProjectDocument::ProjectCallback &callback)
{
m_document = std::make_unique<ProjectDocument>(mimeType, fileName, callback);
@@ -180,7 +180,7 @@ public:
Kit::Predicate m_preferredKitPredicate;
Utils::MacroExpander m_macroExpander;
- Utils::FileName m_rootProjectDirectory;
+ Utils::FilePath m_rootProjectDirectory;
mutable QVector<const Node *> m_sortedNodeList;
};
@@ -190,7 +190,7 @@ ProjectPrivate::~ProjectPrivate()
std::unique_ptr<ProjectNode> oldNode = std::move(m_rootProjectNode);
}
-Project::Project(const QString &mimeType, const Utils::FileName &fileName,
+Project::Project(const QString &mimeType, const Utils::FilePath &fileName,
const ProjectDocument::ProjectCallback &callback) :
d(new ProjectPrivate(mimeType, fileName, callback))
{
@@ -233,9 +233,9 @@ Core::IDocument *Project::document() const
return d->m_document.get();
}
-Utils::FileName Project::projectFilePath() const
+Utils::FilePath Project::projectFilePath() const
{
- QTC_ASSERT(document(), return Utils::FileName());
+ QTC_ASSERT(document(), return Utils::FilePath());
return document()->filePath();
}
@@ -584,19 +584,19 @@ Project::RestoreResult Project::restoreSettings(QString *errorMessage)
/*!
* Returns a sorted list of all files matching the predicate \a filter.
*/
-Utils::FileNameList Project::files(const Project::NodeMatcher &filter) const
+Utils::FilePathList Project::files(const Project::NodeMatcher &filter) const
{
- Utils::FileNameList result;
+ Utils::FilePathList result;
if (d->m_sortedNodeList.empty() && filter(containerNode()))
result.append(projectFilePath());
- Utils::FileName lastAdded;
+ Utils::FilePath lastAdded;
for (const Node *n : qAsConst(d->m_sortedNodeList)) {
if (filter && !filter(n))
continue;
// Remove duplicates:
- const Utils::FileName path = n->filePath();
+ const Utils::FilePath path = n->filePath();
if (path == lastAdded)
continue; // skip duplicates
lastAdded = path;
@@ -639,7 +639,7 @@ QVariantMap Project::toMap() const
This includes the absolute path.
*/
-Utils::FileName Project::projectDirectory() const
+Utils::FilePath Project::projectDirectory() const
{
return projectDirectory(projectFilePath());
}
@@ -650,16 +650,16 @@ Utils::FileName Project::projectDirectory() const
This includes the absolute path.
*/
-Utils::FileName Project::projectDirectory(const Utils::FileName &top)
+Utils::FilePath Project::projectDirectory(const Utils::FilePath &top)
{
if (top.isEmpty())
- return Utils::FileName();
- return Utils::FileName::fromString(top.toFileInfo().absoluteDir().path());
+ return Utils::FilePath();
+ return Utils::FilePath::fromString(top.toFileInfo().absoluteDir().path());
}
void Project::changeRootProjectDirectory()
{
- Utils::FileName rootPath = Utils::FileName::fromString(
+ Utils::FilePath rootPath = Utils::FilePath::fromString(
QFileDialog::getExistingDirectory(Core::ICore::dialogParent(),
tr("Select The Root Directory"),
rootProjectDirectory().toString(),
@@ -675,7 +675,7 @@ void Project::changeRootProjectDirectory()
/*!
Returns the common root directory that contains all files which belongs to a project.
*/
-Utils::FileName Project::rootProjectDirectory() const
+Utils::FilePath Project::rootProjectDirectory() const
{
if (!d->m_rootProjectDirectory.isEmpty())
return d->m_rootProjectDirectory;
@@ -722,7 +722,7 @@ Project::RestoreResult Project::fromMap(const QVariantMap &map, QString *errorMe
createTargetFromMap(map, i);
}
- d->m_rootProjectDirectory = Utils::FileName::fromString(
+ d->m_rootProjectDirectory = Utils::FilePath::fromString(
namedSettings(Constants::PROJECT_ROOT_PATH_KEY).toString());
return RestoreResult::Ok;
@@ -753,7 +753,7 @@ QStringList Project::filesGeneratedFrom(const QString &file) const
return QStringList();
}
-bool Project::isKnownFile(const Utils::FileName &filename) const
+bool Project::isKnownFile(const Utils::FilePath &filename) const
{
if (d->m_sortedNodeList.empty())
return filename == projectFilePath();
@@ -802,7 +802,7 @@ void Project::projectLoaded()
Task Project::createProjectTask(Task::TaskType type, const QString &description)
{
- return Task(type, description, Utils::FileName(), -1, Core::Id());
+ return Task(type, description, Utils::FilePath(), -1, Core::Id());
}
Core::Context Project::projectContext() const
@@ -959,18 +959,18 @@ void Project::setPreferredKitPredicate(const Kit::Predicate &predicate)
namespace ProjectExplorer {
-static Utils::FileName constructTestPath(const char *basePath)
+static Utils::FilePath constructTestPath(const char *basePath)
{
- Utils::FileName drive;
+ Utils::FilePath drive;
if (Utils::HostOsInfo::isWindowsHost())
- drive = Utils::FileName::fromString("C:");
+ drive = Utils::FilePath::fromString("C:");
return drive + QLatin1String(basePath);
}
-const Utils::FileName TEST_PROJECT_PATH = constructTestPath("/tmp/foobar/baz.project");
-const Utils::FileName TEST_PROJECT_NONEXISTING_FILE = constructTestPath("/tmp/foobar/nothing.cpp");
-const Utils::FileName TEST_PROJECT_CPP_FILE = constructTestPath("/tmp/foobar/main.cpp");
-const Utils::FileName TEST_PROJECT_GENERATED_FILE = constructTestPath("/tmp/foobar/generated.foo");
+const Utils::FilePath TEST_PROJECT_PATH = constructTestPath("/tmp/foobar/baz.project");
+const Utils::FilePath TEST_PROJECT_NONEXISTING_FILE = constructTestPath("/tmp/foobar/nothing.cpp");
+const Utils::FilePath TEST_PROJECT_CPP_FILE = constructTestPath("/tmp/foobar/main.cpp");
+const Utils::FilePath TEST_PROJECT_GENERATED_FILE = constructTestPath("/tmp/foobar/generated.foo");
const QString TEST_PROJECT_MIMETYPE = "application/vnd.test.qmakeprofile";
const QString TEST_PROJECT_DISPLAYNAME = "testProjectFoo";
const char TEST_PROJECT_ID[] = "Test.Project.Id";
@@ -1128,14 +1128,14 @@ void ProjectExplorerPlugin::testProject_projectTree()
QCOMPARE(project.isKnownFile(TEST_PROJECT_CPP_FILE), true);
QCOMPARE(project.isKnownFile(TEST_PROJECT_GENERATED_FILE), true);
- Utils::FileNameList allFiles = project.files(Project::AllFiles);
+ Utils::FilePathList allFiles = project.files(Project::AllFiles);
QCOMPARE(allFiles.count(), 3);
QVERIFY(allFiles.contains(TEST_PROJECT_PATH));
QVERIFY(allFiles.contains(TEST_PROJECT_CPP_FILE));
QVERIFY(allFiles.contains(TEST_PROJECT_GENERATED_FILE));
QCOMPARE(project.files(Project::GeneratedFiles), {TEST_PROJECT_GENERATED_FILE});
- Utils::FileNameList sourceFiles = project.files(Project::SourceFiles);
+ Utils::FilePathList sourceFiles = project.files(Project::SourceFiles);
QCOMPARE(sourceFiles.count(), 2);
QVERIFY(sourceFiles.contains(TEST_PROJECT_PATH));
QVERIFY(sourceFiles.contains(TEST_PROJECT_CPP_FILE));
diff --git a/src/plugins/projectexplorer/project.h b/src/plugins/projectexplorer/project.h
index 6704e47107..e66e049c0c 100644
--- a/src/plugins/projectexplorer/project.h
+++ b/src/plugins/projectexplorer/project.h
@@ -64,7 +64,7 @@ class PROJECTEXPLORER_EXPORT ProjectDocument : public Core::IDocument
public:
using ProjectCallback = std::function<void()>;
- ProjectDocument(const QString &mimeType, const Utils::FileName &fileName,
+ ProjectDocument(const QString &mimeType, const Utils::FilePath &fileName,
const ProjectCallback &callback = {});
Core::IDocument::ReloadBehavior reloadBehavior(Core::IDocument::ChangeTrigger state,
@@ -91,7 +91,7 @@ public:
isParsingRole
};
- Project(const QString &mimeType, const Utils::FileName &fileName,
+ Project(const QString &mimeType, const Utils::FilePath &fileName,
const ProjectDocument::ProjectCallback &callback = {});
~Project() override;
@@ -101,13 +101,13 @@ public:
QString mimeType() const;
Core::IDocument *document() const;
- Utils::FileName projectFilePath() const;
- Utils::FileName projectDirectory() const;
- static Utils::FileName projectDirectory(const Utils::FileName &top);
+ Utils::FilePath projectFilePath() const;
+ Utils::FilePath projectDirectory() const;
+ static Utils::FilePath projectDirectory(const Utils::FilePath &top);
// This does not affect nodes, only the root path.
void changeRootProjectDirectory();
- Utils::FileName rootProjectDirectory() const;
+ Utils::FilePath rootProjectDirectory() const;
virtual ProjectNode *rootProjectNode() const;
ContainerNode *containerNode() const;
@@ -141,9 +141,9 @@ public:
static const NodeMatcher SourceFiles;
static const NodeMatcher GeneratedFiles;
- Utils::FileNameList files(const NodeMatcher &matcher) const;
+ Utils::FilePathList files(const NodeMatcher &matcher) const;
virtual QStringList filesGeneratedFrom(const QString &sourceFile) const;
- bool isKnownFile(const Utils::FileName &filename) const;
+ bool isKnownFile(const Utils::FilePath &filename) const;
virtual QVariantMap toMap() const;
diff --git a/src/plugins/projectexplorer/projectconfigurationaspects.cpp b/src/plugins/projectexplorer/projectconfigurationaspects.cpp
index 279cf39fa5..d9ad7c4334 100644
--- a/src/plugins/projectexplorer/projectconfigurationaspects.cpp
+++ b/src/plugins/projectexplorer/projectconfigurationaspects.cpp
@@ -79,7 +79,7 @@ public:
QPointer<PathChooser> m_pathChooserDisplay;
QPointer<QTextEdit> m_textEditDisplay;
QPixmap m_labelPixmap;
- Utils::FileName m_baseFileName;
+ Utils::FilePath m_baseFileName;
};
class BaseIntegerAspectPrivate
@@ -138,12 +138,12 @@ void BaseStringAspect::toMap(QVariantMap &map) const
d->m_checker->toMap(map);
}
-FileName BaseStringAspect::fileName() const
+FilePath BaseStringAspect::fileName() const
{
- return FileName::fromString(d->m_value);
+ return FilePath::fromString(d->m_value);
}
-void BaseStringAspect::setFileName(const FileName &val)
+void BaseStringAspect::setFileName(const FilePath &val)
{
setValue(val.toString());
}
@@ -214,7 +214,7 @@ void BaseStringAspect::setEnvironment(const Environment &env)
d->m_pathChooserDisplay->setEnvironment(env);
}
-void BaseStringAspect::setBaseFileName(const FileName &baseFileName)
+void BaseStringAspect::setBaseFileName(const FilePath &baseFileName)
{
d->m_baseFileName = baseFileName;
if (d->m_pathChooserDisplay)
@@ -292,7 +292,7 @@ void BaseStringAspect::update()
const bool enabled = !d->m_checker || d->m_checker->value();
if (d->m_pathChooserDisplay) {
- d->m_pathChooserDisplay->setFileName(FileName::fromString(displayedString));
+ d->m_pathChooserDisplay->setFileName(FilePath::fromString(displayedString));
d->m_pathChooserDisplay->setEnabled(enabled);
}
diff --git a/src/plugins/projectexplorer/projectconfigurationaspects.h b/src/plugins/projectexplorer/projectconfigurationaspects.h
index 843e7ca461..250482b44e 100644
--- a/src/plugins/projectexplorer/projectconfigurationaspects.h
+++ b/src/plugins/projectexplorer/projectconfigurationaspects.h
@@ -89,7 +89,7 @@ public:
void setHistoryCompleter(const QString &historyCompleterKey);
void setExpectedKind(const Utils::PathChooser::Kind expectedKind);
void setEnvironment(const Utils::Environment &env);
- void setBaseFileName(const Utils::FileName &baseFileName);
+ void setBaseFileName(const Utils::FilePath &baseFileName);
bool isChecked() const;
void makeCheckable(const QString &optionalLabel, const QString &optionalBaseKey);
@@ -105,8 +105,8 @@ public:
void fromMap(const QVariantMap &map) override;
void toMap(QVariantMap &map) const override;
- Utils::FileName fileName() const;
- void setFileName(const Utils::FileName &val);
+ Utils::FilePath fileName() const;
+ void setFileName(const Utils::FilePath &val);
private:
void update();
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 266a262968..cda19816a7 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -477,7 +477,7 @@ public:
int m_activeRunControlCount = 0;
int m_shutdownWatchDogId = -1;
- QHash<QString, std::function<Project *(const Utils::FileName &)>> m_projectCreators;
+ QHash<QString, std::function<Project *(const Utils::FilePath &)>> m_projectCreators;
QList<QPair<QString, QString> > m_recentProjects; // pair of filename, displayname
static const int m_maxRecentProjects = 25;
@@ -680,7 +680,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
dd, &ProjectExplorerPluginPrivate::updateActions);
connect(tree, &ProjectTree::currentProjectChanged, this, [](Project *project) {
TextEditor::FindInFiles::instance()->setBaseDirectory(project ? project->projectDirectory()
- : Utils::FileName());
+ : Utils::FilePath());
});
// For JsonWizard:
@@ -1525,7 +1525,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
expander->registerFileVariables(Constants::VAR_CURRENTPROJECT_PREFIX,
tr("Current project's main file."),
[]() -> QString {
- Utils::FileName projectFilePath;
+ Utils::FilePath projectFilePath;
if (Project *project = ProjectTree::currentProject())
projectFilePath = project->projectFilePath();
return projectFilePath.toString();
@@ -1795,16 +1795,16 @@ void ProjectExplorerPlugin::extensionsInitialized()
QSsh::SshSettings::loadSettings(Core::ICore::settings());
const auto searchPathRetriever = [] {
- Utils::FileNameList searchPaths;
- searchPaths << Utils::FileName::fromString(Core::ICore::libexecPath());
+ Utils::FilePathList searchPaths;
+ searchPaths << Utils::FilePath::fromString(Core::ICore::libexecPath());
if (Utils::HostOsInfo::isWindowsHost()) {
const QString gitBinary = Core::ICore::settings()->value("Git/BinaryPath", "git")
.toString();
const QStringList rawGitSearchPaths = Core::ICore::settings()->value("Git/Path")
.toString().split(':', QString::SkipEmptyParts);
- const Utils::FileNameList gitSearchPaths = Utils::transform(rawGitSearchPaths,
- [](const QString &rawPath) { return Utils::FileName::fromString(rawPath); });
- const Utils::FileName fullGitPath = Utils::Environment::systemEnvironment()
+ const Utils::FilePathList gitSearchPaths = Utils::transform(rawGitSearchPaths,
+ [](const QString &rawPath) { return Utils::FilePath::fromString(rawPath); });
+ const Utils::FilePath fullGitPath = Utils::Environment::systemEnvironment()
.searchInPath(gitBinary, gitSearchPaths);
if (!fullGitPath.isEmpty()) {
searchPaths << fullGitPath.parentDir()
@@ -2033,7 +2033,7 @@ ProjectExplorerPlugin::OpenProjectResult ProjectExplorerPlugin::openProjects(con
QTC_ASSERT(!fileName.isEmpty(), continue);
const QFileInfo fi(fileName);
- const auto filePath = Utils::FileName::fromString(fi.absoluteFilePath());
+ const auto filePath = Utils::FilePath::fromString(fi.absoluteFilePath());
Project *found = Utils::findOrDefault(SessionManager::projects(),
Utils::equal(&Project::projectFilePath, filePath));
if (found) {
@@ -2358,7 +2358,7 @@ QList<QPair<QString, QString> > ProjectExplorerPluginPrivate::recentProjects() c
static QString pathOrDirectoryFor(const Node *node, bool dir)
{
- Utils::FileName path = node->filePath();
+ Utils::FilePath path = node->filePath();
QString location;
const FolderNode *folder = node->asFolderNode();
if (node->isVirtualFolderType() && folder) {
@@ -2595,7 +2595,7 @@ int ProjectExplorerPluginPrivate::queue(QList<Project *> projects, QList<Id> ste
BuildConfiguration *bc = t ? t->activeBuildConfiguration() : nullptr;
if (!bc)
return false;
- if (!Utils::FileName::fromString(rc->runnable().executable).isChildOf(bc->buildDirectory()))
+ if (!Utils::FilePath::fromString(rc->runnable().executable).isChildOf(bc->buildDirectory()))
return false;
IDevice::ConstPtr device = rc->runnable().device;
if (device.isNull())
@@ -3341,7 +3341,7 @@ void ProjectExplorerPluginPrivate::updateLocationSubMenus()
for (const FolderNode::LocationInfo &li : locations) {
const int line = li.line;
- const Utils::FileName path = li.path;
+ const Utils::FilePath path = li.path;
auto *action = new QAction(li.displayName, nullptr);
connect(action, &QAction::triggered, this, [line, path]() {
Core::EditorManager::openEditorAt(path.toString(), line);
@@ -3473,12 +3473,12 @@ void ProjectExplorerPluginPrivate::addExistingDirectory()
QTC_ASSERT(folderNode, return);
- SelectableFilesDialogAddDirectory dialog(Utils::FileName::fromString(directoryFor(node)),
- Utils::FileNameList(), ICore::mainWindow());
+ SelectableFilesDialogAddDirectory dialog(Utils::FilePath::fromString(directoryFor(node)),
+ Utils::FilePathList(), ICore::mainWindow());
dialog.setAddFileFilter({});
if (dialog.exec() == QDialog::Accepted)
- ProjectExplorerPlugin::addExistingFiles(folderNode, Utils::transform(dialog.selectedFiles(), &Utils::FileName::toString));
+ ProjectExplorerPlugin::addExistingFiles(folderNode, Utils::transform(dialog.selectedFiles(), &Utils::FilePath::toString));
}
void ProjectExplorerPlugin::addExistingFiles(FolderNode *folderNode, const QStringList &filePaths)
@@ -3558,7 +3558,7 @@ void ProjectExplorerPluginPrivate::removeFile()
const Node *currentNode = ProjectTree::currentNode();
QTC_ASSERT(currentNode && currentNode->asFileNode(), return);
- const Utils::FileName filePath = currentNode->filePath();
+ const Utils::FilePath filePath = currentNode->filePath();
Utils::RemoveFileDialog removeFileDialog(filePath.toString(), ICore::mainWindow());
if (removeFileDialog.exec() == QDialog::Accepted) {
@@ -3798,7 +3798,7 @@ QStringList ProjectExplorerPlugin::projectFilePatterns()
return patterns;
}
-bool ProjectExplorerPlugin::isProjectFile(const Utils::FileName &filePath)
+bool ProjectExplorerPlugin::isProjectFile(const Utils::FilePath &filePath)
{
Utils::MimeType mt = Utils::mimeTypeForFile(filePath.toString());
for (const QString &mime : dd->m_projectCreators.keys()) {
@@ -3839,12 +3839,12 @@ QList<QPair<QString, QString> > ProjectExplorerPlugin::recentProjects()
}
void ProjectManager::registerProjectCreator(const QString &mimeType,
- const std::function<Project *(const Utils::FileName &)> &creator)
+ const std::function<Project *(const Utils::FilePath &)> &creator)
{
dd->m_projectCreators[mimeType] = creator;
}
-Project *ProjectManager::openProject(const Utils::MimeType &mt, const Utils::FileName &fileName)
+Project *ProjectManager::openProject(const Utils::MimeType &mt, const Utils::FilePath &fileName)
{
if (mt.isValid()) {
for (const QString &mimeType : dd->m_projectCreators.keys()) {
diff --git a/src/plugins/projectexplorer/projectexplorer.h b/src/plugins/projectexplorer/projectexplorer.h
index f3c545828f..23c2098216 100644
--- a/src/plugins/projectexplorer/projectexplorer.h
+++ b/src/plugins/projectexplorer/projectexplorer.h
@@ -45,7 +45,7 @@ class Id;
namespace Utils {
class ProcessHandle;
-class FileName;
+class FilePath;
}
namespace ProjectExplorer {
@@ -141,7 +141,7 @@ public:
// internal public for FlatModel
static void renameFile(Node *node, const QString &newFilePath);
static QStringList projectFilePatterns();
- static bool isProjectFile(const Utils::FileName &filePath);
+ static bool isProjectFile(const Utils::FilePath &filePath);
static QList<QPair<QString, QString> > recentProjects();
static bool canRunStartupProject(Core::Id runMode, QString *whyNot = nullptr);
diff --git a/src/plugins/projectexplorer/projectexplorersettingspage.cpp b/src/plugins/projectexplorer/projectexplorersettingspage.cpp
index 05586ce173..73f622aedf 100644
--- a/src/plugins/projectexplorer/projectexplorersettingspage.cpp
+++ b/src/plugins/projectexplorer/projectexplorersettingspage.cpp
@@ -205,7 +205,7 @@ void ProjectExplorerSettingsPage::apply()
if (m_widget) {
ProjectExplorerPlugin::setProjectExplorerSettings(m_widget->settings());
Core::DocumentManager::setProjectsDirectory(
- Utils::FileName::fromString(m_widget->projectsDirectory()));
+ Utils::FilePath::fromString(m_widget->projectsDirectory()));
Core::DocumentManager::setUseProjectsDirectory(m_widget->useProjectsDirectory());
}
}
diff --git a/src/plugins/projectexplorer/projectfilewizardextension.cpp b/src/plugins/projectexplorer/projectfilewizardextension.cpp
index 5dab7bbf99..33be4cdcfe 100644
--- a/src/plugins/projectexplorer/projectfilewizardextension.cpp
+++ b/src/plugins/projectexplorer/projectfilewizardextension.cpp
@@ -256,7 +256,7 @@ void ProjectFileWizardExtension::applyCodeStyle(GeneratedFile *file) const
Indenter *indenter = nullptr;
if (factory) {
indenter = factory->createIndenter(&doc);
- indenter->setFileName(Utils::FileName::fromString(file->path()));
+ indenter->setFileName(Utils::FilePath::fromString(file->path()));
}
if (!indenter)
indenter = new NormalIndenter(&doc);
diff --git a/src/plugins/projectexplorer/projectimporter.cpp b/src/plugins/projectexplorer/projectimporter.cpp
index 3c6e48733a..4d32dba9d6 100644
--- a/src/plugins/projectexplorer/projectimporter.cpp
+++ b/src/plugins/projectexplorer/projectimporter.cpp
@@ -71,7 +71,7 @@ static bool hasOtherUsers(Core::Id id, const QVariant &v, Kit *k)
});
}
-ProjectImporter::ProjectImporter(const Utils::FileName &path) : m_projectPath(path)
+ProjectImporter::ProjectImporter(const Utils::FilePath &path) : m_projectPath(path)
{
useTemporaryKitAspect(ToolChainKitAspect::id(),
[this](Kit *k, const QVariantList &vl) { cleanupTemporaryToolChains(k, vl); },
@@ -84,7 +84,7 @@ ProjectImporter::~ProjectImporter()
removeProject(k);
}
-const QList<BuildInfo> ProjectImporter::import(const Utils::FileName &importPath, bool silent)
+const QList<BuildInfo> ProjectImporter::import(const Utils::FilePath &importPath, bool silent)
{
QList<BuildInfo> result;
@@ -97,7 +97,7 @@ const QList<BuildInfo> ProjectImporter::import(const Utils::FileName &importPath
return result;
}
- const Utils::FileName absoluteImportPath = Utils::FileName::fromString(fi.absoluteFilePath());
+ const Utils::FilePath absoluteImportPath = Utils::FilePath::fromString(fi.absoluteFilePath());
const auto handleFailure = [this, importPath, silent] {
if (silent)
@@ -367,7 +367,7 @@ bool ProjectImporter::hasKitWithTemporaryData(Core::Id id, const QVariant &data)
}
static ProjectImporter::ToolChainData
-createToolChains(const Utils::FileName &toolChainPath, const Core::Id &language)
+createToolChains(const Utils::FilePath &toolChainPath, const Core::Id &language)
{
ProjectImporter::ToolChainData data;
@@ -387,7 +387,7 @@ createToolChains(const Utils::FileName &toolChainPath, const Core::Id &language)
}
ProjectImporter::ToolChainData
-ProjectImporter::findOrCreateToolChains(const Utils::FileName &toolChainPath,
+ProjectImporter::findOrCreateToolChains(const Utils::FilePath &toolChainPath,
const Core::Id &language) const
{
ToolChainData result;
diff --git a/src/plugins/projectexplorer/projectimporter.h b/src/plugins/projectexplorer/projectimporter.h
index 87ee21a7b8..f1cf482607 100644
--- a/src/plugins/projectexplorer/projectimporter.h
+++ b/src/plugins/projectexplorer/projectimporter.h
@@ -51,13 +51,13 @@ public:
bool areTemporary = false;
};
- ProjectImporter(const Utils::FileName &path);
+ ProjectImporter(const Utils::FilePath &path);
~ProjectImporter() override;
- const Utils::FileName projectFilePath() const { return m_projectPath; }
- const Utils::FileName projectDirectory() const { return m_projectPath.parentDir(); }
+ const Utils::FilePath projectFilePath() const { return m_projectPath; }
+ const Utils::FilePath projectDirectory() const { return m_projectPath.parentDir(); }
- virtual const QList<BuildInfo> import(const Utils::FileName &importPath, bool silent = false);
+ virtual const QList<BuildInfo> import(const Utils::FilePath &importPath, bool silent = false);
virtual QStringList importCandidates() = 0;
virtual Target *preferredTarget(const QList<Target *> &possibleTargets);
@@ -88,7 +88,7 @@ protected:
};
// importPath is an existing directory at this point!
- virtual QList<void *> examineDirectory(const Utils::FileName &importPath) const = 0;
+ virtual QList<void *> examineDirectory(const Utils::FilePath &importPath) const = 0;
// will get one of the results from examineDirectory
virtual bool matchKit(void *directoryData, const Kit *k) const = 0;
// will get one of the results from examineDirectory
@@ -110,7 +110,7 @@ protected:
// Does *any* kit feature the requested data yet?
bool hasKitWithTemporaryData(Core::Id id, const QVariant &data) const;
- ToolChainData findOrCreateToolChains(const Utils::FileName &toolChainPath, const Core::Id &language) const;
+ ToolChainData findOrCreateToolChains(const Utils::FilePath &toolChainPath, const Core::Id &language) const;
private:
void markKitAsTemporary(Kit *k) const;
@@ -119,7 +119,7 @@ private:
void cleanupTemporaryToolChains(ProjectExplorer::Kit *k, const QVariantList &vl);
void persistTemporaryToolChains(ProjectExplorer::Kit *k, const QVariantList &vl);
- const Utils::FileName m_projectPath;
+ const Utils::FilePath m_projectPath;
mutable bool m_isUpdating = false;
class TemporaryInformationHandler {
diff --git a/src/plugins/projectexplorer/projectmanager.h b/src/plugins/projectexplorer/projectmanager.h
index e504b1968e..c0f91cebc7 100644
--- a/src/plugins/projectexplorer/projectmanager.h
+++ b/src/plugins/projectexplorer/projectmanager.h
@@ -32,7 +32,7 @@
#include <functional>
namespace Utils {
-class FileName;
+class FilePath;
class MimeType;
} // Utils
@@ -44,19 +44,19 @@ class PROJECTEXPLORER_EXPORT ProjectManager
{
public:
static bool canOpenProjectForMimeType(const Utils::MimeType &mt);
- static Project *openProject(const Utils::MimeType &mt, const Utils::FileName &fileName);
+ static Project *openProject(const Utils::MimeType &mt, const Utils::FilePath &fileName);
template <typename T>
static void registerProjectType(const QString &mimeType)
{
- ProjectManager::registerProjectCreator(mimeType, [](const Utils::FileName &fileName) {
+ ProjectManager::registerProjectCreator(mimeType, [](const Utils::FilePath &fileName) {
return new T(fileName);
});
}
private:
static void registerProjectCreator(const QString &mimeType,
- const std::function<Project *(const Utils::FileName &)> &);
+ const std::function<Project *(const Utils::FilePath &)> &);
};
} // namespace ProjectExplorer
diff --git a/src/plugins/projectexplorer/projectmodels.cpp b/src/plugins/projectexplorer/projectmodels.cpp
index 31f986d864..cfacd27ab6 100644
--- a/src/plugins/projectexplorer/projectmodels.cpp
+++ b/src/plugins/projectexplorer/projectmodels.cpp
@@ -219,8 +219,8 @@ bool FlatModel::setData(const QModelIndex &index, const QVariant &value, int rol
Node *node = nodeForIndex(index);
QTC_ASSERT(node, return false);
- const Utils::FileName orgFilePath = node->filePath();
- const Utils::FileName newFilePath = orgFilePath.parentDir().pathAppended(value.toString());
+ const Utils::FilePath orgFilePath = node->filePath();
+ const Utils::FilePath newFilePath = orgFilePath.parentDir().pathAppended(value.toString());
ProjectExplorerPlugin::renameFile(node, newFilePath.toString());
emit renamed(orgFilePath, newFilePath);
@@ -453,7 +453,7 @@ class DropFileDialog : public QDialog
{
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::FlatModel)
public:
- DropFileDialog(const FileName &defaultTargetDir)
+ DropFileDialog(const FilePath &defaultTargetDir)
: m_buttonBox(new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel)),
m_buttonGroup(new QButtonGroup(this))
{
@@ -516,9 +516,9 @@ public:
}
DropAction dropAction() const { return static_cast<DropAction>(m_buttonGroup->checkedId()); }
- FileName targetDir() const
+ FilePath targetDir() const
{
- return m_targetDirChooser ? m_targetDirChooser->fileName() : FileName();
+ return m_targetDirChooser ? m_targetDirChooser->fileName() : FilePath();
}
private:
@@ -576,15 +576,15 @@ bool FlatModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int r
// Node weirdness: Sometimes the "file path" is a directory, sometimes it's a file...
const auto dirForProjectNode = [](const ProjectNode *pNode) {
- const FileName dir = pNode->filePath();
+ const FilePath dir = pNode->filePath();
if (dir.toFileInfo().isDir())
return dir;
- return FileName::fromString(dir.toFileInfo().path());
+ return FilePath::fromString(dir.toFileInfo().path());
};
- FileName targetDir = dirForProjectNode(targetProjectNode);
+ FilePath targetDir = dirForProjectNode(targetProjectNode);
// Ask the user what to do now: Copy or add? With or without file transfer?
- DropFileDialog dlg(targetDir == dirForProjectNode(sourceProjectNode) ? FileName() : targetDir);
+ DropFileDialog dlg(targetDir == dirForProjectNode(sourceProjectNode) ? FilePath() : targetDir);
if (dlg.exec() != QDialog::Accepted)
return true;
if (!dlg.targetDir().isEmpty())
diff --git a/src/plugins/projectexplorer/projectmodels.h b/src/plugins/projectexplorer/projectmodels.h
index 5805efe3ea..aa044fc0f0 100644
--- a/src/plugins/projectexplorer/projectmodels.h
+++ b/src/plugins/projectexplorer/projectmodels.h
@@ -86,7 +86,7 @@ public:
void onCollapsed(const QModelIndex &idx);
signals:
- void renamed(const Utils::FileName &oldName, const Utils::FileName &newName);
+ void renamed(const Utils::FilePath &oldName, const Utils::FilePath &newName);
void requestExpansion(const QModelIndex &index);
private:
diff --git a/src/plugins/projectexplorer/projectnodes.cpp b/src/plugins/projectexplorer/projectnodes.cpp
index dfc07ec534..e6825e98be 100644
--- a/src/plugins/projectexplorer/projectnodes.cpp
+++ b/src/plugins/projectexplorer/projectnodes.cpp
@@ -52,7 +52,7 @@
namespace ProjectExplorer {
-static FolderNode *folderNode(const FolderNode *folder, const Utils::FileName &directory)
+static FolderNode *folderNode(const FolderNode *folder, const Utils::FilePath &directory)
{
return static_cast<FolderNode *>(Utils::findOrDefault(folder->folderNodes(),
[&directory](const FolderNode *fn) {
@@ -61,13 +61,13 @@ static FolderNode *folderNode(const FolderNode *folder, const Utils::FileName &d
}
static FolderNode *recursiveFindOrCreateFolderNode(FolderNode *folder,
- const Utils::FileName &directory,
- const Utils::FileName &overrideBaseDir,
+ const Utils::FilePath &directory,
+ const Utils::FilePath &overrideBaseDir,
const FolderNode::FolderNodeFactory &factory)
{
- Utils::FileName path = overrideBaseDir.isEmpty() ? folder->filePath() : overrideBaseDir;
+ Utils::FilePath path = overrideBaseDir.isEmpty() ? folder->filePath() : overrideBaseDir;
- Utils::FileName directoryWithoutPrefix;
+ Utils::FilePath directoryWithoutPrefix;
bool isRelative = false;
if (path.isEmpty() || path.toFileInfo().isRoot()) {
@@ -126,7 +126,7 @@ void Node::setPriority(int p)
m_priority = p;
}
-void Node::setFilePath(const Utils::FileName &filePath)
+void Node::setFilePath(const Utils::FilePath &filePath)
{
m_filePath = filePath;
}
@@ -152,7 +152,7 @@ void Node::setIsGenerated(bool g)
m_flags = static_cast<NodeFlag>(m_flags & ~FlagIsGenerated);
}
-void Node::setAbsoluteFilePathAndLine(const Utils::FileName &path, int line)
+void Node::setAbsoluteFilePathAndLine(const Utils::FilePath &path, int line)
{
if (m_filePath == path && m_line == line)
return;
@@ -215,7 +215,7 @@ const ProjectNode *Node::managingProject() const
/*!
The path of the file or folder in the filesystem the node represents.
*/
-const Utils::FileName &Node::filePath() const
+const Utils::FilePath &Node::filePath() const
{
return m_filePath;
}
@@ -297,7 +297,7 @@ FileType Node::fileTypeForMimeType(const Utils::MimeType &mt)
return type;
}
-FileType Node::fileTypeForFileName(const Utils::FileName &file)
+FileType Node::fileTypeForFileName(const Utils::FilePath &file)
{
return fileTypeForMimeType(Utils::mimeTypeForFile(file.toString(),
Utils::MimeMatchMode::MatchExtension));
@@ -313,7 +313,7 @@ FileType Node::fileTypeForFileName(const Utils::FileName &file)
\sa ProjectExplorer::FolderNode, ProjectExplorer::ProjectNode
*/
-FileNode::FileNode(const Utils::FileName &filePath, const FileType fileType) :
+FileNode::FileNode(const Utils::FilePath &filePath, const FileType fileType) :
m_fileType(fileType)
{
setFilePath(filePath);
@@ -340,8 +340,8 @@ FileType FileNode::fileType() const
return m_fileType;
}
-static QList<FileNode *> scanForFilesRecursively(const Utils::FileName &directory,
- const std::function<FileNode *(const Utils::FileName &)> factory,
+static QList<FileNode *> scanForFilesRecursively(const Utils::FilePath &directory,
+ const std::function<FileNode *(const Utils::FilePath &)> factory,
QSet<QString> &visited, QFutureInterface<QList<FileNode*>> *future,
double progressStart, double progressRange,
const QList<Core::IVersionControl*> &versionControls)
@@ -364,7 +364,7 @@ static QList<FileNode *> scanForFilesRecursively(const Utils::FileName &director
if (future && future->isCanceled())
return result;
- const Utils::FileName entryName = Utils::FileName::fromString(entry.absoluteFilePath());
+ const Utils::FilePath entryName = Utils::FilePath::fromString(entry.absoluteFilePath());
if (!Utils::contains(versionControls, [&entryName](const Core::IVersionControl *vc) {
return vc->isVcsFileOrDirectory(entryName);
})) {
@@ -388,8 +388,8 @@ static QList<FileNode *> scanForFilesRecursively(const Utils::FileName &director
}
QList<FileNode *>
-FileNode::scanForFiles(const Utils::FileName &directory,
- const std::function<FileNode *(const Utils::FileName &)> factory,
+FileNode::scanForFiles(const Utils::FilePath &directory,
+ const std::function<FileNode *(const Utils::FilePath &)> factory,
QFutureInterface<QList<FileNode *>> *future)
{
QSet<QString> visited;
@@ -422,7 +422,7 @@ QString FileNode::displayName() const
\sa ProjectExplorer::FileNode, ProjectExplorer::ProjectNode
*/
-FolderNode::FolderNode(const Utils::FileName &folderPath)
+FolderNode::FolderNode(const Utils::FilePath &folderPath)
{
setFilePath(folderPath);
setPriority(DefaultFolderPriority);
@@ -559,7 +559,7 @@ QList<FileNode*> FolderNode::fileNodes() const
return result;
}
-FileNode *FolderNode::fileNode(const Utils::FileName &file) const
+FileNode *FolderNode::fileNode(const Utils::FilePath &file) const
{
return static_cast<FileNode *>(Utils::findOrDefault(m_nodes,
[&file](const std::unique_ptr<Node> &n) {
@@ -579,7 +579,7 @@ QList<FolderNode*> FolderNode::folderNodes() const
}
void FolderNode::addNestedNode(std::unique_ptr<FileNode> &&fileNode,
- const Utils::FileName &overrideBaseDir,
+ const Utils::FilePath &overrideBaseDir,
const FolderNodeFactory &factory)
{
FolderNode *folder = recursiveFindOrCreateFolderNode(this, fileNode->filePath().parentDir(),
@@ -588,7 +588,7 @@ void FolderNode::addNestedNode(std::unique_ptr<FileNode> &&fileNode,
}
void FolderNode::addNestedNodes(std::vector<std::unique_ptr<FileNode> > &&files,
- const Utils::FileName &overrideBaseDir,
+ const Utils::FilePath &overrideBaseDir,
const FolderNode::FolderNodeFactory &factory)
{
for (std::unique_ptr<FileNode> &f : files)
@@ -776,7 +776,7 @@ bool FolderNode::showWhenEmpty() const
\sa ProjectExplorer::FileNode, ProjectExplorer::ProjectNode
*/
-VirtualFolderNode::VirtualFolderNode(const Utils::FileName &folderPath) :
+VirtualFolderNode::VirtualFolderNode(const Utils::FilePath &folderPath) :
FolderNode(folderPath)
{
}
@@ -794,7 +794,7 @@ VirtualFolderNode::VirtualFolderNode(const Utils::FileName &folderPath) :
/*!
Creates an uninitialized project node object.
*/
-ProjectNode::ProjectNode(const Utils::FileName &projectFilePath) :
+ProjectNode::ProjectNode(const Utils::FilePath &projectFilePath) :
FolderNode(projectFilePath)
{
setPriority(DefaultProjectPriority);
@@ -870,7 +870,7 @@ bool ProjectNode::deploysFolder(const QString &folder) const
return false;
}
-ProjectNode *ProjectNode::projectNode(const Utils::FileName &file) const
+ProjectNode *ProjectNode::projectNode(const Utils::FilePath &file) const
{
for (const std::unique_ptr<Node> &n: m_nodes) {
if (ProjectNode *pnode = n->asProjectNode())
diff --git a/src/plugins/projectexplorer/projectnodes.h b/src/plugins/projectexplorer/projectnodes.h
index b8bd5c3042..ce36882aa9 100644
--- a/src/plugins/projectexplorer/projectnodes.h
+++ b/src/plugins/projectexplorer/projectnodes.h
@@ -121,7 +121,7 @@ public:
// or node->parentProjectNode() for all other cases.
const ProjectNode *managingProject() const; // see above.
- const Utils::FileName &filePath() const; // file system path
+ const Utils::FilePath &filePath() const; // file system path
int line() const;
virtual QString displayName() const;
virtual QString tooltip() const;
@@ -132,7 +132,7 @@ public:
virtual bool supportsAction(ProjectAction action, const Node *node) const;
void setEnabled(bool enabled);
- void setAbsoluteFilePathAndLine(const Utils::FileName &filePath, int line);
+ void setAbsoluteFilePathAndLine(const Utils::FilePath &filePath, int line);
virtual FileNode *asFileNode() { return nullptr; }
virtual const FileNode *asFileNode() const { return nullptr; }
@@ -154,18 +154,18 @@ public:
void setLine(int line);
static FileType fileTypeForMimeType(const Utils::MimeType &mt);
- static FileType fileTypeForFileName(const Utils::FileName &file);
+ static FileType fileTypeForFileName(const Utils::FilePath &file);
protected:
Node();
Node(const Node &other) = delete;
bool operator=(const Node &other) = delete;
- void setFilePath(const Utils::FileName &filePath);
+ void setFilePath(const Utils::FilePath &filePath);
private:
FolderNode *m_parentFolderNode = nullptr;
- Utils::FileName m_filePath;
+ Utils::FilePath m_filePath;
int m_line = -1;
int m_priority = DefaultPriority;
@@ -181,7 +181,7 @@ private:
class PROJECTEXPLORER_EXPORT FileNode : public Node
{
public:
- FileNode(const Utils::FileName &filePath, const FileType fileType);
+ FileNode(const Utils::FilePath &filePath, const FileType fileType);
FileNode *clone() const;
@@ -191,8 +191,8 @@ public:
const FileNode *asFileNode() const final { return this; }
static QList<FileNode *>
- scanForFiles(const Utils::FileName &directory,
- const std::function<FileNode *(const Utils::FileName &fileName)> factory,
+ scanForFiles(const Utils::FilePath &directory,
+ const std::function<FileNode *(const Utils::FilePath &fileName)> factory,
QFutureInterface<QList<FileNode *>> *future = nullptr);
bool supportsAction(ProjectAction action, const Node *node) const override;
QString displayName() const override;
@@ -205,7 +205,7 @@ private:
class PROJECTEXPLORER_EXPORT FolderNode : public Node
{
public:
- explicit FolderNode(const Utils::FileName &folderPath);
+ explicit FolderNode(const Utils::FilePath &folderPath);
QString displayName() const override;
QIcon icon() const;
@@ -223,17 +223,17 @@ public:
ProjectNode *findProjectNode(const std::function<bool(const ProjectNode *)> &predicate);
const QList<Node *> nodes() const;
QList<FileNode *> fileNodes() const;
- FileNode *fileNode(const Utils::FileName &file) const;
+ FileNode *fileNode(const Utils::FilePath &file) const;
QList<FolderNode *> folderNodes() const;
- using FolderNodeFactory = std::function<std::unique_ptr<FolderNode>(const Utils::FileName &)>;
+ using FolderNodeFactory = std::function<std::unique_ptr<FolderNode>(const Utils::FilePath &)>;
void addNestedNodes(std::vector<std::unique_ptr<FileNode>> &&files,
- const Utils::FileName &overrideBaseDir = Utils::FileName(),
+ const Utils::FilePath &overrideBaseDir = Utils::FilePath(),
const FolderNodeFactory &factory
- = [](const Utils::FileName &fn) { return std::make_unique<FolderNode>(fn); });
+ = [](const Utils::FilePath &fn) { return std::make_unique<FolderNode>(fn); });
void addNestedNode(std::unique_ptr<FileNode> &&fileNode,
- const Utils::FileName &overrideBaseDir = Utils::FileName(),
+ const Utils::FilePath &overrideBaseDir = Utils::FilePath(),
const FolderNodeFactory &factory
- = [](const Utils::FileName &fn) { return std::make_unique<FolderNode>(fn); });
+ = [](const Utils::FilePath &fn) { return std::make_unique<FolderNode>(fn); });
void compress();
// takes ownership of newNode.
@@ -245,10 +245,10 @@ public:
class LocationInfo {
public:
- LocationInfo(const QString &dn, const Utils::FileName &p, const int l = -1) :
+ LocationInfo(const QString &dn, const Utils::FilePath &p, const int l = -1) :
path(p), line(l), displayName(dn) { }
- Utils::FileName path;
+ Utils::FilePath path;
int line = -1;
QString displayName;
};
@@ -311,7 +311,7 @@ private:
class PROJECTEXPLORER_EXPORT VirtualFolderNode : public FolderNode
{
public:
- explicit VirtualFolderNode(const Utils::FileName &folderPath);
+ explicit VirtualFolderNode(const Utils::FilePath &folderPath);
bool isFolderNodeType() const override { return false; }
bool isVirtualFolderType() const override { return true; }
@@ -321,13 +321,13 @@ public:
class PROJECTEXPLORER_EXPORT ProjectNode : public FolderNode
{
public:
- explicit ProjectNode(const Utils::FileName &projectFilePath);
+ explicit ProjectNode(const Utils::FilePath &projectFilePath);
virtual bool canAddSubProject(const QString &proFilePath) const;
virtual bool addSubProject(const QString &proFile);
virtual QStringList subProjectFileNamePatterns() const;
virtual bool removeSubProject(const QString &proFilePath);
- virtual Utils::optional<Utils::FileName> visibleAfterAddFileAction() const {
+ virtual Utils::optional<Utils::FilePath> visibleAfterAddFileAction() const {
return Utils::nullopt;
}
@@ -345,7 +345,7 @@ public:
// by default returns false
virtual bool deploysFolder(const QString &folder) const;
- ProjectNode *projectNode(const Utils::FileName &file) const;
+ ProjectNode *projectNode(const Utils::FilePath &file) const;
ProjectNode *asProjectNode() final { return this; }
const ProjectNode *asProjectNode() const final { return this; }
diff --git a/src/plugins/projectexplorer/projecttree.cpp b/src/plugins/projectexplorer/projecttree.cpp
index ceb6033a42..ca35bcff68 100644
--- a/src/plugins/projectexplorer/projecttree.cpp
+++ b/src/plugins/projectexplorer/projecttree.cpp
@@ -110,10 +110,10 @@ Node *ProjectTree::currentNode()
return s_instance->m_currentNode;
}
-FileName ProjectTree::currentFilePath()
+FilePath ProjectTree::currentFilePath()
{
Node *node = currentNode();
- return node ? node->filePath() : FileName();
+ return node ? node->filePath() : FilePath();
}
void ProjectTree::registerWidget(ProjectTreeWidget *widget)
@@ -167,7 +167,7 @@ void ProjectTree::updateFromProjectTreeWidget(ProjectTreeWidget *widget)
void ProjectTree::updateFromDocumentManager()
{
if (Core::IDocument *document = Core::EditorManager::currentDocument()) {
- const FileName fileName = document->filePath();
+ const FilePath fileName = document->filePath();
updateFromNode(ProjectTreeWidget::nodeForFile(fileName));
} else {
updateFromNode(nullptr);
@@ -302,12 +302,12 @@ void ProjectTree::updateExternalFileWarning()
}
if (!infoBar->canInfoBeAdded(externalFileId))
return;
- const FileName fileName = document->filePath();
+ const FilePath fileName = document->filePath();
const QList<Project *> projects = SessionManager::projects();
if (projects.isEmpty())
return;
for (Project *project : projects) {
- FileName projectDir = project->projectDirectory();
+ FilePath projectDir = project->projectDirectory();
if (projectDir.isEmpty())
continue;
if (fileName.isChildOf(projectDir))
@@ -315,7 +315,7 @@ void ProjectTree::updateExternalFileWarning()
// External file. Test if it under the same VCS
QString topLevel;
if (Core::VcsManager::findVersionControlForDirectory(projectDir.toString(), &topLevel)
- && fileName.isChildOf(FileName::fromString(topLevel))) {
+ && fileName.isChildOf(FilePath::fromString(topLevel))) {
return;
}
}
@@ -423,7 +423,7 @@ Project *ProjectTree::projectForNode(const Node *node)
});
}
-Node *ProjectTree::nodeForFile(const FileName &fileName)
+Node *ProjectTree::nodeForFile(const FilePath &fileName)
{
Node *node = nullptr;
for (const Project *project : SessionManager::projects()) {
diff --git a/src/plugins/projectexplorer/projecttree.h b/src/plugins/projectexplorer/projecttree.h
index f1a22b0237..4adcaa7571 100644
--- a/src/plugins/projectexplorer/projecttree.h
+++ b/src/plugins/projectexplorer/projecttree.h
@@ -31,7 +31,7 @@
#include <functional>
-namespace Utils { class FileName; }
+namespace Utils { class FilePath; }
namespace ProjectExplorer {
class FileNode;
@@ -54,7 +54,7 @@ public:
static Project *currentProject();
static Node *currentNode();
- static Utils::FileName currentFilePath();
+ static Utils::FilePath currentFilePath();
// Integration with ProjectTreeWidget
static void registerWidget(Internal::ProjectTreeWidget *widget);
@@ -76,7 +76,7 @@ public:
static void forEachNode(const std::function<void(Node *)> &task);
static Project *projectForNode(const Node *node);
- static Node *nodeForFile(const Utils::FileName &fileName);
+ static Node *nodeForFile(const Utils::FilePath &fileName);
void collapseAll();
void expandAll();
diff --git a/src/plugins/projectexplorer/projecttreewidget.cpp b/src/plugins/projectexplorer/projecttreewidget.cpp
index 3f8a5e3d83..70d3dc976a 100644
--- a/src/plugins/projectexplorer/projecttreewidget.cpp
+++ b/src/plugins/projectexplorer/projecttreewidget.cpp
@@ -350,7 +350,7 @@ void ProjectTreeWidget::rowsInserted(const QModelIndex &parent, int start, int e
}
}
-Node *ProjectTreeWidget::nodeForFile(const FileName &fileName)
+Node *ProjectTreeWidget::nodeForFile(const FilePath &fileName)
{
Node *bestNode = nullptr;
int bestNodeExpandCount = INT_MAX;
@@ -457,7 +457,7 @@ void ProjectTreeWidget::editCurrentItem()
editor->setSelection(0, dotIndex);
}
-void ProjectTreeWidget::renamed(const FileName &oldPath, const FileName &newPath)
+void ProjectTreeWidget::renamed(const FilePath &oldPath, const FilePath &newPath)
{
update();
Q_UNUSED(oldPath);
@@ -474,7 +474,7 @@ void ProjectTreeWidget::renamed(const FileName &oldPath, const FileName &newPath
void ProjectTreeWidget::syncFromDocumentManager()
{
// sync from document manager
- FileName fileName;
+ FilePath fileName;
if (IDocument *doc = EditorManager::currentDocument())
fileName = doc->filePath();
if (!currentNode() || currentNode()->filePath() != fileName)
diff --git a/src/plugins/projectexplorer/projecttreewidget.h b/src/plugins/projectexplorer/projecttreewidget.h
index fb2abfc702..3ab73eeef9 100644
--- a/src/plugins/projectexplorer/projecttreewidget.h
+++ b/src/plugins/projectexplorer/projecttreewidget.h
@@ -61,7 +61,7 @@ public:
void sync(ProjectExplorer::Node *node);
void showMessage(ProjectExplorer::Node *node, const QString &message);
- static Node *nodeForFile(const Utils::FileName &fileName);
+ static Node *nodeForFile(const Utils::FilePath &fileName);
void toggleAutoSynchronization();
void editCurrentItem();
@@ -80,7 +80,7 @@ private:
void setCurrentItem(ProjectExplorer::Node *node);
static int expandedCount(Node *node);
void rowsInserted(const QModelIndex &parent, int start, int end);
- void renamed(const Utils::FileName &oldPath, const Utils::FileName &newPath);
+ void renamed(const Utils::FilePath &oldPath, const Utils::FilePath &newPath);
void syncFromDocumentManager();
@@ -93,7 +93,7 @@ private:
QString m_modelId;
bool m_autoSync = true;
- Utils::FileName m_delayedRename;
+ Utils::FilePath m_delayedRename;
static QList<ProjectTreeWidget *> m_projectTreeWidgets;
friend class ProjectTreeWidgetFactory;
diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp
index 434249bee1..394a63290a 100644
--- a/src/plugins/projectexplorer/projectwindow.cpp
+++ b/src/plugins/projectexplorer/projectwindow.cpp
@@ -546,7 +546,7 @@ public:
QString importDir = QFileDialog::getExistingDirectory(ICore::mainWindow(),
ProjectWindow::tr("Import Directory"),
dir);
- FileName path = FileName::fromString(importDir);
+ FilePath path = FilePath::fromString(importDir);
Target *lastTarget = nullptr;
BuildConfiguration *lastBc = nullptr;
diff --git a/src/plugins/projectexplorer/projectwizardpage.cpp b/src/plugins/projectexplorer/projectwizardpage.cpp
index 508f5a1e88..9eaf136d8b 100644
--- a/src/plugins/projectexplorer/projectwizardpage.cpp
+++ b/src/plugins/projectexplorer/projectwizardpage.cpp
@@ -534,7 +534,7 @@ void ProjectWizardPage::setFiles(const QStringList &fileNames)
const bool filePath2HasDir = filePath2.contains(QLatin1Char('/'));
if (filePath1HasDir == filePath2HasDir)
- return FileName::fromString(filePath1) < FileName::fromString(filePath2);
+ return FilePath::fromString(filePath1) < FilePath::fromString(filePath2);
return filePath1HasDir;
}
);
diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp
index 56b5d68bc2..5c3c6fc0e9 100644
--- a/src/plugins/projectexplorer/runconfiguration.cpp
+++ b/src/plugins/projectexplorer/runconfiguration.cpp
@@ -204,7 +204,7 @@ RunConfiguration::RunConfiguration(Target *target, Core::Id id)
m_executableGetter = [this] {
if (const auto executableAspect = aspect<ExecutableAspect>())
return executableAspect->executable();
- return FileName();
+ return FilePath();
};
}
@@ -229,7 +229,7 @@ QString RunConfiguration::disabledReason() const
return tr("The Project is currently being parsed.");
if (!target()->project()->hasParsingData()) {
QString msg = tr("The project could not be fully parsed.");
- const FileName projectFilePath = buildTargetInfo().projectFilePath;
+ const FilePath projectFilePath = buildTargetInfo().projectFilePath;
if (!projectFilePath.exists())
msg += '\n' + tr("The project file \"%1\" does not exist.").arg(projectFilePath.toString());
return msg;
@@ -332,7 +332,7 @@ void RunConfiguration::setExecutableGetter(const RunConfiguration::ExecutableGet
m_executableGetter = exeGetter;
}
-FileName RunConfiguration::executable() const
+FilePath RunConfiguration::executable() const
{
return m_executableGetter();
}
diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h
index 77b9846471..3e5cbc6b15 100644
--- a/src/plugins/projectexplorer/runconfiguration.h
+++ b/src/plugins/projectexplorer/runconfiguration.h
@@ -160,9 +160,9 @@ public:
bool fromMap(const QVariantMap &map) override;
QVariantMap toMap() const override;
- using ExecutableGetter = std::function<Utils::FileName()>;
+ using ExecutableGetter = std::function<Utils::FilePath()>;
void setExecutableGetter(const ExecutableGetter &exeGetter);
- Utils::FileName executable() const;
+ Utils::FilePath executable() const;
virtual Runnable runnable() const;
@@ -228,7 +228,7 @@ public:
QString buildKey;
QString displayName;
QString displayNameUniquifier;
- Utils::FileName projectFilePath;
+ Utils::FilePath projectFilePath;
CreationMode creationMode = AlwaysCreate;
bool useTerminal = false;
};
diff --git a/src/plugins/projectexplorer/runconfigurationaspects.cpp b/src/plugins/projectexplorer/runconfigurationaspects.cpp
index 134589fe05..697b456758 100644
--- a/src/plugins/projectexplorer/runconfigurationaspects.cpp
+++ b/src/plugins/projectexplorer/runconfigurationaspects.cpp
@@ -190,8 +190,8 @@ void WorkingDirectoryAspect::resetPath()
void WorkingDirectoryAspect::fromMap(const QVariantMap &map)
{
- m_workingDirectory = FileName::fromString(map.value(settingsKey()).toString());
- m_defaultWorkingDirectory = FileName::fromString(map.value(keyForDefaultWd()).toString());
+ m_workingDirectory = FilePath::fromString(map.value(settingsKey()).toString());
+ m_defaultWorkingDirectory = FilePath::fromString(map.value(keyForDefaultWd()).toString());
if (m_workingDirectory.isEmpty())
m_workingDirectory = m_defaultWorkingDirectory;
@@ -208,32 +208,32 @@ void WorkingDirectoryAspect::toMap(QVariantMap &data) const
data.insert(keyForDefaultWd(), m_defaultWorkingDirectory.toString());
}
-FileName WorkingDirectoryAspect::workingDirectory(const MacroExpander *expander) const
+FilePath WorkingDirectoryAspect::workingDirectory(const MacroExpander *expander) const
{
const Utils::Environment env = m_envAspect ? m_envAspect->environment()
: Utils::Environment::systemEnvironment();
QString workingDir = m_workingDirectory.toUserOutput();
if (expander)
workingDir = expander->expandProcessArgs(workingDir);
- return FileName::fromString(PathChooser::expandedDirectory(workingDir, env, QString()));
+ return FilePath::fromString(PathChooser::expandedDirectory(workingDir, env, QString()));
}
-FileName WorkingDirectoryAspect::defaultWorkingDirectory() const
+FilePath WorkingDirectoryAspect::defaultWorkingDirectory() const
{
return m_defaultWorkingDirectory;
}
-FileName WorkingDirectoryAspect::unexpandedWorkingDirectory() const
+FilePath WorkingDirectoryAspect::unexpandedWorkingDirectory() const
{
return m_workingDirectory;
}
-void WorkingDirectoryAspect::setDefaultWorkingDirectory(const FileName &defaultWorkingDir)
+void WorkingDirectoryAspect::setDefaultWorkingDirectory(const FilePath &defaultWorkingDir)
{
if (defaultWorkingDir == m_defaultWorkingDirectory)
return;
- Utils::FileName oldDefaultDir = m_defaultWorkingDirectory;
+ Utils::FilePath oldDefaultDir = m_defaultWorkingDirectory;
m_defaultWorkingDirectory = defaultWorkingDir;
if (m_chooser)
m_chooser->setBaseFileName(m_defaultWorkingDirectory);
@@ -381,7 +381,7 @@ void ExecutableAspect::makeOverridable(const QString &overridingKey, const QStri
this, &ExecutableAspect::changed);
}
-FileName ExecutableAspect::executable() const
+FilePath ExecutableAspect::executable() const
{
if (m_alternativeExecutable && m_alternativeExecutable->isChecked())
return m_alternativeExecutable->fileName();
@@ -406,7 +406,7 @@ void ExecutableAspect::setPlaceHolderText(const QString &placeHolderText)
m_executable.setPlaceHolderText(placeHolderText);
}
-void ExecutableAspect::setExecutable(const FileName &executable)
+void ExecutableAspect::setExecutable(const FilePath &executable)
{
m_executable.setValue(executable.toString());
}
diff --git a/src/plugins/projectexplorer/runconfigurationaspects.h b/src/plugins/projectexplorer/runconfigurationaspects.h
index fb8de434ef..77973f65f4 100644
--- a/src/plugins/projectexplorer/runconfigurationaspects.h
+++ b/src/plugins/projectexplorer/runconfigurationaspects.h
@@ -72,10 +72,10 @@ public:
void addToConfigurationLayout(QFormLayout *layout) override;
void acquaintSiblings(const ProjectConfigurationAspects &) override;
- Utils::FileName workingDirectory(const Utils::MacroExpander *expander) const;
- Utils::FileName defaultWorkingDirectory() const;
- Utils::FileName unexpandedWorkingDirectory() const;
- void setDefaultWorkingDirectory(const Utils::FileName &defaultWorkingDir);
+ Utils::FilePath workingDirectory(const Utils::MacroExpander *expander) const;
+ Utils::FilePath defaultWorkingDirectory() const;
+ Utils::FilePath unexpandedWorkingDirectory() const;
+ void setDefaultWorkingDirectory(const Utils::FilePath &defaultWorkingDir);
Utils::PathChooser *pathChooser() const;
private:
@@ -86,8 +86,8 @@ private:
QString keyForDefaultWd() const;
EnvironmentAspect *m_envAspect = nullptr;
- Utils::FileName m_workingDirectory;
- Utils::FileName m_defaultWorkingDirectory;
+ Utils::FilePath m_workingDirectory;
+ Utils::FilePath m_defaultWorkingDirectory;
QPointer<Utils::PathChooser> m_chooser;
QPointer<QToolButton> m_resetButton;
};
@@ -141,8 +141,8 @@ public:
ExecutableAspect();
~ExecutableAspect() override;
- Utils::FileName executable() const;
- void setExecutable(const Utils::FileName &executable);
+ Utils::FilePath executable() const;
+ void setExecutable(const Utils::FilePath &executable);
void setSettingsKey(const QString &key);
void makeOverridable(const QString &overridingKey, const QString &useOverridableKey);
diff --git a/src/plugins/projectexplorer/selectablefilesmodel.cpp b/src/plugins/projectexplorer/selectablefilesmodel.cpp
index 2a0dff0933..28d6f4ef23 100644
--- a/src/plugins/projectexplorer/selectablefilesmodel.cpp
+++ b/src/plugins/projectexplorer/selectablefilesmodel.cpp
@@ -53,13 +53,13 @@ SelectableFilesModel::SelectableFilesModel(QObject *parent) : QAbstractItemModel
m_root = new Tree;
}
-void SelectableFilesModel::setInitialMarkedFiles(const Utils::FileNameList &files)
+void SelectableFilesModel::setInitialMarkedFiles(const Utils::FilePathList &files)
{
m_files = files.toSet();
m_allFiles = files.isEmpty();
}
-void SelectableFilesFromDirModel::startParsing(const Utils::FileName &baseDir)
+void SelectableFilesFromDirModel::startParsing(const Utils::FilePath &baseDir)
{
m_watcher.cancel();
m_watcher.waitForFinished();
@@ -87,7 +87,7 @@ void SelectableFilesFromDirModel::buildTreeFinished()
m_root = m_rootForFuture;
m_rootForFuture = nullptr;
m_outOfBaseDirFiles
- = Utils::filtered(m_files, [this](const Utils::FileName &fn) { return !fn.isChildOf(m_baseDir); });
+ = Utils::filtered(m_files, [this](const Utils::FilePath &fn) { return !fn.isChildOf(m_baseDir); });
endResetModel();
emit parsingFinished();
@@ -116,7 +116,7 @@ SelectableFilesModel::FilterState SelectableFilesModel::filter(Tree *t)
return Utils::anyOf(m_hideFilesFilter, matchesTreeName) ? FilterState::HIDDEN : FilterState::SHOWN;
}
-void SelectableFilesFromDirModel::buildTree(const Utils::FileName &baseDir, Tree *tree,
+void SelectableFilesFromDirModel::buildTree(const Utils::FilePath &baseDir, Tree *tree,
QFutureInterface<void> &fi, int symlinkDepth)
{
if (symlinkDepth == 0)
@@ -128,7 +128,7 @@ void SelectableFilesFromDirModel::buildTree(const Utils::FileName &baseDir, Tree
bool allChecked = true;
bool allUnchecked = true;
for (const QFileInfo &fileInfo : fileInfoList) {
- Utils::FileName fn = Utils::FileName::fromFileInfo(fileInfo);
+ Utils::FilePath fn = Utils::FilePath::fromFileInfo(fileInfo);
if (m_futureCount % 100) {
emit parsingProgress(fn);
if (fi.isCanceled())
@@ -302,14 +302,14 @@ Qt::ItemFlags SelectableFilesModel::flags(const QModelIndex &index) const
return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable;
}
-Utils::FileNameList SelectableFilesModel::selectedPaths() const
+Utils::FilePathList SelectableFilesModel::selectedPaths() const
{
- Utils::FileNameList result;
+ Utils::FilePathList result;
collectPaths(m_root, &result);
return result;
}
-void SelectableFilesModel::collectPaths(Tree *root, Utils::FileNameList *result) const
+void SelectableFilesModel::collectPaths(Tree *root, Utils::FilePathList *result) const
{
if (root->checked == Qt::Unchecked)
return;
@@ -318,14 +318,14 @@ void SelectableFilesModel::collectPaths(Tree *root, Utils::FileNameList *result)
collectPaths(t, result);
}
-Utils::FileNameList SelectableFilesModel::selectedFiles() const
+Utils::FilePathList SelectableFilesModel::selectedFiles() const
{
- Utils::FileNameList result = m_outOfBaseDirFiles.toList();
+ Utils::FilePathList result = m_outOfBaseDirFiles.toList();
collectFiles(m_root, &result);
return result;
}
-Utils::FileNameList SelectableFilesModel::preservedFiles() const
+Utils::FilePathList SelectableFilesModel::preservedFiles() const
{
return m_outOfBaseDirFiles.toList();
}
@@ -335,7 +335,7 @@ bool SelectableFilesModel::hasCheckedFiles() const
return m_root->checked != Qt::Unchecked;
}
-void SelectableFilesModel::collectFiles(Tree *root, Utils::FileNameList *result) const
+void SelectableFilesModel::collectFiles(Tree *root, Utils::FilePathList *result) const
{
if (root->checked == Qt::Unchecked)
return;
@@ -591,8 +591,8 @@ SelectableFilesWidget::SelectableFilesWidget(QWidget *parent) :
layout->addWidget(m_progressLabel, static_cast<int>(SelectableFilesWidgetRows::Progress), 0, 1, 4);
}
-SelectableFilesWidget::SelectableFilesWidget(const Utils::FileName &path,
- const Utils::FileNameList &files, QWidget *parent) :
+SelectableFilesWidget::SelectableFilesWidget(const Utils::FilePath &path,
+ const Utils::FilePathList &files, QWidget *parent) :
SelectableFilesWidget(parent)
{
resetModel(path, files);
@@ -615,14 +615,14 @@ void SelectableFilesWidget::setBaseDirEditable(bool edit)
m_startParsingButton->setVisible(edit);
}
-Utils::FileNameList SelectableFilesWidget::selectedFiles() const
+Utils::FilePathList SelectableFilesWidget::selectedFiles() const
{
- return m_model ? m_model->selectedFiles() : Utils::FileNameList();
+ return m_model ? m_model->selectedFiles() : Utils::FilePathList();
}
-Utils::FileNameList SelectableFilesWidget::selectedPaths() const
+Utils::FilePathList SelectableFilesWidget::selectedPaths() const
{
- return m_model ? m_model->selectedPaths() : Utils::FileNameList();
+ return m_model ? m_model->selectedPaths() : Utils::FilePathList();
}
bool SelectableFilesWidget::hasFilesSelected() const
@@ -630,7 +630,7 @@ bool SelectableFilesWidget::hasFilesSelected() const
return m_model ? m_model->hasCheckedFiles() : false;
}
-void SelectableFilesWidget::resetModel(const Utils::FileName &path, const Utils::FileNameList &files)
+void SelectableFilesWidget::resetModel(const Utils::FilePath &path, const Utils::FilePathList &files)
{
m_view->setModel(nullptr);
@@ -689,7 +689,7 @@ void SelectableFilesWidget::baseDirectoryChanged(bool validState)
m_startParsingButton->setEnabled(validState);
}
-void SelectableFilesWidget::startParsing(const Utils::FileName &baseDir)
+void SelectableFilesWidget::startParsing(const Utils::FilePath &baseDir)
{
if (!m_model)
return;
@@ -699,7 +699,7 @@ void SelectableFilesWidget::startParsing(const Utils::FileName &baseDir)
m_model->startParsing(baseDir);
}
-void SelectableFilesWidget::parsingProgress(const Utils::FileName &fileName)
+void SelectableFilesWidget::parsingProgress(const Utils::FilePath &fileName)
{
m_progressLabel->setText(tr("Generating file list...\n\n%1").arg(fileName.toUserOutput()));
}
@@ -711,7 +711,7 @@ void SelectableFilesWidget::parsingFinished()
smartExpand(m_model->index(0,0, QModelIndex()));
- const Utils::FileNameList preservedFiles = m_model->preservedFiles();
+ const Utils::FilePathList preservedFiles = m_model->preservedFiles();
m_preservedFilesLabel->setText(tr("Not showing %n files that are outside of the base directory.\n"
"These files are preserved.", nullptr, preservedFiles.count()));
@@ -735,8 +735,8 @@ void SelectableFilesWidget::smartExpand(const QModelIndex &idx)
// SelectableFilesDialogs
//////////
-SelectableFilesDialogEditFiles::SelectableFilesDialogEditFiles(const Utils::FileName &path,
- const Utils::FileNameList &files,
+SelectableFilesDialogEditFiles::SelectableFilesDialogEditFiles(const Utils::FilePath &path,
+ const Utils::FilePathList &files,
QWidget *parent) :
QDialog(parent),
m_filesWidget(new SelectableFilesWidget(path, files))
@@ -759,7 +759,7 @@ SelectableFilesDialogEditFiles::SelectableFilesDialogEditFiles(const Utils::File
layout->addWidget(buttonBox);
}
-Utils::FileNameList SelectableFilesDialogEditFiles::selectedFiles() const
+Utils::FilePathList SelectableFilesDialogEditFiles::selectedFiles() const
{
return m_filesWidget->selectedFiles();
}
@@ -770,8 +770,8 @@ Utils::FileNameList SelectableFilesDialogEditFiles::selectedFiles() const
//////////
-SelectableFilesDialogAddDirectory::SelectableFilesDialogAddDirectory(const Utils::FileName &path,
- const Utils::FileNameList &files,
+SelectableFilesDialogAddDirectory::SelectableFilesDialogAddDirectory(const Utils::FilePath &path,
+ const Utils::FilePathList &files,
QWidget *parent) :
SelectableFilesDialogEditFiles(path, files, parent)
{
diff --git a/src/plugins/projectexplorer/selectablefilesmodel.h b/src/plugins/projectexplorer/selectablefilesmodel.h
index 677329cb92..a04a059ffc 100644
--- a/src/plugins/projectexplorer/selectablefilesmodel.h
+++ b/src/plugins/projectexplorer/selectablefilesmodel.h
@@ -64,7 +64,7 @@ public:
QList<Tree *> files;
QList<Tree *> visibleFiles;
QIcon icon;
- Utils::FileName fullPath;
+ Utils::FilePath fullPath;
Tree *parent = nullptr;
};
@@ -107,7 +107,7 @@ public:
SelectableFilesModel(QObject *parent);
~SelectableFilesModel() override;
- void setInitialMarkedFiles(const Utils::FileNameList &files);
+ void setInitialMarkedFiles(const Utils::FilePathList &files);
int columnCount(const QModelIndex &parent) const override;
int rowCount(const QModelIndex &parent) const override;
@@ -118,9 +118,9 @@ public:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
- Utils::FileNameList selectedFiles() const;
- Utils::FileNameList selectedPaths() const;
- Utils::FileNameList preservedFiles() const;
+ Utils::FilePathList selectedFiles() const;
+ Utils::FilePathList selectedPaths() const;
+ Utils::FilePathList preservedFiles() const;
bool hasCheckedFiles() const;
@@ -141,14 +141,14 @@ protected:
private:
QList<Glob> parseFilter(const QString &filter);
Qt::CheckState applyFilter(const QModelIndex &idx);
- void collectFiles(Tree *root, Utils::FileNameList *result) const;
- void collectPaths(Tree *root, Utils::FileNameList *result) const;
+ void collectFiles(Tree *root, Utils::FilePathList *result) const;
+ void collectPaths(Tree *root, Utils::FilePathList *result) const;
void selectAllFiles(Tree *root);
protected:
bool m_allFiles = true;
- QSet<Utils::FileName> m_outOfBaseDirFiles;
- QSet<Utils::FileName> m_files;
+ QSet<Utils::FilePath> m_outOfBaseDirFiles;
+ QSet<Utils::FilePath> m_files;
Tree *m_root = nullptr;
private:
@@ -164,15 +164,15 @@ public:
SelectableFilesFromDirModel(QObject *parent);
~SelectableFilesFromDirModel() override;
- void startParsing(const Utils::FileName &baseDir);
+ void startParsing(const Utils::FilePath &baseDir);
void cancel();
signals:
void parsingFinished();
- void parsingProgress(const Utils::FileName &fileName);
+ void parsingProgress(const Utils::FilePath &fileName);
private:
- void buildTree(const Utils::FileName &baseDir,
+ void buildTree(const Utils::FilePath &baseDir,
Tree *tree,
QFutureInterface<void> &fi,
int symlinkDepth);
@@ -180,7 +180,7 @@ private:
void buildTreeFinished();
// Used in the future thread need to all not used after calling startParsing
- Utils::FileName m_baseDir;
+ Utils::FilePath m_baseDir;
QFutureWatcher<void> m_watcher;
Tree *m_rootForFuture = nullptr;
int m_futureCount = 0;
@@ -192,18 +192,18 @@ class PROJECTEXPLORER_EXPORT SelectableFilesWidget : public QWidget
public:
explicit SelectableFilesWidget(QWidget *parent = nullptr);
- SelectableFilesWidget(const Utils::FileName &path, const Utils::FileNameList &files,
+ SelectableFilesWidget(const Utils::FilePath &path, const Utils::FilePathList &files,
QWidget *parent = nullptr);
void setAddFileFilter(const QString &filter);
void setBaseDirEditable(bool edit);
- Utils::FileNameList selectedFiles() const;
- Utils::FileNameList selectedPaths() const;
+ Utils::FilePathList selectedFiles() const;
+ Utils::FilePathList selectedPaths() const;
bool hasFilesSelected() const;
- void resetModel(const Utils::FileName &path, const Utils::FileNameList &files);
+ void resetModel(const Utils::FilePath &path, const Utils::FilePathList &files);
void cancelParsing();
void enableFilterHistoryCompletion(const QString &keyPrefix);
@@ -216,8 +216,8 @@ private:
void applyFilter();
void baseDirectoryChanged(bool validState);
- void startParsing(const Utils::FileName &baseDir);
- void parsingProgress(const Utils::FileName &fileName);
+ void startParsing(const Utils::FilePath &baseDir);
+ void parsingProgress(const Utils::FilePath &fileName);
void parsingFinished();
void smartExpand(const QModelIndex &idx);
@@ -249,9 +249,9 @@ class PROJECTEXPLORER_EXPORT SelectableFilesDialogEditFiles : public QDialog
Q_OBJECT
public:
- SelectableFilesDialogEditFiles(const Utils::FileName &path, const Utils::FileNameList &files,
+ SelectableFilesDialogEditFiles(const Utils::FilePath &path, const Utils::FilePathList &files,
QWidget *parent);
- Utils::FileNameList selectedFiles() const;
+ Utils::FilePathList selectedFiles() const;
void setAddFileFilter(const QString &filter) { m_filesWidget->setAddFileFilter(filter); }
@@ -264,7 +264,7 @@ class SelectableFilesDialogAddDirectory : public SelectableFilesDialogEditFiles
Q_OBJECT
public:
- SelectableFilesDialogAddDirectory(const Utils::FileName &path, const Utils::FileNameList &files,
+ SelectableFilesDialogAddDirectory(const Utils::FilePath &path, const Utils::FilePathList &files,
QWidget *parent);
};
diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp
index 011107790a..95a8fbd4e6 100644
--- a/src/plugins/projectexplorer/session.cpp
+++ b/src/plugins/projectexplorer/session.cpp
@@ -210,7 +210,7 @@ QList<Project *> SessionManager::dependencies(const Project *project)
QList<Project *> projects;
foreach (const QString &dep, proDeps) {
- const Utils::FileName fn = Utils::FileName::fromString(dep);
+ const Utils::FilePath fn = Utils::FilePath::fromString(dep);
Project *pro = Utils::findOrDefault(d->m_projects, [&fn](Project *p) { return p->projectFilePath() == fn; });
if (pro)
projects += pro;
@@ -558,17 +558,17 @@ QString SessionManagerPrivate::sessionTitle(const QString &filePath)
}
QString SessionManagerPrivate::locationInProject(const QString &filePath) {
- const Project *project = SessionManager::projectForFile(Utils::FileName::fromString(filePath));
+ const Project *project = SessionManager::projectForFile(Utils::FilePath::fromString(filePath));
if (!project)
return QString();
- const Utils::FileName file = Utils::FileName::fromString(filePath);
- const Utils::FileName parentDir = file.parentDir();
+ const Utils::FilePath file = Utils::FilePath::fromString(filePath);
+ const Utils::FilePath parentDir = file.parentDir();
if (parentDir == project->projectDirectory())
return "@ " + project->displayName();
if (file.isChildOf(project->projectDirectory())) {
- const Utils::FileName dirInProject = parentDir.relativeChildPath(project->projectDirectory());
+ const Utils::FilePath dirInProject = parentDir.relativeChildPath(project->projectDirectory());
return "(" + dirInProject.toUserOutput() + " @ " + project->displayName() + ")";
}
@@ -638,7 +638,7 @@ QList<Project *> SessionManager::projectOrder(const Project *project)
return result;
}
-Project *SessionManager::projectForFile(const Utils::FileName &fileName)
+Project *SessionManager::projectForFile(const Utils::FilePath &fileName)
{
return Utils::findOrDefault(SessionManager::projects(),
[&fileName](const Project *p) { return p->isKnownFile(fileName); });
@@ -647,7 +647,7 @@ Project *SessionManager::projectForFile(const Utils::FileName &fileName)
void SessionManager::configureEditor(IEditor *editor, const QString &fileName)
{
if (auto textEditor = qobject_cast<TextEditor::BaseTextEditor*>(editor)) {
- Project *project = projectForFile(Utils::FileName::fromString(fileName));
+ Project *project = projectForFile(Utils::FilePath::fromString(fileName));
// Global settings are the default.
if (project)
project->editorConfiguration()->configureEditor(textEditor);
@@ -761,9 +761,9 @@ QDateTime SessionManager::sessionDateTime(const QString &session)
return d->m_sessionDateTimes.value(session);
}
-FileName SessionManager::sessionNameToFileName(const QString &session)
+FilePath SessionManager::sessionNameToFileName(const QString &session)
{
- return FileName::fromString(ICore::userResourcePath() + QLatin1Char('/') + session + QLatin1String(".qws"));
+ return FilePath::fromString(ICore::userResourcePath() + QLatin1Char('/') + session + QLatin1String(".qws"));
}
/*!
@@ -947,7 +947,7 @@ bool SessionManager::loadSession(const QString &session)
QStringList fileList;
// Try loading the file
- FileName fileName = sessionNameToFileName(session);
+ FilePath fileName = sessionNameToFileName(session);
PersistentSettingsReader reader;
if (fileName.exists()) {
if (!reader.load(fileName)) {
@@ -1078,7 +1078,7 @@ void SessionManagerPrivate::sessionLoadingProgress()
QStringList SessionManager::projectsForSessionName(const QString &session)
{
- const FileName fileName = sessionNameToFileName(session);
+ const FilePath fileName = sessionNameToFileName(session);
PersistentSettingsReader reader;
if (fileName.exists()) {
if (!reader.load(fileName)) {
diff --git a/src/plugins/projectexplorer/session.h b/src/plugins/projectexplorer/session.h
index 21800faa5b..782079f9d7 100644
--- a/src/plugins/projectexplorer/session.h
+++ b/src/plugins/projectexplorer/session.h
@@ -94,7 +94,7 @@ public:
static void setActiveBuildConfiguration(Target *t, BuildConfiguration *bc, SetActive cascade);
static void setActiveDeployConfiguration(Target *t, DeployConfiguration *dc, SetActive cascade);
- static Utils::FileName sessionNameToFileName(const QString &session);
+ static Utils::FilePath sessionNameToFileName(const QString &session);
static Project *startupProject();
static const QList<Project *> projects();
@@ -111,7 +111,7 @@ public:
// NBS rewrite projectOrder (dependency management)
static QList<Project *> projectOrder(const Project *project = nullptr);
- static Project *projectForFile(const Utils::FileName &fileName);
+ static Project *projectForFile(const Utils::FilePath &fileName);
static QStringList projectsForSessionName(const QString &session);
diff --git a/src/plugins/projectexplorer/targetsetuppage.cpp b/src/plugins/projectexplorer/targetsetuppage.cpp
index 501e0efc39..ab7d13a76e 100644
--- a/src/plugins/projectexplorer/targetsetuppage.cpp
+++ b/src/plugins/projectexplorer/targetsetuppage.cpp
@@ -67,10 +67,10 @@ IPotentialKit::~IPotentialKit()
}
namespace Internal {
-static Utils::FileName importDirectory(const QString &projectPath)
+static Utils::FilePath importDirectory(const QString &projectPath)
{
// Setup import widget:
- auto path = Utils::FileName::fromString(projectPath);
+ auto path = Utils::FilePath::fromString(projectPath);
path = path.parentDir(); // base dir
path = path.parentDir(); // parent dir
@@ -210,7 +210,7 @@ TargetSetupPage::TargetSetupPage(QWidget *parent) :
connect(km, &KitManager::kitRemoved, this, &TargetSetupPage::handleKitRemoval);
connect(km, &KitManager::kitUpdated, this, &TargetSetupPage::handleKitUpdate);
connect(m_importWidget, &ImportWidget::importFrom,
- this, [this](const Utils::FileName &dir) { import(dir); });
+ this, [this](const Utils::FilePath &dir) { import(dir); });
setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Kits"));
}
@@ -347,7 +347,7 @@ void TargetSetupPage::setupImports()
QStringList toImport = m_importer->importCandidates();
foreach (const QString &path, toImport)
- import(Utils::FileName::fromString(path), true);
+ import(Utils::FilePath::fromString(path), true);
}
void TargetSetupPage::handleKitAddition(Kit *k)
@@ -485,7 +485,7 @@ bool TargetSetupPage::isUpdating() const
return false;
}
-void TargetSetupPage::import(const Utils::FileName &path, bool silent)
+void TargetSetupPage::import(const Utils::FilePath &path, bool silent)
{
if (!m_importer)
return;
diff --git a/src/plugins/projectexplorer/targetsetuppage.h b/src/plugins/projectexplorer/targetsetuppage.h
index 86eeb65013..cbd0305c04 100644
--- a/src/plugins/projectexplorer/targetsetuppage.h
+++ b/src/plugins/projectexplorer/targetsetuppage.h
@@ -40,7 +40,7 @@
QT_FORWARD_DECLARE_CLASS(QSpacerItem)
namespace Core { class Id; }
-namespace Utils { class FileName; }
+namespace Utils { class FilePath; }
namespace ProjectExplorer {
class Kit;
@@ -105,7 +105,7 @@ private:
Internal::TargetSetupWidget *addWidget(Kit *k);
void setupImports();
- void import(const Utils::FileName &path, bool silent = false);
+ void import(const Utils::FilePath &path, bool silent = false);
void setupWidgets(const QString &filterText = QString());
void reset();
diff --git a/src/plugins/projectexplorer/task.cpp b/src/plugins/projectexplorer/task.cpp
index beac102b90..2a323f0041 100644
--- a/src/plugins/projectexplorer/task.cpp
+++ b/src/plugins/projectexplorer/task.cpp
@@ -62,7 +62,7 @@ unsigned int Task::s_nextId = 1;
*/
Task::Task(TaskType type_, const QString &description_,
- const Utils::FileName &file_, int line_, Core::Id category_,
+ const Utils::FilePath &file_, int line_, Core::Id category_,
const QIcon &icon, Options options) :
taskId(s_nextId), type(type_), options(options), description(description_),
line(line_), movedLine(line_), category(category_),
@@ -79,7 +79,7 @@ Task Task::compilerMissingTask()
"%1 needs a compiler set up to build. "
"Configure a compiler in the kit options.")
.arg(Core::Constants::IDE_DISPLAY_NAME),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
Constants::TASK_CATEGORY_BUILDSYSTEM);
}
@@ -90,7 +90,7 @@ Task Task::buildConfigurationMissingTask()
"%1 needs a build configuration set up to build. "
"Configure a build configuration in the project settings.")
.arg(Core::Constants::IDE_DISPLAY_NAME),
- Utils::FileName(), -1,
+ Utils::FilePath(), -1,
Constants::TASK_CATEGORY_BUILDSYSTEM);
}
@@ -111,7 +111,7 @@ void Task::clear()
taskId = 0;
type = Task::Unknown;
description.clear();
- file = Utils::FileName();
+ file = Utils::FilePath();
line = -1;
movedLine = -1;
category = Core::Id();
@@ -120,11 +120,11 @@ void Task::clear()
m_mark.clear();
}
-void Task::setFile(const Utils::FileName &file_)
+void Task::setFile(const Utils::FilePath &file_)
{
file = file_;
if (!file.isEmpty() && !file.toFileInfo().isAbsolute()) {
- Utils::FileNameList possiblePaths = Internal::findFileInSession(file);
+ Utils::FilePathList possiblePaths = Internal::findFileInSession(file);
if (possiblePaths.length() == 1)
file = possiblePaths.first();
else
diff --git a/src/plugins/projectexplorer/task.h b/src/plugins/projectexplorer/task.h
index fddd5e144f..739e90f176 100644
--- a/src/plugins/projectexplorer/task.h
+++ b/src/plugins/projectexplorer/task.h
@@ -61,7 +61,7 @@ public:
Task() = default;
Task(TaskType type, const QString &description,
- const Utils::FileName &file, int line, Core::Id category,
+ const Utils::FilePath &file, int line, Core::Id category,
const QIcon &icon = QIcon(),
Options options = AddTextMark | FlashWorthy);
@@ -70,14 +70,14 @@ public:
bool isNull() const;
void clear();
- void setFile(const Utils::FileName &file);
+ void setFile(const Utils::FilePath &file);
unsigned int taskId = 0;
TaskType type = Unknown;
Options options = AddTextMark | FlashWorthy;
QString description;
- Utils::FileName file;
- Utils::FileNameList fileCandidates;
+ Utils::FilePath file;
+ Utils::FilePathList fileCandidates;
int line = -1;
int movedLine = -1; // contains a line number if the line was moved in the editor
Core::Id category;
diff --git a/src/plugins/projectexplorer/taskhub.cpp b/src/plugins/projectexplorer/taskhub.cpp
index b68f8dd4df..10b04c4d5b 100644
--- a/src/plugins/projectexplorer/taskhub.cpp
+++ b/src/plugins/projectexplorer/taskhub.cpp
@@ -79,7 +79,7 @@ public:
bool isClickable() const override;
void clicked() override;
- void updateFileName(const FileName &fileName) override;
+ void updateFileName(const FilePath &fileName) override;
void updateLineNumber(int lineNumber) override;
void removedFromEditor() override;
private:
@@ -92,10 +92,10 @@ void TaskMark::updateLineNumber(int lineNumber)
TextMark::updateLineNumber(lineNumber);
}
-void TaskMark::updateFileName(const FileName &fileName)
+void TaskMark::updateFileName(const FilePath &fileName)
{
TaskHub::updateTaskFileName(m_id, fileName.toString());
- TextMark::updateFileName(FileName::fromString(fileName.toString()));
+ TextMark::updateFileName(FilePath::fromString(fileName.toString()));
}
void TaskMark::removedFromEditor()
@@ -138,7 +138,7 @@ TaskHub *TaskHub::instance()
return m_instance;
}
-void TaskHub::addTask(Task::TaskType type, const QString &description, Core::Id category, const Utils::FileName &file, int line)
+void TaskHub::addTask(Task::TaskType type, const QString &description, Core::Id category, const Utils::FilePath &file, int line)
{
addTask(Task(type, description, file, line, category));
}
diff --git a/src/plugins/projectexplorer/taskhub.h b/src/plugins/projectexplorer/taskhub.h
index 80bb6a5219..fc2c489c1a 100644
--- a/src/plugins/projectexplorer/taskhub.h
+++ b/src/plugins/projectexplorer/taskhub.h
@@ -43,7 +43,7 @@ public:
// Convenience overload
static void addTask(Task::TaskType type, const QString &description,
Core::Id category,
- const Utils::FileName &file = Utils::FileName(),
+ const Utils::FilePath &file = Utils::FilePath(),
int line = -1);
public slots:
diff --git a/src/plugins/projectexplorer/taskmodel.cpp b/src/plugins/projectexplorer/taskmodel.cpp
index a2a8d5dca9..3baac2c841 100644
--- a/src/plugins/projectexplorer/taskmodel.cpp
+++ b/src/plugins/projectexplorer/taskmodel.cpp
@@ -147,7 +147,7 @@ void TaskModel::updateTaskFileName(unsigned int id, const QString &fileName)
int i = rowForId(id);
QTC_ASSERT(i != -1, return);
if (m_tasks.at(i).taskId == id) {
- m_tasks[i].file = Utils::FileName::fromString(fileName);
+ m_tasks[i].file = Utils::FilePath::fromString(fileName);
emit dataChanged(index(i, 0), index(i, 0));
}
}
diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp
index 86bae32906..0ae486a695 100644
--- a/src/plugins/projectexplorer/taskwindow.cpp
+++ b/src/plugins/projectexplorer/taskwindow.cpp
@@ -498,7 +498,7 @@ void TaskWindow::triggerDefaultHandler(const QModelIndex &index)
if (!task.file.isEmpty() && !task.file.toFileInfo().isAbsolute()
&& !task.fileCandidates.empty()) {
- const Utils::FileName userChoice = Utils::chooseFileFromList(task.fileCandidates);
+ const Utils::FilePath userChoice = Utils::chooseFileFromList(task.fileCandidates);
if (!userChoice.isEmpty()) {
task.file = userChoice;
updatedTaskFileName(task.taskId, task.file.toString());
diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp
index 7d76184894..66c5ac83db 100644
--- a/src/plugins/projectexplorer/toolchain.cpp
+++ b/src/plugins/projectexplorer/toolchain.cpp
@@ -169,7 +169,7 @@ QStringList ToolChain::suggestedMkspecList() const
return {};
}
-Utils::FileName ToolChain::suggestedDebugger() const
+Utils::FilePath ToolChain::suggestedDebugger() const
{
return ToolChainManager::defaultDebugger(targetAbi());
}
@@ -436,7 +436,7 @@ QList<ToolChain *> ToolChainFactory::autoDetect(const QList<ToolChain *> &alread
return QList<ToolChain *>();
}
-QList<ToolChain *> ToolChainFactory::autoDetect(const Utils::FileName &compilerPath, const Core::Id &language)
+QList<ToolChain *> ToolChainFactory::autoDetect(const Utils::FilePath &compilerPath, const Core::Id &language)
{
Q_UNUSED(compilerPath);
Q_UNUSED(language);
diff --git a/src/plugins/projectexplorer/toolchain.h b/src/plugins/projectexplorer/toolchain.h
index b7ff1f30e7..1cbe478691 100644
--- a/src/plugins/projectexplorer/toolchain.h
+++ b/src/plugins/projectexplorer/toolchain.h
@@ -99,7 +99,7 @@ public:
QByteArray id() const;
virtual QStringList suggestedMkspecList() const;
- virtual Utils::FileName suggestedDebugger() const;
+ virtual Utils::FilePath suggestedDebugger() const;
Core::Id typeId() const;
virtual QString typeDisplayName() const = 0;
@@ -134,13 +134,13 @@ public:
const QStringList &cxxflags, const QString &sysRoot, const QString &originalTargetTriple)>;
virtual BuiltInHeaderPathsRunner createBuiltInHeaderPathsRunner() const = 0;
virtual HeaderPaths builtInHeaderPaths(const QStringList &cxxflags,
- const Utils::FileName &sysRoot) const = 0;
+ const Utils::FilePath &sysRoot) const = 0;
virtual void addToEnvironment(Utils::Environment &env) const = 0;
- virtual Utils::FileName makeCommand(const Utils::Environment &env) const = 0;
+ virtual Utils::FilePath makeCommand(const Utils::Environment &env) const = 0;
Core::Id language() const;
- virtual Utils::FileName compilerCommand() const = 0;
+ virtual Utils::FilePath compilerCommand() const = 0;
virtual IOutputParser *outputParser() const = 0;
virtual bool operator ==(const ToolChain &) const;
@@ -196,7 +196,7 @@ public:
Core::Id supportedToolChainType() const;
virtual QList<ToolChain *> autoDetect(const QList<ToolChain *> &alreadyKnown);
- virtual QList<ToolChain *> autoDetect(const Utils::FileName &compilerPath, const Core::Id &language);
+ virtual QList<ToolChain *> autoDetect(const Utils::FilePath &compilerPath, const Core::Id &language);
virtual bool canCreate() const;
virtual ToolChain *create();
@@ -220,7 +220,7 @@ protected:
class Candidate {
public:
- Utils::FileName compilerPath;
+ Utils::FilePath compilerPath;
QString compilerVersion;
bool operator==(const ToolChainFactory::Candidate &other) const {
diff --git a/src/plugins/projectexplorer/toolchainmanager.cpp b/src/plugins/projectexplorer/toolchainmanager.cpp
index 6dc8703c21..ffea568dbe 100644
--- a/src/plugins/projectexplorer/toolchainmanager.cpp
+++ b/src/plugins/projectexplorer/toolchainmanager.cpp
@@ -63,7 +63,7 @@ class ToolChainManagerPrivate
public:
~ToolChainManagerPrivate();
- QMap<QString, FileName> m_abiToDebugger;
+ QMap<QString, FilePath> m_abiToDebugger;
std::unique_ptr<ToolChainSettingsAccessor> m_accessor;
QList<ToolChain *> m_toolChains; // prioritized List
@@ -186,7 +186,7 @@ ToolChain *ToolChainManager::findToolChain(const QByteArray &id)
return tc;
}
-FileName ToolChainManager::defaultDebugger(const Abi &abi)
+FilePath ToolChainManager::defaultDebugger(const Abi &abi)
{
return d->m_abiToDebugger.value(abi.toString());
}
diff --git a/src/plugins/projectexplorer/toolchainmanager.h b/src/plugins/projectexplorer/toolchainmanager.h
index 06178419be..4de51c2b2a 100644
--- a/src/plugins/projectexplorer/toolchainmanager.h
+++ b/src/plugins/projectexplorer/toolchainmanager.h
@@ -38,7 +38,7 @@
#include <functional>
-namespace Utils { class FileName; }
+namespace Utils { class FilePath; }
namespace ProjectExplorer {
@@ -68,7 +68,7 @@ public:
static QList<ToolChain *> findToolChains(const Abi &abi);
static ToolChain *findToolChain(const QByteArray &id);
- static Utils::FileName defaultDebugger(const Abi &abi);
+ static Utils::FilePath defaultDebugger(const Abi &abi);
static bool isLoaded();
diff --git a/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp b/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp
index 83ac914aca..d2c347dd37 100644
--- a/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp
+++ b/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp
@@ -184,7 +184,7 @@ ToolChainSettingsAccessor::ToolChainSettingsAccessor() :
QCoreApplication::translate("ProjectExplorer::ToolChainManager", "Tool Chains"),
Core::Constants::IDE_DISPLAY_NAME)
{
- setBaseFilePath(FileName::fromString(Core::ICore::userResourcePath() + TOOLCHAIN_FILENAME));
+ setBaseFilePath(FilePath::fromString(Core::ICore::userResourcePath() + TOOLCHAIN_FILENAME));
addVersionUpgrader(std::make_unique<ToolChainSettingsUpgraderV0>());
}
@@ -193,7 +193,7 @@ QList<ToolChain *> ToolChainSettingsAccessor::restoreToolChains(QWidget *parent)
{
// read all tool chains from SDK
const QList<ToolChain *> systemFileTcs
- = toolChains(restoreSettings(FileName::fromString(Core::ICore::installerResourcePath() + TOOLCHAIN_FILENAME),
+ = toolChains(restoreSettings(FilePath::fromString(Core::ICore::installerResourcePath() + TOOLCHAIN_FILENAME),
parent));
for (ToolChain * const systemTc : systemFileTcs)
systemTc->setDetection(ToolChain::AutoDetectionFromSdk);
@@ -321,11 +321,11 @@ public:
LanguageExtensions languageExtensions(const QStringList &cxxflags) const override { Q_UNUSED(cxxflags); return LanguageExtension::None; }
WarningFlags warningFlags(const QStringList &cflags) const override { Q_UNUSED(cflags); return WarningFlags::NoWarnings; }
BuiltInHeaderPathsRunner createBuiltInHeaderPathsRunner() const override { return BuiltInHeaderPathsRunner(); }
- HeaderPaths builtInHeaderPaths(const QStringList &cxxflags, const FileName &sysRoot) const override
+ HeaderPaths builtInHeaderPaths(const QStringList &cxxflags, const FilePath &sysRoot) const override
{ Q_UNUSED(cxxflags); Q_UNUSED(sysRoot); return {}; }
void addToEnvironment(Environment &env) const override { Q_UNUSED(env); }
- FileName makeCommand(const Environment &) const override { return FileName::fromString("make"); }
- FileName compilerCommand() const override { return Utils::FileName::fromString("/tmp/test/gcc"); }
+ FilePath makeCommand(const Environment &) const override { return FilePath::fromString("make"); }
+ FilePath compilerCommand() const override { return Utils::FilePath::fromString("/tmp/test/gcc"); }
IOutputParser *outputParser() const override { return nullptr; }
std::unique_ptr<ToolChainConfigWidget> createConfigurationWidget() override { return nullptr; }
bool operator ==(const ToolChain &other) const override {
diff --git a/src/plugins/projectexplorer/treescanner.cpp b/src/plugins/projectexplorer/treescanner.cpp
index 9c4803cc9d..7c7f634d1a 100644
--- a/src/plugins/projectexplorer/treescanner.cpp
+++ b/src/plugins/projectexplorer/treescanner.cpp
@@ -42,7 +42,7 @@ namespace ProjectExplorer {
TreeScanner::TreeScanner(QObject *parent) : QObject(parent)
{
m_factory = TreeScanner::genericFileType;
- m_filter = [](const Utils::MimeType &mimeType, const Utils::FileName &fn) {
+ m_filter = [](const Utils::MimeType &mimeType, const Utils::FilePath &fn) {
return isWellKnownBinary(mimeType, fn) && isMimeBinary(mimeType, fn);
};
@@ -57,7 +57,7 @@ TreeScanner::~TreeScanner()
}
}
-bool TreeScanner::asyncScanForFiles(const Utils::FileName &directory)
+bool TreeScanner::asyncScanForFiles(const Utils::FilePath &directory)
{
if (!m_futureWatcher.isFinished())
return false;
@@ -116,7 +116,7 @@ void TreeScanner::reset()
m_scanFuture = Future();
}
-bool TreeScanner::isWellKnownBinary(const Utils::MimeType & /*mdb*/, const Utils::FileName &fn)
+bool TreeScanner::isWellKnownBinary(const Utils::MimeType & /*mdb*/, const Utils::FilePath &fn)
{
return fn.endsWith(QLatin1String(".a")) ||
fn.endsWith(QLatin1String(".o")) ||
@@ -127,7 +127,7 @@ bool TreeScanner::isWellKnownBinary(const Utils::MimeType & /*mdb*/, const Utils
fn.endsWith(QLatin1String(".elf"));
}
-bool TreeScanner::isMimeBinary(const Utils::MimeType &mimeType, const Utils::FileName &/*fn*/)
+bool TreeScanner::isMimeBinary(const Utils::MimeType &mimeType, const Utils::FilePath &/*fn*/)
{
bool isBinary = false;
if (mimeType.isValid()) {
@@ -138,12 +138,12 @@ bool TreeScanner::isMimeBinary(const Utils::MimeType &mimeType, const Utils::Fil
return isBinary;
}
-FileType TreeScanner::genericFileType(const Utils::MimeType &mimeType, const Utils::FileName &/*fn*/)
+FileType TreeScanner::genericFileType(const Utils::MimeType &mimeType, const Utils::FilePath &/*fn*/)
{
return Node::fileTypeForMimeType(mimeType);
}
-void TreeScanner::scanForFiles(FutureInterface *fi, const Utils::FileName& directory,
+void TreeScanner::scanForFiles(FutureInterface *fi, const Utils::FilePath& directory,
const FileFilter &filter, const FileTypeFactory &factory)
{
std::unique_ptr<FutureInterface> fip(fi);
@@ -151,7 +151,7 @@ void TreeScanner::scanForFiles(FutureInterface *fi, const Utils::FileName& direc
Result nodes = FileNode::scanForFiles(
directory,
- [&filter, &factory](const Utils::FileName &fn) -> FileNode * {
+ [&filter, &factory](const Utils::FilePath &fn) -> FileNode * {
const Utils::MimeType mimeType = Utils::mimeTypeForFile(fn.toString());
// Skip some files during scan.
diff --git a/src/plugins/projectexplorer/treescanner.h b/src/plugins/projectexplorer/treescanner.h
index f2bb9876a3..e2ad544bde 100644
--- a/src/plugins/projectexplorer/treescanner.h
+++ b/src/plugins/projectexplorer/treescanner.h
@@ -51,14 +51,14 @@ public:
using FutureWatcher = QFutureWatcher<Result>;
using FutureInterface = QFutureInterface<Result>;
- using FileFilter = std::function<bool(const Utils::MimeType &, const Utils::FileName &)>;
- using FileTypeFactory = std::function<ProjectExplorer::FileType(const Utils::MimeType &, const Utils::FileName &)>;
+ using FileFilter = std::function<bool(const Utils::MimeType &, const Utils::FilePath &)>;
+ using FileTypeFactory = std::function<ProjectExplorer::FileType(const Utils::MimeType &, const Utils::FilePath &)>;
explicit TreeScanner(QObject *parent = nullptr);
~TreeScanner() override;
// Start scanning in given directory
- bool asyncScanForFiles(const Utils::FileName& directory);
+ bool asyncScanForFiles(const Utils::FilePath& directory);
// Setup filter for ignored files
void setFilter(FileFilter filter);
@@ -77,17 +77,17 @@ public:
void reset();
// Standard filters helpers
- static bool isWellKnownBinary(const Utils::MimeType &mimeType, const Utils::FileName &fn);
- static bool isMimeBinary(const Utils::MimeType &mimeType, const Utils::FileName &fn);
+ static bool isWellKnownBinary(const Utils::MimeType &mimeType, const Utils::FilePath &fn);
+ static bool isMimeBinary(const Utils::MimeType &mimeType, const Utils::FilePath &fn);
// Standard file factory
- static ProjectExplorer::FileType genericFileType(const Utils::MimeType &mdb, const Utils::FileName& fn);
+ static ProjectExplorer::FileType genericFileType(const Utils::MimeType &mdb, const Utils::FilePath& fn);
signals:
void finished();
private:
- static void scanForFiles(FutureInterface *fi, const Utils::FileName &directory,
+ static void scanForFiles(FutureInterface *fi, const Utils::FilePath &directory,
const FileFilter &filter, const FileTypeFactory &factory);
private:
diff --git a/src/plugins/projectexplorer/userfileaccessor.cpp b/src/plugins/projectexplorer/userfileaccessor.cpp
index 2a4924fd24..838507e544 100644
--- a/src/plugins/projectexplorer/userfileaccessor.cpp
+++ b/src/plugins/projectexplorer/userfileaccessor.cpp
@@ -240,14 +240,14 @@ static QString makeRelative(QString path)
}
// Return complete file path of the .user file.
-static FileName externalUserFilePath(const Utils::FileName &projectFilePath, const QString &suffix)
+static FilePath externalUserFilePath(const Utils::FilePath &projectFilePath, const QString &suffix)
{
static const optional<QString> externalUserFileDir = defineExternalUserFileDir();
if (externalUserFileDir) {
// Recreate the relative project file hierarchy under the shared directory.
// PersistentSettingsWriter::write() takes care of creating the path.
- return FileName::fromString(externalUserFileDir.value()
+ return FilePath::fromString(externalUserFileDir.value()
+ '/' + makeRelative(projectFilePath.toString())
+ suffix);
}
@@ -266,18 +266,18 @@ public:
UserFileBackUpStrategy(UserFileAccessor *accessor) : Utils::VersionedBackUpStrategy(accessor)
{ }
- FileNameList readFileCandidates(const Utils::FileName &baseFileName) const final;
+ FilePathList readFileCandidates(const Utils::FilePath &baseFileName) const final;
};
-FileNameList UserFileBackUpStrategy::readFileCandidates(const FileName &baseFileName) const
+FilePathList UserFileBackUpStrategy::readFileCandidates(const FilePath &baseFileName) const
{
const auto *const ac = static_cast<const UserFileAccessor *>(accessor());
- const FileName externalUser = ac->externalUserFile();
- const FileName projectUser = ac->projectUserFile();
+ const FilePath externalUser = ac->externalUserFile();
+ const FilePath projectUser = ac->projectUserFile();
QTC_CHECK(!baseFileName.isEmpty());
QTC_CHECK(baseFileName == externalUser || baseFileName == projectUser);
- FileNameList result = Utils::VersionedBackUpStrategy::readFileCandidates(projectUser);
+ FilePathList result = Utils::VersionedBackUpStrategy::readFileCandidates(projectUser);
if (!externalUser.isEmpty())
result.append(Utils::VersionedBackUpStrategy::readFileCandidates(externalUser));
@@ -295,8 +295,8 @@ UserFileAccessor::UserFileAccessor(Project *project) :
m_project(project)
{
// Setup:
- const FileName externalUser = externalUserFile();
- const FileName projectUser = projectUserFile();
+ const FilePath externalUser = externalUserFile();
+ const FilePath projectUser = projectUserFile();
setBaseFilePath(externalUser.isEmpty() ? projectUser : externalUser);
auto secondary
@@ -384,21 +384,21 @@ QVariant UserFileAccessor::retrieveSharedSettings() const
return project()->property(SHARED_SETTINGS);
}
-FileName UserFileAccessor::projectUserFile() const
+FilePath UserFileAccessor::projectUserFile() const
{
static const QString qtcExt = QLatin1String(qgetenv("QTC_EXTENSION"));
return m_project->projectFilePath()
.stringAppended(generateSuffix(qtcExt.isEmpty() ? FILE_EXTENSION_STR : qtcExt));
}
-FileName UserFileAccessor::externalUserFile() const
+FilePath UserFileAccessor::externalUserFile() const
{
static const QString qtcExt = QFile::decodeName(qgetenv("QTC_EXTENSION"));
return externalUserFilePath(m_project->projectFilePath(),
generateSuffix(qtcExt.isEmpty() ? FILE_EXTENSION_STR : qtcExt));
}
-FileName UserFileAccessor::sharedFile() const
+FilePath UserFileAccessor::sharedFile() const
{
static const QString qtcExt = QLatin1String(qgetenv("QTC_SHARED_EXTENSION"));
return m_project->projectFilePath()
@@ -884,7 +884,7 @@ private:
class TestProject : public Project
{
public:
- TestProject() : Project("x-test/testproject", Utils::FileName::fromString("/test/project")) {
+ TestProject() : Project("x-test/testproject", Utils::FilePath::fromString("/test/project")) {
setDisplayName("Test Project");
}
@@ -981,7 +981,7 @@ void ProjectExplorerPlugin::testUserFileAccessor_mergeSettings()
sharedData.insert("shared1", "bar");
sharedData.insert("shared2", "baz");
sharedData.insert("shared3", "foooo");
- TestUserFileAccessor::RestoreData shared(FileName::fromString("/shared/data"), sharedData);
+ TestUserFileAccessor::RestoreData shared(FilePath::fromString("/shared/data"), sharedData);
QVariantMap data;
data.insert("Version", accessor.currentVersion());
@@ -990,7 +990,7 @@ void ProjectExplorerPlugin::testUserFileAccessor_mergeSettings()
data.insert("shared1", "bar1");
data.insert("unique1", 1234);
data.insert("shared3", "foo");
- TestUserFileAccessor::RestoreData user(FileName::fromString("/user/data"), data);
+ TestUserFileAccessor::RestoreData user(FilePath::fromString("/user/data"), data);
TestUserFileAccessor::RestoreData result = accessor.mergeSettings(user, shared);
QVERIFY(!result.hasIssue());
@@ -1016,10 +1016,10 @@ void ProjectExplorerPlugin::testUserFileAccessor_mergeSettingsEmptyUser()
sharedData.insert("shared1", "bar");
sharedData.insert("shared2", "baz");
sharedData.insert("shared3", "foooo");
- TestUserFileAccessor::RestoreData shared(FileName::fromString("/shared/data"), sharedData);
+ TestUserFileAccessor::RestoreData shared(FilePath::fromString("/shared/data"), sharedData);
QVariantMap data;
- TestUserFileAccessor::RestoreData user(FileName::fromString("/shared/data"), data);
+ TestUserFileAccessor::RestoreData user(FilePath::fromString("/shared/data"), data);
TestUserFileAccessor::RestoreData result = accessor.mergeSettings(user, shared);
@@ -1033,7 +1033,7 @@ void ProjectExplorerPlugin::testUserFileAccessor_mergeSettingsEmptyShared()
TestUserFileAccessor accessor(&project);
QVariantMap sharedData;
- TestUserFileAccessor::RestoreData shared(FileName::fromString("/shared/data"), sharedData);
+ TestUserFileAccessor::RestoreData shared(FilePath::fromString("/shared/data"), sharedData);
QVariantMap data;
data.insert("Version", accessor.currentVersion());
@@ -1043,7 +1043,7 @@ void ProjectExplorerPlugin::testUserFileAccessor_mergeSettingsEmptyShared()
data.insert("shared1", "bar1");
data.insert("unique1", 1234);
data.insert("shared3", "foo");
- TestUserFileAccessor::RestoreData user(FileName::fromString("/shared/data"), data);
+ TestUserFileAccessor::RestoreData user(FilePath::fromString("/shared/data"), data);
TestUserFileAccessor::RestoreData result = accessor.mergeSettings(user, shared);
diff --git a/src/plugins/projectexplorer/userfileaccessor.h b/src/plugins/projectexplorer/userfileaccessor.h
index 6544de987e..6b7d42ec1a 100644
--- a/src/plugins/projectexplorer/userfileaccessor.h
+++ b/src/plugins/projectexplorer/userfileaccessor.h
@@ -47,9 +47,9 @@ public:
virtual QVariant retrieveSharedSettings() const;
- Utils::FileName projectUserFile() const;
- Utils::FileName externalUserFile() const;
- Utils::FileName sharedFile() const;
+ Utils::FilePath projectUserFile() const;
+ Utils::FilePath externalUserFile() const;
+ Utils::FilePath sharedFile() const;
protected:
QVariantMap postprocessMerge(const QVariantMap &main,
diff --git a/src/plugins/projectexplorer/xcodebuildparser.cpp b/src/plugins/projectexplorer/xcodebuildparser.cpp
index dd9f0c879f..ae551e259c 100644
--- a/src/plugins/projectexplorer/xcodebuildparser.cpp
+++ b/src/plugins/projectexplorer/xcodebuildparser.cpp
@@ -73,7 +73,7 @@ void XcodebuildParser::stdOutput(const QString &line)
Task task(Task::Warning,
QCoreApplication::translate("ProjectExplorer::XcodebuildParser",
"Replacing signature"),
- Utils::FileName::fromString(
+ Utils::FilePath::fromString(
lne.left(lne.size() - QLatin1String(signatureChangeEndsWithPattern).size())), /* filename */
-1, /* line */
Constants::TASK_CATEGORY_COMPILE);
@@ -96,7 +96,7 @@ void XcodebuildParser::stdError(const QString &line)
Task task(Task::Error,
QCoreApplication::translate("ProjectExplorer::XcodebuildParser",
"Xcodebuild failed."),
- Utils::FileName(), /* filename */
+ Utils::FilePath(), /* filename */
-1, /* line */
Constants::TASK_CATEGORY_COMPILE);
taskAdded(task);
@@ -223,7 +223,7 @@ void ProjectExplorerPlugin::testXcodebuildParserParsing_data()
Task::Error,
QCoreApplication::translate("ProjectExplorer::XcodebuildParser",
"Xcodebuild failed."),
- Utils::FileName(), /* filename */
+ Utils::FilePath(), /* filename */
-1, /* line */
Constants::TASK_CATEGORY_COMPILE))
<< QString()
@@ -240,7 +240,7 @@ void ProjectExplorerPlugin::testXcodebuildParserParsing_data()
Task::Error,
QCoreApplication::translate("ProjectExplorer::XcodebuildParser",
"Xcodebuild failed."),
- Utils::FileName(), /* filename */
+ Utils::FilePath(), /* filename */
-1, /* line */
Constants::TASK_CATEGORY_COMPILE))
<< QString()
@@ -253,7 +253,7 @@ void ProjectExplorerPlugin::testXcodebuildParserParsing_data()
<< Task(Task::Warning,
QCoreApplication::translate("ProjectExplorer::XcodebuildParser",
"Replacing signature"),
- Utils::FileName::fromString(QLatin1String("/somepath/somefile.app")), /* filename */
+ Utils::FilePath::fromString(QLatin1String("/somepath/somefile.app")), /* filename */
-1, /* line */
Constants::TASK_CATEGORY_COMPILE))
<< QString()