QtSupport: Do not prefer Qt4's uic unconditionally

A Linux distribution with Qt4 and Qt5 installed will typically have uic
and uic-qt4 present in the same directory. Our code always preferred
uic-qt4, even for Qt5, leading to potentially invalid code in the
generated ui header file.

Fixes: QTCREATORBUG-17739
Change-Id: Icf509de4e2fbee1d51fd049a8cf5a27d1ac5190b
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2020-11-10 12:53:22 +01:00
parent d1d95e78d6
commit f7399d520e

View File

@@ -1054,7 +1054,9 @@ QString BaseQtVersionPrivate::findHostBinary(HostBinaries binary) const
if (HostOsInfo::isWindowsHost()) { if (HostOsInfo::isWindowsHost()) {
possibleCommands << "uic.exe"; possibleCommands << "uic.exe";
} else { } else {
possibleCommands << "uic-qt4" << "uic4" << "uic"; possibleCommands << "uic";
if (q->qtVersion().majorVersion == 4)
possibleCommands << "uic-qt4" << "uic4";
} }
break; break;
case QScxmlc: case QScxmlc: