forked from qt-creator/qt-creator
ProjectExplorer: Handle parsingStarted/Finished in BuildConfiguration
Make all buildconfigurations disabled while the project parses. This unifies how this is handled in different build systems. Change-Id: I6afca3743ad1433529a4f9d3bfdf73042799e456 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -86,9 +86,6 @@ QbsBuildConfiguration::QbsBuildConfiguration(Target *target, Core::Id id)
|
||||
connect(m_configurationName, &BaseStringAspect::changed,
|
||||
this, &BuildConfiguration::buildDirectoryChanged);
|
||||
|
||||
connect(project(), &Project::parsingStarted, this, &BuildConfiguration::enabledChanged);
|
||||
connect(project(), &Project::parsingFinished, this, &BuildConfiguration::enabledChanged);
|
||||
|
||||
connect(this, &BuildConfiguration::environmentChanged,
|
||||
this, &QbsBuildConfiguration::triggerReparseIfActive);
|
||||
connect(this, &BuildConfiguration::buildDirectoryChanged,
|
||||
@@ -176,20 +173,6 @@ Internal::QbsProject *QbsBuildConfiguration::qbsProject() const
|
||||
return qobject_cast<Internal::QbsProject *>(project());
|
||||
}
|
||||
|
||||
bool QbsBuildConfiguration::isEnabled() const
|
||||
{
|
||||
return !project()->isParsing() && qbsProject()->hasParseResult();
|
||||
}
|
||||
|
||||
QString QbsBuildConfiguration::disabledReason() const
|
||||
{
|
||||
if (project()->isParsing())
|
||||
return tr("Parsing the Qbs project.");
|
||||
if (!qbsProject()->hasParseResult())
|
||||
return tr("Parsing of Qbs project has failed.");
|
||||
return QString();
|
||||
}
|
||||
|
||||
BuildConfiguration::BuildType QbsBuildConfiguration::buildType() const
|
||||
{
|
||||
QString variant;
|
||||
|
||||
@@ -55,9 +55,6 @@ public:
|
||||
|
||||
Internal::QbsProject *qbsProject() const;
|
||||
|
||||
bool isEnabled() const override;
|
||||
QString disabledReason() const override;
|
||||
|
||||
BuildType buildType() const override;
|
||||
|
||||
void setChangedFiles(const QStringList &files);
|
||||
|
||||
@@ -410,11 +410,6 @@ QString QbsProject::profileForTarget(const Target *t) const
|
||||
return QbsManager::profileForKit(t->kit());
|
||||
}
|
||||
|
||||
bool QbsProject::hasParseResult() const
|
||||
{
|
||||
return qbsProject().isValid();
|
||||
}
|
||||
|
||||
qbs::Project QbsProject::qbsProject() const
|
||||
{
|
||||
return m_qbsProject;
|
||||
|
||||
@@ -82,7 +82,6 @@ public:
|
||||
static ProjectExplorer::FileType fileTypeFor(const QSet<QString> &tags);
|
||||
|
||||
QString profileForTarget(const ProjectExplorer::Target *t) const;
|
||||
bool hasParseResult() const;
|
||||
void parseCurrentBuildConfiguration();
|
||||
void scheduleParsing() { m_parsingScheduled = true; }
|
||||
bool parsingScheduled() const { return m_parsingScheduled; }
|
||||
|
||||
Reference in New Issue
Block a user