Commit 6f2a0c66 authored by Timo Jyrinki's avatar Timo Jyrinki
Browse files

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: default avatarDaniel Teske <>
parent 08eb65fb
......@@ -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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment