From f7399d520e8a6b7cbf133c60285d5ef7479e8d1c Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 10 Nov 2020 12:53:22 +0100 Subject: [PATCH] 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 --- src/plugins/qtsupport/baseqtversion.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index f9eb26a4f06..5efec8e297b 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -1054,7 +1054,9 @@ QString BaseQtVersionPrivate::findHostBinary(HostBinaries binary) const if (HostOsInfo::isWindowsHost()) { possibleCommands << "uic.exe"; } else { - possibleCommands << "uic-qt4" << "uic4" << "uic"; + possibleCommands << "uic"; + if (q->qtVersion().majorVersion == 4) + possibleCommands << "uic-qt4" << "uic4"; } break; case QScxmlc: