forked from qt-creator/qt-creator
Add some pass-through fields for {RunConfiguration,BuildTarget}Info
This is unused here by will be used in subsequent changes. Project parsing yields information on whether there's a console requested and whether the "magic" qtc_runnable flag for primary executables has been seen. Also, the current "targetname" is taking different roles in different context, try to split-off the pure visual aspect by allowing to specify an explicit displayName, with fallback to the current decorated targetName if empty. Task-number: QTCREATORBUG-19985 Change-Id: I11edfcaafd17972f6a78aeff3fbbf3d7eb91a213 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -471,8 +471,13 @@ QList<RunConfigurationCreationInfo>
|
||||
RunConfigurationFactory::availableCreators(Target *parent) const
|
||||
{
|
||||
return Utils::transform(parent->applicationTargets().list, [parent, this](const BuildTargetInfo &ti) {
|
||||
const QString displayName = decoratedTargetName(ti.targetName, parent);
|
||||
return RunConfigurationCreationInfo(this, m_runConfigBaseId, ti.targetName, displayName);
|
||||
QString displayName = ti.displayName;
|
||||
if (displayName.isEmpty())
|
||||
displayName = decoratedTargetName(ti.targetName, parent);
|
||||
return RunConfigurationCreationInfo(this, m_runConfigBaseId, ti.targetName, displayName,
|
||||
ti.isAutoRunnable ? RunConfigurationCreationInfo::AlwaysCreate
|
||||
: RunConfigurationCreationInfo::ManualCreationOnly,
|
||||
ti.usesTerminal);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user