forked from qt-creator/qt-creator
QmakeProject: Make availableBuildTargets return a BuildTargetInfo list
It's what the "consumer side" expects. Change-Id: I1a4e75eda09f8626fcf65290e6c58a08eed9fdca Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -784,8 +784,8 @@ bool QmakeProject::hasApplicationProFile(const FileName &path) const
|
||||
return Utils::contains(list, Utils::equal(&QmakeProFile::filePath, path));
|
||||
}
|
||||
|
||||
QList<QString> QmakeProject::buildTargets(IRunConfigurationFactory::CreationMode mode,
|
||||
const QList<ProjectType> &projectTypes)
|
||||
QList<BuildTargetInfo> QmakeProject::buildTargets(IRunConfigurationFactory::CreationMode mode,
|
||||
const QList<ProjectType> &projectTypes)
|
||||
{
|
||||
QList<ProjectType> realTypes = projectTypes;
|
||||
if (realTypes.isEmpty())
|
||||
@@ -800,7 +800,12 @@ QList<QString> QmakeProject::buildTargets(IRunConfigurationFactory::CreationMode
|
||||
temp = filtered.isEmpty() ? files : filtered;
|
||||
}
|
||||
|
||||
return Utils::transform(temp, [](QmakeProFile *f) { return f->filePath().toString(); });
|
||||
return Utils::transform(temp, [](QmakeProFile *f) {
|
||||
BuildTargetInfo bti;
|
||||
bti.targetName = f->filePath().toString();
|
||||
bti.displayName = QFileInfo(bti.targetName).completeBaseName();
|
||||
return bti;
|
||||
});
|
||||
}
|
||||
|
||||
void QmakeProject::activeTargetWasChanged()
|
||||
|
||||
Reference in New Issue
Block a user