From 6f2a0c66a33ed838bbdfc7aaa255227784299864 Mon Sep 17 00:00:00 2001 From: Timo Jyrinki Date: Thu, 4 Apr 2013 13:35:10 +0300 Subject: [PATCH] Use the qtchooser default Qt on first run instead of forcing Qt 4. Task-number: QTCREATORBUG-9068 This makes 'qmake' the first qmake binary to check when iterating over possible Qt:s on the system. Without this if the system uses the old way of adding version suffixes to Qt binaries (kept for Qt 4 for compatibility reasons in Debian and Ubuntu), Qt 4 would be used over Qt 5 even if Qt 5 is the default. I've tested it to be working on Ubuntu 13.04 and 12.04 LTS as follows, with Qt Creator 2.7 patched. At each phase I removed the old Qt Creator configuration to simulate first run. 1. With Qt 5 as the default, no qmake-qt4, Qt 5 continues to be found. 2. With Qt 5 as the default + qmake-qt4, Qt Creator now still finds Qt 5 as it's the /usr/bin/qmake - this is the part that fixes the bug. 3. With Qt 4 as the default, Qt 4 is found via /usr/bin/qmake (before, it would have been found via qmake-qt4 symlink). 4. With qtchooser removed but qt4-qmake still installed, Qt 4 is found via /usr/bin/qmake-qt4 as a fallback. Change-Id: I05ed6dc0e81336330a0b3b458249e9c7c928cc40 Reviewed-by: Daniel Teske --- src/libs/utils/buildablehelperlibrary.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/utils/buildablehelperlibrary.cpp b/src/libs/utils/buildablehelperlibrary.cpp index 6037e1d357a..670624a20cb 100644 --- a/src/libs/utils/buildablehelperlibrary.cpp +++ b/src/libs/utils/buildablehelperlibrary.cpp @@ -118,8 +118,8 @@ QStringList BuildableHelperLibrary::possibleQMakeCommands() // On unix some distributions renamed qmake to avoid clashes QStringList result; - result << QLatin1String("qmake-qt4") << QLatin1String("qmake4") - << QLatin1String("qmake-qt5") << QLatin1String("qmake5") << QLatin1String("qmake"); + result << QLatin1String("qmake") << QLatin1String("qmake-qt4") << QLatin1String("qmake4") + << QLatin1String("qmake-qt5") << QLatin1String("qmake5") ; return result; }