forked from qt-creator/qt-creator
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:
@@ -111,6 +111,7 @@ CMakeProject::CMakeProject(const FilePath &fileName)
|
|||||||
setProjectLanguages(Core::Context(ProjectExplorer::Constants::CXX_LANGUAGE_ID));
|
setProjectLanguages(Core::Context(ProjectExplorer::Constants::CXX_LANGUAGE_ID));
|
||||||
setDisplayName(projectDirectory().fileName());
|
setDisplayName(projectDirectory().fileName());
|
||||||
setCanBuildProducts();
|
setCanBuildProducts();
|
||||||
|
setKnowsAllBuildExecutables(false);
|
||||||
|
|
||||||
// Timer:
|
// Timer:
|
||||||
m_delayedParsingTimer.setSingleShot(true);
|
m_delayedParsingTimer.setSingleShot(true);
|
||||||
@@ -294,11 +295,6 @@ void CMakeProject::updateQmlJSCodeModel(CMakeBuildConfiguration *bc)
|
|||||||
modelManager->updateProjectInfo(projectInfo, this);
|
modelManager->updateProjectInfo(projectInfo, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CMakeProject::knowsAllBuildExecutables() const
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Tasks CMakeProject::projectIssues(const Kit *k) const
|
Tasks CMakeProject::projectIssues(const Kit *k) const
|
||||||
{
|
{
|
||||||
Tasks result = Project::projectIssues(k);
|
Tasks result = Project::projectIssues(k);
|
||||||
|
@@ -65,8 +65,6 @@ public:
|
|||||||
|
|
||||||
QStringList buildTargetTitles() const;
|
QStringList buildTargetTitles() const;
|
||||||
|
|
||||||
bool knowsAllBuildExecutables() const final;
|
|
||||||
|
|
||||||
ProjectExplorer::Tasks projectIssues(const ProjectExplorer::Kit *k) const final;
|
ProjectExplorer::Tasks projectIssues(const ProjectExplorer::Kit *k) const final;
|
||||||
|
|
||||||
void runCMake();
|
void runCMake();
|
||||||
|
@@ -166,6 +166,7 @@ public:
|
|||||||
bool m_hasParsingData = false;
|
bool m_hasParsingData = false;
|
||||||
bool m_needsInitialExpansion = false;
|
bool m_needsInitialExpansion = false;
|
||||||
bool m_canBuildProducts = false;
|
bool m_canBuildProducts = false;
|
||||||
|
bool m_knowsAllBuildExecutables = true;
|
||||||
std::unique_ptr<Core::IDocument> m_document;
|
std::unique_ptr<Core::IDocument> m_document;
|
||||||
std::unique_ptr<ProjectNode> m_rootProjectNode;
|
std::unique_ptr<ProjectNode> m_rootProjectNode;
|
||||||
std::unique_ptr<ContainerNode> m_containerNode;
|
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)
|
Task Project::createProjectTask(Task::TaskType type, const QString &description)
|
||||||
{
|
{
|
||||||
return Task(type, description, Utils::FilePath(), -1, Core::Id());
|
return Task(type, description, Utils::FilePath(), -1, Core::Id());
|
||||||
@@ -864,7 +870,7 @@ void Project::configureAsExampleProject()
|
|||||||
|
|
||||||
bool Project::knowsAllBuildExecutables() const
|
bool Project::knowsAllBuildExecutables() const
|
||||||
{
|
{
|
||||||
return true;
|
return d->m_knowsAllBuildExecutables;
|
||||||
}
|
}
|
||||||
|
|
||||||
MakeInstallCommand Project::makeInstallCommand(const Target *target, const QString &installRoot)
|
MakeInstallCommand Project::makeInstallCommand(const Target *target, const QString &installRoot)
|
||||||
|
@@ -167,7 +167,7 @@ public:
|
|||||||
|
|
||||||
// The build system is able to report all executables that can be built, independent
|
// The build system is able to report all executables that can be built, independent
|
||||||
// of configuration.
|
// of configuration.
|
||||||
virtual bool knowsAllBuildExecutables() const;
|
bool knowsAllBuildExecutables() const;
|
||||||
|
|
||||||
virtual DeploymentKnowledge deploymentKnowledge() const { return DeploymentKnowledge::Bad; }
|
virtual DeploymentKnowledge deploymentKnowledge() const { return DeploymentKnowledge::Bad; }
|
||||||
virtual bool hasMakeInstallEquivalent() const { return false; }
|
virtual bool hasMakeInstallEquivalent() const { return false; }
|
||||||
@@ -262,6 +262,8 @@ protected:
|
|||||||
void setProjectLanguage(Core::Id id, bool enabled);
|
void setProjectLanguage(Core::Id id, bool enabled);
|
||||||
virtual void projectLoaded(); // Called when the project is fully loaded.
|
virtual void projectLoaded(); // Called when the project is fully loaded.
|
||||||
|
|
||||||
|
void setKnowsAllBuildExecutables(bool value);
|
||||||
|
|
||||||
static ProjectExplorer::Task createProjectTask(ProjectExplorer::Task::TaskType type,
|
static ProjectExplorer::Task createProjectTask(ProjectExplorer::Task::TaskType type,
|
||||||
const QString &description);
|
const QString &description);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user