Utils: Accommodate cross-platform qmake setups

File picker dialog filter was based exclusively on the host system.
This created problems in some remote scenarios, for example,
on Windows host it was impossible to select Linux target qmake.

Fixes: QTCREATORBUG-31939
Change-Id: I6a6716a4ce198cd5732f39525baf4b8ded11f376
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Andrii Semkiv
2024-11-01 09:58:04 +01:00
parent b656fef202
commit d5d4e2da8e

View File

@@ -159,13 +159,10 @@ 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)
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;
// Remote build configurations (e.g. Windows host + Linux target) must be taken into account too
return {"qmake*"};
}
} // namespace Utils