CMakePM: Treat empty build as empty when importing CMake builds

Qt Creator 4.15 with the CMake multi-config support it parses the
correct CMAKE_BUILD_TYPE file-api json export.

With the empty build Qt Creator was giving it a name: Build, which
was not part of the file-api json export.

Fixes: QTCREATORBUG-25387
Change-Id: Id0b5f1077f6473fa5aef09397a8257b253557597
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Cristian Adam
2021-03-03 16:06:20 +01:00
parent 47b569afa6
commit f7d729f0b5

View File

@@ -253,7 +253,7 @@ void FileApiReader::endState(const QFileInfo &replyFi)
const FilePath sourceDirectory = m_parameters.sourceDirectory;
const FilePath buildDirectory = m_parameters.workDirectory;
const FilePath topCmakeFile = m_cmakeFiles.size() == 1 ? *m_cmakeFiles.begin() : FilePath{};
const QString cmakeBuildType = m_parameters.cmakeBuildType;
const QString cmakeBuildType = m_parameters.cmakeBuildType == "Build" ? "" : m_parameters.cmakeBuildType;
m_lastReplyTimestamp = replyFi.lastModified();