From c121e4858987822b254e24a2d7ebc51297e0a511 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Wed, 14 Oct 2020 11:41:39 +0300 Subject: [PATCH] Account for qmake.bat script for Qt 6 targets Qt 6 targets that are built with CMake have a qmake.bat instead of qmake.exe, while they can be registered from the Qt installer using QC's sdktool, it's not yet possible to select a new version manually because the FileDialog selection offers only qmake*.exe. Fixes: QTCREATORBUG-24721 Change-Id: I647be1e0fba2f306402b8dbed747e9614a4eb0ea Reviewed-by: Christian Kandeler --- src/libs/utils/buildablehelperlibrary.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libs/utils/buildablehelperlibrary.cpp b/src/libs/utils/buildablehelperlibrary.cpp index b1988bf8c35..fdebca957ec 100644 --- a/src/libs/utils/buildablehelperlibrary.cpp +++ b/src/libs/utils/buildablehelperlibrary.cpp @@ -179,7 +179,13 @@ QStringList BuildableHelperLibrary::possibleQMakeCommands() // On Unix some distributions renamed qmake with a postfix to avoid clashes // On OS X, Qt 4 binary packages also has renamed qmake. There are also symbolic links that are // named "qmake", but the file dialog always checks against resolved links (native Cocoa issue) - return QStringList(HostOsInfo::withExecutableSuffix("qmake*")); + QStringList commands(HostOsInfo::withExecutableSuffix("qmake*")); + + // Qt 6 CMake built targets, such as Android, are dependent on the host installation + // and use a script wrapper around the host qmake executable + if (HostOsInfo::isWindowsHost()) + commands.append("qmake*.bat"); + return commands; } // Copy helper source files to a target directory, replacing older files.