Bug#803937: qtcreator: Qt Creator adds a new configuration on each start
Package: qtcreator
Version: 3.5.1+dfsg-2
Severity: normal
Tags: patch
Dear Maintainer,
Qt Creator in Debian currently has a patch "always_autotect_qt_version".
This is the other half of detection related patches, the other half was
upstreamed for Qt Creator 3.5.
The remaining Debian patch however causes a new configuration to be
added to Options -> Build & Run -> Qt Versions tab every time Qt Creator
is started.
The attached further patch from Ubuntu resolves the problem.
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (450, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 4.2.0-1-686-pae (SMP w/1 CPU core)
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
Versions of packages qtcreator depends on:
ii libbotan-1.10-1 1.10.10-6+b1
ii libc6 2.19-22
ii libclang1-3.6 1:3.6.2-3
ii libgcc1 1:5.2.1-23
ii libqbscore1 1.4.3+dfsg-2
ii libqbsqtprofilesetup1 1.4.3+dfsg-2
ii libqt5concurrent5 5.5.1+dfsg-6
ii libqt5core5a [qtbase-abi-5-5-1] 5.5.1+dfsg-6
ii libqt5designer5 5.5.1-3
ii libqt5designercomponents5 5.5.1-3
ii libqt5gui5 5.5.1+dfsg-6
ii libqt5help5 5.5.1-3
ii libqt5network5 5.5.1+dfsg-6
ii libqt5printsupport5 5.5.1+dfsg-6
ii libqt5qml5 [qtdeclarative-abi-5-5-0] 5.5.1-3
ii libqt5quick5 5.5.1-3
ii libqt5quickwidgets5 5.5.1-3
ii libqt5sql5 5.5.1+dfsg-6
ii libqt5sql5-sqlite 5.5.1+dfsg-6
ii libqt5webkit5 5.5.1+dfsg-2
ii libqt5widgets5 5.5.1+dfsg-6
ii libqt5xml5 5.5.1+dfsg-6
ii libstdc++6 5.2.1-23
ii qml-module-qtquick-controls 5.5.1-2
ii qml-module-qtquick2 5.5.1-3
ii qtchooser 52-gae5eeef-2
ii qtcreator-data 3.5.1+dfsg-2
Versions of packages qtcreator recommends:
ii gdb 7.10-1
ii gnome-terminal [x-terminal-emulator] 3.18.1-1
ii lxterminal [x-terminal-emulator] 0.2.0-1
ii make 4.0-8.2
ii qt5-doc 5.5.1-1
ii qtbase5-dev-tools 5.5.1+dfsg-6
ii qtcreator-doc 3.5.1+dfsg-2
ii qtdeclarative5-dev-tools 5.5.1-3
ii qttools5-dev-tools 5.5.1-3
ii qttranslations5-l10n 5.5.1-2
ii qtxmlpatterns5-dev-tools 5.5.1-2
ii xterm [x-terminal-emulator] 320-1
Versions of packages qtcreator suggests:
pn cmake <none>
ii g++ 4:5.2.1-4
ii git 1:2.6.2-1
pn kdelibs5-data <none>
ii subversion 1.9.2-2
-- no debconf information
Author: Benjamin Zeller <benjamin.zeller@canonical.com>
Description: Fix piling up of Qt configurations.
The current Debian Qt autodetection patch registers a "new" Qt version
on each Qt Creator startup. This fixes it.
Last-Update: 2015-11-02
Forwarded: no
--- qtcreator/src/plugins/qtsupport/qtversionmanager.cpp 2015-10-21 17:53:48.000000000 +0200
+++ qtcreator/src/plugins/qtsupport/qtversionmanager.cpp 2015-10-22 11:50:21.323455563 +0200
@@ -458,7 +458,7 @@
QMap<QString, int> currentAutoVersions;
for (QMap<int, BaseQtVersion *>::const_iterator i = m_versions.begin(); i != m_versions.end(); ++i) {
- if (i.value()->isAutodetected()) {
+ if (i.value()->isAutodetected() && !i.value()->autodetectionSource().startsWith(QLatin1String("SDK."))) {
currentAutoVersions.insert(i.value()->qmakeCommand().toString(), i.key());
}
}
--- qtcreator/src/libs/utils/buildablehelperlibrary.cpp 2015-08-18 12:02:51.000000000 +0200
+++ qtcreator/src/libs/utils/buildablehelperlibrary.cpp 2015-11-02 12:36:14.974481823 +0100
@@ -88,8 +88,15 @@
if (dir.exists(qmake)) {
const QString qmakePath = dir.absoluteFilePath(qmake);
- if (isQmake(qmakePath))
+ if (isQmake(qmakePath)) {
+ QFileInfo fi(qmakePath);
+ if (BuildableHelperLibrary::isQtChooser(fi)) {
+ const QString qtChooserPath = BuildableHelperLibrary::qtChooserToQmakePath(fi.symLinkTarget());
+ if (!qtChooserPath.isEmpty())
+ return FileName::fromString(qtChooserPath);
+ }
return FileName::fromString(qmakePath);
+ }
}
// Prefer qmake-qt5 to qmake-qt4 by sorting the filenames in reverse order.
Reply to: