diff --git a/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/installscript.qs b/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/installscript.qs
index 0f096b84775c6bd9a750ba3d4ec005dbb24815b1..1b46304147b4e3c532b0d6714fdc04467f2d41c2 100644
--- a/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/installscript.qs
+++ b/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/installscript.qs
@@ -31,6 +31,7 @@
 function Component()
 {
     component.loaded.connect(this, Component.prototype.loaded);
+    installer.installationFinished.connect(this, Component.prototype.installationFinishedPageIsShown);
     installer.finishButtonClicked.connect(this, Component.prototype.installationFinished);
     installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
 }
@@ -173,6 +174,17 @@ Component.prototype.createOperations = function()
     }
 }
 
+Component.prototype.installationFinishedPageIsShown = function()
+{
+    try {
+        if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success) {
+            installer.addWizardPageItem( component, "LaunchQtCreatorCheckBoxForm", QInstaller.InstallationFinished );
+        }
+    } catch(e) {
+        print(e);
+    }
+}
+
 Component.prototype.installationFinished = function()
 {
     try {
diff --git a/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/launchqtcreatorcheckboxform.ui b/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/launchqtcreatorcheckboxform.ui
new file mode 100644
index 0000000000000000000000000000000000000000..4d6060c67ace27501f38e14e888bf175c82a75f6
--- /dev/null
+++ b/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/launchqtcreatorcheckboxform.ui
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>LaunchQtCreatorCheckBoxForm</class>
+ <widget class="QWidget" name="LaunchQtCreatorCheckBoxForm">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>112</width>
+    <height>17</height>
+   </rect>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <item>
+    <widget class="QCheckBox" name="launchQtCreatorCheckBox">
+     <property name="text">
+      <string>Launch Qt Creator</string>
+     </property>
+     <property name="checked">
+      <bool>true</bool>
+     </property>
+     <property name="tristate">
+      <bool>false</bool>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/package.xml.in b/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/package.xml.in
index 0e21746d4eb86946135d30635bfb5f131f32c5fa..e9d378cd70046ef216d7b9be45e6836f1bfdc6ad 100644
--- a/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/package.xml.in
+++ b/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/package.xml.in
@@ -14,5 +14,6 @@
     <AutoDependOn>org.qtproject.qtcreator</AutoDependOn>
     <UserInterfaces>
         <UserInterface>associatecommonfiletypesform.ui</UserInterface>
+        <UserInterface>launchqtcreatorcheckboxform.ui</UserInterface>
     </UserInterfaces>
 </Package>
diff --git a/doc/images/qtquick-example-script-console.png b/doc/images/qtquick-example-script-console.png
index 30cd1371c2eb68a840ea466588cdc781fafd8201..37945678cd2dc18258eb451380342d53862ba1de 100644
Binary files a/doc/images/qtquick-example-script-console.png and b/doc/images/qtquick-example-script-console.png differ
diff --git a/doc/src/debugger/qtquick-debugger-example.qdoc b/doc/src/debugger/qtquick-debugger-example.qdoc
index ebc06c92273b9177716c1b43d221b72e23200e21..fb770842c5d15ac585c7fa0696371eb20d49ef6c 100644
--- a/doc/src/debugger/qtquick-debugger-example.qdoc
+++ b/doc/src/debugger/qtquick-debugger-example.qdoc
@@ -83,8 +83,8 @@
 
             \image qtquick-example-setting-breakpoint3.png
 
-        \li To execute JavaScript commands in the current context, select the
-            \gui {Console} tab.
+        \li To execute JavaScript commands in the current context, open the
+            \gui {QML/JS Console} output pane.
 
         \li To change the score to 1000, enter \c{gameCanvas.score = 1000}
             in the console.
@@ -108,15 +108,15 @@
             \inlineimage qml-inspector-select-button.png
             (\gui Select) to activate selection mode and then click the
             \gui {Quit} button to move into the \gui ButtonLabel component
-            in the \gui {Console} and the code editor.
-
-            \image qtquick-example-property-values.png
+            in the \gui {QML/JS Console} and the code editor.
 
         \li In the \gui {Locals and Expressions} view, double-click the value of
             the \c text property to change it temporarily from \gui {Quit} to
             \gui {End Game}.
 
-            When you select an item, the cursor moves to it in the code
+            \image qtquick-example-property-values.png
+
+            When you select an element, the cursor moves to it in the code
             editor, where you can change the value permanently.
 
     \endlist
diff --git a/doc/src/debugger/qtquick-debugging.qdoc b/doc/src/debugger/qtquick-debugging.qdoc
index a391b5efe1d970367b9852384dffca19d6c25d5a..aba729b7774820f349670a6f1fd07890d2e3a1f7 100644
--- a/doc/src/debugger/qtquick-debugging.qdoc
+++ b/doc/src/debugger/qtquick-debugging.qdoc
@@ -168,7 +168,7 @@
     \inlineimage qml-observer-bar-reload.png "Apply Changes on Save button"
     (\gui {Apply Changes on Save}) button on the toolbar.
 
-    When you change property values in the \gui {Console} or in the
+    When you change property values in the \gui {QML/JS Console} or in the
     \gui {Locals and Expressions} view, they are immediately updated in the running
     application, but not in the source code.
 
diff --git a/qtcreator.pro b/qtcreator.pro
index 066b0987218bb9c873e6c699f06a48db688ef2d9..532053369d0929904c663a4c6b9407c015b4080c 100644
--- a/qtcreator.pro
+++ b/qtcreator.pro
@@ -21,11 +21,21 @@ OTHER_FILES += dist/copyright_template.txt \
     qbs/pluginspec/pluginspec.qbs
 
 qmake_cache = $$targetPath($$IDE_BUILD_TREE/.qmake.cache)
-unix: maybe_quote = \"
+equals(QMAKE_DIR_SEP, /): {
+    maybe_quote = "\""
+    maybe_backslash = "\\"
+}
 system("echo $${maybe_quote}$${LITERAL_HASH} config for qmake$${maybe_quote} > $$qmake_cache")
 # Make sure the qbs dll ends up alongside the Creator executable.
-win32:exists(src/shared/qbs/qbs.pro) {
+exists(src/shared/qbs/qbs.pro) {
     system("echo QBS_DLLDESTDIR = $${IDE_BUILD_TREE}/bin >> $$qmake_cache")
+    system("echo QBS_DESTDIR = $${maybe_backslash}\"$${IDE_LIBRARY_PATH}$${maybe_backslash}\" >> $$qmake_cache")
+    system("echo QBSLIBDIR = $${maybe_backslash}\"$${IDE_LIBRARY_PATH}$${maybe_backslash}\" >> $$qmake_cache")
+    system("echo QBS_INSTALL_PREFIX = $${QTC_PREFIX} >> $$qmake_cache")
+    system("echo QBS_LIB_INSTALL_DIR = $${QTC_PREFIX}/$${IDE_LIBRARY_BASENAME}/qtcreator >> $$qmake_cache")
+    system("echo QBS_RESOURCES_BUILD_DIR = $${maybe_backslash}\"$${IDE_DATA_PATH}/qbs$${maybe_backslash}\" >> $$qmake_cache")
+    system("echo QBS_RESOURCES_INSTALL_DIR = $${QTC_PREFIX}/share/qtcreator/qbs >> $$qmake_cache")
+    system("echo CONFIG += qbs_no_dev_install >> $$qmake_cache")
 }
 
 contains(QT_ARCH, i386): ARCHITECTURE = x86
diff --git a/scripts/makedmg.sh b/scripts/makedmg.sh
index f9e877ef642cd13de3d62728261e72e64f6d87f8..ba21125c7272675962f585e39666ac5ae907fde7 100755
--- a/scripts/makedmg.sh
+++ b/scripts/makedmg.sh
@@ -12,7 +12,7 @@ cp -a "${sourceFolder}/" "${intermediateFolder}"
 ln -s /Applications "${intermediateFolder}"
 cp "$(dirname "${BASH_SOURCE[0]}")/../LICENSE.LGPL" "${intermediateFolder}/LICENSE_LGPL.txt"
 echo Creating image...
-hdiutil create -srcfolder "${intermediateFolder}" -volname "${title}" -format UDBZ "${finalDMGName}" -ov -scrub
+hdiutil create -srcfolder "${intermediateFolder}" -volname "${title}" -format UDBZ "${finalDMGName}" -ov -scrub -stretch 1g
 
 # clean up
 rm -rf "${intermediateFolder}"
diff --git a/share/qtcreator/dumper/qttypes.py b/share/qtcreator/dumper/qttypes.py
index 80479496c75a06ebb9a8f2955c3382776cb16d02..cfb74e36f852b73012659a88f7a7e48aaf6678d3 100644
--- a/share/qtcreator/dumper/qttypes.py
+++ b/share/qtcreator/dumper/qttypes.py
@@ -2664,14 +2664,13 @@ def qdump__Eigen__Matrix(d, value):
     storage = value["m_storage"]
     options = numericTemplateArgument(value.type, 3)
     rowMajor = (int(options) & 0x1)
+    argRow = numericTemplateArgument(value.type, 1)
+    argCol = numericTemplateArgument(value.type, 2)
+    nrows = value["m_storage"]["m_rows"] if argRow == -1 else int(argRow)
+    ncols = value["m_storage"]["m_cols"] if argCol == -1 else int(argCol)
     p = storage["m_data"]
     if p.type.code == StructCode: # Static
-        nrows = numericTemplateArgument(value.type, 1)
-        ncols = numericTemplateArgument(value.type, 2)
         p = p["array"].cast(innerType.pointer())
-    else: # Dynamic
-        ncols = storage["m_cols"]
-        nrows = storage["m_rows"]
     d.putValue("(%s x %s), %s" % (nrows, ncols, ["ColumnMajor", "RowMajor"][rowMajor]))
     d.putField("keeporder", "1")
     d.putNumChild(nrows * ncols)
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstancesignalspy.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstancesignalspy.cpp
index 2dc2367cf04e5d6628b1612719f6ce580563b598..40de94aecc0333a6b656b323d5a7f1de2bd6478b 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstancesignalspy.cpp
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstancesignalspy.cpp
@@ -82,8 +82,9 @@ void NodeInstanceSignalSpy::registerObject(QObject *spiedObject, const PropertyN
 
              // search recursive in objects
              if (metaProperty.isReadable()
-                 && metaProperty.isWritable()
-                 && QQmlMetaType::isQObject(metaProperty.userType())) {
+                     && metaProperty.isWritable()
+                     && QQmlMetaType::isQObject(metaProperty.userType())
+                     && QLatin1String(metaProperty.name()) != QLatin1String("parent")) {
                  QObject *propertyObject = QQmlMetaType::toQObject(metaProperty.read(spiedObject));
                  if (propertyObject)
                      registerObject(propertyObject, prefix + metaProperty.name() + '/');
diff --git a/share/qtcreator/templates/qml/qtquick1_1/template.xml b/share/qtcreator/templates/qml/qtquick1_1/template.xml
index a16ce71286a6e24c32d4a41a6b495998b58b1f1e..236ea30d25153644babccffaa763a83f445945d4 100644
--- a/share/qtcreator/templates/qml/qtquick1_1/template.xml
+++ b/share/qtcreator/templates/qml/qtquick1_1/template.xml
@@ -4,5 +4,5 @@
     id="QB.QML Application for Qt Quick 1.1">
     <displayname>Qt Quick 1 UI</displayname>
     <displayname xml:lang="de">Qt Quick 1 UI</displayname>
-    <description>Creates a Qt Quick UI 1 project with a single QML file that contains the main view.&lt;br&gt; You can review Qt Quick UI 1 projects in the QML Viewer and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of projects. &lt;br&gt;&lt;br&gt;Requires &lt;b&gt;Qt 4.8&lt;/b&gt; or newer.</description>
+    <description>Creates a Qt Quick 1 UI project with a single QML file that contains the main view.&lt;br/&gt;You can review Qt Quick 1 UI projects in the QML Viewer and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of projects.&lt;br/&gt;&lt;br/&gt;Requires &lt;b&gt;Qt 4.8&lt;/b&gt; or newer.</description>
 </template>
diff --git a/share/qtcreator/templates/qml/qtquick2/template.xml b/share/qtcreator/templates/qml/qtquick2/template.xml
index c899e02228b1d637c16bef80797e77fc9dd7f7b6..97c8d70b80687e8e1f28d268aa1dbc24fd00779a 100644
--- a/share/qtcreator/templates/qml/qtquick2/template.xml
+++ b/share/qtcreator/templates/qml/qtquick2/template.xml
@@ -4,5 +4,5 @@
     id="QB.QML Application for Qt Quick 2.0">
     <displayname>Qt Quick 2 UI</displayname>
     <displayname xml:lang="de">Qt Quick 2 UI</displayname>
-    <description>Creates a Qt Quick UI 2 project with a single QML file that contains the main view.&lt;br&gt; You can review Qt Quick UI 2 projects in the QML Scene and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of projects.&lt;br&gt;&lt;br&gt;Requires &lt;b&gt;Qt 5.0&lt;/b&gt; or newer.</description>
+    <description>Creates a Qt Quick 2 UI project with a single QML file that contains the main view.&lt;br/&gt;You can review Qt Quick 2 UI projects in the QML Scene and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of projects.&lt;br/&gt;&lt;br/&gt;Requires &lt;b&gt;Qt 5.0&lt;/b&gt; or newer.</description>
 </template>
diff --git a/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.h b/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.h
index 97aebfb6194626afffae0774e1461caafd255f35..c87f886cff556c6981775ec50ec1a86f00dffac0 100644
--- a/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.h
+++ b/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.h
@@ -8,7 +8,7 @@
 namespace %PluginName% {
 namespace Internal {
 
-class %PluginName:u%SHARED_EXPORT %PluginName%Plugin : public ExtensionSystem::IPlugin
+class %PluginName%Plugin : public ExtensionSystem::IPlugin
 {
     Q_OBJECT
     Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "%PluginName%.json")
diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp
index affce6262541dd2c033d36b91cf6dd174c9b5f74..256599e1644c116f40dc9aa0a02f21dd933a123d 100644
--- a/src/libs/utils/pathchooser.cpp
+++ b/src/libs/utils/pathchooser.cpp
@@ -250,7 +250,7 @@ PathChooser::PathChooser(QWidget *parent) :
     connect(d->m_lineEdit, SIGNAL(validChanged(bool)), this, SIGNAL(validChanged(bool)));
     connect(d->m_lineEdit, SIGNAL(editingFinished()), this, SIGNAL(editingFinished()));
 
-    d->m_lineEdit->setMinimumWidth(200);
+    d->m_lineEdit->setMinimumWidth(120);
     d->m_hLayout->addWidget(d->m_lineEdit);
     d->m_hLayout->setSizeConstraint(QLayout::SetMinimumSize);
 
diff --git a/src/libs/zeroconf/zeroconf.qbs b/src/libs/zeroconf/zeroconf.qbs
index 04274fd6f69d600922d8d71e1ac6de9b948c9aa2..51ca09d0f1ebae07ec34f54f8a2b6d56d53b446c 100644
--- a/src/libs/zeroconf/zeroconf.qbs
+++ b/src/libs/zeroconf/zeroconf.qbs
@@ -8,22 +8,25 @@ QtcLibrary {
     Depends { name: "Qt.network" }
     cpp.includePaths: base.concat(".")
 
-    cpp.defines: base.concat("ZEROCONF_LIBRARY")
+    cpp.defines: {
+        var list = base;
+        list.push("ZEROCONF_LIBRARY");
+        if (qbs.targetOS === "linux") {
+            list.push(
+                "_GNU_SOURCE",
+                "HAVE_IPV6",
+                "USES_NETLINK",
+                "HAVE_LINUX",
+                "TARGET_OS_LINUX"
+            );
+        }
+        return list;
+    }
 
     Properties {
         condition: qbs.targetOS == "windows"
         cpp.dynamicLibraries:  "ws2_32"
     }
-    Properties {
-        condition: qbs.targetOS == "linux"
-        cpp.defines: base.concat([
-            "_GNU_SOURCE",
-            "HAVE_IPV6",
-            "USES_NETLINK",
-            "HAVE_LINUX",
-            "TARGET_OS_LINUX"
-        ])
-    }
 
     files: [
         "avahiLib.cpp",
diff --git a/src/plugins/cmakeprojectmanager/cmakevalidator.cpp b/src/plugins/cmakeprojectmanager/cmakevalidator.cpp
index 27d38291cb22ba419c869c97c8bf55f52cf4a609..8a85a756fa7c5776b06160799bbb37058d476ffa 100644
--- a/src/plugins/cmakeprojectmanager/cmakevalidator.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakevalidator.cpp
@@ -223,6 +223,8 @@ void CMakeValidator::parseFunctionDetailsOutput(const QByteArray &output)
     QList<QByteArray> cmakeCommandsHelp = output.split('\n');
     for (int i = 0; i < cmakeCommandsHelp.count(); ++i) {
         QByteArray lineTrimmed = cmakeCommandsHelp.at(i).trimmed();
+        if (cmakeFunctionsList.isEmpty())
+            break;
         if (cmakeFunctionsList.first().toLatin1() == lineTrimmed) {
             QStringList commandSyntaxes;
             QString currentCommandSyntax;
@@ -231,7 +233,7 @@ void CMakeValidator::parseFunctionDetailsOutput(const QByteArray &output)
             for (; i < cmakeCommandsHelp.count(); ++i) {
                 lineTrimmed = cmakeCommandsHelp.at(i).trimmed();
 
-                if (cmakeFunctionsList.first().toLatin1() == lineTrimmed) {
+                if (!cmakeFunctionsList.isEmpty() && cmakeFunctionsList.first().toLatin1() == lineTrimmed) {
                     //start of next function in output
                     if (!currentCommandSyntax.isEmpty())
                         commandSyntaxes << currentCommandSyntax.append(QLatin1String("</table>"));
diff --git a/src/plugins/coreplugin/vcsmanager.cpp b/src/plugins/coreplugin/vcsmanager.cpp
index 0dd926b46f09c79476dc4776931cbd6ffbda3a62..4e6ad25159c7b6ddf553094dd04bb1114264d057 100644
--- a/src/plugins/coreplugin/vcsmanager.cpp
+++ b/src/plugins/coreplugin/vcsmanager.cpp
@@ -145,8 +145,12 @@ public:
 
         QString tmpDir = dir;
         const QChar slash = QLatin1Char('/');
-        while (tmpDir.count() >= topLevel.count() && tmpDir.count() > 0) {
+        while (tmpDir.count() >= topLevel.count() && !tmpDir.isEmpty()) {
             m_cachedMatches.insert(tmpDir, newInfo);
+            // if no vc was found, this might mean we're inside a repo internal directory (.git)
+            // Cache only input directory, not parents
+            if (!vc)
+                break;
             const int slashPos = tmpDir.lastIndexOf(slash);
             if (slashPos >= 0)
                 tmpDir.truncate(slashPos);
diff --git a/src/plugins/cpptools/cpptoolssettings.cpp b/src/plugins/cpptools/cpptoolssettings.cpp
index 72ebf2a1337462ad4c18c9a07d1deaa30b26181e..df432831d1d88cf95f6b33a039b5fa6bea8b1342 100644
--- a/src/plugins/cpptools/cpptoolssettings.cpp
+++ b/src/plugins/cpptools/cpptoolssettings.cpp
@@ -240,6 +240,11 @@ CppToolsSettings::~CppToolsSettings()
 {
     ExtensionSystem::PluginManager::removeObject(d->m_completionSettingsPage);
 
+    TextEditor::TextEditorSettings *textEditorSettings = TextEditor::TextEditorSettings::instance();
+    textEditorSettings->unregisterCodeStyle(Constants::CPP_SETTINGS_ID);
+    textEditorSettings->unregisterCodeStylePool(Constants::CPP_SETTINGS_ID);
+    textEditorSettings->unregisterCodeStyleFactory(Constants::CPP_SETTINGS_ID);
+
     delete d;
 
     m_instance = 0;
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp
index 01d224c7addb915c35f90512ff4887043b483181..d3c728fdbe4e8e4e0b7c9d88a038dafaa2aea4b3 100644
--- a/src/plugins/debugger/cdb/cdbengine.cpp
+++ b/src/plugins/debugger/cdb/cdbengine.cpp
@@ -2402,6 +2402,9 @@ void CdbEngine::handleExtensionMessage(char t, int token, const QByteArray &what
         GdbMi gdbmi;
         gdbmi.fromString(message);
         exception.fromGdbMI(gdbmi);
+        // Don't show the Win32 x86 emulation subsystem breakpoint hit exception.
+        if (exception.exceptionCode == winExceptionWX86Breakpoint)
+            return;
         const QString message = exception.toString(true);
         showStatusMessage(message);
         // Report C++ exception in application output as well.
diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp
index b468fbe6f8e8c838fd1834e566428f016425fe4e..58fe94283170aad64c4f0ca512404da66e6dc3c5 100644
--- a/src/plugins/debugger/debuggerkitinformation.cpp
+++ b/src/plugins/debugger/debuggerkitinformation.cpp
@@ -203,7 +203,8 @@ DebuggerKitInformation::DebuggerItem DebuggerKitInformation::autoDetectItem(cons
 void DebuggerKitInformation::setup(Kit *k)
 {
     QTC_ASSERT(ToolChainManager::instance()->isLoaded(), return);
-    setDebuggerItem(k, autoDetectItem(k));
+    if (!isValidDebugger(k))
+        setDebuggerItem(k, autoDetectItem(k));
 }
 
 // Check the configuration errors and return a flag mask. Provide a quick check and
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 8227d4268321dc9810ee4fc5f8fc04091e2d7313..479d0f38b7889c9f0e14d2187050487088fd2b0b 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1574,8 +1574,11 @@ void DebuggerPluginPrivate::onCurrentProjectChanged(Project *project)
     m_interruptAction->setEnabled(false);
     m_continueAction->setEnabled(false);
     m_exitAction->setEnabled(false);
-    m_startAction->setEnabled(true);
-    m_debugWithoutDeployAction->setEnabled(true);
+    ProjectExplorerPlugin *pe = ProjectExplorerPlugin::instance();
+    const bool canRun = pe->canRun(project, DebugRunMode);
+    m_startAction->setEnabled(canRun);
+    m_startAction->setToolTip(canRun ? QString() : pe->cannotRunReason(project, DebugRunMode));
+    m_debugWithoutDeployAction->setEnabled(canRun);
     setProxyAction(m_visibleStartAction, Core::Id(Constants::DEBUG));
 }
 
diff --git a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp
index b667cdd5b195a506f8236eee78fcac0d195d759d..ce0ebf56608d68d6fee5b72ec0296942f015e0ea 100644
--- a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp
+++ b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp
@@ -1640,6 +1640,15 @@ void QmlV8DebuggerClient::setCurrentFrameDetails(const QVariant &bodyVal, const
     d->clearCache();
 
     const int frameIndex = stackHandler->currentIndex();
+    QSet<QByteArray> expandedInames = watchHandler->expandedINames();
+    QHash<quint64, QByteArray> handlesToLookup;
+    // Store handles of all expanded watch data
+    foreach (const QByteArray &iname, expandedInames) {
+        const WatchData *wd = watchHandler->findData(iname);
+        if (!wd || !wd->isLocal())
+            continue;
+        handlesToLookup.insert(wd->id, iname);
+    }
     watchHandler->removeAllData();
     if (frameIndex < 0)
         return;
@@ -1678,6 +1687,11 @@ void QmlV8DebuggerClient::setCurrentFrameDetails(const QVariant &bodyVal, const
         d->scope(scopeIndex);
     }
     d->engine->gotoLocation(stackHandler->currentFrame());
+
+    // Expand watch data that were previously expanded
+    QHash<quint64, QByteArray>::const_iterator itEnd = handlesToLookup.end();
+    for (QHash<quint64, QByteArray>::const_iterator it = handlesToLookup.begin(); it != itEnd; ++it)
+        expandObject(it.value(), it.key());
     emit stackFrameCompleted();
 }
 
diff --git a/src/plugins/diffeditor/differ.cpp b/src/plugins/diffeditor/differ.cpp
index 23d2784908dd3309835e2b7f7b0a43009c8e3a36..5a30d9fe5b3979025bb4b6d0ab441815a6ecbbc0 100644
--- a/src/plugins/diffeditor/differ.cpp
+++ b/src/plugins/diffeditor/differ.cpp
@@ -27,6 +27,14 @@
 **
 ****************************************************************************/
 
+/*
+The main algorithm "diffMyers()" is based on "An O(ND) Difference Algorithm
+and Its Variations" by Eugene W. Myers: http://www.xmailserver.org/diff2.pdf
+
+Preprocessing and postprocessing functions inspired by "Diff Strategies"
+publication by Neil Fraser: http://neil.fraser.name/writing/diff/
+*/
+
 #include "differ.h"
 
 #include <QList>
diff --git a/src/plugins/help/help.qbs b/src/plugins/help/help.qbs
index 75152239c4a93312f5661f6403f065f50c514780..90c215d1ec598f60409c8ce02dab17c9cf18eb77 100644
--- a/src/plugins/help/help.qbs
+++ b/src/plugins/help/help.qbs
@@ -21,11 +21,15 @@ QtcPlugin {
     Depends { name: "app_version_header" }
 
     Depends { name: "cpp" }
-    Properties {
-        condition: qtcore.versionMajor >= 5
-        cpp.defines: base.concat(["QT_NO_WEBKIT"])
+
+    cpp.defines: {
+        var list = base;
+        if (qtcore.versionMajor >= 5)
+            list.push("QT_NO_WEBKIT");
+        list.push("QT_CLUCENE_SUPPORT");
+        return list;
     }
-    cpp.defines: base.concat("QT_CLUCENE_SUPPORT")
+
     cpp.includePaths: base.concat("../../shared/help")
 
     files: [
diff --git a/src/plugins/projectexplorer/kitmanager.cpp b/src/plugins/projectexplorer/kitmanager.cpp
index cc3bf585a9e81712c871200609b82ff7af2d8c81..9dbd0d5b6d3b52c84862e6b977b00f234d54cf0d 100644
--- a/src/plugins/projectexplorer/kitmanager.cpp
+++ b/src/plugins/projectexplorer/kitmanager.cpp
@@ -191,7 +191,10 @@ void KitManager::restoreKits()
     }
 
     // read all kits from user file
-    KitList userKits = restoreKits(settingsFileName());
+    KitList userKits;
+    Utils::FileName userSettingsFile(settingsFileName());
+    if (userSettingsFile.toFileInfo().exists())
+        userKits = restoreKits(userSettingsFile);
     foreach (Kit *k, userKits.kits) {
         if (k->isSdkProvided())
             kitsToCheck.append(k);
@@ -255,8 +258,6 @@ void KitManager::restoreKits()
 
 KitManager::~KitManager()
 {
-    saveKits(); // Make sure we save the current state on exit!
-
     foreach (Kit *k, d->m_kitList)
         delete k;
     d->m_kitList.clear();
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index bd73fbc57865d8f0d0988718e9f701c3b819cc1d..cf2303a01b0562f6fc99ef33256042869da46ef8 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -384,7 +384,7 @@ bool MsvcToolChain::fromMap(const QVariantMap &data)
 {
     if (!ToolChain::fromMap(data))
         return false;
-    m_vcvarsBat = data.value(QLatin1String(varsBatKeyC)).toString();
+    m_vcvarsBat = QDir::fromNativeSeparators(data.value(QLatin1String(varsBatKeyC)).toString());
     m_varsBatArg = data.value(QLatin1String(varsBatArgKeyC)).toString();
     const QString abiString = data.value(QLatin1String(supportedAbiKeyC)).toString();
     m_abi = Abi(abiString);
@@ -422,7 +422,7 @@ void MsvcToolChainConfigWidget::setFromToolChain()
 {
     MsvcToolChain *tc = static_cast<MsvcToolChain *>(toolChain());
     QTC_ASSERT(tc, return);
-    QString varsBatDisplay = tc->varsBat();
+    QString varsBatDisplay = QDir::toNativeSeparators(tc->varsBat());
     if (!tc->varsBatArg().isEmpty()) {
         varsBatDisplay += QLatin1Char(' ');
         varsBatDisplay += tc->varsBatArg();
diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp
index 23ccb12319cb99fba62ac8d14897d3d6255134c0..341806e31093f1e5ab1949b5cbac3aa6be1b175b 100644
--- a/src/plugins/qbsprojectmanager/qbsproject.cpp
+++ b/src/plugins/qbsprojectmanager/qbsproject.cpp
@@ -574,7 +574,7 @@ QString QbsProject::qbsBuildDir() const
     QString buildDir = Utils::Environment::systemEnvironment()
             .value(QLatin1String("QBS_BUILD_DIR"));
     if (buildDir.isEmpty())
-        buildDir = QLatin1String(QBS_BUILD_DIR);
+        buildDir = Core::ICore::resourcePath() + QLatin1String("/qbs");
     return buildDir;
 }
 
diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanager.pro b/src/plugins/qbsprojectmanager/qbsprojectmanager.pro
index 5cbbc02d7ba659755d8059473c3cef0ed9297f53..d8cebcb7d5d20b10720911c56ba0311fd304ad26 100644
--- a/src/plugins/qbsprojectmanager/qbsprojectmanager.pro
+++ b/src/plugins/qbsprojectmanager/qbsprojectmanager.pro
@@ -9,10 +9,9 @@ include(qbsprojectmanager_dependencies.pri)
 QBS_SOURCE_DIR = $$PWD/../../shared/qbs
 QBS_BUILD_DIR = $$IDE_BUILD_TREE/src/shared/qbs
 
-QBSLIBDIR = $$QBS_BUILD_DIR/lib
 include($$QBS_SOURCE_DIR/src/lib/use.pri)
-linux-*:QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$$QBSLIBDIR\'
-macx:QMAKE_LFLAGS += -Wl,-rpath,$$QBSLIBDIR
+# Mac: fix rpath for qbscore soname
+macx:QMAKE_LFLAGS += -Wl,-rpath,@loader_path/../
 
 QBS_BUILD_DIR_FWD_SLASHES = $$replace(QBS_BUILD_DIR, \\\\, /)
 DEFINES += QBS_BUILD_DIR=\\\"$$QBS_BUILD_DIR_FWD_SLASHES\\\"
diff --git a/src/plugins/qmljstools/qmljstoolssettings.cpp b/src/plugins/qmljstools/qmljstoolssettings.cpp
index 46159d467b2296e590f921a1683c055d222768f4..388a120ad47312c02cf9dbfdb7e330a9c23f81f2 100644
--- a/src/plugins/qmljstools/qmljstoolssettings.cpp
+++ b/src/plugins/qmljstools/qmljstoolssettings.cpp
@@ -159,6 +159,11 @@ QmlJSToolsSettings::QmlJSToolsSettings(QObject *parent)
 
 QmlJSToolsSettings::~QmlJSToolsSettings()
 {
+    TextEditor::TextEditorSettings *textEditorSettings = TextEditor::TextEditorSettings::instance();
+    textEditorSettings->unregisterCodeStyle(QmlJSTools::Constants::QML_JS_SETTINGS_ID);
+    textEditorSettings->unregisterCodeStylePool(QmlJSTools::Constants::QML_JS_SETTINGS_ID);
+    textEditorSettings->unregisterCodeStyleFactory(QmlJSTools::Constants::QML_JS_SETTINGS_ID);
+
     delete m_globalCodeStyle;
     m_globalCodeStyle = 0;
 }
diff --git a/src/plugins/qnx/qnxplugin.cpp b/src/plugins/qnx/qnxplugin.cpp
index e329e3b7c05b565c5cd26080c319861c60b49768..02f2d456ce71e08ecee630843ec78f8a0b1dd032 100644
--- a/src/plugins/qnx/qnxplugin.cpp
+++ b/src/plugins/qnx/qnxplugin.cpp
@@ -98,9 +98,7 @@ bool QNXPlugin::initialize(const QStringList &arguments, QString *errorString)
     barDescriptorMimeType.addMagicMatcher(QSharedPointer<Core::IMagicMatcher>(new BarDescriptorMagicMatcher));
     barDescriptorMimeType.setSubClassesOf(QStringList() << QLatin1String("application/xml"));
 
-    Core::ICore *core = Core::ICore::instance();
-    Core::MimeDatabase *mdb = core->mimeDatabase();
-    if (!mdb->addMimeType(barDescriptorMimeType)) {
+    if (!Core::ICore::mimeDatabase()->addMimeType(barDescriptorMimeType)) {
         *errorString = tr("Could not add mime-type for bar-descriptor.xml editor");
         return false;
     }
diff --git a/src/plugins/qt4projectmanager/makestep.cpp b/src/plugins/qt4projectmanager/makestep.cpp
index 652101949e9d155b7134f60bd67a998d190b8a4d..d0acb3347d3faa293c718a7cb76db11a7fdddaca 100644
--- a/src/plugins/qt4projectmanager/makestep.cpp
+++ b/src/plugins/qt4projectmanager/makestep.cpp
@@ -196,7 +196,10 @@ bool MakeStep::init()
         QString makefile = subNode->makefile();
         if (makefile.isEmpty())
             makefile = QLatin1String("Makefile");
-        if (subNode->isDebugAndRelease()) {
+        // Use Makefile.Debug and Makefile.Release
+        // for file builds, since the rules for that are
+        // only in those files.
+        if (subNode->isDebugAndRelease() && bc->fileNodeBuild()) {
             if (bc->buildType() == Qt4BuildConfiguration::Debug)
                 makefile += QLatin1String(".Debug");
             else
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp
index 697b002a05c65e2b648ba29fc7e14de1b82bd067..aa0f216af7e73db251abd5f707ce8bf58e4f9456 100644
--- a/src/plugins/qtsupport/baseqtversion.cpp
+++ b/src/plugins/qtsupport/baseqtversion.cpp
@@ -66,6 +66,9 @@ static const char QTVERSIONAUTODETECTED[] = "isAutodetected";
 static const char QTVERSIONAUTODETECTIONSOURCE []= "autodetectionSource";
 static const char QTVERSIONQMAKEPATH[] = "QMakePath";
 
+static const char MKSPEC_VALUE_LIBINFIX[] = "QT_LIBINFIX";
+static const char MKSPEC_VALUE_NAMESPACE[] = "QT_NAMESPACE";
+
 ///////////////
 // QtVersionNumber
 ///////////////
@@ -369,12 +372,14 @@ Utils::FileName QtSupport::BaseQtVersion::mkspecsPath() const
 
 QString QtSupport::BaseQtVersion::qtNamespace() const
 {
-    return qmakeProperty("QT_NAMESPACE");
+    ensureMkSpecParsed();
+    return m_mkspecValues.value(QLatin1String(MKSPEC_VALUE_NAMESPACE));
 }
 
 QString QtSupport::BaseQtVersion::qtLibInfix() const
 {
-    return qmakeProperty("QT_LIBINFIX");
+    ensureMkSpecParsed();
+    return m_mkspecValues.value(QLatin1String(MKSPEC_VALUE_LIBINFIX));
 }
 
 void BaseQtVersion::setId(int id)
@@ -833,9 +838,13 @@ void BaseQtVersion::parseMkSpec(ProFileEvaluator *evaluator) const
     const QString designerBins = QLatin1String("QT.designer.bins");
     const QString qmlBins = QLatin1String("QT.qml.bins");
     const QString declarativeBins = QLatin1String("QT.declarative.bins");
+    const QString libinfix = QLatin1String(MKSPEC_VALUE_LIBINFIX);
+    const QString ns = QLatin1String(MKSPEC_VALUE_NAMESPACE);
     m_mkspecValues.insert(designerBins, evaluator->value(designerBins));
     m_mkspecValues.insert(qmlBins, evaluator->value(qmlBins));
     m_mkspecValues.insert(declarativeBins, evaluator->value(declarativeBins));
+    m_mkspecValues.insert(libinfix, evaluator->value(libinfix));
+    m_mkspecValues.insert(ns, evaluator->value(ns));
 }
 
 FileName BaseQtVersion::mkspec() const
@@ -951,10 +960,14 @@ void BaseQtVersion::updateVersionInfo() const
         if (!fi.exists())
             m_installed = false;
     }
-    if (!qtHeaderData.isNull()) {
-        const QFileInfo fi(qtHeaderData);
-        if (!fi.exists())
-            m_installed = false;
+    // Framework builds for Qt 4.8 don't use QT_INSTALL_HEADERS
+    // so we don't check on mac
+    if (!HostOsInfo::isMacHost()) {
+        if (!qtHeaderData.isNull()) {
+            const QFileInfo fi(qtHeaderData);
+            if (!fi.exists())
+                m_installed = false;
+        }
     }
     const QString qtInstallDocs = qmakeProperty("QT_INSTALL_DOCS");
     if (!qtInstallDocs.isNull()) {
diff --git a/src/plugins/texteditor/texteditorsettings.cpp b/src/plugins/texteditor/texteditorsettings.cpp
index a3a9c685027eb8bc7686540bc48edc31e685d770..877d337f9984d5a6272cb837e9421400ba471181 100644
--- a/src/plugins/texteditor/texteditorsettings.cpp
+++ b/src/plugins/texteditor/texteditorsettings.cpp
@@ -411,6 +411,11 @@ void TextEditorSettings::registerCodeStyleFactory(ICodeStylePreferencesFactory *
     m_d->m_languageToFactory.insert(factory->languageId(), factory);
 }
 
+void TextEditorSettings::unregisterCodeStyleFactory(Core::Id languageId)
+{
+    m_d->m_languageToFactory.remove(languageId);
+}
+
 QMap<Core::Id, ICodeStylePreferencesFactory *> TextEditorSettings::codeStyleFactories() const
 {
     return m_d->m_languageToFactory;
@@ -441,6 +446,11 @@ void TextEditorSettings::registerCodeStyle(Core::Id languageId, ICodeStylePrefer
     m_d->m_languageToCodeStyle.insert(languageId, prefs);
 }
 
+void TextEditorSettings::unregisterCodeStyle(Core::Id languageId)
+{
+    m_d->m_languageToCodeStyle.remove(languageId);
+}
+
 CodeStylePool *TextEditorSettings::codeStylePool() const
 {
     return m_d->m_behaviorSettingsPage->codeStylePool();
@@ -456,6 +466,11 @@ void TextEditorSettings::registerCodeStylePool(Core::Id languageId, CodeStylePoo
     m_d->m_languageToCodeStylePool.insert(languageId, pool);
 }
 
+void TextEditorSettings::unregisterCodeStylePool(Core::Id languageId)
+{
+    m_d->m_languageToCodeStylePool.remove(languageId);
+}
+
 void TextEditorSettings::registerMimeTypeForLanguageId(const QString &mimeType, Core::Id languageId)
 {
     m_d->m_mimeTypeToLanguage.insert(mimeType, languageId);
diff --git a/src/plugins/texteditor/texteditorsettings.h b/src/plugins/texteditor/texteditorsettings.h
index 94685559677504eaf2712ea3ff0b4dc4edd4d044..5bd56ced17fc12595ca79c1d6a5585c63cfac544 100644
--- a/src/plugins/texteditor/texteditorsettings.h
+++ b/src/plugins/texteditor/texteditorsettings.h
@@ -92,15 +92,18 @@ public:
     ICodeStylePreferencesFactory *codeStyleFactory(Core::Id languageId) const;
     QMap<Core::Id, ICodeStylePreferencesFactory *> codeStyleFactories() const;
     void registerCodeStyleFactory(ICodeStylePreferencesFactory *codeStyleFactory);
+    void unregisterCodeStyleFactory(Core::Id languageId);
 
     CodeStylePool *codeStylePool() const;
     CodeStylePool *codeStylePool(Core::Id languageId) const;
     void registerCodeStylePool(Core::Id languageId, CodeStylePool *pool);
+    void unregisterCodeStylePool(Core::Id languageId);
 
     ICodeStylePreferences *codeStyle() const;
     ICodeStylePreferences *codeStyle(Core::Id languageId) const;
     QMap<Core::Id, ICodeStylePreferences *> codeStyles() const;
     void registerCodeStyle(Core::Id languageId, ICodeStylePreferences *prefs);
+    void unregisterCodeStyle(Core::Id languageId);
 
     void registerMimeTypeForLanguageId(const QString &mimeType, Core::Id languageId);
     Core::Id languageId(const QString &mimeType) const;
diff --git a/src/qtcreatorlibrary.pri b/src/qtcreatorlibrary.pri
index 0dc1a179b23654e040b7090d8e5f9da775f37586..947286b44170a1409d810d18e5d68207cb74ea2b 100644
--- a/src/qtcreatorlibrary.pri
+++ b/src/qtcreatorlibrary.pri
@@ -19,9 +19,10 @@ contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
 
 !macx {
     win32 {
-        target.path = $$QTC_PREFIX/bin
+        dlltarget.path = $$QTC_PREFIX/bin
+        INSTALLS += dlltarget
     } else {
         target.path = $$QTC_PREFIX/$$IDE_LIBRARY_BASENAME/qtcreator
+        INSTALLS += target
     }
-    INSTALLS += target
 }
diff --git a/src/shared/qbs b/src/shared/qbs
index 0a20fe28a70b810575d33b8a3c8623057a036bd7..dcfc06010eb622adc4e90b8d77e5db25aa6219d9 160000
--- a/src/shared/qbs
+++ b/src/shared/qbs
@@ -1 +1 @@
-Subproject commit 0a20fe28a70b810575d33b8a3c8623057a036bd7
+Subproject commit dcfc06010eb622adc4e90b8d77e5db25aa6219d9
diff --git a/src/shared/qtlockedfile/qtlockedfile_unix.cpp b/src/shared/qtlockedfile/qtlockedfile_unix.cpp
index 3e0ad9f6e1d26d1af31a4dfd81a219f9db6c8541..02e65a8126c17db297ce7bb48701f117fbe5bb28 100644
--- a/src/shared/qtlockedfile/qtlockedfile_unix.cpp
+++ b/src/shared/qtlockedfile/qtlockedfile_unix.cpp
@@ -95,6 +95,7 @@ bool QtLockedFile::unlock()
     }
 
     m_lock_mode = NoLock;
+    remove();
     return true;
 }
 
diff --git a/src/shared/qtlockedfile/qtlockedfile_win.cpp b/src/shared/qtlockedfile/qtlockedfile_win.cpp
index dcc7e602fa93df88366b184a75f9342e00bd9418..d384094b93ee17f66835d1b770775bb44c09f83d 100644
--- a/src/shared/qtlockedfile/qtlockedfile_win.cpp
+++ b/src/shared/qtlockedfile/qtlockedfile_win.cpp
@@ -167,6 +167,7 @@ bool QtLockedFile::unlock()
     }
 
     m_lock_mode = QtLockedFile::NoLock;
+    remove();
     return true;
 }
 
diff --git a/tests/manual/debugger/qquick2/app.pro b/tests/manual/debugger/qquick2/app.pro
index 2994749979c7e280a43c3db1d3be67e948a1c2c6..835748dd66beddcfcfbdfdf71e5a259f75940df0 100644
--- a/tests/manual/debugger/qquick2/app.pro
+++ b/tests/manual/debugger/qquick2/app.pro
@@ -1,4 +1,4 @@
-QT += declarative quick
+QT += qml quick
 
 macx:CONFIG -= app_bundle
 
diff --git a/tests/manual/debugger/qquick2/main.cpp b/tests/manual/debugger/qquick2/main.cpp
index b66c3d9af9b50fc8bf16fa92cf2d4ab32b28387e..6cd5a3a9ac8545dd8d67b843dbdd549b086aa973 100644
--- a/tests/manual/debugger/qquick2/main.cpp
+++ b/tests/manual/debugger/qquick2/main.cpp
@@ -1,7 +1,7 @@
 #include <QGuiApplication>
 #include <QQuickView>
-#include <QDeclarativeContext>
-#include <QDeclarativeEngine>
+#include <QQmlContext>
+#include <QQmlEngine>
 #include <QDebug>
 
 class Backend : public QObject {
diff --git a/tests/manual/debugger/qquick2/myplugin/myplugin.cpp b/tests/manual/debugger/qquick2/myplugin/myplugin.cpp
index 879e5beace72dc2d4fea265a95ca27fca7a57512..8b4de2168552ce85dd99191a1129338eb3f32e88 100644
--- a/tests/manual/debugger/qquick2/myplugin/myplugin.cpp
+++ b/tests/manual/debugger/qquick2/myplugin/myplugin.cpp
@@ -1,6 +1,8 @@
 #include "myplugin.h"
 #include "mytype.h"
 
+#include <qqml.h>
+
 void MyPlugin::registerTypes(const char *uri)
 {
     // @uri mymodule
@@ -8,4 +10,3 @@ void MyPlugin::registerTypes(const char *uri)
     qmlRegisterType<MyType>(uri, 1, 0, "MyType");
 }
 
-Q_EXPORT_PLUGIN(MyPlugin)
diff --git a/tests/manual/debugger/qquick2/myplugin/myplugin.h b/tests/manual/debugger/qquick2/myplugin/myplugin.h
index bf2d86041fe2346635a62ce54d6904061437a68e..053f8bdf153ebf295d3aa22da53bbeac28499f50 100644
--- a/tests/manual/debugger/qquick2/myplugin/myplugin.h
+++ b/tests/manual/debugger/qquick2/myplugin/myplugin.h
@@ -1,13 +1,12 @@
 #ifndef MYPLUGIN_H
 #define MYPLUGIN_H
 
-#include <qdeclarative.h>
-#include <QDeclarativeExtensionPlugin>
+#include <QQmlExtensionPlugin>
 
-class MyPlugin : public QDeclarativeExtensionPlugin
+class MyPlugin : public QQmlExtensionPlugin
 {
     Q_OBJECT
-
+    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
 public:
     void registerTypes(const char *uri);
 };
diff --git a/tests/manual/debugger/qquick2/myplugin/myplugin.pro b/tests/manual/debugger/qquick2/myplugin/myplugin.pro
index 09116f6977b0ed9357a1897f24bdd77f3fa3560b..5b8c5d1510477753926a9326c561445b31c60845 100644
--- a/tests/manual/debugger/qquick2/myplugin/myplugin.pro
+++ b/tests/manual/debugger/qquick2/myplugin/myplugin.pro
@@ -1,6 +1,6 @@
 TEMPLATE = lib
 TARGET = myplugin
-QT += declarative
+QT += qml
 CONFIG += qt plugin
 
 TARGET = $$qtLibraryTarget($$TARGET)
diff --git a/tests/manual/debugger/qquick2/myplugin/mytype.cpp b/tests/manual/debugger/qquick2/myplugin/mytype.cpp
index d8e52755713160fb82398f09a2a2572b3a2e7097..f3232af87034d68f7cce099e97bc8ecf278ae841 100644
--- a/tests/manual/debugger/qquick2/myplugin/mytype.cpp
+++ b/tests/manual/debugger/qquick2/myplugin/mytype.cpp
@@ -1,8 +1,8 @@
+#include "mytype.h"
+
 #include <QTimer>
 #include <QTime>
-#include <qdeclarative.h>
-
-#include "mytype.h"
+#include <qqml.h>
 
 MyType::MyType(QObject *parent)
     : QObject(parent)
diff --git a/tests/manual/debugger/qquick2/myplugin/qmldir b/tests/manual/debugger/qquick2/myplugin/qmldir
index a244fa6ad8e108a6a997a7ffdbb988ee15318f21..c3cf4d4281585c72337cd809db2a8c85ce0c99ce 100644
--- a/tests/manual/debugger/qquick2/myplugin/qmldir
+++ b/tests/manual/debugger/qquick2/myplugin/qmldir
@@ -1 +1,2 @@
+module myplugin
 plugin myplugin
diff --git a/tests/system/shared/hook_utils.py b/tests/system/shared/hook_utils.py
index 4a179eeee3dcdfc2d1110adb05efed339acb7214..79f627153aefe3eb1448bfb53cff54ca24038051 100644
--- a/tests/system/shared/hook_utils.py
+++ b/tests/system/shared/hook_utils.py
@@ -111,7 +111,8 @@ def modifyRunSettingsForHookIntoQtQuickUI(kitCount, workingDir, projectName, por
     if platform.system() == "Darwin":
         __addVariableToRunEnvironment__("DYLD_FRAMEWORK_PATH", qtLibPath)
     if not platform.system() in ('Microsoft', 'Windows'):
-        __addVariableToRunEnvironment__("DISPLAY", ":0.0")
+        if not os.getenv("DISPLAY"):
+            __addVariableToRunEnvironment__("DISPLAY", ":0.0")
     result = qmlViewer
     switchViewTo(ViewConstants.EDIT)
     return result
diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py
index b42bba60b84c23431dbf8a59b04e4018f05ee839..08285e750da1d9a05faad9fa48146436e7b08dcb 100644
--- a/tests/system/shared/utils.py
+++ b/tests/system/shared/utils.py
@@ -291,7 +291,7 @@ def __checkParentAccess__(filePath):
 # this function checks for all configured Qt versions inside
 # options dialog and returns a dict holding the kits as keys
 # and a list of information of its configured Qt
-def getConfiguredKits(isMaddedDisabled=True):
+def getConfiguredKits(isMaddeDisabled=True):
     def __retrieveQtVersionName__(target, version):
         treeWidget = waitForObject(":QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget")
         return treeWidget.currentItem().text(0)
@@ -310,8 +310,8 @@ def getConfiguredKits(isMaddedDisabled=True):
     # update collected Qt versions with their configured device and version
     iterateKits(True, True, __setQtVersionForKit__, kitsWithQtVersionName)
     # merge defined target names with their configured Qt versions and devices
-    for kit,qtVersion in kitsWithQtVersionName.iteritems():
-        if isMaddedDisabled and  kit in ('Fremantle', 'Harmattan') and qtVersion == 'None':
+    for kit, qtVersion in kitsWithQtVersionName.iteritems():
+        if isMaddeDisabled and kit in ('Fremantle', 'Harmattan') and qtVersion == 'None':
                 test.log("Found Kit '%s' with unassigned Qt version (disabled Madde plugin)" % kit)
         elif qtVersion in qtVersionNames:
             result[kit] = targetsQtVersions[qtVersionNames.index(qtVersion)].items()[0]
diff --git a/tests/system/suite_editors/tst_memberoperator/test.py b/tests/system/suite_editors/tst_memberoperator/test.py
index ea69df7761a9be7b20689ec0463a257c418b22a3..6316dff138fd253d57fdcf91c0568c19c14cdbdb 100644
--- a/tests/system/suite_editors/tst_memberoperator/test.py
+++ b/tests/system/suite_editors/tst_memberoperator/test.py
@@ -16,11 +16,9 @@ def main():
         placeCursorToLine(cppwindow, "return a.exec();")
         typeLines(cppwindow, ("<Up>", testData.field(record, "declaration")))
         type(cppwindow, testData.field(record, "usage"))
-        waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}",
-                      "sourceFilesRefreshed(QStringList)")
+        snooze(1) # maybe find something better
         type(cppwindow, testData.field(record, "operator"))
-        waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}",
-                      "sourceFilesRefreshed(QStringList)")
+        waitFor("object.exists(':popupFrame_TextEditor::GenericProposalWidget')", 1500)
         test.compare(str(lineUnderCursor(cppwindow)).strip(), testData.field(record, "expected"))
         invokeMenuItem("File", 'Revert "main.cpp" to Saved')
         clickButton(waitForObject(":Revert to Saved.Proceed_QPushButton"))