QtSupport: Simplify detection of qmake executable in PATH on Windows

Instead of enumerating the directory, search directly for the executable
first, like it is done on UNIX.

Change-Id: I6465d85efa20d97622afc227eaadcbc14b3e22f5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Orgad Shaneh
2019-10-21 22:56:09 +03:00
committed by Orgad Shaneh
parent d73632c6f3
commit 82859399e6

View File

@@ -78,7 +78,7 @@ static FilePath findQmakeInDir(const FilePath &path)
if (path.isEmpty())
return FilePath();
const QString qmake = "qmake";
const QString qmake = HostOsInfo::withExecutableSuffix("qmake");
QDir dir(path.toString());
if (dir.exists(qmake)) {
const QString qmakePath = dir.absoluteFilePath(qmake);