forked from qt-creator/qt-creator
CMakeProjectManager: Remove compatibility code with < 4.13
This hunk was added as part of 01b0d4f8f5 in 2020.
Change-Id: I3b520005dc2462397ddfb1a2f6671603131ddced
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -1576,36 +1576,7 @@ QVariantMap CMakeBuildConfiguration::toMap() const
|
|||||||
|
|
||||||
bool CMakeBuildConfiguration::fromMap(const QVariantMap &map)
|
bool CMakeBuildConfiguration::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
if (!BuildConfiguration::fromMap(map))
|
return BuildConfiguration::fromMap(map);
|
||||||
return false;
|
|
||||||
|
|
||||||
const CMakeConfig conf
|
|
||||||
= Utils::filtered(Utils::transform(map.value(QLatin1String(CONFIGURATION_KEY)).toStringList(),
|
|
||||||
[](const QString &v) { return CMakeConfigItem::fromString(v); }),
|
|
||||||
[](const CMakeConfigItem &c) { return !c.isNull(); });
|
|
||||||
|
|
||||||
// TODO: Upgrade from Qt Creator < 4.13: Remove when no longer supported!
|
|
||||||
const QString buildTypeName = [this] {
|
|
||||||
switch (buildType()) {
|
|
||||||
case Debug:
|
|
||||||
return QString("Debug");
|
|
||||||
case Profile:
|
|
||||||
return QString("RelWithDebInfo");
|
|
||||||
case Release:
|
|
||||||
return QString("Release");
|
|
||||||
case Unknown:
|
|
||||||
default:
|
|
||||||
return QString("");
|
|
||||||
}
|
|
||||||
}();
|
|
||||||
if (m_buildSystem->initialCMakeArguments().isEmpty()) {
|
|
||||||
CommandLine cmd = defaultInitialCMakeCommand(kit(), buildTypeName);
|
|
||||||
for (const CMakeConfigItem &item : conf)
|
|
||||||
cmd.addArg(item.toArgument(macroExpander()));
|
|
||||||
m_buildSystem->setInitialCMakeArguments(cmd.splitArguments());
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath CMakeBuildConfiguration::shadowBuildDirectory(const FilePath &projectFilePath,
|
FilePath CMakeBuildConfiguration::shadowBuildDirectory(const FilePath &projectFilePath,
|
||||||
|
|||||||
Reference in New Issue
Block a user