forked from qt-creator/qt-creator
ProjectExplorer: Merge StatefulProjectConfiguration into RunConfiguration
It's the only user, and single inheritance for feature reuse is an antipattern. Change-Id: I975861d111cec67fb2dbf94e38bd824d18a0c8d0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -158,7 +158,7 @@ void GlobalOrProjectAspect::resetProjectToGlobalSettings()
|
||||
static std::vector<RunConfiguration::AspectFactory> theAspectFactories;
|
||||
|
||||
RunConfiguration::RunConfiguration(Target *target, Core::Id id)
|
||||
: StatefulProjectConfiguration(target, id)
|
||||
: ProjectConfiguration(target, id)
|
||||
{
|
||||
connect(target->project(), &Project::parsingStarted,
|
||||
this, [this]() { updateEnabledState(); });
|
||||
@@ -201,6 +201,14 @@ bool RunConfiguration::isActive() const
|
||||
return target()->isActive() && target()->activeRunConfiguration() == this;
|
||||
}
|
||||
|
||||
void RunConfiguration::setEnabled(bool enabled)
|
||||
{
|
||||
if (enabled == m_isEnabled)
|
||||
return;
|
||||
m_isEnabled = enabled;
|
||||
emit enabledChanged();
|
||||
}
|
||||
|
||||
QString RunConfiguration::disabledReason() const
|
||||
{
|
||||
if (!target()->hasBuildTarget(m_buildKey))
|
||||
|
||||
Reference in New Issue
Block a user