forked from qt-creator/qt-creator
ProjectExplorer: Streamline OutputFormatter creation a bit
Note that the concept of a single monolithic OutputFormatter per RunConfiguration (and why RunConfiguration, not RunControl to start with?) is unchanged and suboptimal as one cannot easily combine existing use cases, e.g. Python_and_Qt. Change-Id: Ibeb8191020387324f22ed313230293597f96e36a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -83,6 +83,9 @@ CMakeRunConfiguration::CMakeRunConfiguration(Target *target)
|
||||
|
||||
connect(target->project(), &Project::parsingFinished,
|
||||
this, &CMakeRunConfiguration::updateTargetInformation);
|
||||
|
||||
if (QtSupport::QtKitInformation::qtVersion(target->kit()))
|
||||
setOutputFormatter<QtSupport::QtOutputFormatter>();
|
||||
}
|
||||
|
||||
Runnable CMakeRunConfiguration::runnable() const
|
||||
@@ -143,13 +146,6 @@ QString CMakeRunConfiguration::disabledReason() const
|
||||
return RunConfiguration::disabledReason();
|
||||
}
|
||||
|
||||
Utils::OutputFormatter *CMakeRunConfiguration::createOutputFormatter() const
|
||||
{
|
||||
if (QtSupport::QtKitInformation::qtVersion(target()->kit()))
|
||||
return new QtSupport::QtOutputFormatter(target()->project());
|
||||
return RunConfiguration::createOutputFormatter();
|
||||
}
|
||||
|
||||
void CMakeRunConfiguration::updateTargetInformation()
|
||||
{
|
||||
setDefaultDisplayName(m_title);
|
||||
|
||||
Reference in New Issue
Block a user