forked from qt-creator/qt-creator
CMake: Make fromMap more robust for CMakeBuildConfigurations
Do not add broken configuration items read in from the .user file. Change-Id: Ia4372d040456252fdd0750b597777979ad568ca6 Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com> Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -105,8 +105,9 @@ bool CMakeBuildConfiguration::fromMap(const QVariantMap &map)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
const CMakeConfig conf
|
const CMakeConfig conf
|
||||||
= Utils::transform(map.value(QLatin1String(CONFIGURATION_KEY)).toStringList(),
|
= Utils::filtered(Utils::transform(map.value(QLatin1String(CONFIGURATION_KEY)).toStringList(),
|
||||||
[](const QString &v) { return CMakeConfigItem::fromString(v); });
|
[](const QString &v) { return CMakeConfigItem::fromString(v); }),
|
||||||
|
[](const CMakeConfigItem &c) { return !c.isNull(); });
|
||||||
|
|
||||||
// Legacy (pre QtC 3.7):
|
// Legacy (pre QtC 3.7):
|
||||||
const QStringList args = QtcProcess::splitArgs(map.value(QLatin1String(INITIAL_ARGUMENTS)).toString());
|
const QStringList args = QtcProcess::splitArgs(map.value(QLatin1String(INITIAL_ARGUMENTS)).toString());
|
||||||
|
Reference in New Issue
Block a user