From 95510a842e86600b986b55d3a1f4734ce65b5b6c Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 10 Mar 2022 13:05:03 +0100 Subject: [PATCH] CMake: Drop two use of HostOsInfo::isXXXHost More friendly to docker. Change-Id: I3eeb859cc880fa24c2b1c74caf5a06ec4f27cb2f Reviewed-by: Cristian Adam Reviewed-by: Christian Stenger --- src/plugins/cmakeprojectmanager/cmaketool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmaketool.cpp b/src/plugins/cmakeprojectmanager/cmaketool.cpp index f4cc060e659..e3526737ea4 100644 --- a/src/plugins/cmakeprojectmanager/cmaketool.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketool.cpp @@ -234,7 +234,7 @@ FilePath CMakeTool::qchFilePath() const FilePath CMakeTool::cmakeExecutable(const FilePath &path) { - if (HostOsInfo::isMacHost()) { + if (path.osType() == OsTypeMac) { const QString executableString = path.toString(); const int appIndex = executableString.lastIndexOf(".app"); const int appCutIndex = appIndex + 4; @@ -251,7 +251,7 @@ FilePath CMakeTool::cmakeExecutable(const FilePath &path) const FilePath resolvedPath = path.canonicalPath(); // Evil hack to make snap-packages of CMake work. See QTCREATORBUG-23376 - if (HostOsInfo::isLinuxHost() && resolvedPath.fileName() == "snap") + if (path.osType() == OsTypeLinux && resolvedPath.fileName() == "snap") return path; return resolvedPath;