CMakePM: Filter out (more) empty key configuration items

The code was not filtering empty configuration items
that were the result of bad string input like:
-DMY_KEY:PATH/some/path/but/no/equal/sign

Amends a2a8f56b6e

Task-number: QTCREATORBUG-27237
Change-Id: Ic307eceb66dc0e00b073c9aabb04fe70a223cf08
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Cristian Adam
2022-03-31 17:30:02 +02:00
parent 1833bf285e
commit 1e9e09d765

View File

@@ -349,7 +349,8 @@ CMakeConfig CMakeConfig::fromArguments(const QStringList &list, QStringList &unk
unknownOptions.append(i);
}
return result;
return Utils::filtered(result, [](const CMakeConfigItem &item) { return !item.key.isEmpty(); });
}
CMakeConfig CMakeConfig::fromFile(const Utils::FilePath &cacheFile, QString *errorMessage)