forked from qt-creator/qt-creator
ProjectExplorer: Pass extra project files as QSet
They are available in some cases as such, and consumed as such. Change-Id: I9866c7d7bd817fb19a8b11a0efbe583ed55fe393 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -390,7 +390,7 @@ void BuildDirManager::parse()
|
||||
reparseParameters & REPARSE_FORCE_CONFIGURATION);
|
||||
}
|
||||
|
||||
QVector<FilePath> BuildDirManager::takeProjectFilesToWatch()
|
||||
QSet<FilePath> BuildDirManager::projectFilesToWatch() const
|
||||
{
|
||||
QTC_ASSERT(!m_isHandlingError, return {});
|
||||
QTC_ASSERT(m_reader, return {});
|
||||
@@ -398,7 +398,7 @@ QVector<FilePath> BuildDirManager::takeProjectFilesToWatch()
|
||||
Utils::FilePath sourceDir = m_parameters.sourceDirectory;
|
||||
Utils::FilePath buildDir = m_parameters.workDirectory;
|
||||
|
||||
return Utils::filtered(m_reader->takeProjectFilesToWatch(),
|
||||
return Utils::filtered(m_reader->projectFilesToWatch(),
|
||||
[&sourceDir,
|
||||
&buildDir](const Utils::FilePath &p) {
|
||||
return p.isChildOf(sourceDir)
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
bool isFilesystemScanRequested() const;
|
||||
void parse();
|
||||
|
||||
QVector<Utils::FilePath> takeProjectFilesToWatch();
|
||||
QSet<Utils::FilePath> projectFilesToWatch() const;
|
||||
std::unique_ptr<CMakeProjectNode> generateProjectTree(const QList<const ProjectExplorer::FileNode *> &allFiles,
|
||||
QString &errorMessage) const;
|
||||
ProjectExplorer::RawProjectParts createRawProjectParts(QString &errorMessage) const;
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
virtual bool isParsing() const = 0;
|
||||
|
||||
virtual QVector<Utils::FilePath> takeProjectFilesToWatch() = 0;
|
||||
virtual QSet<Utils::FilePath> projectFilesToWatch() const = 0;
|
||||
virtual QList<CMakeBuildTarget> takeBuildTargets(QString &errorMessage) = 0;
|
||||
virtual CMakeConfig takeParsedConfiguration(QString &errorMessage) = 0;
|
||||
virtual std::unique_ptr<CMakeProjectNode> generateProjectTree(
|
||||
|
||||
@@ -409,7 +409,7 @@ void CMakeBuildSystem::updateProjectData()
|
||||
|
||||
QTC_ASSERT(m_treeScanner.isFinished() && !m_buildDirManager.isParsing(), return);
|
||||
|
||||
m_buildConfiguration->project()->setExtraProjectFiles(m_buildDirManager.takeProjectFilesToWatch());
|
||||
m_buildConfiguration->project()->setExtraProjectFiles(m_buildDirManager.projectFilesToWatch());
|
||||
|
||||
CMakeConfig patchedConfig = m_buildConfiguration->configurationFromCMake();
|
||||
{
|
||||
|
||||
@@ -164,9 +164,9 @@ bool FileApiReader::isParsing() const
|
||||
return m_isParsing;
|
||||
}
|
||||
|
||||
QVector<FilePath> FileApiReader::takeProjectFilesToWatch()
|
||||
QSet<FilePath> FileApiReader::projectFilesToWatch() const
|
||||
{
|
||||
return QVector<FilePath>::fromList(Utils::toList(m_cmakeFiles));
|
||||
return m_cmakeFiles;
|
||||
}
|
||||
|
||||
QList<CMakeBuildTarget> FileApiReader::takeBuildTargets(QString &errorMessage){
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
|
||||
bool isParsing() const final;
|
||||
|
||||
QVector<Utils::FilePath> takeProjectFilesToWatch() final;
|
||||
QSet<Utils::FilePath> projectFilesToWatch() const final;
|
||||
QList<CMakeBuildTarget> takeBuildTargets(QString &errorMessage) final;
|
||||
CMakeConfig takeParsedConfiguration(QString &errorMessage) final;
|
||||
std::unique_ptr<CMakeProjectNode> generateProjectTree(
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
bool isParsing() const final;
|
||||
|
||||
QVector<Utils::FilePath> takeProjectFilesToWatch() final { return {}; };
|
||||
QSet<Utils::FilePath> projectFilesToWatch() const final { return {}; };
|
||||
QList<CMakeBuildTarget> takeBuildTargets(QString &errorMessage) final;
|
||||
CMakeConfig takeParsedConfiguration(QString &errorMessage) final;
|
||||
std::unique_ptr<CMakeProjectNode> generateProjectTree(
|
||||
|
||||
@@ -160,9 +160,9 @@ bool TeaLeafReader::isParsing() const
|
||||
return m_cmakeProcess && m_cmakeProcess->state() != QProcess::NotRunning;
|
||||
}
|
||||
|
||||
QVector<FilePath> TeaLeafReader::takeProjectFilesToWatch()
|
||||
QSet<FilePath> TeaLeafReader::projectFilesToWatch() const
|
||||
{
|
||||
return transform<QVector>(m_cmakeFiles, [](const FilePath &p) { return p; });
|
||||
return m_cmakeFiles;
|
||||
}
|
||||
|
||||
QList<CMakeBuildTarget> TeaLeafReader::takeBuildTargets(QString &errorMessage)
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
|
||||
bool isParsing() const final;
|
||||
|
||||
QVector<Utils::FilePath> takeProjectFilesToWatch() final;
|
||||
QSet<Utils::FilePath> projectFilesToWatch() const final;
|
||||
QList<CMakeBuildTarget> takeBuildTargets(QString &errorMessage) final;
|
||||
CMakeConfig takeParsedConfiguration(QString &errorMessage) final;
|
||||
std::unique_ptr<CMakeProjectNode> generateProjectTree(
|
||||
|
||||
Reference in New Issue
Block a user