From 70e1aad0416afd5cad6e34e131f79fff6ef47a10 Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Thu, 8 Aug 2013 15:11:19 +0200 Subject: [PATCH] QMake: Also check for QtChooser in DesktopQtVersion::fromMap This is only done for DesktopQtVersions, as I believe that only those are affected by this. Fixes more issues described in Task-number: QTCREATORBUG-9841 Change-Id: Ifb7a797e71c812daef5bc5139bc339fb11423c15 Reviewed-by: Tobias Hunger Reviewed-by: Orgad Shaneh --- src/plugins/qtsupport/baseqtversion.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 1e256c5c37a..e73f8e24b53 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -388,6 +388,15 @@ void BaseQtVersion::fromMap(const QVariantMap &map) QString string = map.value(QLatin1String(QTVERSIONQMAKEPATH)).toString(); if (string.startsWith(QLatin1Char('~'))) string.remove(0, 1).prepend(QDir::homePath()); + + QFileInfo fi(string); + if (BuildableHelperLibrary::isQtChooser(fi)) { + // we don't want to treat qtchooser as a normal qmake + // see e.g. QTCREATORBUG-9841, also this lead to users changing what + // qtchooser forwards too behind our backs, which will inadvertly lead to bugs + string = BuildableHelperLibrary::qtChooserToQmakePath(string); + } + ctor(FileName::fromString(string)); }