CMakePM: Filter out empty key configuration items

There were cases when an empty "-D" CMake command line parameter would
be genered, resulting in a failed CMake project configuration.

Task-number: QTCREATORBUG-27256
Fixes: QTCREATORBUG-27237
Change-Id: Ic26c9dfe72db154cd76fdcc913eb7fe623b3123c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Cristian Adam
2022-03-29 15:46:28 +02:00
parent b4f2ac0dd4
commit a2a8f56b6e
2 changed files with 7 additions and 3 deletions

View File

@@ -619,7 +619,7 @@ void CMakeBuildSettingsWidget::updateInitialCMakeArguments()
*it = ci;
if (ci.isUnset)
initialList.erase(it);
} else {
} else if (!ci.key.isEmpty()) {
initialList.push_back(ci);
}
}