diff --git a/dist/changes-2.6.1 b/dist/changes-2.6.1
new file mode 100644
index 0000000000000000000000000000000000000000..3e148d3eccdd34818c15bf691b4c234a016233cd
--- /dev/null
+++ b/dist/changes-2.6.1
@@ -0,0 +1,166 @@
+Qt Creator version 2.6.1 is a bugfix release.
+
+The most important changes are listed in this document. For a complete
+list of changes, see the Git log for the Qt Creator sources that
+you can check out from the public Git repository. For example:
+
+git clone git://gitorious.org/qt-creator/qt-creator.git
+git log --cherry-pick --pretty=oneline v2.6.0..v2.6.1
+
+General
+   * Fixed opening files ending in "++" (QTCREATORBUG-8272)
+
+Editing
+   * Fixed freeze when searching for certain regular expressions in a selected
+     block (QTCREATORBUG-8159)
+
+Managing Projects
+   * Fixed setting the default kit (QTCREATORBUG-8205)
+   * Fixed several crashes when managing kits
+   * Fixed cloning of auto-detected kits (QTCREATORBUG-8231)
+
+QMake Projects
+
+CMake Projects
+   * Fixed a crash when selecting kit without tool chain when opening project
+
+Debugging
+   * Fixed connection problems when remotely attaching to a running application
+
+Debugging QML/JS
+   * Fixed remote QML debugging which ignored the kit settings
+   * Fixed that locals and expressions could become disabled (QTCREATORBUG-8167)
+
+Analyzing Code
+
+C++ Support
+   * Fixed code completion for Qt containers (QTCREATORBUG-8228)
+
+QML/JS Support
+   * Fixed the warning about missing QmlViewer in Qt 5 (QTCREATORBUG-8187)
+   * Split up Qt Quick wizards into Qt Quick 1 and Qt Quick 2 versions
+     (QTCREATORBUG-8236, QTCREATORBUG-8269)
+
+GLSL Support
+
+Qt Quick Designer
+   * Removed a confusing warning about qml2puppet not being found (QTCREATORBUG-7858)
+
+Help
+
+Qt Designer
+
+Version control plugins
+
+Git
+   * Fixed detection of Git version with 2-digit patch number
+SVN
+
+FakeVim
+
+Platform Specific
+
+Mac
+   * Fixed missing interface languages (QTCREATORBUG-8244)
+   * Added missing QWebView and other widgets to Qt Designer (QTCREATORBUG-8256)
+   * Fixed layout issues in preferences (QTCREATORBUG-8345)
+
+Linux (GNOME and KDE)
+
+Windows
+   * Fixed Windows SDK 7.1 compiler detection
+   * Fixed empty welcome screen when running from incorrectly capitalized
+     application directory (QTCREATORBUG-6126)
+
+Symbian Target
+
+Remote Linux Support
+
+Madde
+
+Credits go to:
+    Aleksey Sidorov
+    Alessandro Portale
+    Andreas Holzammer
+    Andre Hartmann
+    André Pönitz
+    Aurélien Gâteau
+    Aurindam Jana
+    axasia
+    Bill King
+    BogDan Vatra
+    Bojan Petrovic
+    Bradley T. Hughes
+    Campbell Barton
+    Casper van Donderen
+    Christiaan Janssen
+    Christian Kamm
+    Christian Kandeler
+    Christian Stenger
+    cnavarro
+    Daniel Molkentin
+    Daniel Teske
+    David Schulz
+    Dmitry Savchenko
+    Eike Ziller
+    Erik Verbruggen
+    Fawzi Mohamed
+    Flex Ferrum
+    Francois Ferrand
+    Franklin Weng
+    Friedemann Kleint
+    hluk
+    Hugues Delorme
+    Jarek Kobus
+    Jędrzej Nowacki
+    Jörg Bornemann
+    Jonathan Liu
+    Juei-ray Tseng
+    Juhapekka Piiroinen
+    Kaffeine
+    Kai Köhne
+    Kevin Krammer
+    Karsten Heimrich
+    Knut Petter Svendsen
+    Konstantin Ritt
+    Konstantin Tokarev
+    Leandro Melo
+    Leena Miettinen
+    Lukas Geyer
+    Lukas Holecek
+    Marc Mutz
+    Marco Bubke
+    Marius Storm-Olsen
+    Martin Aumüller
+    Mathias Hasselmann
+    Mehdi Fekari
+    Montel Laurent
+    Morten Johan Sorvig
+    Nicolas Arnaud-Cormos
+    Nikolai Kosjar
+    Orgad Shaneh
+    Oswald Buddenhagen
+    Oto Magaldadze
+    Peter Kümmel
+    Pierre Rossi
+    Przemyslaw Gorszkowski
+    raidsan
+    Robert Löhning
+    Ryan May
+    Sergey Belyashov
+    Sergey Shambir
+    Sergio Ahumada
+    Simjees Abraham
+    Stephen Kelly
+    Takumi Asaki
+    Theo J.A. de Vries
+    Thiago Macieira
+    Thomas Hartmann
+    Thorbjørn Lindeijer
+    Tim Jenssen
+    Tobias Hunger
+    Tobias Nätterlund
+    Tommi Asp
+    Tyler Mandry
+    Vladislav Navrocky
+    Yuchen Deng
diff --git a/qtcreator.pro b/qtcreator.pro
index 82c8a75a7b5673d4ef5de349d313f412873d14b5..a35f884d101bccbe9d8ba61c841512608aed6748 100644
--- a/qtcreator.pro
+++ b/qtcreator.pro
@@ -19,9 +19,12 @@ OTHER_FILES += dist/copyright_template.txt \
     qtcreator.qbp \
     qbs/pluginspec/pluginspec.qbs
 
