summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-11-03 14:01:25 +0100
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-11-16 08:33:02 +0000
commitca29cbfc8a4cd2fad3556f0c98febc4692894265 (patch)
treec1ed043fa137e06d4004c123ee88b59dc6471c78 /src/plugins
parent153d593b6328ba45f4e7ee46ff1ad1ce9e19b61e (diff)
downloadqt-creator-ca29cbfc8a4cd2fad3556f0c98febc4692894265.tar.gz
Consistently use Utils::FileNameList
Consistently use Utils::FileNameList in favor of QList<Utils::FileName> Change-Id: Iafbb466c882bfd91c25c9e78f107d401bfdb6d55 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/android/androidtoolchain.cpp4
-rw-r--r--src/plugins/android/androidtoolchain.h2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakecbpparser.cpp4
-rw-r--r--src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp2
-rw-r--r--src/plugins/debugger/debuggeritemmanager.cpp4
-rw-r--r--src/plugins/genericprojectmanager/filesselectionwizardpage.cpp8
-rw-r--r--src/plugins/genericprojectmanager/filesselectionwizardpage.h7
-rw-r--r--src/plugins/genericprojectmanager/genericprojectwizard.cpp4
-rw-r--r--src/plugins/genericprojectmanager/genericprojectwizard.h10
-rw-r--r--src/plugins/projectexplorer/customtoolchain.cpp2
-rw-r--r--src/plugins/projectexplorer/customtoolchain.h4
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.cpp44
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.h8
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp4
-rw-r--r--src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h2
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.cpp16
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.h2
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp2
-rw-r--r--src/plugins/projectexplorer/selectablefilesmodel.cpp24
-rw-r--r--src/plugins/projectexplorer/selectablefilesmodel.h20
-rw-r--r--src/plugins/projectexplorer/settingsaccessor.cpp10
-rw-r--r--src/plugins/projectexplorer/settingsaccessor.h2
-rw-r--r--src/plugins/projectexplorer/toolchain.cpp4
-rw-r--r--src/plugins/projectexplorer/toolchain.h9
-rw-r--r--src/plugins/projectexplorer/wincetoolchain.cpp4
-rw-r--r--src/plugins/projectexplorer/wincetoolchain.h2
-rw-r--r--src/plugins/qnx/qnxtoolchain.cpp4
-rw-r--r--src/plugins/qnx/qnxtoolchain.h2
-rw-r--r--src/plugins/qtsupport/baseqtversion.cpp10
-rw-r--r--src/plugins/qtsupport/baseqtversion.h6
30 files changed, 112 insertions, 114 deletions
diff --git a/src/plugins/android/androidtoolchain.cpp b/src/plugins/android/androidtoolchain.cpp
index 1b4177a0b6..c2ccacbc8f 100644
--- a/src/plugins/android/androidtoolchain.cpp
+++ b/src/plugins/android/androidtoolchain.cpp
@@ -198,9 +198,9 @@ bool AndroidToolChain::fromMap(const QVariantMap &data)
return isValid();
}
-QList<FileName> AndroidToolChain::suggestedMkspecList() const
+FileNameList AndroidToolChain::suggestedMkspecList() const
{
- return QList<FileName>()<< FileName::fromLatin1("android-g++");
+ return FileNameList()<< FileName::fromLatin1("android-g++");
}
QString AndroidToolChain::makeCommand(const Environment &env) const
diff --git a/src/plugins/android/androidtoolchain.h b/src/plugins/android/androidtoolchain.h
index dae082dcc4..71d34a0474 100644
--- a/src/plugins/android/androidtoolchain.h
+++ b/src/plugins/android/androidtoolchain.h
@@ -56,7 +56,7 @@ public:
QVariantMap toMap() const override;
bool fromMap(const QVariantMap &data) override;
- QList<Utils::FileName> suggestedMkspecList() const override;
+ Utils::FileNameList suggestedMkspecList() const override;
QString makeCommand(const Utils::Environment &environment) const override;
QString ndkToolChainVersion() const;
diff --git a/src/plugins/cmakeprojectmanager/cmakecbpparser.cpp b/src/plugins/cmakeprojectmanager/cmakecbpparser.cpp
index cf69a8adce..980f87c443 100644
--- a/src/plugins/cmakeprojectmanager/cmakecbpparser.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakecbpparser.cpp
@@ -65,9 +65,7 @@ int distance(const QString &targetDirectory, const FileName &fileName)
void CMakeCbpParser::sortFiles()
{
QLoggingCategory log("qtc.cmakeprojectmanager.filetargetmapping");
- QList<FileName> fileNames = Utils::transform(m_fileList, [] (FileNode *node) {
- return node->filePath();
- });
+ FileNameList fileNames = Utils::transform(m_fileList, &FileNode::filePath);
Utils::sort(fileNames);
diff --git a/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp b/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp
index 9620acecc5..2543217667 100644
--- a/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp
+++ b/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp
@@ -163,7 +163,7 @@ static void readAndDeleteLegacyCMakeSettings ()
static QList<CMakeTool *> autoDetectCMakeTools()
{
- QList<FileName> suspects;
+ FileNameList suspects;
Utils::Environment env = Environment::systemEnvironment();
diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp
index f449c2f638..4ab671e757 100644
--- a/src/plugins/debugger/debuggeritemmanager.cpp
+++ b/src/plugins/debugger/debuggeritemmanager.cpp
@@ -139,7 +139,7 @@ QList<DebuggerItem> DebuggerItemManager::debuggers()
void DebuggerItemManager::autoDetectCdbDebuggers()
{
- QList<FileName> cdbs;
+ FileNameList cdbs;
QStringList programDirs;
programDirs.append(QString::fromLocal8Bit(qgetenv("ProgramFiles")));
@@ -227,7 +227,7 @@ void DebuggerItemManager::autoDetectGdbOrLldbDebuggers()
}
*/
- QList<FileName> suspects;
+ FileNameList suspects;
if (HostOsInfo::isMacHost()) {
QProcess lldbInfo;
diff --git a/src/plugins/genericprojectmanager/filesselectionwizardpage.cpp b/src/plugins/genericprojectmanager/filesselectionwizardpage.cpp
index 5a6956269d..aadd5e33ef 100644
--- a/src/plugins/genericprojectmanager/filesselectionwizardpage.cpp
+++ b/src/plugins/genericprojectmanager/filesselectionwizardpage.cpp
@@ -175,14 +175,14 @@ bool FilesSelectionWizardPage::isComplete() const
return m_finished;
}
-QList<Utils::FileName> FilesSelectionWizardPage::selectedPaths() const
+Utils::FileNameList FilesSelectionWizardPage::selectedPaths() const
{
- return m_model ? m_model->selectedPaths() : QList<Utils::FileName>();
+ return m_model ? m_model->selectedPaths() : Utils::FileNameList();
}
-QList<Utils::FileName> FilesSelectionWizardPage::selectedFiles() const
+Utils::FileNameList FilesSelectionWizardPage::selectedFiles() const
{
- return m_model ? m_model->selectedFiles() : QList<Utils::FileName>();
+ return m_model ? m_model->selectedFiles() : Utils::FileNameList();
}
void FilesSelectionWizardPage::applyFilter()
diff --git a/src/plugins/genericprojectmanager/filesselectionwizardpage.h b/src/plugins/genericprojectmanager/filesselectionwizardpage.h
index a5cbdcfda9..e130f28f93 100644
--- a/src/plugins/genericprojectmanager/filesselectionwizardpage.h
+++ b/src/plugins/genericprojectmanager/filesselectionwizardpage.h
@@ -33,6 +33,8 @@
#include <QWizardPage>
+#include <utils/fileutils.h>
+
QT_BEGIN_NAMESPACE
class QVBoxLayout;
class QLabel;
@@ -40,7 +42,6 @@ class QTreeView;
class QLineEdit;
QT_END_NAMESPACE
-namespace Utils { class FileName; }
namespace ProjectExplorer { class SelectableFilesModel; }
namespace GenericProjectManager {
@@ -57,8 +58,8 @@ public:
bool isComplete() const;
void initializePage();
void cleanupPage();
- QList<Utils::FileName> selectedFiles() const;
- QList<Utils::FileName> selectedPaths() const;
+ Utils::FileNameList selectedFiles() const;
+ Utils::FileNameList selectedPaths() const;
private slots:
void applyFilter();
diff --git a/src/plugins/genericprojectmanager/genericprojectwizard.cpp b/src/plugins/genericprojectmanager/genericprojectwizard.cpp
index 4326f37601..f0bf10d347 100644
--- a/src/plugins/genericprojectmanager/genericprojectwizard.cpp
+++ b/src/plugins/genericprojectmanager/genericprojectwizard.cpp
@@ -86,12 +86,12 @@ QString GenericProjectWizardDialog::path() const
return m_firstPage->path();
}
-QList<Utils::FileName> GenericProjectWizardDialog::selectedPaths() const
+Utils::FileNameList GenericProjectWizardDialog::selectedPaths() const
{
return m_secondPage->selectedPaths();
}
-QList<Utils::FileName> GenericProjectWizardDialog::selectedFiles() const
+Utils::FileNameList GenericProjectWizardDialog::selectedFiles() const
{
return m_secondPage->selectedFiles();
}
diff --git a/src/plugins/genericprojectmanager/genericprojectwizard.h b/src/plugins/genericprojectmanager/genericprojectwizard.h
index f69c396244..ff9036cbb3 100644
--- a/src/plugins/genericprojectmanager/genericprojectwizard.h
+++ b/src/plugins/genericprojectmanager/genericprojectwizard.h
@@ -33,12 +33,10 @@
#include <coreplugin/basefilewizard.h>
#include <coreplugin/basefilewizardfactory.h>
+#include <utils/fileutils.h>
#include <utils/wizard.h>
-namespace Utils {
-class FileName;
-class FileWizardPage;
-} // namespace Utils
+namespace Utils { class FileWizardPage; }
namespace GenericProjectManager {
namespace Internal {
@@ -54,8 +52,8 @@ public:
QString path() const;
void setPath(const QString &path);
- QList<Utils::FileName> selectedFiles() const;
- QList<Utils::FileName> selectedPaths() const;
+ Utils::FileNameList selectedFiles() const;
+ Utils::FileNameList selectedPaths() const;
QString projectName() const;
diff --git a/src/plugins/projectexplorer/customtoolchain.cpp b/src/plugins/projectexplorer/customtoolchain.cpp
index b7d38dc7cd..b2a71d27a9 100644
--- a/src/plugins/projectexplorer/customtoolchain.cpp
+++ b/src/plugins/projectexplorer/customtoolchain.cpp
@@ -181,7 +181,7 @@ void CustomToolChain::addToEnvironment(Environment &env) const
}
}
-QList<FileName> CustomToolChain::suggestedMkspecList() const
+FileNameList CustomToolChain::suggestedMkspecList() const
{
return m_mkspecs;
}
diff --git a/src/plugins/projectexplorer/customtoolchain.h b/src/plugins/projectexplorer/customtoolchain.h
index a2169a61f2..4b6e9d703e 100644
--- a/src/plugins/projectexplorer/customtoolchain.h
+++ b/src/plugins/projectexplorer/customtoolchain.h
@@ -91,7 +91,7 @@ public:
QList<HeaderPath> systemHeaderPaths(const QStringList &cxxFlags,
const Utils::FileName &) const override;
void addToEnvironment(Utils::Environment &env) const override;
- QList<Utils::FileName> suggestedMkspecList() const override;
+ Utils::FileNameList suggestedMkspecList() const override;
IOutputParser *outputParser() const override;
QStringList headerPathsList() const;
void setHeaderPaths(const QStringList &list);
@@ -135,7 +135,7 @@ private:
QStringList m_predefinedMacros;
QList<HeaderPath> m_systemHeaderPaths;
QStringList m_cxx11Flags;
- QList<Utils::FileName> m_mkspecs;
+ Utils::FileNameList m_mkspecs;
OutputParser m_outputParser;
CustomParserSettings m_customParserSettings;
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp
index cbec918acd..fc151d0387 100644
--- a/src/plugins/projectexplorer/gcctoolchain.cpp
+++ b/src/plugins/projectexplorer/gcctoolchain.cpp
@@ -565,7 +565,7 @@ void GccToolChain::addToEnvironment(Environment &env) const
addCommandPathToEnvironment(m_compilerCommand, env);
}
-QList<FileName> GccToolChain::suggestedMkspecList() const
+FileNameList GccToolChain::suggestedMkspecList() const
{
Abi abi = targetAbi();
Abi host = Abi::hostAbi();
@@ -574,34 +574,34 @@ QList<FileName> GccToolChain::suggestedMkspecList() const
if (abi.architecture() != host.architecture()
|| abi.os() != host.os()
|| abi.osFlavor() != host.osFlavor()) // Note: This can fail:-(
- return QList<FileName>();
+ return FileNameList();
if (abi.os() == Abi::MacOS) {
QString v = version();
// prefer versioned g++ on mac. This is required to enable building for older Mac OS versions
if (v.startsWith(QLatin1String("4.0")) && m_compilerCommand.endsWith(QLatin1String("-4.0")))
- return QList<FileName>() << FileName::fromLatin1("macx-g++40");
+ return FileNameList() << FileName::fromLatin1("macx-g++40");
if (v.startsWith(QLatin1String("4.2")) && m_compilerCommand.endsWith(QLatin1String("-4.2")))
- return QList<FileName>() << FileName::fromLatin1("macx-g++42");
- return QList<FileName>() << FileName::fromLatin1("macx-g++");
+ return FileNameList() << FileName::fromLatin1("macx-g++42");
+ return FileNameList() << FileName::fromLatin1("macx-g++");
}
if (abi.os() == Abi::LinuxOS) {
if (abi.osFlavor() != Abi::GenericLinuxFlavor)
- return QList<FileName>(); // most likely not a desktop, so leave the mkspec alone.
+ return FileNameList(); // most likely not a desktop, so leave the mkspec alone.
if (abi.wordWidth() == host.wordWidth()) {
// no need to explicitly set the word width, but provide that mkspec anyway to make sure
// that the correct compiler is picked if a mkspec with a wordwidth is given.
- return QList<FileName>() << FileName::fromLatin1("linux-g++")
- << FileName::fromString(QLatin1String("linux-g++-") + QString::number(m_targetAbi.wordWidth()));
+ return FileNameList() << FileName::fromLatin1("linux-g++")
+ << FileName::fromString(QLatin1String("linux-g++-") + QString::number(m_targetAbi.wordWidth()));
}
- return QList<FileName>() << FileName::fromString(QLatin1String("linux-g++-") + QString::number(m_targetAbi.wordWidth()));
+ return FileNameList() << FileName::fromString(QLatin1String("linux-g++-") + QString::number(m_targetAbi.wordWidth()));
}
if (abi.os() == Abi::BsdOS && abi.osFlavor() == Abi::FreeBsdFlavor)
- return QList<FileName>() << FileName::fromLatin1("freebsd-g++");
+ return FileNameList() << FileName::fromLatin1("freebsd-g++");
- return QList<FileName>();
+ return FileNameList();
}
QString GccToolChain::makeCommand(const Environment &environment) const
@@ -1069,20 +1069,20 @@ ToolChain::WarningFlags ClangToolChain::warningFlags(const QStringList &cflags)
return flags;
}
-QList<FileName> ClangToolChain::suggestedMkspecList() const
+FileNameList ClangToolChain::suggestedMkspecList() const
{
Abi abi = targetAbi();
if (abi.os() == Abi::MacOS)
- return QList<FileName>()
+ return FileNameList()
<< FileName::fromLatin1("macx-clang")
<< FileName::fromLatin1("macx-clang-32")
<< FileName::fromLatin1("unsupported/macx-clang")
<< FileName::fromLatin1("macx-ios-clang");
else if (abi.os() == Abi::LinuxOS)
- return QList<FileName>()
+ return FileNameList()
<< FileName::fromLatin1("linux-clang")
<< FileName::fromLatin1("unsupported/linux-clang");
- return QList<FileName>(); // Note: Not supported by Qt yet, so default to the mkspec the Qt was build with
+ return FileNameList(); // Note: Not supported by Qt yet, so default to the mkspec the Qt was build with
}
void ClangToolChain::addToEnvironment(Environment &env) const
@@ -1148,21 +1148,21 @@ QString MingwToolChain::typeDisplayName() const
return MingwToolChainFactory::tr("MinGW");
}
-QList<FileName> MingwToolChain::suggestedMkspecList() const
+FileNameList MingwToolChain::suggestedMkspecList() const
{
if (HostOsInfo::isWindowsHost())
- return QList<FileName>() << FileName::fromLatin1("win32-g++");
+ return FileNameList() << FileName::fromLatin1("win32-g++");
if (HostOsInfo::isLinuxHost()) {
if (version().startsWith(QLatin1String("4.6.")))
- return QList<FileName>()
+ return FileNameList()
<< FileName::fromLatin1("win32-g++-4.6-cross")
<< FileName::fromLatin1("unsupported/win32-g++-4.6-cross");
else
- return QList<FileName>()
+ return FileNameList()
<< FileName::fromLatin1("win32-g++-cross")
<< FileName::fromLatin1("unsupported/win32-g++-cross");
}
- return QList<FileName>();
+ return FileNameList();
}
QString MingwToolChain::makeCommand(const Environment &environment) const
@@ -1256,9 +1256,9 @@ IOutputParser *LinuxIccToolChain::outputParser() const
return new LinuxIccParser;
}
-QList<FileName> LinuxIccToolChain::suggestedMkspecList() const
+FileNameList LinuxIccToolChain::suggestedMkspecList() const
{
- return QList<FileName>()
+ return FileNameList()
<< FileName::fromString(QLatin1String("linux-icc-") + QString::number(targetAbi().wordWidth()));
}
diff --git a/src/plugins/projectexplorer/gcctoolchain.h b/src/plugins/projectexplorer/gcctoolchain.h
index 5a78360b37..4a276329b3 100644
--- a/src/plugins/projectexplorer/gcctoolchain.h
+++ b/src/plugins/projectexplorer/gcctoolchain.h
@@ -74,7 +74,7 @@ public:
const Utils::FileName &sysRoot) const override;
void addToEnvironment(Utils::Environment &env) const override;
QString makeCommand(const Utils::Environment &environment) const override;
- QList<Utils::FileName> suggestedMkspecList() const override;
+ Utils::FileNameList suggestedMkspecList() const override;
IOutputParser *outputParser() const override;
QVariantMap toMap() const override;
@@ -172,7 +172,7 @@ public:
ToolChain *clone() const override;
- QList<Utils::FileName> suggestedMkspecList() const override;
+ Utils::FileNameList suggestedMkspecList() const override;
void addToEnvironment(Utils::Environment &env) const override;
protected:
@@ -195,7 +195,7 @@ public:
ToolChain *clone() const override;
- QList<Utils::FileName> suggestedMkspecList() const override;
+ Utils::FileNameList suggestedMkspecList() const override;
private:
explicit MingwToolChain(Detection d);
@@ -218,7 +218,7 @@ public:
ToolChain *clone() const override;
- QList<Utils::FileName> suggestedMkspecList() const override;
+ Utils::FileNameList suggestedMkspecList() const override;
private:
explicit LinuxIccToolChain(Detection d);
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp
index 32722aca37..36d0b425b8 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp
@@ -316,9 +316,9 @@ JsonWizardFactory *JsonWizardFactory::createWizardFactory(const QVariantMap &dat
return factory;
}
-QList<Utils::FileName> &JsonWizardFactory::searchPaths()
+Utils::FileNameList &JsonWizardFactory::searchPaths()
{
- static QList<Utils::FileName> m_searchPaths = QList<Utils::FileName>()
+ static Utils::FileNameList m_searchPaths = Utils::FileNameList()
<< Utils::FileName::fromString(Core::ICore::userResourcePath() + QLatin1Char('/') +
QLatin1String(WIZARD_PATH))
<< Utils::FileName::fromString(Core::ICore::resourcePath() + QLatin1Char('/') +
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h
index 530f576d73..d5750dae91 100644
--- a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h
+++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h
@@ -102,7 +102,7 @@ private:
static QList<IWizardFactory *> createWizardFactories();
static JsonWizardFactory *createWizardFactory(const QVariantMap &data, const QDir &baseDir,
QString *errorMessage);
- static QList<Utils::FileName> &searchPaths();
+ static Utils::FileNameList &searchPaths();
static void setVerbose(int level);
static int verbose();
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index 16633ecc4e..0677575980 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -379,21 +379,21 @@ QString MsvcToolChain::typeDisplayName() const
return MsvcToolChainFactory::tr("MSVC");
}
-QList<Utils::FileName> MsvcToolChain::suggestedMkspecList() const
+Utils::FileNameList MsvcToolChain::suggestedMkspecList() const
{
switch (m_abi.osFlavor()) {
case Abi::WindowsMsvc2005Flavor:
- return QList<Utils::FileName>() << Utils::FileName::fromLatin1("win32-msvc2005");
+ return Utils::FileNameList() << Utils::FileName::fromLatin1("win32-msvc2005");
case Abi::WindowsMsvc2008Flavor:
- return QList<Utils::FileName>() << Utils::FileName::fromLatin1("win32-msvc2008");
+ return Utils::FileNameList() << Utils::FileName::fromLatin1("win32-msvc2008");
case Abi::WindowsMsvc2010Flavor:
- return QList<Utils::FileName>() << Utils::FileName::fromLatin1("win32-msvc2010");
+ return Utils::FileNameList() << Utils::FileName::fromLatin1("win32-msvc2010");
case Abi::WindowsMsvc2012Flavor:
- return QList<Utils::FileName>()
+ return Utils::FileNameList()
<< Utils::FileName::fromLatin1("win32-msvc2012")
<< Utils::FileName::fromLatin1("win32-msvc2010");
case Abi::WindowsMsvc2013Flavor:
- return QList<Utils::FileName>()
+ return Utils::FileNameList()
<< Utils::FileName::fromLatin1("win32-msvc2013")
<< Utils::FileName::fromLatin1("winphone-arm-msvc2013")
<< Utils::FileName::fromLatin1("winphone-x86-msvc2013")
@@ -403,7 +403,7 @@ QList<Utils::FileName> MsvcToolChain::suggestedMkspecList() const
<< Utils::FileName::fromLatin1("win32-msvc2012")
<< Utils::FileName::fromLatin1("win32-msvc2010");
case Abi::WindowsMsvc2015Flavor:
- return QList<Utils::FileName>()
+ return Utils::FileNameList()
<< Utils::FileName::fromLatin1("win32-msvc2015")
<< Utils::FileName::fromLatin1("winphone-arm-msvc2015")
<< Utils::FileName::fromLatin1("winphone-x86-msvc2015")
@@ -413,7 +413,7 @@ QList<Utils::FileName> MsvcToolChain::suggestedMkspecList() const
default:
break;
}
- return QList<Utils::FileName>();
+ return Utils::FileNameList();
}
QVariantMap MsvcToolChain::toMap() const
diff --git a/src/plugins/projectexplorer/msvctoolchain.h b/src/plugins/projectexplorer/msvctoolchain.h
index 22dfab5ae9..69c6782393 100644
--- a/src/plugins/projectexplorer/msvctoolchain.h
+++ b/src/plugins/projectexplorer/msvctoolchain.h
@@ -61,7 +61,7 @@ public:
MsvcToolChain(const QString &name, const Abi &abi,
const QString &varsBat, const QString &varsBatArg, Detection d = ManualDetection);
bool isValid() const override;
- QList<Utils::FileName> suggestedMkspecList() const override;
+ Utils::FileNameList suggestedMkspecList() const override;
static MsvcToolChain *readFromMap(const QVariantMap &data);
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index f3e6907f04..3f501c1e64 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -3148,7 +3148,7 @@ void ProjectExplorerPluginPrivate::addExistingDirectory()
QTC_ASSERT(folderNode, return);
SelectableFilesDialogAddDirectory dialog(Utils::FileName::fromString(directoryFor(ProjectTree::currentNode())),
- QList<Utils::FileName>(), ICore::mainWindow());
+ Utils::FileNameList(), ICore::mainWindow());
dialog.setAddFileFilter(folderNode->addFileFilter());
if (dialog.exec() == QDialog::Accepted)
diff --git a/src/plugins/projectexplorer/selectablefilesmodel.cpp b/src/plugins/projectexplorer/selectablefilesmodel.cpp
index 68c4f01cc4..1cf07dd8d9 100644
--- a/src/plugins/projectexplorer/selectablefilesmodel.cpp
+++ b/src/plugins/projectexplorer/selectablefilesmodel.cpp
@@ -62,7 +62,7 @@ SelectableFilesModel::SelectableFilesModel(QObject *parent) : QAbstractItemModel
m_root->parent = 0;
}
-void SelectableFilesModel::setInitialMarkedFiles(const QList<Utils::FileName> &files)
+void SelectableFilesModel::setInitialMarkedFiles(const Utils::FileNameList &files)
{
m_files = files.toSet();
m_outOfBaseDirFiles
@@ -312,14 +312,14 @@ Qt::ItemFlags SelectableFilesModel::flags(const QModelIndex &index) const
return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable;
}
-QList<Utils::FileName> SelectableFilesModel::selectedPaths() const
+Utils::FileNameList SelectableFilesModel::selectedPaths() const
{
- QList<Utils::FileName> result;
+ Utils::FileNameList result;
collectPaths(m_root, &result);
return result;
}
-void SelectableFilesModel::collectPaths(Tree *root, QList<Utils::FileName> *result) const
+void SelectableFilesModel::collectPaths(Tree *root, Utils::FileNameList *result) const
{
if (root->checked == Qt::Unchecked)
return;
@@ -328,19 +328,19 @@ void SelectableFilesModel::collectPaths(Tree *root, QList<Utils::FileName> *resu
collectPaths(t, result);
}
-QList<Utils::FileName> SelectableFilesModel::selectedFiles() const
+Utils::FileNameList SelectableFilesModel::selectedFiles() const
{
- QList<Utils::FileName> result = m_outOfBaseDirFiles.toList();
+ Utils::FileNameList result = m_outOfBaseDirFiles.toList();
collectFiles(m_root, &result);
return result;
}
-QList<Utils::FileName> SelectableFilesModel::preservedFiles() const
+Utils::FileNameList SelectableFilesModel::preservedFiles() const
{
return m_outOfBaseDirFiles.toList();
}
-void SelectableFilesModel::collectFiles(Tree *root, QList<Utils::FileName> *result) const
+void SelectableFilesModel::collectFiles(Tree *root, Utils::FileNameList *result) const
{
if (root->checked == Qt::Unchecked)
return;
@@ -514,7 +514,7 @@ Qt::CheckState SelectableFilesModel::applyFilter(const QModelIndex &index)
//////////
SelectableFilesDialogEditFiles::SelectableFilesDialogEditFiles(const Utils::FileName &path,
- const QList<Utils::FileName> &files,
+ const Utils::FileNameList &files,
QWidget *parent)
: QDialog(parent)
{
@@ -634,7 +634,7 @@ void SelectableFilesDialogEditFiles::parsingFinished()
smartExpand(m_selectableFilesModel->index(0,0, QModelIndex()));
applyFilter();
- const QList<Utils::FileName> preservedFiles = m_selectableFilesModel->preservedFiles();
+ const Utils::FileNameList preservedFiles = m_selectableFilesModel->preservedFiles();
m_preservedFiles->setText(tr("Not showing %n files that are outside of the base directory.\nThese files are preserved.", 0, preservedFiles.count()));
m_preservedFiles->setVisible(!preservedFiles.isEmpty());
}
@@ -649,7 +649,7 @@ void SelectableFilesDialogEditFiles::smartExpand(const QModelIndex &index)
}
}
-QList<Utils::FileName> SelectableFilesDialogEditFiles::selectedFiles() const
+Utils::FileNameList SelectableFilesDialogEditFiles::selectedFiles() const
{
return m_selectableFilesModel->selectedFiles();
}
@@ -671,7 +671,7 @@ void SelectableFilesDialogEditFiles::applyFilter()
}
SelectableFilesDialogAddDirectory::SelectableFilesDialogAddDirectory(const Utils::FileName &path,
- const QList<Utils::FileName> &files,
+ const Utils::FileNameList &files,
QWidget *parent) :
SelectableFilesDialogEditFiles(path, files, parent)
{
diff --git a/src/plugins/projectexplorer/selectablefilesmodel.h b/src/plugins/projectexplorer/selectablefilesmodel.h
index 1aad877adb..a201c4a623 100644
--- a/src/plugins/projectexplorer/selectablefilesmodel.h
+++ b/src/plugins/projectexplorer/selectablefilesmodel.h
@@ -97,7 +97,7 @@ public:
SelectableFilesModel(QObject *parent);
~SelectableFilesModel();
- void setInitialMarkedFiles(const QList<Utils::FileName> &files);
+ void setInitialMarkedFiles(const Utils::FileNameList &files);
int columnCount(const QModelIndex &parent) const;
int rowCount(const QModelIndex &parent) const;
@@ -108,9 +108,9 @@ public:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
- QList<Utils::FileName> selectedFiles() const;
- QList<Utils::FileName> selectedPaths() const;
- QList<Utils::FileName> preservedFiles() const;
+ Utils::FileNameList selectedFiles() const;
+ Utils::FileNameList selectedPaths() const;
+ Utils::FileNameList preservedFiles() const;
void startParsing(const Utils::FileName &baseDir);
void cancel();
@@ -130,8 +130,8 @@ private:
Qt::CheckState applyFilter(const QModelIndex &index);
bool filter(Tree *t);
void run(QFutureInterface<void> &fi);
- void collectFiles(Tree *root, QList<Utils::FileName> *result) const;
- void collectPaths(Tree *root, QList<Utils::FileName> *result) const;
+ void collectFiles(Tree *root, Utils::FileNameList *result) const;
+ void collectPaths(Tree *root, Utils::FileNameList *result) const;
void buildTree(const Utils::FileName &baseDir, Tree *tree, QFutureInterface<void> &fi, int symlinkDepth);
void propagateUp(const QModelIndex &index);
void propagateDown(const QModelIndex &index);
@@ -157,9 +157,10 @@ class PROJECTEXPLORER_EXPORT SelectableFilesDialogEditFiles : public QDialog
Q_OBJECT
public:
- SelectableFilesDialogEditFiles(const Utils::FileName &path, const QList<Utils::FileName> &files, QWidget *parent);
+ SelectableFilesDialogEditFiles(const Utils::FileName &path, const Utils::FileNameList &files,
+ QWidget *parent);
~SelectableFilesDialogEditFiles();
- QList<Utils::FileName> selectedFiles() const;
+ Utils::FileNameList selectedFiles() const;
void setAddFileFilter(const QString &filter);
@@ -194,7 +195,8 @@ class SelectableFilesDialogAddDirectory : public SelectableFilesDialogEditFiles
Q_OBJECT
public:
- SelectableFilesDialogAddDirectory(const Utils::FileName &path, const QList<Utils::FileName> &files, QWidget *parent);
+ SelectableFilesDialogAddDirectory(const Utils::FileName &path, const Utils::FileNameList &files,
+ QWidget *parent);
private slots:
void validityOfDirectoryChanged(bool validState);
diff --git a/src/plugins/projectexplorer/settingsaccessor.cpp b/src/plugins/projectexplorer/settingsaccessor.cpp
index 0e98b8e02d..d3d80a3853 100644
--- a/src/plugins/projectexplorer/settingsaccessor.cpp
+++ b/src/plugins/projectexplorer/settingsaccessor.cpp
@@ -514,7 +514,7 @@ public:
return m_upgraders.at(pos);
return 0;
}
- Settings bestSettings(const SettingsAccessor *accessor, const QList<FileName> &pathList);
+ Settings bestSettings(const SettingsAccessor *accessor, const FileNameList &pathList);
QList<VersionUpgrader *> m_upgraders;
PersistentSettingsWriter *m_writer;
@@ -979,9 +979,9 @@ bool SettingsAccessor::addVersionUpgrader(VersionUpgrader *upgrader)
}
/* Will always return the default name first (if applicable) */
-QList<FileName> SettingsAccessor::settingsFiles(const QString &suffix) const
+FileNameList SettingsAccessor::settingsFiles(const QString &suffix) const
{
- QList<FileName> result;
+ FileNameList result;
QFileInfoList list;
const QFileInfo pfi = project()->projectFilePath().toFileInfo();
@@ -1062,7 +1062,7 @@ void SettingsAccessor::backupUserFile() const
QVariantMap SettingsAccessor::readUserSettings(QWidget *parent) const
{
SettingsAccessorPrivate::Settings result;
- QList<FileName> fileList = settingsFiles(m_userSuffix);
+ FileNameList fileList = settingsFiles(m_userSuffix);
if (fileList.isEmpty()) // No settings found at all.
return result.map;
@@ -1112,7 +1112,7 @@ QVariantMap SettingsAccessor::readSharedSettings(QWidget *parent) const
}
SettingsAccessorPrivate::Settings SettingsAccessorPrivate::bestSettings(const SettingsAccessor *accessor,
- const QList<FileName> &pathList)
+ const FileNameList &pathList)
{
Settings bestMatch;
foreach (const FileName &path, pathList) {
diff --git a/src/plugins/projectexplorer/settingsaccessor.h b/src/plugins/projectexplorer/settingsaccessor.h
index 1bf05fe798..db310806f6 100644
--- a/src/plugins/projectexplorer/settingsaccessor.h
+++ b/src/plugins/projectexplorer/settingsaccessor.h
@@ -120,7 +120,7 @@ protected:
virtual IssueInfo findIssues(const QVariantMap &data, const Utils::FileName &path) const;
private:
- QList<Utils::FileName> settingsFiles(const QString &suffix) const;
+ Utils::FileNameList settingsFiles(const QString &suffix) const;
static QByteArray creatorId();
QString defaultFileName(const QString &suffix) const;
void backupUserFile() const;
diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp
index 13fe120300..c061d8069b 100644
--- a/src/plugins/projectexplorer/toolchain.cpp
+++ b/src/plugins/projectexplorer/toolchain.cpp
@@ -125,9 +125,9 @@ QByteArray ToolChain::id() const
return d->m_id;
}
-QList<Utils::FileName> ToolChain::suggestedMkspecList() const
+Utils::FileNameList ToolChain::suggestedMkspecList() const
{
- return QList<Utils::FileName>();
+ return Utils::FileNameList();
}
Utils::FileName ToolChain::suggestedDebugger() const
diff --git a/src/plugins/projectexplorer/toolchain.h b/src/plugins/projectexplorer/toolchain.h
index d3b3dfa5d5..f54b93c98b 100644
--- a/src/plugins/projectexplorer/toolchain.h
+++ b/src/plugins/projectexplorer/toolchain.h
@@ -34,14 +34,13 @@
#include "projectexplorer_export.h"
#include <coreplugin/id.h>
+#include <utils/fileutils.h>
+
#include <QObject>
#include <QString>
#include <QVariantMap>
-namespace Utils {
-class Environment;
-class FileName;
-}
+namespace Utils { class Environment; }
namespace ProjectExplorer {
@@ -79,7 +78,7 @@ public:
QByteArray id() const;
- virtual QList<Utils::FileName> suggestedMkspecList() const;
+ virtual Utils::FileNameList suggestedMkspecList() const;
virtual Utils::FileName suggestedDebugger() const;
Core::Id typeId() const;
diff --git a/src/plugins/projectexplorer/wincetoolchain.cpp b/src/plugins/projectexplorer/wincetoolchain.cpp
index 5b6a73301f..5e8217746b 100644
--- a/src/plugins/projectexplorer/wincetoolchain.cpp
+++ b/src/plugins/projectexplorer/wincetoolchain.cpp
@@ -277,7 +277,7 @@ QString WinCEToolChain::typeDisplayName() const
return WinCEToolChainFactory::tr("WinCE");
}
-QList<Utils::FileName> WinCEToolChain::suggestedMkspecList() const
+Utils::FileNameList WinCEToolChain::suggestedMkspecList() const
{
const QChar specSeperator(QLatin1Char('-'));
@@ -289,7 +289,7 @@ QList<Utils::FileName> WinCEToolChain::suggestedMkspecList() const
specString += specSeperator;
specString += m_msvcVer;
- return QList<Utils::FileName>() << Utils::FileName::fromString(specString);
+ return Utils::FileNameList() << Utils::FileName::fromString(specString);
}
diff --git a/src/plugins/projectexplorer/wincetoolchain.h b/src/plugins/projectexplorer/wincetoolchain.h
index 44c0e3f3c6..f87278f64a 100644
--- a/src/plugins/projectexplorer/wincetoolchain.h
+++ b/src/plugins/projectexplorer/wincetoolchain.h
@@ -51,7 +51,7 @@ public:
const QString &libPath,
Detection d = ManualDetection);
- QList<Utils::FileName> suggestedMkspecList() const override;
+ Utils::FileNameList suggestedMkspecList() const override;
static WinCEToolChain *readFromMap(const QVariantMap &data);
diff --git a/src/plugins/qnx/qnxtoolchain.cpp b/src/plugins/qnx/qnxtoolchain.cpp
index eb126703c9..416716acef 100644
--- a/src/plugins/qnx/qnxtoolchain.cpp
+++ b/src/plugins/qnx/qnxtoolchain.cpp
@@ -86,9 +86,9 @@ void QnxToolChain::addToEnvironment(Utils::Environment &env) const
GccToolChain::addToEnvironment(env);
}
-QList<Utils::FileName> QnxToolChain::suggestedMkspecList() const
+Utils::FileNameList QnxToolChain::suggestedMkspecList() const
{
- QList<Utils::FileName> mkspecList;
+ Utils::FileNameList mkspecList;
mkspecList << Utils::FileName::fromLatin1("qnx-armv7le-qcc");
mkspecList << Utils::FileName::fromLatin1("qnx-armle-v7-qcc");
mkspecList << Utils::FileName::fromLatin1("qnx-x86-qcc");
diff --git a/src/plugins/qnx/qnxtoolchain.h b/src/plugins/qnx/qnxtoolchain.h
index b9b438985d..6d05b68434 100644
--- a/src/plugins/qnx/qnxtoolchain.h
+++ b/src/plugins/qnx/qnxtoolchain.h
@@ -49,7 +49,7 @@ public:
ProjectExplorer::ToolChainConfigWidget *configurationWidget() override;
void addToEnvironment(Utils::Environment &env) const override;
- QList<Utils::FileName> suggestedMkspecList() const override;
+ Utils::FileNameList suggestedMkspecList() const override;
QVariantMap toMap() const override;
bool fromMap(const QVariantMap &data) override;
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp
index 4b3ef96f1e..6968c30bed 100644
--- a/src/plugins/qtsupport/baseqtversion.cpp
+++ b/src/plugins/qtsupport/baseqtversion.cpp
@@ -1015,7 +1015,7 @@ FileName BaseQtVersion::mkspecFor(ToolChain *tc) const
if (!tc)
return versionSpec;
- const QList<FileName> tcSpecList = tc->suggestedMkspecList();
+ const FileNameList tcSpecList = tc->suggestedMkspecList();
if (tcSpecList.contains(versionSpec))
return versionSpec;
foreach (const FileName &tcSpec, tcSpecList) {
@@ -1650,14 +1650,14 @@ bool BaseQtVersion::isQtQuickCompilerSupported(QString *reason) const
return true;
}
-QList<FileName> BaseQtVersion::qtCorePaths(const QHash<QString,QString> &versionInfo, const QString &versionString)
+FileNameList BaseQtVersion::qtCorePaths(const QHash<QString,QString> &versionInfo, const QString &versionString)
{
QStringList dirs;
dirs << qmakeProperty(versionInfo, "QT_INSTALL_LIBS")
<< qmakeProperty(versionInfo, "QT_INSTALL_BINS");
- QList<FileName> staticLibs;
- QList<FileName> dynamicLibs;
+ FileNameList staticLibs;
+ FileNameList dynamicLibs;
foreach (const QString &dir, dirs) {
if (dir.isEmpty())
continue;
@@ -1693,7 +1693,7 @@ QList<FileName> BaseQtVersion::qtCorePaths(const QHash<QString,QString> &version
return dynamicLibs;
}
-QList<Abi> BaseQtVersion::qtAbisFromLibrary(const QList<FileName> &coreLibraries)
+QList<Abi> BaseQtVersion::qtAbisFromLibrary(const FileNameList &coreLibraries)
{
QList<Abi> res;
foreach (const FileName &library, coreLibraries)
diff --git a/src/plugins/qtsupport/baseqtversion.h b/src/plugins/qtsupport/baseqtversion.h
index 442b20052f..f9ea7b473e 100644
--- a/src/plugins/qtsupport/baseqtversion.h
+++ b/src/plugins/qtsupport/baseqtversion.h
@@ -242,9 +242,9 @@ protected:
virtual QList<ProjectExplorer::Task> reportIssuesImpl(const QString &proFile, const QString &buildDir) const;
// helper function for desktop and simulator to figure out the supported abis based on the libraries
- static QList<Utils::FileName> qtCorePaths(const QHash<QString,QString> &versionInfo,
- const QString &versionString);
- static QList<ProjectExplorer::Abi> qtAbisFromLibrary(const QList<Utils::FileName> &coreLibraries);
+ static Utils::FileNameList qtCorePaths(const QHash<QString,QString> &versionInfo,
+ const QString &versionString);
+ static QList<ProjectExplorer::Abi> qtAbisFromLibrary(const Utils::FileNameList &coreLibraries);
void ensureMkSpecParsed() const;
virtual void parseMkSpec(ProFileEvaluator *) const;