CMakePM: Use case insensitive search for file-api configuration

Fixes the case of CMAKE_BUILD_TYPE=RELEASE on Linux, when the project
loading would fail due to "Release" build type name used by Qt Creator.

Change-Id: I2b1a643df190fd02acc422d154a717ed5cd9ce31
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Cristian Adam
2021-03-05 12:20:14 +01:00
parent 8c9faaf3e5
commit 69afdcd290

View File

@@ -892,7 +892,9 @@ FileApiData FileApiParser::parseData(const QFileInfo &replyFileInfo, const QStri
}
auto it = std::find_if(codeModels.cbegin(), codeModels.cend(),
[cmakeBuildType](const Configuration& cfg) { return cfg.name == cmakeBuildType; });
[cmakeBuildType](const Configuration& cfg) {
return QString::compare(cfg.name, cmakeBuildType, Qt::CaseInsensitive) == 0;
});
if (it == codeModels.cend()) {
errorMessage = QString("No '%1' CMake configuration found!").arg(cmakeBuildType);
qWarning() << errorMessage;