ProjectExplorer: De-virtualize knowsAllBuildExectuables method on Project

Just use a setter instead.

Change-Id: Id5dff64e9a7fcdf64a245b71432318299a49d9f7
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tobias Hunger
2019-08-08 17:28:11 +02:00
parent 0c8c08b81b
commit d880f1f771
4 changed files with 11 additions and 9 deletions

View File

@@ -111,6 +111,7 @@ CMakeProject::CMakeProject(const FilePath &fileName)
setProjectLanguages(Core::Context(ProjectExplorer::Constants::CXX_LANGUAGE_ID));
setDisplayName(projectDirectory().fileName());
setCanBuildProducts();
setKnowsAllBuildExecutables(false);
// Timer:
m_delayedParsingTimer.setSingleShot(true);
@@ -294,11 +295,6 @@ void CMakeProject::updateQmlJSCodeModel(CMakeBuildConfiguration *bc)
modelManager->updateProjectInfo(projectInfo, this);
}
bool CMakeProject::knowsAllBuildExecutables() const
{
return false;
}
Tasks CMakeProject::projectIssues(const Kit *k) const
{
Tasks result = Project::projectIssues(k);

View File

@@ -65,8 +65,6 @@ public:
QStringList buildTargetTitles() const;
bool knowsAllBuildExecutables() const final;
ProjectExplorer::Tasks projectIssues(const ProjectExplorer::Kit *k) const final;
void runCMake();

View File

@@ -166,6 +166,7 @@ public:
bool m_hasParsingData = false;
bool m_needsInitialExpansion = false;
bool m_canBuildProducts = false;
bool m_knowsAllBuildExecutables = true;
std::unique_ptr<Core::IDocument> m_document;
std::unique_ptr<ProjectNode> m_rootProjectNode;
std::unique_ptr<ContainerNode> m_containerNode;
@@ -812,6 +813,11 @@ void Project::projectLoaded()
{
}
void Project::setKnowsAllBuildExecutables(bool value)
{
d->m_knowsAllBuildExecutables = value;
}
Task Project::createProjectTask(Task::TaskType type, const QString &description)
{
return Task(type, description, Utils::FilePath(), -1, Core::Id());
@@ -864,7 +870,7 @@ void Project::configureAsExampleProject()
bool Project::knowsAllBuildExecutables() const
{
return true;
return d->m_knowsAllBuildExecutables;
}
MakeInstallCommand Project::makeInstallCommand(const Target *target, const QString &installRoot)

View File

@@ -167,7 +167,7 @@ public:
// The build system is able to report all executables that can be built, independent
// of configuration.
virtual bool knowsAllBuildExecutables() const;
bool knowsAllBuildExecutables() const;
virtual DeploymentKnowledge deploymentKnowledge() const { return DeploymentKnowledge::Bad; }
virtual bool hasMakeInstallEquivalent() const { return false; }
@@ -262,6 +262,8 @@ protected:
void setProjectLanguage(Core::Id id, bool enabled);
virtual void projectLoaded(); // Called when the project is fully loaded.
void setKnowsAllBuildExecutables(bool value);
static ProjectExplorer::Task createProjectTask(ProjectExplorer::Task::TaskType type,
const QString &description);