+contains(QT_ARCH, i386): ARCHITECTURE = x86
+else: ARCHITECTURE = $$QT_ARCH
+
 macx: PLATFORM = "mac"
 else:win32: PLATFORM = "windows"
-else:linux-*: PLATFORM = "linux-$${QT_ARCH}"
+else:linux-*: PLATFORM = "linux-$${ARCHITECTURE}"
 else: PLATFORM = "unknown"
 
 PATTERN = $${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)
diff --git a/src/plugins/android/androidruncontrol.cpp b/src/plugins/android/androidruncontrol.cpp
index 5ad51c5fc248b36fe8e89c2ca0a9418d3672945b..45dfdf391f39484336bcc36bd93ef1a9ca556563 100644
--- a/src/plugins/android/androidruncontrol.cpp
+++ b/src/plugins/android/androidruncontrol.cpp
@@ -71,7 +71,7 @@ void AndroidRunControl::start()
 
 RunControl::StopResult AndroidRunControl::stop()
 {
-    m_runner->stop();
+    m_runner->stop(true);
     return StoppedSynchronously;
 }
 
diff --git a/src/plugins/android/androidrunner.cpp b/src/plugins/android/androidrunner.cpp
index cbf6c35787de3867bdf524255bd8ec7fabc77938..0df3536f6f20d6b3016402df46a985c14aad43e1 100644
--- a/src/plugins/android/androidrunner.cpp
+++ b/src/plugins/android/androidrunner.cpp
@@ -68,7 +68,7 @@ AndroidRunner::AndroidRunner(QObject *parent, AndroidRunConfiguration *runConfig
 
 AndroidRunner::~AndroidRunner()
 {
-    stop();
+    stop(false);
 }
 
 void AndroidRunner::checkPID()
@@ -248,7 +248,7 @@ void AndroidRunner::startLogcat()
     emit remoteProcessStarted(5039);
 }
 
