ProjectExplorer: Move some of the BuildInfo setup code to central places

Change-Id: I8893366acb187ea1a94a8ca272ded2c46cb521d1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-01-09 18:42:28 +01:00
parent 27bbe6462b
commit b4ee6eb3c0
26 changed files with 114 additions and 143 deletions

View File

@@ -232,16 +232,12 @@ Kit *QmakeProjectImporter::createKit(void *directoryData) const
return createTemporaryKit(data->qtVersionData, data->parsedSpec, data->archConfig, data->osType);
}
const QList<BuildInfo> QmakeProjectImporter::buildInfoListForKit(const Kit *k, void *directoryData) const
const QList<BuildInfo> QmakeProjectImporter::buildInfoList(void *directoryData) const
{
auto *data = static_cast<DirectoryData *>(directoryData);
auto factory = dynamic_cast<QmakeBuildConfigurationFactory *>(
BuildConfigurationFactory::find(k, projectFilePath()));
if (!factory)
return {};
// create info:
BuildInfo info(factory);
BuildInfo info;
if (data->buildConfig & BaseQtVersion::DebugBuild) {
info.buildType = BuildConfiguration::Debug;
info.displayName = QCoreApplication::translate("QmakeProjectManager::Internal::QmakeProjectImporter", "Debug");
@@ -249,7 +245,6 @@ const QList<BuildInfo> QmakeProjectImporter::buildInfoListForKit(const Kit *k, v
info.buildType = BuildConfiguration::Release;
info.displayName = QCoreApplication::translate("QmakeProjectManager::Internal::QmakeProjectImporter", "Release");
}
info.kitId = k->id();
info.buildDirectory = data->buildDirectory;
QmakeExtraBuildInfo extra;