forked from qt-creator/qt-creator
ProjectExplorer: Consider the case of no active target
... in BuildManager. Fixes: QTCREATORBUG-29207 Change-Id: Icbcdc957cd9105f7c4b9bc27fc9feb34dd547955 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -61,7 +61,9 @@ static const QList<Target *> targetsForSelection(const Project *project,
|
|||||||
{
|
{
|
||||||
if (targetSelection == ConfigSelection::All)
|
if (targetSelection == ConfigSelection::All)
|
||||||
return project->targets();
|
return project->targets();
|
||||||
return {project->activeTarget()};
|
if (project->activeTarget())
|
||||||
|
return {project->activeTarget()};
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
static const QList<BuildConfiguration *> buildConfigsForSelection(const Target *target,
|
static const QList<BuildConfiguration *> buildConfigsForSelection(const Target *target,
|
||||||
|
|||||||
Reference in New Issue
Block a user