-void AndroidRunner::stop()
+void AndroidRunner::stop(bool async)
 {
     QMutexLocker locker(&m_mutex);
     m_adbLogcatProcess.kill();
@@ -256,6 +256,14 @@ void AndroidRunner::stop()
     m_checkPIDTimer.stop();
     if (m_processPID == -1)
         return; // don't emit another signal
+    if (async)
+        QtConcurrent::run(this, &AndroidRunner::asyncStop);
+    else
+        asyncStop();
+}
+
+void AndroidRunner::asyncStop()
+{
     killPID();
     emit remoteProcessFinished(tr("\n\n'%1' killed.").arg(m_packageName));
 }
diff --git a/src/plugins/android/androidrunner.h b/src/plugins/android/androidrunner.h
index cbe9656ccc1a89c57c1708fa75b315e22fa6de29..24be23db8b58ead9241c5fb00fc506fdee643f18 100644
--- a/src/plugins/android/androidrunner.h
+++ b/src/plugins/android/androidrunner.h
@@ -55,7 +55,8 @@ public:
 
 public slots:
     void start();
-    void stop();
+    void stop(bool async);
+    void asyncStop();
 
 signals:
     void remoteProcessStarted(int gdbServerPort = -1, int qmlPort = -1);
diff --git a/src/plugins/bineditor/bineditorplugin.cpp b/src/plugins/bineditor/bineditorplugin.cpp
index 0eaebaa27669c2d7e705375a5fe0a6c9169477a6..692a7d4b83c03f76871ef6c5cc8e84290745f22e 100644
--- a/src/plugins/bineditor/bineditorplugin.cpp
+++ b/src/plugins/bineditor/bineditorplugin.cpp
@@ -218,7 +218,7 @@ public:
     bool open(QString *errorString, const QString &fileName, quint64 offset = 0) {
         QFile file(fileName);
         quint64 size = static_cast<quint64>(file.size());
-        if (size == 0) {
+        if (size == 0 && !fileName.isEmpty()) {
             QString msg = tr("The Binary Editor cannot open empty files.");
             if (errorString)
                 *errorString = msg;
diff --git a/src/plugins/clearcase/checkoutdialog.ui b/src/plugins/clearcase/checkoutdialog.ui
index 3af4fa0eeb30aa149ab27dbd8f682344e0c2f0f9..ecbe69cff568cbc88cc0244df58912fd976d94b1 100644
--- a/src/plugins/clearcase/checkoutdialog.ui
+++ b/src/plugins/clearcase/checkoutdialog.ui
@@ -32,7 +32,11 @@
     </widget>
    </item>
    <item>
-    <widget class="QPlainTextEdit" name="txtComment"/>
+    <widget class="QPlainTextEdit" name="txtComment">
+     <property name="tabChangesFocus">
+      <bool>true</bool>
+     </property>
+    </widget>
    </item>
    <item>
     <widget class="QCheckBox" name="chkReserved">
diff --git a/src/plugins/cpptools/cppcompletionassist.cpp b/src/plugins/cpptools/cppcompletionassist.cpp
index 7f7225dad832de73a7cbca3285398413b17269c0..38f6db543a02699bbe229e01bca0d0c130d2d909 100644
--- a/src/plugins/cpptools/cppcompletionassist.cpp
+++ b/src/plugins/cpptools/cppcompletionassist.cpp
@@ -343,7 +343,7 @@ void CppAssistProposalItem::applyContextualContent(TextEditor::BaseTextEditor *e
     if (!inEditor.isEmpty()) {
         preserveLength = toInsert.length() - (editor->position() - basePosition);
         const int inEditorLength = inEditor.length();
-        while (preserveLength) {
+        while (preserveLength > 0) {
             if (inEditor.startsWith(toInsert.right(preserveLength))
                     && (inEditorLength == preserveLength
                         || (!inEditor.at(preserveLength).isLetterOrNumber()
diff --git a/src/plugins/debugger/Debugger.pluginspec.in b/src/plugins/debugger/Debugger.pluginspec.in
index 2debe9b93f59d0ad7848321bbbc0b08387431dbc..153529f85128854e6dfcddacdf70cc3b26720140 100644
--- a/src/plugins/debugger/Debugger.pluginspec.in
+++ b/src/plugins/debugger/Debugger.pluginspec.in
@@ -24,9 +24,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
     <argumentList>
         <argument name=\"-debug\" parameter=\"pid\">Attach to local process</argument>
         <argument name=\"-debug\" parameter=\"executable\">Start and debug executable</argument>
-        <argument name=\"-debug [executable,]core=&lt;corefile&gt;[,sysroot=&lt;sysroot&gt;]\">
+        <argument name=\"-debug [executable,]core=&lt;corefile&gt;[,kit=&lt;kit&gt;]\">
                 Attach to core file</argument>
-        <argument name=\"-debug &lt;executable&gt;,server=&lt;server:port&gt;[,sysroot=&lt;sysroot&gt;][,arch=&lt;arch&gt;]\">
+        <argument name=\"-debug &lt;executable&gt;,server=&lt;server:port&gt;[,kit=&lt;kit&gt;]\">
                 Attach to remote debug server</argument>
         <argument name=\"-wincrashevent\"
             parameter=\"eventhandle:pid\">
diff --git a/src/plugins/debugger/gdb/classicgdbengine.cpp b/src/plugins/debugger/gdb/classicgdbengine.cpp
index 2c603829ce33fbcebacdbcb0f01d69325d61ba74..7a8214fa269ef2c12752b6cfbd9523e80c62a9d5 100644
--- a/src/plugins/debugger/gdb/classicgdbengine.cpp
+++ b/src/plugins/debugger/gdb/classicgdbengine.cpp
@@ -1276,6 +1276,9 @@ static void showQtDumperLibraryWarning(const QString &details)
         "expand the Details section and click Build All."));
     if (!details.isEmpty())
         dialog.setDetailedText(details);
+#if defined(Q_OS_MAC) && QT_VERSION >= 0x050000
+    dialog.setWindowModality(Qt::WindowModal);
+#endif
     dialog.exec();
     if (dialog.clickedButton() == qtPref) {
         Core::ICore::showOptionsDialog(
diff --git a/src/plugins/projectexplorer/abstractmsvctoolchain.cpp b/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
index 1517686a2c2475a421d9fa6e5879e98159d1196f..33470a99b6ac3a258e64cda8dc191f6a0e593e16 100644
--- a/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
+++ b/src/plugins/projectexplorer/abstractmsvctoolchain.cpp
@@ -153,7 +153,7 @@ QString AbstractMsvcToolChain::makeCommand(const Utils::Environment &environment
 
 Utils::FileName AbstractMsvcToolChain::compilerCommand() const
 {
-    Utils::Environment env;
+    Utils::Environment env = Utils::Environment::systemEnvironment();
     addToEnvironment(env);
     return Utils::FileName::fromString(env.searchInPath(QLatin1String("cl.exe")));
 }
diff --git a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp
index 71b868c8d5ab9cb2508a5f3e8f4040b6554504a5..237adb69ff3ced3667dc18f7ce7a92d6a9878934 100644
--- a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp
+++ b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp
@@ -135,6 +135,8 @@ void DeviceManager::copy(const DeviceManager *source, DeviceManager *target, boo
 
 void DeviceManager::save()
 {
+    if (d->clonedInstance == this)
+        return;
     QVariantMap data;
     data.insert(QLatin1String(DeviceManagerKey), toMap());
     d->writer->save(data, Core::ICore::mainWindow());
@@ -341,7 +343,8 @@ DeviceManager::DeviceManager(bool isInstance) : d(new DeviceManagerPrivate)
 
 DeviceManager::~DeviceManager()
 {
-    delete d->writer;
+    if (d->clonedInstance != this)
+        delete d->writer;
     delete d;
 }
 
diff --git a/src/plugins/projectexplorer/kitmanager.cpp b/src/plugins/projectexplorer/kitmanager.cpp
index a036cfb97d17435fe2a51bb07e01625cacdf3198..ce7938a914dd17fc254765ce9f0452dbdeef9b50 100644
--- a/src/plugins/projectexplorer/kitmanager.cpp
+++ b/src/plugins/projectexplorer/kitmanager.cpp
@@ -89,8 +89,7 @@ public:
 };
 
 KitManagerPrivate::KitManagerPrivate()
-    : m_defaultKit(0), m_initialized(false),
-      m_writer(0)
+    : m_defaultKit(0), m_initialized(false), m_writer(0)
 { }
 
 KitManagerPrivate::~KitManagerPrivate()
@@ -131,7 +130,15 @@ KitManager::KitManager(QObject *parent) :
 
 void KitManager::restoreKits()
 {
-    QTC_ASSERT(!d->m_writer, return);
+    QTC_ASSERT(!d->m_initialized, return);
+    static bool initializing = false;
+
+    if (initializing) // kits will call kits() to check their display names, which will trigger another
+                      // call to restoreKits, which ...
+        return;
+
+    initializing = true;
+
     QList<Kit *> kitsToRegister;
     QList<Kit *> kitsToValidate;
     QList<Kit *> kitsToCheck;
@@ -203,6 +210,7 @@ void KitManager::restoreKits()
         setDefaultKit(k);
 
     d->m_writer = new Utils::PersistentSettingsWriter(settingsFileName(), QLatin1String("QtCreatorProfiles"));
+    d->m_initialized = true;
     emit kitsChanged();
 }
 
@@ -320,10 +328,8 @@ KitManager::KitList KitManager::restoreKits(const Utils::FileName &fileName)
 
 QList<Kit *> KitManager::kits(const KitMatcher *m) const
 {
-    if (!d->m_initialized) {
-        d->m_initialized = true;
+    if (!d->m_initialized)
         const_cast<KitManager *>(this)->restoreKits();
-    }
 
     QList<Kit *> result;
     foreach (Kit *k, d->m_kitList) {
@@ -351,12 +357,10 @@ Kit *KitManager::find(const KitMatcher *m) const
     return matched.isEmpty() ? 0 : matched.first();
 }
 
-Kit *KitManager::defaultKit()
+Kit *KitManager::defaultKit() const
 {
-    if (!d->m_initialized) {
-        d->m_initialized = true;
-        restoreKits();
-    }
+    if (!d->m_initialized)
+        const_cast<KitManager *>(this)->restoreKits();
     return d->m_defaultKit;
 }
 
@@ -378,7 +382,7 @@ void KitManager::notifyAboutUpdate(ProjectExplorer::Kit *k)
 {
     if (!k)
         return;
-    if (kits().contains(k))
+    if (kits().contains(k) && d->m_initialized)
         emit kitUpdated(k);
     else
         emit unmanagedKitUpdated(k);
@@ -395,7 +399,8 @@ bool KitManager::registerKit(ProjectExplorer::Kit *k)
 
     // make sure we have all the information in our kits:
     addKit(k);
-    emit kitAdded(k);
+    if (d->m_initialized)
+        emit kitAdded(k);
     return true;
 }
 
@@ -415,7 +420,8 @@ void KitManager::deregisterKit(Kit *k)
         }
         setDefaultKit(newDefault);
     }
-    emit kitRemoved(k);
+    if (d->m_initialized)
+        emit kitRemoved(k);
     delete k;
 }
 
@@ -426,7 +432,8 @@ void KitManager::setDefaultKit(Kit *k)
     if (k && !kits().contains(k))
         return;
     d->m_defaultKit = k;
-    emit defaultkitChanged();
+    if (d->m_initialized)
+        emit defaultkitChanged();
 }
 
 void KitManager::validateKits()
@@ -440,12 +447,14 @@ void KitManager::addKit(Kit *k)
     if (!k)
         return;
 
-    KitGuard g(k);
-    foreach (KitInformation *ki, d->m_informationList) {
-        if (!k->hasValue(ki->dataId()))
-            k->setValue(ki->dataId(), ki->defaultValue(k));
-        else
-            ki->fix(k);
+    {
+        KitGuard g(k);
+        foreach (KitInformation *ki, d->m_informationList) {
+            if (!k->hasValue(ki->dataId()))
+                k->setValue(ki->dataId(), ki->defaultValue(k));
+            else
+                ki->fix(k);
+        }
     }
 
     d->m_kitList.append(k);
diff --git a/src/plugins/projectexplorer/kitmanager.h b/src/plugins/projectexplorer/kitmanager.h
index b1c4f13b6588c978c9d2ca84a2b9a3aad739f1bd..b0ed404a7eb5ff2679a9da084fc7954911c5d428 100644
--- a/src/plugins/projectexplorer/kitmanager.h
+++ b/src/plugins/projectexplorer/kitmanager.h
@@ -112,7 +112,7 @@ public:
     QList<Kit *> kits(const KitMatcher *m = 0) const;
     Kit *find(const Core::Id &id) const;
     Kit *find(const KitMatcher *m) const;
-    Kit *defaultKit();
+    Kit *defaultKit() const;
 
     QList<KitInformation *> kitInformation() const;
 
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index 7456e688aec663b805f1357777b961dc0e567fce..cdbc7949d3502edb78560f05ae35c5ac2068d13f 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -439,6 +439,19 @@ QString MsvcToolChainFactory::id() const
     return QLatin1String(Constants::MSVC_TOOLCHAIN_ID);
 }
 
+bool MsvcToolChainFactory::checkForVisualStudioInstallation(const QString &vsName)
+{
+    const QSettings vsRegistry(
+#ifdef Q_OS_WIN64
+                QLatin1String("HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VS7"),
+#else
+                QLatin1String("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7"),
+#endif
+                QSettings::NativeFormat);
+
+    return vsRegistry.contains(vsName);
+}
+
 QList<ToolChain *> MsvcToolChainFactory::autoDetect()
 {
     QList<ToolChain *> results;
@@ -500,6 +513,8 @@ QList<ToolChain *> MsvcToolChainFactory::autoDetect()
         const int dotPos = vsName.indexOf(QLatin1Char('.'));
         if (dotPos == -1)
             continue;
+        if (!checkForVisualStudioInstallation(vsName))
+            continue;
 
         const QString path = vsRegistry.value(vsName).toString();
         const int version = vsName.left(dotPos).toInt();
diff --git a/src/plugins/projectexplorer/msvctoolchain.h b/src/plugins/projectexplorer/msvctoolchain.h
index 8afbf6ebb72889bba8a9bbb37eab725495176dfd..21a0582aaa118acfbbfe06fb296f96da5f358bfa 100644
--- a/src/plugins/projectexplorer/msvctoolchain.h
+++ b/src/plugins/projectexplorer/msvctoolchain.h
@@ -106,6 +106,8 @@ public:
         { return MsvcToolChain::readFromMap(data); }
 
     ToolChainConfigWidget *configurationWidget(ToolChain *);
+private:
+    static bool checkForVisualStudioInstallation(const QString &vsName);
 };
 
 // --------------------------------------------------------------------------
diff --git a/src/plugins/projectexplorer/toolchainoptionspage.cpp b/src/plugins/projectexplorer/toolchainoptionspage.cpp
index de5c314fc8c16b4d76c13bc8d5d4fca762b83ed9..991ad2c551b54a580a30ba046bf22047bfef20ad 100644
--- a/src/plugins/projectexplorer/toolchainoptionspage.cpp
+++ b/src/plugins/projectexplorer/toolchainoptionspage.cpp
@@ -573,6 +573,8 @@ bool ToolChainOptionsPage::matches(const QString &s) const
 
 void ToolChainOptionsPage::toolChainSelectionChanged()
 {
+    if (!m_container)
+        return;
     QModelIndex current = currentIndex();
     (void)m_container->takeWidget(); // Prevent deletion.
     QWidget *currentTcWidget = current.isValid() ? m_model->widget(current) : 0;
diff --git a/src/plugins/qt4projectmanager/qmakekitinformation.cpp b/src/plugins/qt4projectmanager/qmakekitinformation.cpp
index f4c2f8e42b58491d231f17860d79bb20902f784d..65dc5d1acc4f81be30be9e65bdee33fcf7855a25 100644
--- a/src/plugins/qt4projectmanager/qmakekitinformation.cpp
+++ b/src/plugins/qt4projectmanager/qmakekitinformation.cpp
@@ -33,6 +33,7 @@
 #include "qmakekitconfigwidget.h"
 
 #include <projectexplorer/projectexplorerconstants.h>
+#include <projectexplorer/toolchainmanager.h>
 
 #include <qtsupport/baseqtversion.h>
 #include <qtsupport/qtkitinformation.h>
@@ -83,6 +84,30 @@ QList<ProjectExplorer::Task> QmakeKitInformation::validate(const ProjectExplorer
     return result;
 }
 
+void QmakeKitInformation::fix(ProjectExplorer::Kit *k)
+{
+    QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
+    if (!version)
+        return;
+
+    Utils::FileName spec = QmakeKitInformation::mkspec(k);
+    if (spec.isEmpty())
+        spec = version->mkspec();
+
+    ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k);
+
+    if (!tc || !tc->suggestedMkspecList().contains(spec)) {
+        QList<ProjectExplorer::ToolChain *> tcList = ProjectExplorer::ToolChainManager::instance()->toolChains();
+        foreach (ProjectExplorer::ToolChain *current, tcList) {
+            if (version->qtAbis().contains(current->targetAbi())
+                    && current->suggestedMkspecList().contains(spec)) {
+                ProjectExplorer::ToolChainKitInformation::setToolChain(k, current);
+                break;
+            }
+        }
+    }
+}
+
 ProjectExplorer::KitConfigWidget *
 QmakeKitInformation::createConfigWidget(ProjectExplorer::Kit *k) const
 {
diff --git a/src/plugins/qt4projectmanager/qmakekitinformation.h b/src/plugins/qt4projectmanager/qmakekitinformation.h
index 59a43d4a2f219099e62c0b558fe5aedc779d8c3c..e1c630f58844a1c427068a842235a64e8f5ea497 100644
--- a/src/plugins/qt4projectmanager/qmakekitinformation.h
+++ b/src/plugins/qt4projectmanager/qmakekitinformation.h
@@ -50,6 +50,7 @@ public:
     QVariant defaultValue(ProjectExplorer::Kit *k) const;
 
     QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const;
+    void fix(ProjectExplorer::Kit *k);
 
     ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const;
 
diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp
index 016002a8c8cf2b3bc6cf3f887d9dcb2a0437f6ca..b5c341763277b47441bbc5b1421505388307c1e1 100644
--- a/src/plugins/qt4projectmanager/qt4nodes.cpp
+++ b/src/plugins/qt4projectmanager/qt4nodes.cpp
@@ -2023,6 +2023,7 @@ QStringList Qt4ProFileNode::includePaths(QtSupport::ProFileReader *reader) const
     }
 
     paths.append(reader->absolutePathValues(QLatin1String("INCLUDEPATH"), m_projectDir));
+    paths.append(reader->absolutePathValues(QLatin1String("QMAKE_INCDIR"), m_projectDir));
     // paths already contains moc dir and ui dir, due to corrrectly parsing uic.prf and moc.prf
     // except if those directories don't exist at the time of parsing
     // thus we add those directories manually (without checking for existence)
diff --git a/src/plugins/texteditor/codeassist/basicproposalitemlistmodel.cpp b/src/plugins/texteditor/codeassist/basicproposalitemlistmodel.cpp
index 68bbfbe2d6a01e05a76ab2e6c13399fe2fa9d939..ee0fca827d410dec344087eb85d54a30d425fb38 100644
--- a/src/plugins/texteditor/codeassist/basicproposalitemlistmodel.cpp
+++ b/src/plugins/texteditor/codeassist/basicproposalitemlistmodel.cpp
@@ -285,22 +285,27 @@ bool BasicProposalItemListModel::keepPerfectMatch(AssistReason reason) const
 
 QString BasicProposalItemListModel::proposalPrefix() const
 {
-    if (m_currentItems.size() >= kMaxPrefixFilter)
+    if (m_currentItems.size() >= kMaxPrefixFilter || m_currentItems.isEmpty())
         return QString();
 
     // Compute common prefix
-    QString firstKey = m_currentItems.first()->text();
-    QString lastKey = m_currentItems.last()->text();
-    const int length = qMin(firstKey.length(), lastKey.length());
-    firstKey.truncate(length);
-    lastKey.truncate(length);
-
-    while (firstKey != lastKey) {
-        firstKey.chop(1);
-        lastKey.chop(1);
+    QString commonPrefix = m_currentItems.first()->text();
+    for (int i = 1, ei = m_currentItems.size(); i < ei; ++i) {
+        QString nextItem = m_currentItems.at(i)->text();
+        const int length = qMin(commonPrefix.length(), nextItem.length());
+        commonPrefix.truncate(length);
+        nextItem.truncate(length);
+
+        while (commonPrefix != nextItem) {
+            commonPrefix.chop(1);
+            nextItem.chop(1);
+        }
+
+        if (commonPrefix.isEmpty()) // there is no common prefix, so return.
+            return commonPrefix;
     }
 
-    return firstKey;
+    return commonPrefix;
 }
 
 IAssistProposalItem *BasicProposalItemListModel::proposalItem(int index) const
diff --git a/tests/system/suite_WELP/tst_WELP03/test.py b/tests/system/suite_WELP/tst_WELP03/test.py
index 38e270cb9e2b12e61e13284d84a66a8536e753ab..7eea26b0912dc9c1375df0c037720ebef17de7f9 100644
--- a/tests/system/suite_WELP/tst_WELP03/test.py
+++ b/tests/system/suite_WELP/tst_WELP03/test.py
@@ -40,6 +40,7 @@ def main():
     installLazySignalHandler(":QWebPage","loadFinished(bool)", "webPageContentLoaded")
     installLazySignalHandler(":*Qt Creator_Help::Internal::HelpViewer", "loadFinished(bool)",
                              "webPageContentLoaded")
+    addHelpDocumentationFromSDK()
     setAlwaysStartFullHelp()
     if not test.verify(checkIfObjectExists(getQmlItem("Text", ":Qt Creator_QDeclarativeView", False,
                                                       "text='Getting Started'")),
diff --git a/tests/system/suite_editors/tst_modify_readonly/test.py b/tests/system/suite_editors/tst_modify_readonly/test.py
index c5de75a85368480ae3daf63b6d7562fc9a108b9a..389ee0574a3b0f769d8e0f49dc7ebd0948064663 100644
--- a/tests/system/suite_editors/tst_modify_readonly/test.py
+++ b/tests/system/suite_editors/tst_modify_readonly/test.py
@@ -82,10 +82,12 @@ def testSaveChangesAndMakeWritable(modifiedFiles, readOnlyFiles):
             clickButton(waitForObject("{text='Make Writable' type='QPushButton' unnamed='1' "
                                       "visible='1' window=%s}" % readOnlyMBoxStr))
             try:
-                waitForObject(cannotResetStr, 3000)
-                # should not be possible
-                test.fail("Could not reset file '%s' to writable state." % currentFile)
-                clickButton("{text='OK' type='QPushButton' window=%s}" % cannotResetStr)
+                # avoid an AUT crash that happens frequently on the testing machines
+                if currentApplicationContext().isRunning:
+                    waitForObject(cannotResetStr, 3000)
+                    # should not be possible
+                    test.fail("Could not reset file '%s' to writable state." % currentFile)
+                    clickButton("{text='OK' type='QPushButton' window=%s}" % cannotResetStr)
             except:
                 if isWritable(currentFile):
                     test.passes("File '%s' resetted to writable state and saved." % currentFile)