forked from qt-creator/qt-creator
Utils: Rename FilePathList to simply FilePaths
The exact storage type does not really matter here. Change-Id: Iefec40f0f5909c8e7ba3415db4a11962694e1b38 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -851,7 +851,7 @@ QList<Snapshot::IncludeLocation> Snapshot::includeLocationsOfDocument(const QStr
|
||||
return result;
|
||||
}
|
||||
|
||||
Utils::FilePathList Snapshot::filesDependingOn(const Utils::FilePath &fileName) const
|
||||
Utils::FilePaths Snapshot::filesDependingOn(const Utils::FilePath &fileName) const
|
||||
{
|
||||
updateDependencyTable();
|
||||
return m_deps.filesDependingOn(fileName);
|
||||
|
@@ -442,8 +442,8 @@ public:
|
||||
QSet<QString> allIncludesForDocument(const QString &fileName) const;
|
||||
QList<IncludeLocation> includeLocationsOfDocument(const QString &fileName) const;
|
||||
|
||||
Utils::FilePathList filesDependingOn(const Utils::FilePath &fileName) const;
|
||||
Utils::FilePathList filesDependingOn(const QString &fileName) const
|
||||
Utils::FilePaths filesDependingOn(const Utils::FilePath &fileName) const;
|
||||
Utils::FilePaths filesDependingOn(const QString &fileName) const
|
||||
{ return filesDependingOn(Utils::FilePath::fromString(fileName)); }
|
||||
void updateDependencyTable() const;
|
||||
|
||||
|
@@ -29,9 +29,9 @@
|
||||
|
||||
using namespace CPlusPlus;
|
||||
|
||||
Utils::FilePathList DependencyTable::filesDependingOn(const Utils::FilePath &fileName) const
|
||||
Utils::FilePaths DependencyTable::filesDependingOn(const Utils::FilePath &fileName) const
|
||||
{
|
||||
Utils::FilePathList deps;
|
||||
Utils::FilePaths deps;
|
||||
|
||||
int index = fileIndex.value(fileName, -1);
|
||||
if (index == -1)
|
||||
|
@@ -44,7 +44,7 @@ class CPLUSPLUS_EXPORT DependencyTable
|
||||
private:
|
||||
friend class Snapshot;
|
||||
void build(const Snapshot &snapshot);
|
||||
Utils::FilePathList filesDependingOn(const Utils::FilePath &fileName) const;
|
||||
Utils::FilePaths filesDependingOn(const Utils::FilePath &fileName) const;
|
||||
|
||||
QVector<Utils::FilePath> files;
|
||||
QHash<Utils::FilePath, int> fileIndex;
|
||||
|
@@ -43,7 +43,7 @@ struct SshSettings
|
||||
FilePath sftpFilePath;
|
||||
FilePath askpassFilePath;
|
||||
FilePath keygenFilePath;
|
||||
QSsh::SshSettings::SearchPathRetriever searchPathRetriever = [] { return FilePathList(); };
|
||||
QSsh::SshSettings::SearchPathRetriever searchPathRetriever = [] { return FilePaths(); };
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
@@ -61,7 +61,7 @@ public:
|
||||
static void setKeygenFilePath(const Utils::FilePath &keygen);
|
||||
static Utils::FilePath keygenFilePath();
|
||||
|
||||
using SearchPathRetriever = std::function<Utils::FilePathList()>;
|
||||
using SearchPathRetriever = std::function<Utils::FilePaths()>;
|
||||
static void setExtraSearchPathRetriever(const SearchPathRetriever &pathRetriever);
|
||||
};
|
||||
|
||||
|
@@ -101,15 +101,15 @@ static FilePath findQmakeInDir(const FilePath &path)
|
||||
|
||||
FilePath BuildableHelperLibrary::findSystemQt(const Environment &env)
|
||||
{
|
||||
const FilePathList list = findQtsInEnvironment(env, 1);
|
||||
const FilePaths list = findQtsInEnvironment(env, 1);
|
||||
return list.size() == 1 ? list.first() : FilePath();
|
||||
}
|
||||
|
||||
FilePathList BuildableHelperLibrary::findQtsInEnvironment(const Environment &env, int maxCount)
|
||||
FilePaths BuildableHelperLibrary::findQtsInEnvironment(const Environment &env, int maxCount)
|
||||
{
|
||||
FilePathList qmakeList;
|
||||
FilePaths qmakeList;
|
||||
std::set<QString> canonicalEnvPaths;
|
||||
const FilePathList paths = env.path();
|
||||
const FilePaths paths = env.path();
|
||||
for (const FilePath &path : paths) {
|
||||
if (!canonicalEnvPaths.insert(path.toFileInfo().canonicalFilePath()).second)
|
||||
continue;
|
||||
|
@@ -38,7 +38,7 @@ public:
|
||||
// returns the full path to the first qmake, qmake-qt4, qmake4 that has
|
||||
// at least version 2.0.0 and thus is a qt4 qmake
|
||||
static FilePath findSystemQt(const Environment &env);
|
||||
static FilePathList findQtsInEnvironment(const Environment &env, int maxCount = -1);
|
||||
static FilePaths findQtsInEnvironment(const Environment &env, int maxCount = -1);
|
||||
static bool isQtChooser(const QFileInfo &info);
|
||||
static QString qtChooserToQmakePath(const QString &path);
|
||||
// return true if the qmake at qmakePath is a Qt (used by QtVersion)
|
||||
|
@@ -218,7 +218,7 @@ QString Environment::expandedValueForKey(const QString &key) const
|
||||
}
|
||||
|
||||
FilePath Environment::searchInPath(const QString &executable,
|
||||
const FilePathList &additionalDirs,
|
||||
const FilePaths &additionalDirs,
|
||||
const PathFilter &func) const
|
||||
{
|
||||
if (executable.isEmpty())
|
||||
@@ -256,8 +256,8 @@ FilePath Environment::searchInPath(const QString &executable,
|
||||
return FilePath();
|
||||
}
|
||||
|
||||
FilePathList Environment::findAllInPath(const QString &executable,
|
||||
const FilePathList &additionalDirs,
|
||||
FilePaths Environment::findAllInPath(const QString &executable,
|
||||
const FilePaths &additionalDirs,
|
||||
const Environment::PathFilter &func) const
|
||||
{
|
||||
if (executable.isEmpty())
|
||||
@@ -295,12 +295,12 @@ FilePathList Environment::findAllInPath(const QString &executable,
|
||||
return result.values();
|
||||
}
|
||||
|
||||
FilePathList Environment::path() const
|
||||
FilePaths Environment::path() const
|
||||
{
|
||||
return pathListValue("PATH");
|
||||
}
|
||||
|
||||
FilePathList Environment::pathListValue(const QString &varName) const
|
||||
FilePaths Environment::pathListValue(const QString &varName) const
|
||||
{
|
||||
const QStringList pathComponents = expandedValueForKey(varName)
|
||||
.split(OsSpecificAspects::pathListSeparator(m_osType), QString::SkipEmptyParts);
|
||||
|
@@ -64,14 +64,14 @@ public:
|
||||
|
||||
using PathFilter = std::function<bool(const FilePath &)>;
|
||||
FilePath searchInPath(const QString &executable,
|
||||
const FilePathList &additionalDirs = FilePathList(),
|
||||
const FilePaths &additionalDirs = FilePaths(),
|
||||
const PathFilter &func = PathFilter()) const;
|
||||
FilePathList findAllInPath(const QString &executable,
|
||||
const FilePathList &additionalDirs = FilePathList(),
|
||||
FilePaths findAllInPath(const QString &executable,
|
||||
const FilePaths &additionalDirs = FilePaths(),
|
||||
const PathFilter &func = PathFilter()) const;
|
||||
|
||||
FilePathList path() const;
|
||||
FilePathList pathListValue(const QString &varName) const;
|
||||
FilePaths path() const;
|
||||
FilePaths pathListValue(const QString &varName) const;
|
||||
QStringList appendExeExtensions(const QString &executable) const;
|
||||
|
||||
bool isSameExecutable(const QString &exe1, const QString &exe2) const;
|
||||
|
@@ -100,7 +100,7 @@ FilePath FileInProjectFinder::projectDirectory() const
|
||||
return m_projectDir;
|
||||
}
|
||||
|
||||
void FileInProjectFinder::setProjectFiles(const FilePathList &projectFiles)
|
||||
void FileInProjectFinder::setProjectFiles(const FilePaths &projectFiles)
|
||||
{
|
||||
if (m_projectFiles == projectFiles)
|
||||
return;
|
||||
@@ -142,12 +142,12 @@ void FileInProjectFinder::addMappedPath(const FilePath &localFilePath, const QSt
|
||||
folder specified. Third, we walk the list of project files, and search for a file name match
|
||||
there. If all fails, it returns the original path from the file URL.
|
||||
*/
|
||||
FilePathList FileInProjectFinder::findFile(const QUrl &fileUrl, bool *success) const
|
||||
FilePaths FileInProjectFinder::findFile(const QUrl &fileUrl, bool *success) const
|
||||
{
|
||||
qCDebug(finderLog) << "FileInProjectFinder: trying to find file" << fileUrl.toString() << "...";
|
||||
|
||||
if (fileUrl.scheme() == "qrc" || fileUrl.toString().startsWith(':')) {
|
||||
const FilePathList result = m_qrcUrlFinder.find(fileUrl);
|
||||
const FilePaths result = m_qrcUrlFinder.find(fileUrl);
|
||||
if (!result.isEmpty()) {
|
||||
if (success)
|
||||
*success = true;
|
||||
@@ -159,7 +159,7 @@ FilePathList FileInProjectFinder::findFile(const QUrl &fileUrl, bool *success) c
|
||||
if (originalPath.isEmpty()) // e.g. qrc://
|
||||
originalPath = fileUrl.path();
|
||||
|
||||
FilePathList result;
|
||||
FilePaths result;
|
||||
bool found = findFileOrDirectory(originalPath, [&](const QString &fileName, int) {
|
||||
result << FilePath::fromString(fileName);
|
||||
});
|
||||
@@ -446,12 +446,12 @@ QStringList FileInProjectFinder::bestMatches(const QStringList &filePaths,
|
||||
return bestFilePaths;
|
||||
}
|
||||
|
||||
FilePathList FileInProjectFinder::searchDirectories() const
|
||||
FilePaths FileInProjectFinder::searchDirectories() const
|
||||
{
|
||||
return m_searchDirectories;
|
||||
}
|
||||
|
||||
void FileInProjectFinder::setAdditionalSearchDirectories(const FilePathList &searchDirectories)
|
||||
void FileInProjectFinder::setAdditionalSearchDirectories(const FilePaths &searchDirectories)
|
||||
{
|
||||
m_searchDirectories = searchDirectories;
|
||||
}
|
||||
@@ -461,7 +461,7 @@ FileInProjectFinder::PathMappingNode::~PathMappingNode()
|
||||
qDeleteAll(children);
|
||||
}
|
||||
|
||||
FilePathList FileInProjectFinder::QrcUrlFinder::find(const QUrl &fileUrl) const
|
||||
FilePaths FileInProjectFinder::QrcUrlFinder::find(const QUrl &fileUrl) const
|
||||
{
|
||||
const auto fileIt = m_fileCache.constFind(fileUrl);
|
||||
if (fileIt != m_fileCache.cend())
|
||||
@@ -476,19 +476,19 @@ FilePathList FileInProjectFinder::QrcUrlFinder::find(const QUrl &fileUrl) const
|
||||
qrcParser->collectFilesAtPath(QrcParser::normalizedQrcFilePath(fileUrl.toString()), &hits);
|
||||
}
|
||||
hits.removeDuplicates();
|
||||
const FilePathList result = transform(hits, &FilePath::fromString);
|
||||
const FilePaths result = transform(hits, &FilePath::fromString);
|
||||
m_fileCache.insert(fileUrl, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void FileInProjectFinder::QrcUrlFinder::setProjectFiles(const FilePathList &projectFiles)
|
||||
void FileInProjectFinder::QrcUrlFinder::setProjectFiles(const FilePaths &projectFiles)
|
||||
{
|
||||
m_allQrcFiles = filtered(projectFiles, [](const FilePath &f) { return f.endsWith(".qrc"); });
|
||||
m_fileCache.clear();
|
||||
m_parserCache.clear();
|
||||
}
|
||||
|
||||
FilePath chooseFileFromList(const FilePathList &candidates)
|
||||
FilePath chooseFileFromList(const FilePaths &candidates)
|
||||
{
|
||||
if (candidates.length() == 1)
|
||||
return candidates.first();
|
||||
|
@@ -50,17 +50,17 @@ public:
|
||||
void setProjectDirectory(const FilePath &absoluteProjectPath);
|
||||
FilePath projectDirectory() const;
|
||||
|
||||
void setProjectFiles(const FilePathList &projectFiles);
|
||||
void setProjectFiles(const FilePaths &projectFiles);
|
||||
void setSysroot(const FilePath &sysroot);
|
||||
|
||||
void addMappedPath(const FilePath &localFilePath, const QString &remoteFilePath);
|
||||
|
||||
FilePathList findFile(const QUrl &fileUrl, bool *success = nullptr) const;
|
||||
FilePaths findFile(const QUrl &fileUrl, bool *success = nullptr) const;
|
||||
bool findFileOrDirectory(const QString &originalPath, FileHandler fileHandler = nullptr,
|
||||
DirectoryHandler directoryHandler = nullptr) const;
|
||||
|
||||
FilePathList searchDirectories() const;
|
||||
void setAdditionalSearchDirectories(const FilePathList &searchDirectories);
|
||||
FilePaths searchDirectories() const;
|
||||
void setAdditionalSearchDirectories(const FilePaths &searchDirectories);
|
||||
|
||||
private:
|
||||
struct PathMappingNode
|
||||
@@ -77,11 +77,11 @@ private:
|
||||
|
||||
class QrcUrlFinder {
|
||||
public:
|
||||
FilePathList find(const QUrl &fileUrl) const;
|
||||
void setProjectFiles(const FilePathList &projectFiles);
|
||||
FilePaths find(const QUrl &fileUrl) const;
|
||||
void setProjectFiles(const FilePaths &projectFiles);
|
||||
private:
|
||||
FilePathList m_allQrcFiles;
|
||||
mutable QHash<QUrl, FilePathList> m_fileCache;
|
||||
FilePaths m_allQrcFiles;
|
||||
mutable QHash<QUrl, FilePaths> m_fileCache;
|
||||
mutable QHash<FilePath, QSharedPointer<QrcParser>> m_parserCache;
|
||||
};
|
||||
|
||||
@@ -100,14 +100,14 @@ private:
|
||||
|
||||
FilePath m_projectDir;
|
||||
FilePath m_sysroot;
|
||||
FilePathList m_projectFiles;
|
||||
FilePathList m_searchDirectories;
|
||||
FilePaths m_projectFiles;
|
||||
FilePaths m_searchDirectories;
|
||||
PathMappingNode m_pathMapRoot;
|
||||
|
||||
mutable QHash<QString, CacheEntry> m_cache;
|
||||
QrcUrlFinder m_qrcUrlFinder;
|
||||
};
|
||||
|
||||
QTCREATOR_UTILS_EXPORT FilePath chooseFileFromList(const FilePathList &candidates);
|
||||
QTCREATOR_UTILS_EXPORT FilePath chooseFileFromList(const FilePaths &candidates);
|
||||
|
||||
} // namespace Utils
|
||||
|
@@ -128,7 +128,7 @@ private:
|
||||
|
||||
QTCREATOR_UTILS_EXPORT QTextStream &operator<<(QTextStream &s, const FilePath &fn);
|
||||
|
||||
using FilePathList = QList<FilePath>;
|
||||
using FilePaths = QList<FilePath>;
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT CommandLine
|
||||
{
|
||||
|
@@ -217,7 +217,7 @@ QVariantMap SettingsAccessor::prepareToWriteSettings(const QVariantMap &data) co
|
||||
// BackingUpSettingsAccessor:
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
FilePathList BackUpStrategy::readFileCandidates(const FilePath &baseFileName) const
|
||||
FilePaths BackUpStrategy::readFileCandidates(const FilePath &baseFileName) const
|
||||
{
|
||||
|
||||
const QFileInfo pfi = baseFileName.toFileInfo();
|
||||
@@ -264,7 +264,7 @@ BackingUpSettingsAccessor::BackingUpSettingsAccessor(std::unique_ptr<BackUpStrat
|
||||
SettingsAccessor::RestoreData
|
||||
BackingUpSettingsAccessor::readData(const FilePath &path, QWidget *parent) const
|
||||
{
|
||||
const FilePathList fileList = readFileCandidates(path);
|
||||
const FilePaths fileList = readFileCandidates(path);
|
||||
if (fileList.isEmpty()) // No settings found at all.
|
||||
return RestoreData(path, QVariantMap());
|
||||
|
||||
@@ -301,9 +301,9 @@ BackingUpSettingsAccessor::writeData(const FilePath &path, const QVariantMap &da
|
||||
return SettingsAccessor::writeData(path, data, parent);
|
||||
}
|
||||
|
||||
FilePathList BackingUpSettingsAccessor::readFileCandidates(const FilePath &path) const
|
||||
FilePaths BackingUpSettingsAccessor::readFileCandidates(const FilePath &path) const
|
||||
{
|
||||
FilePathList result = Utils::filteredUnique(m_strategy->readFileCandidates(path));
|
||||
FilePaths result = Utils::filteredUnique(m_strategy->readFileCandidates(path));
|
||||
if (result.removeOne(baseFilePath()))
|
||||
result.prepend(baseFilePath());
|
||||
|
||||
@@ -311,7 +311,7 @@ FilePathList BackingUpSettingsAccessor::readFileCandidates(const FilePath &path)
|
||||
}
|
||||
|
||||
SettingsAccessor::RestoreData
|
||||
BackingUpSettingsAccessor::bestReadFileData(const FilePathList &candidates, QWidget *parent) const
|
||||
BackingUpSettingsAccessor::bestReadFileData(const FilePaths &candidates, QWidget *parent) const
|
||||
{
|
||||
SettingsAccessor::RestoreData bestMatch;
|
||||
for (const FilePath &c : candidates) {
|
||||
|
@@ -154,7 +154,7 @@ class QTCREATOR_UTILS_EXPORT BackUpStrategy
|
||||
public:
|
||||
virtual ~BackUpStrategy() = default;
|
||||
|
||||
virtual FilePathList readFileCandidates(const FilePath &baseFileName) const;
|
||||
virtual FilePaths readFileCandidates(const FilePath &baseFileName) const;
|
||||
// Return -1 if data1 is better that data2, 0 if both are equally worthwhile
|
||||
// and 1 if data2 is better than data1
|
||||
virtual int compare(const SettingsAccessor::RestoreData &data1,
|
||||
@@ -179,8 +179,8 @@ public:
|
||||
BackUpStrategy *strategy() const { return m_strategy.get(); }
|
||||
|
||||
private:
|
||||
FilePathList readFileCandidates(const FilePath &path) const;
|
||||
RestoreData bestReadFileData(const FilePathList &candidates, QWidget *parent) const;
|
||||
FilePaths readFileCandidates(const FilePath &path) const;
|
||||
RestoreData bestReadFileData(const FilePaths &candidates, QWidget *parent) const;
|
||||
void backupFile(const FilePath &path, const QVariantMap &data, QWidget *parent) const;
|
||||
|
||||
std::unique_ptr<BackUpStrategy> m_strategy;
|
||||
|
@@ -369,7 +369,7 @@ QSet<QString> TestTreeItem::dependingInternalTargets(CppTools::CppModelManager *
|
||||
bool wasHeader;
|
||||
const QString correspondingFile
|
||||
= CppTools::correspondingHeaderOrSource(file, &wasHeader, CppTools::CacheUsage::ReadOnly);
|
||||
const Utils::FilePathList dependingFiles = snapshot.filesDependingOn(
|
||||
const Utils::FilePaths dependingFiles = snapshot.filesDependingOn(
|
||||
wasHeader ? file : correspondingFile);
|
||||
for (const Utils::FilePath &fn : dependingFiles) {
|
||||
for (const CppTools::ProjectPart::Ptr &part : cppMM->projectPart(fn))
|
||||
|
@@ -104,7 +104,7 @@ QString ArtisticStyle::configurationFile() const
|
||||
if (m_settings.useOtherFiles()) {
|
||||
if (const ProjectExplorer::Project *project
|
||||
= ProjectExplorer::ProjectTree::currentProject()) {
|
||||
const Utils::FilePathList astyleRcfiles = project->files(
|
||||
const Utils::FilePaths astyleRcfiles = project->files(
|
||||
[](const ProjectExplorer::Node *n) { return n->filePath().endsWith(".astylerc"); });
|
||||
for (const Utils::FilePath &file : astyleRcfiles) {
|
||||
const QFileInfo fi = file.toFileInfo();
|
||||
|
@@ -145,7 +145,7 @@ QString Uncrustify::configurationFile() const
|
||||
if (m_settings.useOtherFiles()) {
|
||||
if (const ProjectExplorer::Project *project
|
||||
= ProjectExplorer::ProjectTree::currentProject()) {
|
||||
const Utils::FilePathList files = project->files(
|
||||
const Utils::FilePaths files = project->files(
|
||||
[](const ProjectExplorer::Node *n) { return n->filePath().endsWith("cfg"); });
|
||||
for (const Utils::FilePath &file : files) {
|
||||
const QFileInfo fi = file.toFileInfo();
|
||||
|
@@ -103,7 +103,7 @@ public:
|
||||
protected:
|
||||
void newExtraCompiler(const ProjectExplorer::Project *,
|
||||
const Utils::FilePath &,
|
||||
const Utils::FilePathList &targets) override
|
||||
const Utils::FilePaths &targets) override
|
||||
{
|
||||
auto filePaths = Utils::transform<ClangBackEnd::FilePaths>(targets,
|
||||
[](const Utils::FilePath &filePath) {
|
||||
|
@@ -633,7 +633,7 @@ void Parser::resetData(const CPlusPlus::Snapshot &snapshot)
|
||||
d->docLocker.unlock();
|
||||
|
||||
// recalculate file list
|
||||
FilePathList fileList;
|
||||
FilePaths fileList;
|
||||
|
||||
// check all projects
|
||||
for (const Project *prj : SessionManager::projects())
|
||||
|
@@ -633,7 +633,7 @@ QList<ProjectExplorer::ExtraCompiler *> CMakeBuildSystem::findExtraCompilers()
|
||||
|
||||
// Find all files generated by any of the extra compilers, in a rather crude way.
|
||||
Project *p = project();
|
||||
const FilePathList fileList = p->files([&fileExtensions, p](const Node *n) {
|
||||
const FilePaths fileList = p->files([&fileExtensions, p](const Node *n) {
|
||||
if (!p->SourceFiles(n))
|
||||
return false;
|
||||
const QString fp = n->filePath().toString();
|
||||
@@ -660,7 +660,7 @@ QList<ProjectExplorer::ExtraCompiler *> CMakeBuildSystem::findExtraCompilers()
|
||||
if (generated.isEmpty())
|
||||
continue;
|
||||
|
||||
const FilePathList fileNames = transform(generated, [](const QString &s) {
|
||||
const FilePaths fileNames = transform(generated, [](const QString &s) {
|
||||
return FilePath::fromString(s);
|
||||
});
|
||||
extraCompilers.append(factory->create(p, file, fileNames));
|
||||
|
@@ -61,7 +61,7 @@ int distance(const FilePath &targetDirectory, const FilePath &fileName)
|
||||
void CMakeCbpParser::sortFiles()
|
||||
{
|
||||
QLoggingCategory log("qtc.cmakeprojectmanager.filetargetmapping", QtWarningMsg);
|
||||
FilePathList fileNames = transform<QList>(m_fileList, &FileNode::filePath);
|
||||
FilePaths fileNames = transform<QList>(m_fileList, &FileNode::filePath);
|
||||
|
||||
sort(fileNames);
|
||||
|
||||
|
@@ -72,7 +72,7 @@ static std::vector<std::unique_ptr<CMakeTool>> autoDetectCMakeTools()
|
||||
{
|
||||
Utils::Environment env = Environment::systemEnvironment();
|
||||
|
||||
Utils::FilePathList path = env.path();
|
||||
Utils::FilePaths path = env.path();
|
||||
path = Utils::filteredUnique(path);
|
||||
|
||||
if (HostOsInfo::isWindowsHost()) {
|
||||
@@ -93,7 +93,7 @@ static std::vector<std::unique_ptr<CMakeTool>> autoDetectCMakeTools()
|
||||
|
||||
const QStringList execs = env.appendExeExtensions(QLatin1String("cmake"));
|
||||
|
||||
FilePathList suspects;
|
||||
FilePaths suspects;
|
||||
foreach (const Utils::FilePath &base, path) {
|
||||
if (base.isEmpty())
|
||||
continue;
|
||||
|
@@ -68,8 +68,8 @@ public:
|
||||
NumberOfColumns
|
||||
};
|
||||
|
||||
void initDialog(const FilePathList &filePaths);
|
||||
void promptFailWarning(const FilePathList &files, ReadOnlyFilesDialog::ReadOnlyResult type) const;
|
||||
void initDialog(const FilePaths &filePaths);
|
||||
void promptFailWarning(const FilePaths &files, ReadOnlyFilesDialog::ReadOnlyResult type) const;
|
||||
QRadioButton *createRadioButtonForItem(QTreeWidgetItem *item, QButtonGroup *group, ReadOnlyFilesTreeColumn type);
|
||||
|
||||
void setAll(int index);
|
||||
@@ -143,7 +143,7 @@ using namespace Internal;
|
||||
* and Save As which is used to save the changes to a document in another file.
|
||||
*/
|
||||
|
||||
ReadOnlyFilesDialog::ReadOnlyFilesDialog(const Utils::FilePathList &filePaths, QWidget *parent)
|
||||
ReadOnlyFilesDialog::ReadOnlyFilesDialog(const Utils::FilePaths &filePaths, QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, d(new ReadOnlyFilesDialogPrivate(this))
|
||||
{
|
||||
@@ -170,7 +170,7 @@ ReadOnlyFilesDialog::ReadOnlyFilesDialog(const QList<IDocument *> &documents, QW
|
||||
: QDialog(parent)
|
||||
, d(new ReadOnlyFilesDialogPrivate(this))
|
||||
{
|
||||
FilePathList files;
|
||||
FilePaths files;
|
||||
for (IDocument *document : documents)
|
||||
files << document->filePath();
|
||||
d->initDialog(files);
|
||||
@@ -205,7 +205,7 @@ void ReadOnlyFilesDialog::setShowFailWarning(bool show, const QString &warning)
|
||||
* Opens a message box with an error description according to the type.
|
||||
* \internal
|
||||
*/
|
||||
void ReadOnlyFilesDialogPrivate::promptFailWarning(const FilePathList &files, ReadOnlyFilesDialog::ReadOnlyResult type) const
|
||||
void ReadOnlyFilesDialogPrivate::promptFailWarning(const FilePaths &files, ReadOnlyFilesDialog::ReadOnlyResult type) const
|
||||
{
|
||||
if (files.isEmpty())
|
||||
return;
|
||||
@@ -281,7 +281,7 @@ int ReadOnlyFilesDialog::exec()
|
||||
return RO_Cancel;
|
||||
|
||||
ReadOnlyResult result = RO_Cancel;
|
||||
FilePathList failedToMakeWritable;
|
||||
FilePaths failedToMakeWritable;
|
||||
for (ReadOnlyFilesDialogPrivate::ButtonGroupForFile buttongroup : qAsConst(d->buttonGroups)) {
|
||||
result = static_cast<ReadOnlyResult>(buttongroup.group->checkedId());
|
||||
switch (result) {
|
||||
@@ -388,7 +388,7 @@ void ReadOnlyFilesDialogPrivate::updateSelectAll()
|
||||
* dialog.
|
||||
* \internal
|
||||
*/
|
||||
void ReadOnlyFilesDialogPrivate::initDialog(const FilePathList &filePaths)
|
||||
void ReadOnlyFilesDialogPrivate::initDialog(const FilePaths &filePaths)
|
||||
{
|
||||
ui.setupUi(q);
|
||||
ui.buttonBox->addButton(tr("Change &Permission"), QDialogButtonBox::AcceptRole);
|
||||
|
@@ -59,7 +59,7 @@ public:
|
||||
RO_SaveAs = SaveAs
|
||||
};
|
||||
|
||||
explicit ReadOnlyFilesDialog(const Utils::FilePathList &filePaths,
|
||||
explicit ReadOnlyFilesDialog(const Utils::FilePaths &filePaths,
|
||||
QWidget *parent = nullptr);
|
||||
explicit ReadOnlyFilesDialog(const Utils::FilePath &filePath,
|
||||
QWidget * parent = nullptr);
|
||||
|
@@ -50,7 +50,7 @@ public:
|
||||
}
|
||||
|
||||
QSharedPointer<BaseFileFilter::Iterator> iterator;
|
||||
FilePathList previousResultPaths;
|
||||
FilePaths previousResultPaths;
|
||||
bool forceNewSearchList;
|
||||
QString previousEntry;
|
||||
};
|
||||
@@ -220,7 +220,7 @@ void BaseFileFilter::updatePreviousResultData()
|
||||
// forceNewSearchList was already reset in prepareSearch
|
||||
}
|
||||
|
||||
BaseFileFilter::ListIterator::ListIterator(const FilePathList &filePaths)
|
||||
BaseFileFilter::ListIterator::ListIterator(const FilePaths &filePaths)
|
||||
{
|
||||
m_filePaths = filePaths;
|
||||
toFront();
|
||||
|
@@ -51,7 +51,7 @@ public:
|
||||
|
||||
class CORE_EXPORT ListIterator : public Iterator {
|
||||
public:
|
||||
ListIterator(const Utils::FilePathList &filePaths);
|
||||
ListIterator(const Utils::FilePaths &filePaths);
|
||||
|
||||
void toFront() override;
|
||||
bool hasNext() const override;
|
||||
@@ -59,8 +59,8 @@ public:
|
||||
Utils::FilePath filePath() const override;
|
||||
|
||||
private:
|
||||
Utils::FilePathList m_filePaths;
|
||||
Utils::FilePathList::const_iterator m_pathPosition;
|
||||
Utils::FilePaths m_filePaths;
|
||||
Utils::FilePaths::const_iterator m_pathPosition;
|
||||
};
|
||||
|
||||
BaseFileFilter();
|
||||
|
@@ -233,7 +233,7 @@ void DirectoryFilter::refresh(QFutureInterface<void> &future)
|
||||
}
|
||||
Utils::SubDirFileIterator subDirIterator(directories, m_filters, m_exclusionFilters);
|
||||
future.setProgressRange(0, subDirIterator.maxProgress());
|
||||
Utils::FilePathList filesFound;
|
||||
Utils::FilePaths filesFound;
|
||||
auto end = subDirIterator.end();
|
||||
for (auto it = subDirIterator.begin(); it != end; ++it) {
|
||||
if (future.isCanceled())
|
||||
|
@@ -77,7 +77,7 @@ private:
|
||||
QDialog *m_dialog = nullptr;
|
||||
Internal::Ui::DirectoryFilterOptions *m_ui = nullptr;
|
||||
mutable QMutex m_lock;
|
||||
Utils::FilePathList m_files;
|
||||
Utils::FilePaths m_files;
|
||||
bool m_isCustomFilter = true;
|
||||
};
|
||||
|
||||
|
@@ -45,7 +45,7 @@ QTC_DECLARE_MYTESTDATADIR("../../../../tests/locators/")
|
||||
class MyBaseFileFilter : public Core::BaseFileFilter
|
||||
{
|
||||
public:
|
||||
MyBaseFileFilter(const Utils::FilePathList &theFiles)
|
||||
MyBaseFileFilter(const Utils::FilePaths &theFiles)
|
||||
{
|
||||
setFileIterator(new BaseFileFilter::ListIterator(theFiles));
|
||||
}
|
||||
|
@@ -176,7 +176,7 @@ void SpotlightLocatorFilter::prepareSearch(const QString &entry)
|
||||
{
|
||||
const EditorManager::FilePathInfo fp = EditorManager::splitLineAndColumnNumber(entry);
|
||||
if (fp.filePath.isEmpty()) {
|
||||
setFileIterator(new BaseFileFilter::ListIterator(Utils::FilePathList()));
|
||||
setFileIterator(new BaseFileFilter::ListIterator(Utils::FilePaths()));
|
||||
} else {
|
||||
// only pass the file name part to spotlight to allow searches like "somepath/*foo"
|
||||
int lastSlash = fp.filePath.lastIndexOf(QLatin1Char('/'));
|
||||
|
@@ -93,7 +93,7 @@ CppcheckOptions ManualRunDialog::options() const
|
||||
return result;
|
||||
}
|
||||
|
||||
Utils::FilePathList ManualRunDialog::filePaths() const
|
||||
Utils::FilePaths ManualRunDialog::filePaths() const
|
||||
{
|
||||
return m_model->selectedFiles();
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
namespace Utils {
|
||||
class FilePath;
|
||||
using FilePathList = QList<FilePath>;
|
||||
using FilePaths = QList<FilePath>;
|
||||
} // namespace Utils
|
||||
|
||||
namespace ProjectExplorer {
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
const ProjectExplorer::Project *project);
|
||||
|
||||
CppcheckOptions options() const;
|
||||
Utils::FilePathList filePaths() const;
|
||||
Utils::FilePaths filePaths() const;
|
||||
QSize sizeHint() const override;
|
||||
|
||||
private:
|
||||
|
@@ -77,10 +77,10 @@ void CppcheckRunner::reconfigure(const QString &binary, const QString &arguments
|
||||
m_arguments = arguments;
|
||||
}
|
||||
|
||||
void CppcheckRunner::addToQueue(const Utils::FilePathList &files,
|
||||
void CppcheckRunner::addToQueue(const Utils::FilePaths &files,
|
||||
const QString &additionalArguments)
|
||||
{
|
||||
Utils::FilePathList &existing = m_queue[additionalArguments];
|
||||
Utils::FilePaths &existing = m_queue[additionalArguments];
|
||||
if (existing.isEmpty()) {
|
||||
existing = files;
|
||||
} else {
|
||||
@@ -96,7 +96,7 @@ void CppcheckRunner::addToQueue(const Utils::FilePathList &files,
|
||||
m_queueTimer.start();
|
||||
}
|
||||
|
||||
void CppcheckRunner::stop(const Utils::FilePathList &files)
|
||||
void CppcheckRunner::stop(const Utils::FilePaths &files)
|
||||
{
|
||||
if (!m_isRunning)
|
||||
return;
|
||||
@@ -105,7 +105,7 @@ void CppcheckRunner::stop(const Utils::FilePathList &files)
|
||||
m_process->kill();
|
||||
}
|
||||
|
||||
void CppcheckRunner::removeFromQueue(const Utils::FilePathList &files)
|
||||
void CppcheckRunner::removeFromQueue(const Utils::FilePaths &files)
|
||||
{
|
||||
if (m_queue.isEmpty())
|
||||
return;
|
||||
@@ -121,7 +121,7 @@ void CppcheckRunner::removeFromQueue(const Utils::FilePathList &files)
|
||||
}
|
||||
}
|
||||
|
||||
const Utils::FilePathList &CppcheckRunner::currentFiles() const
|
||||
const Utils::FilePaths &CppcheckRunner::currentFiles() const
|
||||
{
|
||||
return m_currentFiles;
|
||||
}
|
||||
@@ -137,7 +137,7 @@ void CppcheckRunner::checkQueued()
|
||||
if (m_queue.isEmpty() || m_binary.isEmpty())
|
||||
return;
|
||||
|
||||
Utils::FilePathList files = m_queue.begin().value();
|
||||
Utils::FilePaths files = m_queue.begin().value();
|
||||
QString arguments = m_arguments + ' ' + m_queue.begin().key();
|
||||
m_currentFiles.clear();
|
||||
int argumentsLength = arguments.length();
|
||||
|
@@ -31,7 +31,7 @@
|
||||
namespace Utils {
|
||||
class QtcProcess;
|
||||
class FilePath;
|
||||
using FilePathList = QList<FilePath>;
|
||||
using FilePaths = QList<FilePath>;
|
||||
}
|
||||
|
||||
namespace Cppcheck {
|
||||
@@ -48,12 +48,12 @@ public:
|
||||
~CppcheckRunner() override;
|
||||
|
||||
void reconfigure(const QString &binary, const QString &arguments);
|
||||
void addToQueue(const Utils::FilePathList &files,
|
||||
void addToQueue(const Utils::FilePaths &files,
|
||||
const QString &additionalArguments = {});
|
||||
void removeFromQueue(const Utils::FilePathList &files);
|
||||
void stop(const Utils::FilePathList &files = {});
|
||||
void removeFromQueue(const Utils::FilePaths &files);
|
||||
void stop(const Utils::FilePaths &files = {});
|
||||
|
||||
const Utils::FilePathList ¤tFiles() const;
|
||||
const Utils::FilePaths ¤tFiles() const;
|
||||
QString currentCommand() const;
|
||||
|
||||
private:
|
||||
@@ -67,8 +67,8 @@ private:
|
||||
Utils::QtcProcess *m_process = nullptr;
|
||||
QString m_binary;
|
||||
QString m_arguments;
|
||||
QHash<QString, Utils::FilePathList> m_queue;
|
||||
Utils::FilePathList m_currentFiles;
|
||||
QHash<QString, Utils::FilePaths> m_queue;
|
||||
Utils::FilePaths m_currentFiles;
|
||||
QTimer m_queueTimer;
|
||||
int m_maxArgumentsLength = 32767;
|
||||
bool m_isRunning = false;
|
||||
|
@@ -45,7 +45,7 @@ void CppcheckTextMarkManager::add(const Diagnostic &diagnostic)
|
||||
fileMarks.push_back(std::make_unique<CppcheckTextMark>(diagnostic));
|
||||
}
|
||||
|
||||
void CppcheckTextMarkManager::clearFiles(const Utils::FilePathList &files)
|
||||
void CppcheckTextMarkManager::clearFiles(const Utils::FilePaths &files)
|
||||
{
|
||||
if (m_marks.empty())
|
||||
return;
|
||||
|
@@ -44,7 +44,7 @@ public:
|
||||
~CppcheckTextMarkManager() override;
|
||||
|
||||
void add(const Diagnostic &diagnostic) override;
|
||||
void clearFiles(const Utils::FilePathList &files);
|
||||
void clearFiles(const Utils::FilePaths &files);
|
||||
|
||||
private:
|
||||
using MarkPtr = std::unique_ptr<CppcheckTextMark>;
|
||||
|
@@ -181,11 +181,11 @@ const CppcheckOptions &CppcheckTool::options() const
|
||||
return m_options;
|
||||
}
|
||||
|
||||
void CppcheckTool::check(const Utils::FilePathList &files)
|
||||
void CppcheckTool::check(const Utils::FilePaths &files)
|
||||
{
|
||||
QTC_ASSERT(m_project, return);
|
||||
|
||||
Utils::FilePathList filtered;
|
||||
Utils::FilePaths filtered;
|
||||
if (m_filters.isEmpty()) {
|
||||
filtered = files;
|
||||
} else {
|
||||
@@ -208,7 +208,7 @@ void CppcheckTool::check(const Utils::FilePathList &files)
|
||||
return;
|
||||
}
|
||||
|
||||
std::map<CppTools::ProjectPart::Ptr, Utils::FilePathList> groups;
|
||||
std::map<CppTools::ProjectPart::Ptr, Utils::FilePaths> groups;
|
||||
for (const Utils::FilePath &file : qAsConst(filtered)) {
|
||||
const QString stringed = file.toString();
|
||||
for (const CppTools::ProjectPart::Ptr &part : parts) {
|
||||
@@ -224,7 +224,7 @@ void CppcheckTool::check(const Utils::FilePathList &files)
|
||||
addToQueue(group.second, *group.first);
|
||||
}
|
||||
|
||||
void CppcheckTool::addToQueue(const Utils::FilePathList &files, CppTools::ProjectPart &part)
|
||||
void CppcheckTool::addToQueue(const Utils::FilePaths &files, CppTools::ProjectPart &part)
|
||||
{
|
||||
const QString key = part.id();
|
||||
if (!m_cachedAdditionalArguments.contains(key))
|
||||
@@ -232,7 +232,7 @@ void CppcheckTool::addToQueue(const Utils::FilePathList &files, CppTools::Projec
|
||||
m_runner->addToQueue(files, m_cachedAdditionalArguments[key]);
|
||||
}
|
||||
|
||||
void CppcheckTool::stop(const Utils::FilePathList &files)
|
||||
void CppcheckTool::stop(const Utils::FilePaths &files)
|
||||
{
|
||||
m_runner->removeFromQueue(files);
|
||||
m_runner->stop(files);
|
||||
|
@@ -35,7 +35,7 @@
|
||||
|
||||
namespace Utils {
|
||||
class FilePath;
|
||||
using FilePathList = QList<FilePath>;
|
||||
using FilePaths = QList<FilePath>;
|
||||
}
|
||||
|
||||
namespace CppTools {
|
||||
@@ -63,8 +63,8 @@ public:
|
||||
|
||||
void updateOptions(const CppcheckOptions &options);
|
||||
void setProject(ProjectExplorer::Project *project);
|
||||
void check(const Utils::FilePathList &files);
|
||||
void stop(const Utils::FilePathList &files);
|
||||
void check(const Utils::FilePaths &files);
|
||||
void stop(const Utils::FilePaths &files);
|
||||
|
||||
void startParsing();
|
||||
void parseOutputLine(const QString &line);
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
|
||||
private:
|
||||
void updateArguments();
|
||||
void addToQueue(const Utils::FilePathList &files, CppTools::ProjectPart &part);
|
||||
void addToQueue(const Utils::FilePaths &files, CppTools::ProjectPart &part);
|
||||
QStringList additionalArguments(const CppTools::ProjectPart &part) const;
|
||||
|
||||
CppcheckDiagnosticManager &m_manager;
|
||||
|
@@ -83,7 +83,7 @@ void CppcheckTrigger::checkEditors(const QList<Core::IEditor *> &editors)
|
||||
const QList<Core::IEditor *> editorList = !editors.isEmpty()
|
||||
? editors : Core::DocumentModel::editorsForOpenedDocuments();
|
||||
|
||||
Utils::FilePathList toCheck;
|
||||
Utils::FilePaths toCheck;
|
||||
for (const Core::IEditor *editor : editorList) {
|
||||
QTC_ASSERT(editor, continue);
|
||||
Core::IDocument *document = editor->document();
|
||||
@@ -128,7 +128,7 @@ void CppcheckTrigger::removeEditors(const QList<Core::IEditor *> &editors)
|
||||
const QList<Core::IEditor *> editorList = !editors.isEmpty()
|
||||
? editors : Core::DocumentModel::editorsForOpenedDocuments();
|
||||
|
||||
Utils::FilePathList toRemove;
|
||||
Utils::FilePaths toRemove;
|
||||
for (const Core::IEditor *editor : editorList) {
|
||||
QTC_ASSERT(editor, return);
|
||||
const Core::IDocument *document = editor->document();
|
||||
@@ -185,12 +185,12 @@ void CppcheckTrigger::updateProjectFiles(ProjectExplorer::Project *project)
|
||||
checkEditors(Core::DocumentModel::editorsForOpenedDocuments());
|
||||
}
|
||||
|
||||
void CppcheckTrigger::check(const Utils::FilePathList &files)
|
||||
void CppcheckTrigger::check(const Utils::FilePaths &files)
|
||||
{
|
||||
m_tool.check(files);
|
||||
}
|
||||
|
||||
void CppcheckTrigger::remove(const Utils::FilePathList &files)
|
||||
void CppcheckTrigger::remove(const Utils::FilePaths &files)
|
||||
{
|
||||
m_marks.clearFiles(files);
|
||||
m_tool.stop(files);
|
||||
|
@@ -30,7 +30,7 @@
|
||||
|
||||
namespace Utils {
|
||||
class FilePath;
|
||||
using FilePathList = QList<FilePath>;
|
||||
using FilePaths = QList<FilePath>;
|
||||
}
|
||||
|
||||
namespace ProjectExplorer {
|
||||
@@ -64,8 +64,8 @@ private:
|
||||
void checkChangedDocument(Core::IDocument *document);
|
||||
void changeCurrentProject(ProjectExplorer::Project *project);
|
||||
void updateProjectFiles(ProjectExplorer::Project *project);
|
||||
void check(const Utils::FilePathList &files);
|
||||
void remove(const Utils::FilePathList &files);
|
||||
void check(const Utils::FilePaths &files);
|
||||
void remove(const Utils::FilePaths &files);
|
||||
|
||||
CppcheckTextMarkManager &m_marks;
|
||||
CppcheckTool &m_tool;
|
||||
|
@@ -1960,7 +1960,7 @@ void AddIncludeForUndefinedIdentifier::match(const CppQuickFixInterface &interfa
|
||||
|
||||
Snapshot localForwardHeaders = forwardHeaders;
|
||||
localForwardHeaders.insert(interface.snapshot().document(info->fileName()));
|
||||
Utils::FilePathList headerAndItsForwardingHeaders;
|
||||
Utils::FilePaths headerAndItsForwardingHeaders;
|
||||
headerAndItsForwardingHeaders << Utils::FilePath::fromString(info->fileName());
|
||||
headerAndItsForwardingHeaders += localForwardHeaders.filesDependingOn(info->fileName());
|
||||
|
||||
|
@@ -144,7 +144,7 @@ static QString findResourceInProject(const QString &resName)
|
||||
return QString();
|
||||
|
||||
if (auto *project = ProjectExplorer::ProjectTree::currentProject()) {
|
||||
const Utils::FilePathList files = project->files(
|
||||
const Utils::FilePaths files = project->files(
|
||||
[](const ProjectExplorer::Node *n) { return n->filePath().endsWith(".qrc"); });
|
||||
for (const Utils::FilePath &file : files) {
|
||||
const QFileInfo fi = file.toFileInfo();
|
||||
|
@@ -269,7 +269,7 @@ void BuiltinEditorDocumentParser::addFileAndDependencies(Snapshot *snapshot,
|
||||
|
||||
toRemove->insert(fileName);
|
||||
if (fileName != Utils::FilePath::fromString(filePath())) {
|
||||
Utils::FilePathList deps = snapshot->filesDependingOn(fileName);
|
||||
Utils::FilePaths deps = snapshot->filesDependingOn(fileName);
|
||||
toRemove->unite(Utils::toSet(deps));
|
||||
}
|
||||
}
|
||||
|
@@ -284,7 +284,7 @@ static void find_helper(QFutureInterface<CPlusPlus::Usage> &future,
|
||||
|
||||
const Utils::FilePath sourceFile = Utils::FilePath::fromUtf8(symbol->fileName(),
|
||||
symbol->fileNameLength());
|
||||
Utils::FilePathList files{sourceFile};
|
||||
Utils::FilePaths files{sourceFile};
|
||||
|
||||
if (symbol->isClass()
|
||||
|| symbol->isForwardClassDeclaration()
|
||||
@@ -689,7 +689,7 @@ static void findMacroUses_helper(QFutureInterface<CPlusPlus::Usage> &future,
|
||||
const CPlusPlus::Macro macro)
|
||||
{
|
||||
const Utils::FilePath sourceFile = Utils::FilePath::fromString(macro.fileName());
|
||||
Utils::FilePathList files{sourceFile};
|
||||
Utils::FilePaths files{sourceFile};
|
||||
files = Utils::filteredUnique(files + snapshot.filesDependingOn(sourceFile));
|
||||
|
||||
future.setProgressRange(0, files.size());
|
||||
|
@@ -150,7 +150,7 @@ void CppIncludesFilter::prepareSearch(const QString &entry)
|
||||
m_needsUpdate = false;
|
||||
QSet<QString> seedPaths;
|
||||
for (Project *project : SessionManager::projects()) {
|
||||
const Utils::FilePathList allFiles = project->files(Project::SourceFiles);
|
||||
const Utils::FilePaths allFiles = project->files(Project::SourceFiles);
|
||||
for (const Utils::FilePath &filePath : allFiles )
|
||||
seedPaths.insert(filePath.toString());
|
||||
}
|
||||
|
@@ -1137,7 +1137,7 @@ QList<ProjectPart::Ptr> CppModelManager::projectPartFromDependencies(
|
||||
const Utils::FilePath &fileName) const
|
||||
{
|
||||
QSet<ProjectPart::Ptr> parts;
|
||||
const Utils::FilePathList deps = snapshot().filesDependingOn(fileName);
|
||||
const Utils::FilePaths deps = snapshot().filesDependingOn(fileName);
|
||||
|
||||
QMutexLocker locker(&d->m_projectMutex);
|
||||
for (const Utils::FilePath &dep : deps)
|
||||
|
@@ -150,7 +150,7 @@ public:
|
||||
// Used by Android to avoid false positives on warnOnRelease
|
||||
bool skipExecutableValidation = false;
|
||||
bool useTargetAsync = false;
|
||||
Utils::FilePathList additionalSearchDirectories;
|
||||
Utils::FilePaths additionalSearchDirectories;
|
||||
|
||||
// Used by iOS.
|
||||
QString platform;
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
ProjectExplorer::Abi toolChainAbi;
|
||||
|
||||
Utils::FilePath projectSourceDirectory;
|
||||
Utils::FilePathList projectSourceFiles;
|
||||
Utils::FilePaths projectSourceFiles;
|
||||
|
||||
// Used by Script debugging
|
||||
QString interpreter;
|
||||
|
@@ -625,7 +625,7 @@ void DebuggerOptionsPage::finish()
|
||||
|
||||
void DebuggerItemManagerPrivate::autoDetectCdbDebuggers()
|
||||
{
|
||||
FilePathList cdbs;
|
||||
FilePaths cdbs;
|
||||
|
||||
const QStringList programDirs = {
|
||||
QString::fromLocal8Bit(qgetenv("ProgramFiles")),
|
||||
@@ -697,7 +697,7 @@ void DebuggerItemManagerPrivate::autoDetectCdbDebuggers()
|
||||
}
|
||||
}
|
||||
|
||||
static Utils::FilePathList searchGdbPathsFromRegistry()
|
||||
static Utils::FilePaths searchGdbPathsFromRegistry()
|
||||
{
|
||||
if (!HostOsInfo::isWindowsHost())
|
||||
return {};
|
||||
@@ -706,7 +706,7 @@ static Utils::FilePathList searchGdbPathsFromRegistry()
|
||||
static const char kRegistryToken[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\" \
|
||||
"Windows\\CurrentVersion\\Uninstall\\";
|
||||
|
||||
Utils::FilePathList searchPaths;
|
||||
Utils::FilePaths searchPaths;
|
||||
|
||||
QSettings registry(kRegistryToken, QSettings::NativeFormat);
|
||||
const auto productGroups = registry.childGroups();
|
||||
@@ -755,7 +755,7 @@ void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers()
|
||||
}
|
||||
*/
|
||||
|
||||
FilePathList suspects;
|
||||
FilePaths suspects;
|
||||
|
||||
if (HostOsInfo::isMacHost()) {
|
||||
SynchronousProcess lldbInfo;
|
||||
@@ -771,7 +771,7 @@ void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers()
|
||||
}
|
||||
}
|
||||
|
||||
FilePathList path = Utils::filteredUnique(
|
||||
FilePaths path = Utils::filteredUnique(
|
||||
Environment::systemEnvironment().path() + searchGdbPathsFromRegistry());
|
||||
|
||||
QDir dir;
|
||||
|
@@ -60,7 +60,7 @@ FilesSelectionWizardPage::FilesSelectionWizardPage(GenericProjectWizardDialog *g
|
||||
void FilesSelectionWizardPage::initializePage()
|
||||
{
|
||||
m_filesWidget->resetModel(Utils::FilePath::fromString(m_genericProjectWizardDialog->path()),
|
||||
Utils::FilePathList());
|
||||
Utils::FilePaths());
|
||||
}
|
||||
|
||||
void FilesSelectionWizardPage::cleanupPage()
|
||||
@@ -73,12 +73,12 @@ bool FilesSelectionWizardPage::isComplete() const
|
||||
return m_filesWidget->hasFilesSelected();
|
||||
}
|
||||
|
||||
Utils::FilePathList FilesSelectionWizardPage::selectedPaths() const
|
||||
Utils::FilePaths FilesSelectionWizardPage::selectedPaths() const
|
||||
{
|
||||
return m_filesWidget->selectedPaths();
|
||||
}
|
||||
|
||||
Utils::FilePathList FilesSelectionWizardPage::selectedFiles() const
|
||||
Utils::FilePaths FilesSelectionWizardPage::selectedFiles() const
|
||||
{
|
||||
return m_filesWidget->selectedFiles();
|
||||
}
|
||||
|
@@ -45,8 +45,8 @@ public:
|
||||
bool isComplete() const override;
|
||||
void initializePage() override;
|
||||
void cleanupPage() override;
|
||||
Utils::FilePathList selectedFiles() const;
|
||||
Utils::FilePathList selectedPaths() const;
|
||||
Utils::FilePaths selectedFiles() const;
|
||||
Utils::FilePaths selectedPaths() const;
|
||||
|
||||
private:
|
||||
GenericProjectWizardDialog *m_genericProjectWizardDialog;
|
||||
|
@@ -83,12 +83,12 @@ QString GenericProjectWizardDialog::path() const
|
||||
return m_firstPage->path();
|
||||
}
|
||||
|
||||
Utils::FilePathList GenericProjectWizardDialog::selectedPaths() const
|
||||
Utils::FilePaths GenericProjectWizardDialog::selectedPaths() const
|
||||
{
|
||||
return m_secondPage->selectedPaths();
|
||||
}
|
||||
|
||||
Utils::FilePathList GenericProjectWizardDialog::selectedFiles() const
|
||||
Utils::FilePaths GenericProjectWizardDialog::selectedFiles() const
|
||||
{
|
||||
return m_secondPage->selectedFiles();
|
||||
}
|
||||
|
@@ -46,8 +46,8 @@ public:
|
||||
|
||||
QString path() const;
|
||||
void setPath(const QString &path);
|
||||
Utils::FilePathList selectedFiles() const;
|
||||
Utils::FilePathList selectedPaths() const;
|
||||
Utils::FilePaths selectedFiles() const;
|
||||
Utils::FilePaths selectedPaths() const;
|
||||
|
||||
QString projectName() const;
|
||||
|
||||
|
@@ -395,7 +395,7 @@ void ModelIndexer::scanProject(ProjectExplorer::Project *project)
|
||||
return;
|
||||
|
||||
// TODO harmonize following code with findFirstModel()?
|
||||
const Utils::FilePathList files = project->files(ProjectExplorer::Project::SourceFiles);
|
||||
const Utils::FilePaths files = project->files(ProjectExplorer::Project::SourceFiles);
|
||||
QQueue<QueuedFile> filesQueue;
|
||||
QSet<QueuedFile> filesSet;
|
||||
|
||||
@@ -477,7 +477,7 @@ QString ModelIndexer::findFirstModel(ProjectExplorer::FolderNode *folderNode)
|
||||
|
||||
void ModelIndexer::forgetProject(ProjectExplorer::Project *project)
|
||||
{
|
||||
const Utils::FilePathList files = project->files(ProjectExplorer::Project::SourceFiles);
|
||||
const Utils::FilePaths files = project->files(ProjectExplorer::Project::SourceFiles);
|
||||
|
||||
QMutexLocker locker(&d->indexerMutex);
|
||||
for (const Utils::FilePath &file : files) {
|
||||
|
@@ -97,7 +97,7 @@ NimBuildConfiguration::NimBuildConfiguration(Target *target, Core::Id id)
|
||||
}
|
||||
nimCompilerBuildStep->setDefaultCompilerOptions(defaultOption);
|
||||
|
||||
const Utils::FilePathList nimFiles = project()->files([](const Node *n) {
|
||||
const Utils::FilePaths nimFiles = project()->files([](const Node *n) {
|
||||
return Project::AllFiles(n) && n->path().endsWith(".nim");
|
||||
});
|
||||
|
||||
|
@@ -271,7 +271,7 @@ void NimCompilerBuildStep::updateTargetNimFile()
|
||||
{
|
||||
if (!m_targetNimFile.isEmpty())
|
||||
return;
|
||||
const Utils::FilePathList nimFiles = project()->files([](const Node *n) {
|
||||
const Utils::FilePaths nimFiles = project()->files([](const Node *n) {
|
||||
return Project::AllFiles(n) && n->path().endsWith(".nim");
|
||||
});
|
||||
if (!nimFiles.isEmpty())
|
||||
|
@@ -119,7 +119,7 @@ void NimCompilerBuildStepConfigWidget::updateTargetComboBox()
|
||||
// Re enter the files
|
||||
m_ui->targetComboBox->clear();
|
||||
|
||||
const FilePathList nimFiles = m_buildStep->project()->files([](const Node *n) {
|
||||
const FilePaths nimFiles = m_buildStep->project()->files([](const Node *n) {
|
||||
return Project::AllFiles(n) && n->path().endsWith(".nim");
|
||||
});
|
||||
|
||||
|
@@ -550,12 +550,12 @@ void PerfProfilerTool::gotoSourceLocation(QString filePath, int lineNumber, int
|
||||
|
||||
}
|
||||
|
||||
static Utils::FilePathList collectQtIncludePaths(const ProjectExplorer::Kit *kit)
|
||||
static Utils::FilePaths collectQtIncludePaths(const ProjectExplorer::Kit *kit)
|
||||
{
|
||||
QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(kit);
|
||||
if (qt == nullptr)
|
||||
return Utils::FilePathList();
|
||||
Utils::FilePathList paths{qt->headerPath()};
|
||||
return Utils::FilePaths();
|
||||
Utils::FilePaths paths{qt->headerPath()};
|
||||
QDirIterator dit(paths.first().toString(), QStringList(), QDir::Dirs | QDir::NoDotAndDotDot,
|
||||
QDirIterator::Subdirectories);
|
||||
while (dit.hasNext()) {
|
||||
@@ -570,9 +570,9 @@ static Utils::FilePath sysroot(const Kit *kit)
|
||||
return SysRootKitAspect::sysRoot(kit);
|
||||
}
|
||||
|
||||
static Utils::FilePathList sourceFiles(const Project *currentProject = nullptr)
|
||||
static Utils::FilePaths sourceFiles(const Project *currentProject = nullptr)
|
||||
{
|
||||
Utils::FilePathList sourceFiles;
|
||||
Utils::FilePaths sourceFiles;
|
||||
|
||||
// Have the current project first.
|
||||
if (currentProject)
|
||||
|
@@ -446,7 +446,7 @@ void AbstractProcessStep::taskAdded(const Task &task, int linkedOutputLines, int
|
||||
while (filePath.startsWith("../"))
|
||||
filePath.remove(0, 3);
|
||||
bool found = false;
|
||||
const Utils::FilePathList candidates
|
||||
const Utils::FilePaths candidates
|
||||
= d->m_fileFinder.findFile(QUrl::fromLocalFile(filePath), &found);
|
||||
if (found && candidates.size() == 1)
|
||||
editable.file = candidates.first();
|
||||
|
@@ -57,7 +57,7 @@ void AllProjectsFilter::prepareSearch(const QString &entry)
|
||||
{
|
||||
Q_UNUSED(entry)
|
||||
if (!fileIterator()) {
|
||||
Utils::FilePathList paths;
|
||||
Utils::FilePaths paths;
|
||||
for (Project *project : SessionManager::projects())
|
||||
paths.append(project->files(Project::SourceFiles));
|
||||
Utils::sort(paths);
|
||||
|
@@ -56,7 +56,7 @@ void CurrentProjectFilter::prepareSearch(const QString &entry)
|
||||
{
|
||||
Q_UNUSED(entry)
|
||||
if (!fileIterator()) {
|
||||
Utils::FilePathList paths;
|
||||
Utils::FilePaths paths;
|
||||
if (m_project)
|
||||
paths = m_project->files(Project::SourceFiles);
|
||||
setFileIterator(new BaseFileFilter::ListIterator(paths));
|
||||
|
@@ -71,7 +71,7 @@ public:
|
||||
};
|
||||
|
||||
ExtraCompiler::ExtraCompiler(const Project *project, const Utils::FilePath &source,
|
||||
const Utils::FilePathList &targets, QObject *parent) :
|
||||
const Utils::FilePaths &targets, QObject *parent) :
|
||||
QObject(parent), d(std::make_unique<ExtraCompilerPrivate>())
|
||||
{
|
||||
d->project = project;
|
||||
@@ -146,7 +146,7 @@ QByteArray ExtraCompiler::content(const Utils::FilePath &file) const
|
||||
return d->contents.value(file);
|
||||
}
|
||||
|
||||
Utils::FilePathList ExtraCompiler::targets() const
|
||||
Utils::FilePaths ExtraCompiler::targets() const
|
||||
{
|
||||
return d->contents.keys();
|
||||
}
|
||||
@@ -323,7 +323,7 @@ ExtraCompilerFactory::~ExtraCompilerFactory()
|
||||
|
||||
void ExtraCompilerFactory::annouceCreation(const Project *project,
|
||||
const Utils::FilePath &source,
|
||||
const Utils::FilePathList &targets)
|
||||
const Utils::FilePaths &targets)
|
||||
{
|
||||
for (ExtraCompilerFactoryObserver *observer : *observers)
|
||||
observer->newExtraCompiler(project, source, targets);
|
||||
@@ -335,7 +335,7 @@ QList<ExtraCompilerFactory *> ExtraCompilerFactory::extraCompilerFactories()
|
||||
}
|
||||
|
||||
ProcessExtraCompiler::ProcessExtraCompiler(const Project *project, const Utils::FilePath &source,
|
||||
const Utils::FilePathList &targets, QObject *parent) :
|
||||
const Utils::FilePaths &targets, QObject *parent) :
|
||||
ExtraCompiler(project, source, targets, parent)
|
||||
{ }
|
||||
|
||||
|
@@ -55,7 +55,7 @@ class PROJECTEXPLORER_EXPORT ExtraCompiler : public QObject
|
||||
public:
|
||||
|
||||
ExtraCompiler(const Project *project, const Utils::FilePath &source,
|
||||
const Utils::FilePathList &targets, QObject *parent = nullptr);
|
||||
const Utils::FilePaths &targets, QObject *parent = nullptr);
|
||||
~ExtraCompiler() override;
|
||||
|
||||
const Project *project() const;
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
void setContent(const Utils::FilePath &file, const QByteArray &content);
|
||||
QByteArray content(const Utils::FilePath &file) const;
|
||||
|
||||
Utils::FilePathList targets() const;
|
||||
Utils::FilePaths targets() const;
|
||||
void forEachTarget(std::function<void(const Utils::FilePath &)> func);
|
||||
|
||||
void setCompileTime(const QDateTime &time);
|
||||
@@ -99,7 +99,7 @@ class PROJECTEXPLORER_EXPORT ProcessExtraCompiler : public ExtraCompiler
|
||||
public:
|
||||
|
||||
ProcessExtraCompiler(const Project *project, const Utils::FilePath &source,
|
||||
const Utils::FilePathList &targets, QObject *parent = nullptr);
|
||||
const Utils::FilePaths &targets, QObject *parent = nullptr);
|
||||
~ProcessExtraCompiler() override;
|
||||
|
||||
protected:
|
||||
@@ -147,7 +147,7 @@ protected:
|
||||
|
||||
virtual void newExtraCompiler(const Project *project,
|
||||
const Utils::FilePath &source,
|
||||
const Utils::FilePathList &targets)
|
||||
const Utils::FilePaths &targets)
|
||||
= 0;
|
||||
};
|
||||
|
||||
@@ -163,12 +163,12 @@ public:
|
||||
|
||||
virtual ExtraCompiler *create(const Project *project,
|
||||
const Utils::FilePath &source,
|
||||
const Utils::FilePathList &targets)
|
||||
const Utils::FilePaths &targets)
|
||||
= 0;
|
||||
|
||||
void annouceCreation(const Project *project,
|
||||
const Utils::FilePath &source,
|
||||
const Utils::FilePathList &targets);
|
||||
const Utils::FilePaths &targets);
|
||||
|
||||
static QList<ExtraCompilerFactory *> extraCompilerFactories();
|
||||
};
|
||||
|
@@ -42,7 +42,7 @@ class FileInSessionFinder : public QObject
|
||||
public:
|
||||
FileInSessionFinder();
|
||||
|
||||
FilePathList doFindFile(const FilePath &filePath);
|
||||
FilePaths doFindFile(const FilePath &filePath);
|
||||
void invalidateFinder() { m_finderIsUpToDate = false; }
|
||||
|
||||
private:
|
||||
@@ -64,13 +64,13 @@ FileInSessionFinder::FileInSessionFinder()
|
||||
});
|
||||
}
|
||||
|
||||
FilePathList FileInSessionFinder::doFindFile(const FilePath &filePath)
|
||||
FilePaths FileInSessionFinder::doFindFile(const FilePath &filePath)
|
||||
{
|
||||
if (!m_finderIsUpToDate) {
|
||||
m_finder.setProjectDirectory(SessionManager::startupProject()
|
||||
? SessionManager::startupProject()->projectDirectory()
|
||||
: FilePath());
|
||||
FilePathList allFiles;
|
||||
FilePaths allFiles;
|
||||
for (const Project * const p : SessionManager::projects())
|
||||
allFiles << p->files(Project::SourceFiles);
|
||||
m_finder.setProjectFiles(allFiles);
|
||||
@@ -81,7 +81,7 @@ FilePathList FileInSessionFinder::doFindFile(const FilePath &filePath)
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
FilePathList findFileInSession(const FilePath &filePath)
|
||||
FilePaths findFileInSession(const FilePath &filePath)
|
||||
{
|
||||
static Internal::FileInSessionFinder finder;
|
||||
return finder.doFindFile(filePath);
|
||||
|
@@ -32,6 +32,6 @@
|
||||
namespace ProjectExplorer {
|
||||
|
||||
// Possibly used by "QtCreatorTerminalPlugin"
|
||||
PROJECTEXPLORER_EXPORT Utils::FilePathList findFileInSession(const Utils::FilePath &filePath);
|
||||
PROJECTEXPLORER_EXPORT Utils::FilePaths findFileInSession(const Utils::FilePath &filePath);
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
@@ -387,7 +387,7 @@ static Utils::FilePath findLocalCompiler(const Utils::FilePath &compilerPath,
|
||||
return compilerPath;
|
||||
|
||||
// Filter out network compilers
|
||||
const FilePathList pathComponents = Utils::filtered(env.path(), [] (const FilePath &dirPath) {
|
||||
const FilePaths pathComponents = Utils::filtered(env.path(), [] (const FilePath &dirPath) {
|
||||
return !isNetworkCompiler(dirPath.toString());
|
||||
});
|
||||
|
||||
@@ -905,7 +905,7 @@ Utils::FilePath GccToolChain::detectInstallDir() const
|
||||
// GccToolChainFactory
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
static Utils::FilePathList gnuSearchPathsFromRegistry()
|
||||
static Utils::FilePaths gnuSearchPathsFromRegistry()
|
||||
{
|
||||
if (!HostOsInfo::isWindowsHost())
|
||||
return {};
|
||||
@@ -914,7 +914,7 @@ static Utils::FilePathList gnuSearchPathsFromRegistry()
|
||||
static const char kRegistryToken[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\" \
|
||||
"Windows\\CurrentVersion\\Uninstall\\";
|
||||
|
||||
Utils::FilePathList searchPaths;
|
||||
Utils::FilePaths searchPaths;
|
||||
|
||||
QSettings registry(kRegistryToken, QSettings::NativeFormat);
|
||||
const auto productGroups = registry.childGroups();
|
||||
@@ -937,7 +937,7 @@ static Utils::FilePathList gnuSearchPathsFromRegistry()
|
||||
return searchPaths;
|
||||
}
|
||||
|
||||
static Utils::FilePathList atmelSearchPathsFromRegistry()
|
||||
static Utils::FilePaths atmelSearchPathsFromRegistry()
|
||||
{
|
||||
if (!HostOsInfo::isWindowsHost())
|
||||
return {};
|
||||
@@ -946,7 +946,7 @@ static Utils::FilePathList atmelSearchPathsFromRegistry()
|
||||
// "Atmel Studio" IDE.
|
||||
static const char kRegistryToken[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Atmel\\";
|
||||
|
||||
Utils::FilePathList searchPaths;
|
||||
Utils::FilePaths searchPaths;
|
||||
QSettings registry(kRegistryToken, QSettings::NativeFormat);
|
||||
|
||||
// This code enumerate the installed toolchains provided
|
||||
@@ -1015,7 +1015,7 @@ static Utils::FilePathList atmelSearchPathsFromRegistry()
|
||||
return searchPaths;
|
||||
}
|
||||
|
||||
static Utils::FilePathList renesasRl78SearchPathsFromRegistry()
|
||||
static Utils::FilePaths renesasRl78SearchPathsFromRegistry()
|
||||
{
|
||||
if (!HostOsInfo::isWindowsHost())
|
||||
return {};
|
||||
@@ -1024,7 +1024,7 @@ static Utils::FilePathList renesasRl78SearchPathsFromRegistry()
|
||||
static const char kRegistryToken[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\" \
|
||||
"Windows\\CurrentVersion\\Uninstall";
|
||||
|
||||
Utils::FilePathList searchPaths;
|
||||
Utils::FilePaths searchPaths;
|
||||
|
||||
QSettings registry(QLatin1String(kRegistryToken), QSettings::NativeFormat);
|
||||
const auto productGroups = registry.childGroups();
|
||||
@@ -1093,13 +1093,13 @@ QList<ToolChain *> GccToolChainFactory::autoDetectToolchains(
|
||||
const Core::Id requiredTypeId, const QList<ToolChain *> &alreadyKnown,
|
||||
const ToolchainChecker &checker)
|
||||
{
|
||||
FilePathList compilerPaths;
|
||||
FilePaths compilerPaths;
|
||||
QFileInfo fi(compilerName);
|
||||
if (fi.isAbsolute()) {
|
||||
if (fi.isFile())
|
||||
compilerPaths << FilePath::fromString(compilerName);
|
||||
} else {
|
||||
FilePathList searchPaths = Environment::systemEnvironment().path();
|
||||
FilePaths searchPaths = Environment::systemEnvironment().path();
|
||||
searchPaths << gnuSearchPathsFromRegistry();
|
||||
searchPaths << atmelSearchPathsFromRegistry();
|
||||
searchPaths << renesasRl78SearchPathsFromRegistry();
|
||||
|
@@ -334,9 +334,9 @@ static QStringList environmentTemplatesPaths()
|
||||
return paths;
|
||||
}
|
||||
|
||||
Utils::FilePathList &JsonWizardFactory::searchPaths()
|
||||
Utils::FilePaths &JsonWizardFactory::searchPaths()
|
||||
{
|
||||
static Utils::FilePathList m_searchPaths = Utils::FilePathList()
|
||||
static Utils::FilePaths m_searchPaths = Utils::FilePaths()
|
||||
<< Utils::FilePath::fromString(Core::ICore::userResourcePath() + QLatin1Char('/') +
|
||||
QLatin1String(WIZARD_PATH))
|
||||
<< Utils::FilePath::fromString(Core::ICore::resourcePath() + QLatin1Char('/') +
|
||||
|
@@ -96,7 +96,7 @@ private:
|
||||
static QList<IWizardFactory *> createWizardFactories();
|
||||
static JsonWizardFactory *createWizardFactory(const QVariantMap &data, const QDir &baseDir,
|
||||
QString *errorMessage);
|
||||
static Utils::FilePathList &searchPaths();
|
||||
static Utils::FilePaths &searchPaths();
|
||||
|
||||
static void setVerbose(int level);
|
||||
static int verbose();
|
||||
|
@@ -591,11 +591,11 @@ Project::RestoreResult Project::restoreSettings(QString *errorMessage)
|
||||
/*!
|
||||
* Returns a sorted list of all files matching the predicate \a filter.
|
||||
*/
|
||||
Utils::FilePathList Project::files(const Project::NodeMatcher &filter) const
|
||||
Utils::FilePaths Project::files(const Project::NodeMatcher &filter) const
|
||||
{
|
||||
QTC_ASSERT(filter, return {});
|
||||
|
||||
Utils::FilePathList result;
|
||||
Utils::FilePaths result;
|
||||
if (d->m_sortedNodeList.empty() && filter(containerNode()))
|
||||
result.append(projectFilePath());
|
||||
|
||||
@@ -1177,14 +1177,14 @@ void ProjectExplorerPlugin::testProject_projectTree()
|
||||
QCOMPARE(project.isKnownFile(TEST_PROJECT_CPP_FILE), true);
|
||||
QCOMPARE(project.isKnownFile(TEST_PROJECT_GENERATED_FILE), true);
|
||||
|
||||
Utils::FilePathList allFiles = project.files(Project::AllFiles);
|
||||
Utils::FilePaths 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::FilePathList sourceFiles = project.files(Project::SourceFiles);
|
||||
Utils::FilePaths sourceFiles = project.files(Project::SourceFiles);
|
||||
QCOMPARE(sourceFiles.count(), 2);
|
||||
QVERIFY(sourceFiles.contains(TEST_PROJECT_PATH));
|
||||
QVERIFY(sourceFiles.contains(TEST_PROJECT_CPP_FILE));
|
||||
|
@@ -124,7 +124,7 @@ public:
|
||||
static const NodeMatcher SourceFiles;
|
||||
static const NodeMatcher GeneratedFiles;
|
||||
|
||||
Utils::FilePathList files(const NodeMatcher &matcher) const;
|
||||
Utils::FilePaths files(const NodeMatcher &matcher) const;
|
||||
bool isKnownFile(const Utils::FilePath &filename) const;
|
||||
|
||||
virtual QVariantMap toMap() const;
|
||||
|
@@ -1904,14 +1904,14 @@ void ProjectExplorerPlugin::extensionsInitialized()
|
||||
|
||||
QSsh::SshSettings::loadSettings(Core::ICore::settings());
|
||||
const auto searchPathRetriever = [] {
|
||||
Utils::FilePathList searchPaths;
|
||||
Utils::FilePaths 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::FilePathList gitSearchPaths = Utils::transform(rawGitSearchPaths,
|
||||
const Utils::FilePaths gitSearchPaths = Utils::transform(rawGitSearchPaths,
|
||||
[](const QString &rawPath) { return Utils::FilePath::fromString(rawPath); });
|
||||
const Utils::FilePath fullGitPath = Utils::Environment::systemEnvironment()
|
||||
.searchInPath(gitBinary, gitSearchPaths);
|
||||
@@ -3578,7 +3578,7 @@ void ProjectExplorerPluginPrivate::addExistingDirectory()
|
||||
QTC_ASSERT(folderNode, return);
|
||||
|
||||
SelectableFilesDialogAddDirectory dialog(Utils::FilePath::fromString(node->directory()),
|
||||
Utils::FilePathList(), ICore::mainWindow());
|
||||
Utils::FilePaths(), ICore::mainWindow());
|
||||
dialog.setAddFileFilter({});
|
||||
|
||||
if (dialog.exec() == QDialog::Accepted)
|
||||
|
@@ -53,7 +53,7 @@ SelectableFilesModel::SelectableFilesModel(QObject *parent) : QAbstractItemModel
|
||||
m_root = new Tree;
|
||||
}
|
||||
|
||||
void SelectableFilesModel::setInitialMarkedFiles(const Utils::FilePathList &files)
|
||||
void SelectableFilesModel::setInitialMarkedFiles(const Utils::FilePaths &files)
|
||||
{
|
||||
m_files = Utils::toSet(files);
|
||||
m_allFiles = files.isEmpty();
|
||||
@@ -302,14 +302,14 @@ Qt::ItemFlags SelectableFilesModel::flags(const QModelIndex &index) const
|
||||
return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable;
|
||||
}
|
||||
|
||||
Utils::FilePathList SelectableFilesModel::selectedPaths() const
|
||||
Utils::FilePaths SelectableFilesModel::selectedPaths() const
|
||||
{
|
||||
Utils::FilePathList result;
|
||||
Utils::FilePaths result;
|
||||
collectPaths(m_root, &result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void SelectableFilesModel::collectPaths(Tree *root, Utils::FilePathList *result) const
|
||||
void SelectableFilesModel::collectPaths(Tree *root, Utils::FilePaths *result) const
|
||||
{
|
||||
if (root->checked == Qt::Unchecked)
|
||||
return;
|
||||
@@ -318,14 +318,14 @@ void SelectableFilesModel::collectPaths(Tree *root, Utils::FilePathList *result)
|
||||
collectPaths(t, result);
|
||||
}
|
||||
|
||||
Utils::FilePathList SelectableFilesModel::selectedFiles() const
|
||||
Utils::FilePaths SelectableFilesModel::selectedFiles() const
|
||||
{
|
||||
Utils::FilePathList result = Utils::toList(m_outOfBaseDirFiles);
|
||||
Utils::FilePaths result = Utils::toList(m_outOfBaseDirFiles);
|
||||
collectFiles(m_root, &result);
|
||||
return result;
|
||||
}
|
||||
|
||||
Utils::FilePathList SelectableFilesModel::preservedFiles() const
|
||||
Utils::FilePaths SelectableFilesModel::preservedFiles() const
|
||||
{
|
||||
return Utils::toList(m_outOfBaseDirFiles);
|
||||
}
|
||||
@@ -335,7 +335,7 @@ bool SelectableFilesModel::hasCheckedFiles() const
|
||||
return m_root->checked != Qt::Unchecked;
|
||||
}
|
||||
|
||||
void SelectableFilesModel::collectFiles(Tree *root, Utils::FilePathList *result) const
|
||||
void SelectableFilesModel::collectFiles(Tree *root, Utils::FilePaths *result) const
|
||||
{
|
||||
if (root->checked == Qt::Unchecked)
|
||||
return;
|
||||
@@ -592,7 +592,7 @@ SelectableFilesWidget::SelectableFilesWidget(QWidget *parent) :
|
||||
}
|
||||
|
||||
SelectableFilesWidget::SelectableFilesWidget(const Utils::FilePath &path,
|
||||
const Utils::FilePathList &files, QWidget *parent) :
|
||||
const Utils::FilePaths &files, QWidget *parent) :
|
||||
SelectableFilesWidget(parent)
|
||||
{
|
||||
resetModel(path, files);
|
||||
@@ -615,14 +615,14 @@ void SelectableFilesWidget::setBaseDirEditable(bool edit)
|
||||
m_startParsingButton->setVisible(edit);
|
||||
}
|
||||
|
||||
Utils::FilePathList SelectableFilesWidget::selectedFiles() const
|
||||
Utils::FilePaths SelectableFilesWidget::selectedFiles() const
|
||||
{
|
||||
return m_model ? m_model->selectedFiles() : Utils::FilePathList();
|
||||
return m_model ? m_model->selectedFiles() : Utils::FilePaths();
|
||||
}
|
||||
|
||||
Utils::FilePathList SelectableFilesWidget::selectedPaths() const
|
||||
Utils::FilePaths SelectableFilesWidget::selectedPaths() const
|
||||
{
|
||||
return m_model ? m_model->selectedPaths() : Utils::FilePathList();
|
||||
return m_model ? m_model->selectedPaths() : Utils::FilePaths();
|
||||
}
|
||||
|
||||
bool SelectableFilesWidget::hasFilesSelected() const
|
||||
@@ -630,7 +630,7 @@ bool SelectableFilesWidget::hasFilesSelected() const
|
||||
return m_model ? m_model->hasCheckedFiles() : false;
|
||||
}
|
||||
|
||||
void SelectableFilesWidget::resetModel(const Utils::FilePath &path, const Utils::FilePathList &files)
|
||||
void SelectableFilesWidget::resetModel(const Utils::FilePath &path, const Utils::FilePaths &files)
|
||||
{
|
||||
m_view->setModel(nullptr);
|
||||
|
||||
@@ -711,7 +711,7 @@ void SelectableFilesWidget::parsingFinished()
|
||||
|
||||
smartExpand(m_model->index(0,0, QModelIndex()));
|
||||
|
||||
const Utils::FilePathList preservedFiles = m_model->preservedFiles();
|
||||
const Utils::FilePaths 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()));
|
||||
|
||||
@@ -736,7 +736,7 @@ void SelectableFilesWidget::smartExpand(const QModelIndex &idx)
|
||||
//////////
|
||||
|
||||
SelectableFilesDialogEditFiles::SelectableFilesDialogEditFiles(const Utils::FilePath &path,
|
||||
const Utils::FilePathList &files,
|
||||
const Utils::FilePaths &files,
|
||||
QWidget *parent) :
|
||||
QDialog(parent),
|
||||
m_filesWidget(new SelectableFilesWidget(path, files))
|
||||
@@ -759,7 +759,7 @@ SelectableFilesDialogEditFiles::SelectableFilesDialogEditFiles(const Utils::File
|
||||
layout->addWidget(buttonBox);
|
||||
}
|
||||
|
||||
Utils::FilePathList SelectableFilesDialogEditFiles::selectedFiles() const
|
||||
Utils::FilePaths SelectableFilesDialogEditFiles::selectedFiles() const
|
||||
{
|
||||
return m_filesWidget->selectedFiles();
|
||||
}
|
||||
@@ -771,7 +771,7 @@ Utils::FilePathList SelectableFilesDialogEditFiles::selectedFiles() const
|
||||
|
||||
|
||||
SelectableFilesDialogAddDirectory::SelectableFilesDialogAddDirectory(const Utils::FilePath &path,
|
||||
const Utils::FilePathList &files,
|
||||
const Utils::FilePaths &files,
|
||||
QWidget *parent) :
|
||||
SelectableFilesDialogEditFiles(path, files, parent)
|
||||
{
|
||||
|
@@ -107,7 +107,7 @@ public:
|
||||
SelectableFilesModel(QObject *parent);
|
||||
~SelectableFilesModel() override;
|
||||
|
||||
void setInitialMarkedFiles(const Utils::FilePathList &files);
|
||||
void setInitialMarkedFiles(const Utils::FilePaths &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::FilePathList selectedFiles() const;
|
||||
Utils::FilePathList selectedPaths() const;
|
||||
Utils::FilePathList preservedFiles() const;
|
||||
Utils::FilePaths selectedFiles() const;
|
||||
Utils::FilePaths selectedPaths() const;
|
||||
Utils::FilePaths preservedFiles() const;
|
||||
|
||||
bool hasCheckedFiles() const;
|
||||
|
||||
@@ -141,8 +141,8 @@ protected:
|
||||
private:
|
||||
QList<Glob> parseFilter(const QString &filter);
|
||||
Qt::CheckState applyFilter(const QModelIndex &idx);
|
||||
void collectFiles(Tree *root, Utils::FilePathList *result) const;
|
||||
void collectPaths(Tree *root, Utils::FilePathList *result) const;
|
||||
void collectFiles(Tree *root, Utils::FilePaths *result) const;
|
||||
void collectPaths(Tree *root, Utils::FilePaths *result) const;
|
||||
void selectAllFiles(Tree *root);
|
||||
|
||||
protected:
|
||||
@@ -192,18 +192,18 @@ class PROJECTEXPLORER_EXPORT SelectableFilesWidget : public QWidget
|
||||
|
||||
public:
|
||||
explicit SelectableFilesWidget(QWidget *parent = nullptr);
|
||||
SelectableFilesWidget(const Utils::FilePath &path, const Utils::FilePathList &files,
|
||||
SelectableFilesWidget(const Utils::FilePath &path, const Utils::FilePaths &files,
|
||||
QWidget *parent = nullptr);
|
||||
|
||||
void setAddFileFilter(const QString &filter);
|
||||
void setBaseDirEditable(bool edit);
|
||||
|
||||
Utils::FilePathList selectedFiles() const;
|
||||
Utils::FilePathList selectedPaths() const;
|
||||
Utils::FilePaths selectedFiles() const;
|
||||
Utils::FilePaths selectedPaths() const;
|
||||
|
||||
bool hasFilesSelected() const;
|
||||
|
||||
void resetModel(const Utils::FilePath &path, const Utils::FilePathList &files);
|
||||
void resetModel(const Utils::FilePath &path, const Utils::FilePaths &files);
|
||||
void cancelParsing();
|
||||
|
||||
void enableFilterHistoryCompletion(const QString &keyPrefix);
|
||||
@@ -249,9 +249,9 @@ class PROJECTEXPLORER_EXPORT SelectableFilesDialogEditFiles : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SelectableFilesDialogEditFiles(const Utils::FilePath &path, const Utils::FilePathList &files,
|
||||
SelectableFilesDialogEditFiles(const Utils::FilePath &path, const Utils::FilePaths &files,
|
||||
QWidget *parent);
|
||||
Utils::FilePathList selectedFiles() const;
|
||||
Utils::FilePaths 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::FilePath &path, const Utils::FilePathList &files,
|
||||
SelectableFilesDialogAddDirectory(const Utils::FilePath &path, const Utils::FilePaths &files,
|
||||
QWidget *parent);
|
||||
};
|
||||
|
||||
|
@@ -124,7 +124,7 @@ void Task::setFile(const Utils::FilePath &file_)
|
||||
{
|
||||
file = file_;
|
||||
if (!file.isEmpty() && !file.toFileInfo().isAbsolute()) {
|
||||
Utils::FilePathList possiblePaths = findFileInSession(file);
|
||||
Utils::FilePaths possiblePaths = findFileInSession(file);
|
||||
if (possiblePaths.length() == 1)
|
||||
file = possiblePaths.first();
|
||||
else
|
||||
|
@@ -77,7 +77,7 @@ public:
|
||||
Options options = AddTextMark | FlashWorthy;
|
||||
QString description;
|
||||
Utils::FilePath file;
|
||||
Utils::FilePathList fileCandidates;
|
||||
Utils::FilePaths fileCandidates;
|
||||
int line = -1;
|
||||
int movedLine = -1; // contains a line number if the line was moved in the editor
|
||||
Core::Id category;
|
||||
|
@@ -278,10 +278,10 @@ public:
|
||||
UserFileBackUpStrategy(UserFileAccessor *accessor) : Utils::VersionedBackUpStrategy(accessor)
|
||||
{ }
|
||||
|
||||
FilePathList readFileCandidates(const Utils::FilePath &baseFileName) const final;
|
||||
FilePaths readFileCandidates(const Utils::FilePath &baseFileName) const final;
|
||||
};
|
||||
|
||||
FilePathList UserFileBackUpStrategy::readFileCandidates(const FilePath &baseFileName) const
|
||||
FilePaths UserFileBackUpStrategy::readFileCandidates(const FilePath &baseFileName) const
|
||||
{
|
||||
const auto *const ac = static_cast<const UserFileAccessor *>(accessor());
|
||||
const FilePath externalUser = ac->externalUserFile();
|
||||
@@ -289,7 +289,7 @@ FilePathList UserFileBackUpStrategy::readFileCandidates(const FilePath &baseFile
|
||||
QTC_CHECK(!baseFileName.isEmpty());
|
||||
QTC_CHECK(baseFileName == externalUser || baseFileName == projectUser);
|
||||
|
||||
FilePathList result = Utils::VersionedBackUpStrategy::readFileCandidates(projectUser);
|
||||
FilePaths result = Utils::VersionedBackUpStrategy::readFileCandidates(projectUser);
|
||||
if (!externalUser.isEmpty())
|
||||
result.append(Utils::VersionedBackUpStrategy::readFileCandidates(externalUser));
|
||||
|
||||
|
@@ -183,7 +183,7 @@ QbsBuildSystem::QbsBuildSystem(QbsBuildConfiguration *bc)
|
||||
for (auto it = m_sourcesForGeneratedFiles.cbegin();
|
||||
it != m_sourcesForGeneratedFiles.cend(); ++it) {
|
||||
for (const QString &sourceFile : it.value()) {
|
||||
const FilePathList generatedFilePaths = transform(
|
||||
const FilePaths generatedFilePaths = transform(
|
||||
generatedFiles.value(sourceFile),
|
||||
[](const QString &s) { return FilePath::fromString(s); });
|
||||
if (!generatedFilePaths.empty()) {
|
||||
|
@@ -133,7 +133,7 @@ namespace QmakeProjectManager {
|
||||
static void createTree(QmakeBuildSystem *buildSystem,
|
||||
const QmakePriFile *pri,
|
||||
QmakePriFileNode *node,
|
||||
const FilePathList &toExclude)
|
||||
const FilePaths &toExclude)
|
||||
{
|
||||
QTC_ASSERT(pri, return);
|
||||
QTC_ASSERT(node, return);
|
||||
@@ -146,7 +146,7 @@ static void createTree(QmakeBuildSystem *buildSystem,
|
||||
|
||||
// other normal files:
|
||||
const QVector<QmakeStaticData::FileTypeData> &fileTypes = qmakeStaticData()->fileTypeData;
|
||||
FilePathList generatedFiles;
|
||||
FilePaths generatedFiles;
|
||||
const auto proFile = dynamic_cast<const QmakeProFile *>(pri);
|
||||
for (int i = 0; i < fileTypes.size(); ++i) {
|
||||
FileType type = fileTypes.at(i).type;
|
||||
@@ -242,7 +242,7 @@ std::unique_ptr<QmakeProFileNode> QmakeNodeTreeBuilder::buildTree(QmakeBuildSyst
|
||||
Target *t = buildSystem->target();
|
||||
BaseQtVersion *qt = QtKitAspect::qtVersion(t->kit());
|
||||
|
||||
const FilePathList toExclude = qt ? qt->directoriesToIgnoreInProjectTree() : FilePathList();
|
||||
const FilePaths toExclude = qt ? qt->directoriesToIgnoreInProjectTree() : FilePaths();
|
||||
|
||||
auto root = std::make_unique<QmakeProFileNode>(buildSystem,
|
||||
buildSystem->projectFilePath(),
|
||||
|
@@ -1397,7 +1397,7 @@ QmakeEvalResult *QmakeProFile::evaluate(const QmakeEvalInput &input)
|
||||
if (result->state == QmakeEvalResult::EvalOk) {
|
||||
if (result->projectType == ProjectType::SubDirsTemplate) {
|
||||
QStringList errors;
|
||||
FilePathList subDirs = subDirsPaths(input.readerExact, input.projectDir, &result->subProjectsNotToDeploy, &errors);
|
||||
FilePaths subDirs = subDirsPaths(input.readerExact, input.projectDir, &result->subProjectsNotToDeploy, &errors);
|
||||
result->errors.append(errors);
|
||||
|
||||
foreach (const Utils::FilePath &subDirName, subDirs) {
|
||||
@@ -1434,7 +1434,7 @@ QmakeEvalResult *QmakeProFile::evaluate(const QmakeEvalInput &input)
|
||||
}
|
||||
|
||||
if (result->projectType == ProjectType::SubDirsTemplate) {
|
||||
FilePathList subDirs = subDirsPaths(input.readerCumulative, input.projectDir, nullptr, nullptr);
|
||||
FilePaths subDirs = subDirsPaths(input.readerCumulative, input.projectDir, nullptr, nullptr);
|
||||
foreach (const Utils::FilePath &subDirName, subDirs) {
|
||||
auto it = result->includedFiles.children.find(subDirName);
|
||||
if (it == result->includedFiles.children.end()) {
|
||||
@@ -1869,12 +1869,12 @@ QStringList QmakeProFile::libDirectories(QtSupport::ProFileReader *reader)
|
||||
return result;
|
||||
}
|
||||
|
||||
FilePathList QmakeProFile::subDirsPaths(QtSupport::ProFileReader *reader,
|
||||
FilePaths QmakeProFile::subDirsPaths(QtSupport::ProFileReader *reader,
|
||||
const QString &projectDir,
|
||||
QStringList *subProjectsNotToDeploy,
|
||||
QStringList *errors)
|
||||
{
|
||||
FilePathList subProjectPaths;
|
||||
FilePaths subProjectPaths;
|
||||
|
||||
const QStringList subDirVars = reader->values(QLatin1String("SUBDIRS"));
|
||||
|
||||
@@ -2043,7 +2043,7 @@ FilePath QmakeProFile::buildDir(BuildConfiguration *bc) const
|
||||
return FilePath::fromString(QDir::cleanPath(QDir(buildDir).absoluteFilePath(relativeDir)));
|
||||
}
|
||||
|
||||
FilePathList QmakeProFile::generatedFiles(const FilePath &buildDir,
|
||||
FilePaths QmakeProFile::generatedFiles(const FilePath &buildDir,
|
||||
const FilePath &sourceFile,
|
||||
const FileType &sourceFileType) const
|
||||
{
|
||||
@@ -2086,7 +2086,7 @@ void QmakeProFile::setupExtraCompiler(const FilePath &buildDir,
|
||||
const FileType &fileType, ExtraCompilerFactory *factory)
|
||||
{
|
||||
for (const FilePath &fn : collectFiles(fileType)) {
|
||||
const FilePathList generated = generatedFiles(buildDir, fn, fileType);
|
||||
const FilePaths generated = generatedFiles(buildDir, fn, fileType);
|
||||
if (!generated.isEmpty())
|
||||
m_extraCompilers.append(factory->create(m_buildSystem->project(), fn, generated));
|
||||
}
|
||||
|
@@ -315,7 +315,7 @@ public:
|
||||
Utils::FilePath sourceDir() const;
|
||||
Utils::FilePath buildDir(ProjectExplorer::BuildConfiguration *bc = nullptr) const;
|
||||
|
||||
Utils::FilePathList generatedFiles(const Utils::FilePath &buildDirectory,
|
||||
Utils::FilePaths generatedFiles(const Utils::FilePath &buildDirectory,
|
||||
const Utils::FilePath &sourceFile,
|
||||
const ProjectExplorer::FileType &sourceFileType) const;
|
||||
QList<ProjectExplorer::ExtraCompiler *> extraCompilers() const;
|
||||
@@ -361,7 +361,7 @@ private:
|
||||
static QString sysrootify(const QString &path, const QString &sysroot, const QString &baseDir, const QString &outputDir);
|
||||
static QStringList includePaths(QtSupport::ProFileReader *reader, const Utils::FilePath &sysroot, const Utils::FilePath &buildDir, const QString &projectDir);
|
||||
static QStringList libDirectories(QtSupport::ProFileReader *reader);
|
||||
static Utils::FilePathList subDirsPaths(QtSupport::ProFileReader *reader, const QString &projectDir, QStringList *subProjectsNotToDeploy, QStringList *errors);
|
||||
static Utils::FilePaths subDirsPaths(QtSupport::ProFileReader *reader, const QString &projectDir, QStringList *subProjectsNotToDeploy, QStringList *errors);
|
||||
|
||||
static TargetInformation targetInformation(QtSupport::ProFileReader *reader, QtSupport::ProFileReader *readerBuildPass, const Utils::FilePath &buildDir, const Utils::FilePath &projectFilePath);
|
||||
static InstallsList installsList(const QtSupport::ProFileReader *reader, const QString &projectFilePath, const QString &projectDir, const QString &buildDir);
|
||||
@@ -382,7 +382,7 @@ private:
|
||||
QList<ProjectExplorer::ExtraCompiler *> m_extraCompilers;
|
||||
|
||||
TargetInformation m_qmakeTargetInformation;
|
||||
Utils::FilePathList m_subProjectsNotToDeploy;
|
||||
Utils::FilePaths m_subProjectsNotToDeploy;
|
||||
InstallsList m_installsList;
|
||||
QStringList m_featureRoots;
|
||||
|
||||
|
@@ -748,7 +748,7 @@ static void notifyChangedHelper(const FilePath &fileName, QmakeProFile *file)
|
||||
|
||||
void QmakeBuildSystem::notifyChanged(const FilePath &name)
|
||||
{
|
||||
FilePathList files = project()->files([&name](const Node *n) {
|
||||
FilePaths files = project()->files([&name](const Node *n) {
|
||||
return Project::SourceFiles(n) && n->filePath() == name;
|
||||
});
|
||||
|
||||
|
@@ -70,8 +70,8 @@ public:
|
||||
bool isComplete() const override { return m_filesWidget->hasFilesSelected(); }
|
||||
void initializePage() override;
|
||||
void cleanupPage() override { m_filesWidget->cancelParsing(); }
|
||||
FilePathList selectedFiles() const { return m_filesWidget->selectedFiles(); }
|
||||
FilePathList selectedPaths() const { return m_filesWidget->selectedPaths(); }
|
||||
FilePaths selectedFiles() const { return m_filesWidget->selectedFiles(); }
|
||||
FilePaths selectedPaths() const { return m_filesWidget->selectedPaths(); }
|
||||
|
||||
private:
|
||||
SimpleProjectWizardDialog *m_simpleProjectWizardDialog;
|
||||
@@ -117,8 +117,8 @@ public:
|
||||
|
||||
QString path() const { return m_firstPage->path(); }
|
||||
void setPath(const QString &path) { m_firstPage->setPath(path); }
|
||||
FilePathList selectedFiles() const { return m_secondPage->selectedFiles(); }
|
||||
FilePathList selectedPaths() const { return m_secondPage->selectedPaths(); }
|
||||
FilePaths selectedFiles() const { return m_secondPage->selectedFiles(); }
|
||||
FilePaths selectedPaths() const { return m_secondPage->selectedPaths(); }
|
||||
QString projectName() const { return m_firstPage->fileName(); }
|
||||
|
||||
FileWizardPage *m_firstPage;
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
void FilesSelectionWizardPage::initializePage()
|
||||
{
|
||||
m_filesWidget->resetModel(FilePath::fromString(m_simpleProjectWizardDialog->path()),
|
||||
FilePathList());
|
||||
FilePaths());
|
||||
}
|
||||
|
||||
SimpleProjectWizard::SimpleProjectWizard()
|
||||
|
@@ -49,7 +49,7 @@ QmlPreviewConnectionManager::QmlPreviewConnectionManager(QObject *parent) :
|
||||
void QmlPreviewConnectionManager::setTarget(ProjectExplorer::Target *target)
|
||||
{
|
||||
QtSupport::BaseQtVersion::populateQmlFileFinder(&m_projectFileFinder, target);
|
||||
m_projectFileFinder.setAdditionalSearchDirectories(Utils::FilePathList());
|
||||
m_projectFileFinder.setAdditionalSearchDirectories(Utils::FilePaths());
|
||||
m_targetFileFinder.setTarget(target);
|
||||
}
|
||||
|
||||
|
@@ -199,7 +199,7 @@ public:
|
||||
void setId(int id); // used by the qtversionmanager for legacy restore
|
||||
// and by the qtoptionspage to replace Qt versions
|
||||
|
||||
FilePathList qtCorePaths();
|
||||
FilePaths qtCorePaths();
|
||||
|
||||
public:
|
||||
BaseQtVersion *q;
|
||||
@@ -645,9 +645,9 @@ FilePath BaseQtVersion::librarySearchPath() const
|
||||
return HostOsInfo::isWindowsHost() ? binPath() : libraryPath();
|
||||
}
|
||||
|
||||
FilePathList BaseQtVersion::directoriesToIgnoreInProjectTree() const
|
||||
FilePaths BaseQtVersion::directoriesToIgnoreInProjectTree() const
|
||||
{
|
||||
FilePathList result;
|
||||
FilePaths result;
|
||||
const FilePath mkspecPathGet = mkspecsPath();
|
||||
result.append(mkspecPathGet);
|
||||
|
||||
@@ -1381,7 +1381,7 @@ FilePath BaseQtVersion::examplesPath() const // QT_INSTALL_EXAMPLES
|
||||
|
||||
QStringList BaseQtVersion::qtSoPaths() const
|
||||
{
|
||||
const FilePathList qtPaths = {libraryPath(), pluginPath(), qmlPath(), importsPath()};
|
||||
const FilePaths qtPaths = {libraryPath(), pluginPath(), qmlPath(), importsPath()};
|
||||
QSet<QString> paths;
|
||||
for (const FilePath &p : qtPaths) {
|
||||
QString path = p.toString();
|
||||
@@ -1574,7 +1574,7 @@ void BaseQtVersion::populateQmlFileFinder(FileInProjectFinder *finder, const Tar
|
||||
QTC_CHECK(projects.isEmpty() || startupProject);
|
||||
|
||||
FilePath projectDirectory;
|
||||
FilePathList sourceFiles;
|
||||
FilePaths sourceFiles;
|
||||
|
||||
// Sort files from startupProject to the front of the list ...
|
||||
if (startupProject) {
|
||||
@@ -1598,8 +1598,8 @@ void BaseQtVersion::populateQmlFileFinder(FileInProjectFinder *finder, const Tar
|
||||
const FilePath activeSysroot = SysRootKitAspect::sysRoot(kit);
|
||||
const BaseQtVersion *qtVersion = QtVersionManager::isLoaded()
|
||||
? QtKitAspect::qtVersion(kit) : nullptr;
|
||||
FilePathList additionalSearchDirectories = qtVersion
|
||||
? FilePathList({qtVersion->qmlPath()}) : FilePathList();
|
||||
FilePaths additionalSearchDirectories = qtVersion
|
||||
? FilePaths({qtVersion->qmlPath()}) : FilePaths();
|
||||
|
||||
if (target) {
|
||||
for (const DeployableFile &file : target->deploymentData().allFiles())
|
||||
@@ -2002,7 +2002,7 @@ bool BaseQtVersion::isQtQuickCompilerSupported(QString *reason) const
|
||||
return true;
|
||||
}
|
||||
|
||||
FilePathList BaseQtVersionPrivate::qtCorePaths()
|
||||
FilePaths BaseQtVersionPrivate::qtCorePaths()
|
||||
{
|
||||
updateVersionInfo();
|
||||
const QString versionString = m_data.qtVersionString;
|
||||
@@ -2020,8 +2020,8 @@ FilePathList BaseQtVersionPrivate::qtCorePaths()
|
||||
result += QDir(installBinDir).entryInfoList(filters);
|
||||
return result;
|
||||
}();
|
||||
FilePathList staticLibs;
|
||||
FilePathList dynamicLibs;
|
||||
FilePaths staticLibs;
|
||||
FilePaths dynamicLibs;
|
||||
for (const QFileInfo &info : entryInfoList) {
|
||||
const QString file = info.fileName();
|
||||
if (info.isDir()
|
||||
@@ -2215,7 +2215,7 @@ static Abi scanQtBinaryForBuildStringAndRefineAbi(const FilePath &library,
|
||||
return results.value(library);
|
||||
}
|
||||
|
||||
Abis BaseQtVersion::qtAbisFromLibrary(const FilePathList &coreLibraries)
|
||||
Abis BaseQtVersion::qtAbisFromLibrary(const FilePaths &coreLibraries)
|
||||
{
|
||||
Abis res;
|
||||
for (const FilePath &library : coreLibraries) {
|
||||
|
@@ -216,7 +216,7 @@ public:
|
||||
Utils::FilePath qmlBinPath() const;
|
||||
Utils::FilePath librarySearchPath() const;
|
||||
|
||||
Utils::FilePathList directoriesToIgnoreInProjectTree() const;
|
||||
Utils::FilePaths directoriesToIgnoreInProjectTree() const;
|
||||
|
||||
QString qtNamespace() const;
|
||||
QString qtLibInfix() const;
|
||||
@@ -242,7 +242,7 @@ protected:
|
||||
virtual ProjectExplorer::Tasks 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 ProjectExplorer::Abis qtAbisFromLibrary(const Utils::FilePathList &coreLibraries);
|
||||
static ProjectExplorer::Abis qtAbisFromLibrary(const Utils::FilePaths &coreLibraries);
|
||||
|
||||
void resetCache() const;
|
||||
|
||||
|
@@ -43,7 +43,7 @@ static const char TaskCategory[] = "Task.Category.ExtraCompiler.QScxmlc";
|
||||
|
||||
QScxmlcGenerator::QScxmlcGenerator(const Project *project,
|
||||
const Utils::FilePath &source,
|
||||
const Utils::FilePathList &targets, QObject *parent) :
|
||||
const Utils::FilePaths &targets, QObject *parent) :
|
||||
ProcessExtraCompiler(project, source, targets, parent),
|
||||
m_tmpdir("qscxmlgenerator")
|
||||
{
|
||||
@@ -144,7 +144,7 @@ QString QScxmlcGeneratorFactory::sourceTag() const
|
||||
|
||||
ExtraCompiler *QScxmlcGeneratorFactory::create(
|
||||
const Project *project, const Utils::FilePath &source,
|
||||
const Utils::FilePathList &targets)
|
||||
const Utils::FilePaths &targets)
|
||||
{
|
||||
annouceCreation(project, source, targets);
|
||||
|
||||
|
@@ -38,7 +38,7 @@ class QScxmlcGenerator : public ProjectExplorer::ProcessExtraCompiler
|
||||
Q_OBJECT
|
||||
public:
|
||||
QScxmlcGenerator(const ProjectExplorer::Project *project, const Utils::FilePath &source,
|
||||
const Utils::FilePathList &targets, QObject *parent = nullptr);
|
||||
const Utils::FilePaths &targets, QObject *parent = nullptr);
|
||||
|
||||
protected:
|
||||
Utils::FilePath command() const override;
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
|
||||
ProjectExplorer::ExtraCompiler *create(const ProjectExplorer::Project *project,
|
||||
const Utils::FilePath &source,
|
||||
const Utils::FilePathList &targets) override;
|
||||
const Utils::FilePaths &targets) override;
|
||||
};
|
||||
|
||||
} // QtSupport
|
||||
|
@@ -408,11 +408,11 @@ static QString qmakePath(const QString &qtchooser, const QString &version)
|
||||
return QString();
|
||||
}
|
||||
|
||||
static FilePathList gatherQmakePathsFromQtChooser()
|
||||
static FilePaths gatherQmakePathsFromQtChooser()
|
||||
{
|
||||
const QString qtchooser = QStandardPaths::findExecutable(QStringLiteral("qtchooser"));
|
||||
if (qtchooser.isEmpty())
|
||||
return FilePathList();
|
||||
return FilePaths();
|
||||
|
||||
const QList<QByteArray> versions = runQtChooser(qtchooser, QStringList("-l"));
|
||||
QSet<FilePath> foundQMakes;
|
||||
@@ -427,12 +427,12 @@ static FilePathList gatherQmakePathsFromQtChooser()
|
||||
|
||||
static void findSystemQt()
|
||||
{
|
||||
FilePathList systemQMakes
|
||||
FilePaths systemQMakes
|
||||
= BuildableHelperLibrary::findQtsInEnvironment(Environment::systemEnvironment());
|
||||
|
||||
systemQMakes.append(gatherQmakePathsFromQtChooser());
|
||||
|
||||
const FilePathList uniqueSystemQmakes = Utils::filteredUnique(systemQMakes);
|
||||
const FilePaths uniqueSystemQmakes = Utils::filteredUnique(systemQMakes);
|
||||
for (const FilePath &qmakePath : uniqueSystemQmakes) {
|
||||
BaseQtVersion *version = QtVersionFactory::createQtVersionFromQMakePath(qmakePath,
|
||||
false,
|
||||
|
@@ -44,7 +44,7 @@ using namespace ProjectExplorer;
|
||||
namespace QtSupport {
|
||||
|
||||
UicGenerator::UicGenerator(const Project *project, const Utils::FilePath &source,
|
||||
const Utils::FilePathList &targets, QObject *parent) :
|
||||
const Utils::FilePaths &targets, QObject *parent) :
|
||||
ProcessExtraCompiler(project, source, targets, parent)
|
||||
{
|
||||
QTC_ASSERT(targets.count() == 1, return);
|
||||
@@ -76,7 +76,7 @@ FileNameToContentsHash UicGenerator::handleProcessFinished(QProcess *process)
|
||||
if (process->exitStatus() != QProcess::NormalExit && process->exitCode() != 0)
|
||||
return result;
|
||||
|
||||
const Utils::FilePathList targetList = targets();
|
||||
const Utils::FilePaths targetList = targets();
|
||||
if (targetList.size() != 1)
|
||||
return result;
|
||||
// As far as I can discover in the UIC sources, it writes out local 8-bit encoding. The
|
||||
@@ -105,7 +105,7 @@ QString UicGeneratorFactory::sourceTag() const
|
||||
|
||||
ExtraCompiler *UicGeneratorFactory::create(const Project *project,
|
||||
const Utils::FilePath &source,
|
||||
const Utils::FilePathList &targets)
|
||||
const Utils::FilePaths &targets)
|
||||
{
|
||||
annouceCreation(project, source, targets);
|
||||
|
||||
|
@@ -37,7 +37,7 @@ class UicGenerator : public ProjectExplorer::ProcessExtraCompiler
|
||||
Q_OBJECT
|
||||
public:
|
||||
UicGenerator(const ProjectExplorer::Project *project, const Utils::FilePath &source,
|
||||
const Utils::FilePathList &targets, QObject *parent = nullptr);
|
||||
const Utils::FilePaths &targets, QObject *parent = nullptr);
|
||||
|
||||
protected:
|
||||
Utils::FilePath command() const override;
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
ProjectExplorer::ExtraCompiler *create(const ProjectExplorer::Project *project,
|
||||
const Utils::FilePath &source,
|
||||
const Utils::FilePathList &targets) override;
|
||||
const Utils::FilePaths &targets) override;
|
||||
};
|
||||
|
||||
} // QtSupport
|
||||
|
@@ -354,7 +354,7 @@ QVariant::Type VcsBaseClientSettings::valueType(const QString &key) const
|
||||
FilePath VcsBaseClientSettings::binaryPath() const
|
||||
{
|
||||
if (d->m_binaryFullPath.isEmpty()) {
|
||||
const FilePathList searchPaths = Utils::transform(searchPathList(), &FilePath::fromString);
|
||||
const FilePaths searchPaths = Utils::transform(searchPathList(), &FilePath::fromString);
|
||||
d->m_binaryFullPath = Environment::systemEnvironment().searchInPath(
|
||||
stringValue(binaryPathKey), searchPaths);
|
||||
}
|
||||
|
@@ -77,7 +77,7 @@ public:
|
||||
|
||||
QHash<Utils::FilePath, QVariantMap> files() const { return m_files; }
|
||||
void addFile(const Utils::FilePath &path, const QVariantMap &data) const { m_files.insert(path, data); }
|
||||
Utils::FilePathList fileNames() const { return m_files.keys(); }
|
||||
Utils::FilePaths fileNames() const { return m_files.keys(); }
|
||||
QVariantMap fileContents(const Utils::FilePath &path) const { return m_files.value(path); }
|
||||
|
||||
protected:
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
VersionedBackUpStrategy(accessor)
|
||||
{ }
|
||||
|
||||
FilePathList readFileCandidates(const Utils::FilePath &baseFileName) const
|
||||
FilePaths readFileCandidates(const Utils::FilePath &baseFileName) const
|
||||
{
|
||||
return Utils::filtered(static_cast<const BasicTestSettingsAccessor *>(accessor())->fileNames(),
|
||||
[&baseFileName](const Utils::FilePath &f) {
|
||||
|
Reference in New Issue
Block a user