forked from qt-creator/qt-creator
Project: Make Project::files return a FileNameList
Change-Id: I75ceb22ac65b8288d824f229d44089cba6fc8ea3 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -159,8 +159,8 @@ void CppIncludesFilter::prepareSearch(const QString &entry)
|
||||
m_needsUpdate = false;
|
||||
QSet<QString> seedPaths;
|
||||
for (Project *project : SessionManager::projects()) {
|
||||
foreach (const QString &filePath, project->files(Project::AllFiles))
|
||||
seedPaths.insert(filePath);
|
||||
foreach (const Utils::FileName &filePath, project->files(Project::AllFiles))
|
||||
seedPaths.insert(filePath.toString());
|
||||
}
|
||||
foreach (DocumentModel::Entry *entry, DocumentModel::entries()) {
|
||||
if (entry)
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projecttree.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/macroexpander.h>
|
||||
@@ -261,7 +262,8 @@ static QStringList findFilesInProject(const QString &name,
|
||||
|
||||
QString pattern = QString(1, QLatin1Char('/'));
|
||||
pattern += name;
|
||||
const QStringList projectFiles = project->files(ProjectExplorer::Project::AllFiles);
|
||||
const QStringList projectFiles
|
||||
= Utils::transform(project->files(ProjectExplorer::Project::AllFiles), &Utils::FileName::toString);
|
||||
const QStringList::const_iterator pcend = projectFiles.constEnd();
|
||||
QStringList candidateList;
|
||||
for (QStringList::const_iterator it = projectFiles.constBegin(); it != pcend; ++it) {
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/session.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/runextensions.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -128,7 +129,7 @@ void SymbolsFindFilter::startSearch(SearchResult *search)
|
||||
QSet<QString> projectFileNames;
|
||||
if (parameters.scope == SymbolSearcher::SearchProjectsOnly) {
|
||||
for (ProjectExplorer::Project *project : ProjectExplorer::SessionManager::projects())
|
||||
projectFileNames += project->files(ProjectExplorer::Project::AllFiles).toSet();
|
||||
projectFileNames += Utils::transform(project->files(ProjectExplorer::Project::AllFiles), &Utils::FileName::toString).toSet();
|
||||
}
|
||||
|
||||
QFutureWatcher<SearchResultItem> *watcher = new QFutureWatcher<SearchResultItem>();
|
||||
|
||||
Reference in New Issue
Block a user