diff --git a/dist/changes-2.2.0 b/dist/changes-2.2.0
index 6ddfbff20038124290be11a4c1a65f49b2f592fd..bd551b9ff0a1374fcf1b670099fcaa3d12a78c2b 100644
--- a/dist/changes-2.2.0
+++ b/dist/changes-2.2.0
@@ -5,7 +5,7 @@ within the logs of Qt Creator sources. Simply check it out from the public git
 repository. For example:
 
 git clone git://gitorious.org/qt-creator/qt-creator.git
-git log --cherry-pick --pretty=oneline origin/master...origin/2.1
+git log --cherry-pick --pretty=oneline origin/2.1...origin/2.2
 
 General
    * Added support for running user defined external tools (Tools->External)
@@ -153,6 +153,11 @@ Symbian Target
    * Added support for the new on-device debugging agent (CODA)
 
 Maemo Target
+   * Added Meego support.
+   * Added a device configuration wizard.
+   * Added a publishing wizard for Fremantle/extras-devel.
+   * On-demand creation of Desktop files.
+   * For Fremantle, it's possible to disable packaging again.
 
 Designer
 
diff --git a/doc/images/qmldesigner-preview-size.png b/doc/images/qmldesigner-preview-size.png
index ad342382e2aac4a027cbf0d369c746094bc71a8f..9d96d0bce5cfa237a3117145e91baf3cae981ef3 100644
Binary files a/doc/images/qmldesigner-preview-size.png and b/doc/images/qmldesigner-preview-size.png differ
diff --git a/doc/images/qmldesigner-visual-editor.png b/doc/images/qmldesigner-visual-editor.png
index 02dc997edfa14b2285119c3e0902efdfb205504e..0af04132756ec88412a4c35b4d8b28bfd5734b9b 100644
Binary files a/doc/images/qmldesigner-visual-editor.png and b/doc/images/qmldesigner-visual-editor.png differ
diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc
index 89b5666b4314ce6392bb0f0c91c98a1d7cc9daed..a59d7f249b63a2922b0cb5440736583f1c6d974a 100644
--- a/doc/qtcreator.qdoc
+++ b/doc/qtcreator.qdoc
@@ -1097,6 +1097,9 @@
     applications: predefined QML elements, your own QML components, and other
     resources.
 
+    \o \gui Canvas is the working area where you create QML components and
+    design applications.
+
     \o \gui {Properties} pane organizes the properties of the selected QML element
     or QML component. You can also change the properties in the code editor.
 
@@ -1168,11 +1171,13 @@
     The \gui Items pane displays the QML elements grouped by type: your own QML
     components, basic elements, interaction elements, views, and widgets.
 
+    \omit
     Sets of UI components with the MeeGo and Symbian look and feel have been
     defined for Qt Quick. They are based on standard QML elements. To view the
     UI components in \gui {QML Components}, click
     \inlineimage qtcreator-filter.png
     and select \gui {MeeGo Components} or \gui {Symbian Components}.
+    \endomit
 
     \image qmldesigner-qml-components.png "QML Components pane"
 
@@ -1437,7 +1442,13 @@
     \section2 Previewing Element Size
 
     The width and height of the root item in a QML file determine the size of
-    the QML element. To experiment with different sizes, enter values in the
+    the QML element. You can reuse elements, such as buttons, in different
+    sizes in other QML files and design screens for use with different device
+    profiles, screen resolution, or screen orientation. The component size
+    might also be zero (0,0) if its final size is determined by property
+    bindings.
+
+    To experiment with different element sizes, enter values in the
     \gui Height and \gui Width fields on the canvas toolbar. The changes are
     displayed in the \gui States pane and on the canvas, but the property
     values are not changed permanently in the QML file. You can permanently
@@ -1445,6 +1456,22 @@
 
     \image qmldesigner-preview-size.png "Canvas width and height"
 
+    \section1 Specifying Canvas Size
+
+    To change the canvas size, select \gui {Tools > Options... > Qt Quick} and
+    specify the canvas width and height in the \gui Canvas group.
+
+    \section1 Refreshing the Canvas
+
+    When you open QML files in \QMLD, the QML elements in the file are drawn on
+    the canvas. When you edit the element properties in \QMLD, the QML file and
+    the image on the canvas might get out of sync. For example, when you change
+    the position of an item within a column or a row, the new position might
+    not be displayed correctly on the canvas.
+
+    To refresh the image on the canvas, press \key R or select the \gui {Reset
+    View} button on the canvas toolbar.
+
 */
 
 
@@ -1589,7 +1616,8 @@
 
     As you write code, Qt Creator suggests properties, IDs, and code
     snippets to complete the code. It provides a list of context-sensitive
-    suggestions to the statement currently under your cursor.
+    suggestions to the statement currently under your cursor. Press \key Tab
+    or \key Enter to accept the selected suggestion and complete the code.
 
     \image qtcreator-codecompletion.png
 
@@ -7317,6 +7345,8 @@
             For a custom target, you can build your own Python-enabled gdb.
             Follow the instructions on
             \l{http://developer.qt.nokia.com/wiki/QtCreatorBuildGdb}{Building Gdb}.
+            You must use at least Python version 2.5, but we recommend that you
+            use version 2.6.
 
         \row
             \o Debugging tools for Windows
diff --git a/share/qtcreator/qml/qmldump/Info.plist b/share/qtcreator/qml/qmldump/Info.plist.in
similarity index 82%
rename from share/qtcreator/qml/qmldump/Info.plist
rename to share/qtcreator/qml/qmldump/Info.plist.in
index bf62990d1138f953e0c33d09ddff5503a24ce0fb..d34a234d9fee9ac50f9e99f5bf62d593e17d0e9d 100644
--- a/share/qtcreator/qml/qmldump/Info.plist
+++ b/share/qtcreator/qml/qmldump/Info.plist.in
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
+<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
+<plist version=\"1.0\">
 <dict>
         <key>NSHumanReadableCopyright</key>
         <string>(C) 2008-2011 Nokia Corporation
@@ -20,9 +20,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
         <key>CFBundleIdentifier</key>
     <string>com.nokia.qtcreator.qmldump</string>
         <key>CFBundleVersion</key>
-        <string>2.1.83</string>
+        <string>$$QTCREATOR_VERSION</string>
         <key>CFBundleShortVersionString</key>
-        <string>2.1.83</string>
+        <string>$$QTCREATOR_VERSION</string>
     <key>LSUIElement</key>
     <string>1</string>
 </dict>
diff --git a/share/qtcreator/qml/qmlobserver/Info_mac.plist b/share/qtcreator/qml/qmlobserver/Info.plist.in
similarity index 55%
rename from share/qtcreator/qml/qmlobserver/Info_mac.plist
rename to share/qtcreator/qml/qmlobserver/Info.plist.in
index 08775479bafd3c8d201dbe3dfd5b1f0b18f207e2..d5b7bb1a0f57610f670e3e07dc306712aee4da02 100644
--- a/share/qtcreator/qml/qmlobserver/Info_mac.plist
+++ b/share/qtcreator/qml/qmlobserver/Info.plist.in
@@ -1,7 +1,16 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
-<plist version="0.1">
+<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<!DOCTYPE plist SYSTEM \"file://localhost/System/Library/DTDs/PropertyList.dtd\">
+<plist version=\"0.1\">
 <dict>
+        <key>NSHumanReadableCopyright</key>
+        <string>(C) 2008-2011 Nokia Corporation
+Commercial Usage
+
+Licensees holding valid Qt Commercial licenses may use this file in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
+
+GNU Lesser General Public License Usage
+
+Alternatively, this plugin may be used under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation and appearing in the file LICENSE.LGPL included in the packaging of this file.  Please review the following information to ensure the GNU Lesser General Public License version 2.1 requirements will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</string>
 	<key>CFBundleIconFile</key>
 	<string>@ICON@</string>
 	<key>CFBundleIdentifier</key>
@@ -14,6 +23,10 @@
 	<string>@TYPEINFO@</string>
 	<key>CFBundleExecutable</key>
 	<string>@EXECUTABLE@</string>
+        <key>CFBundleVersion</key>
+        <string>$$QTCREATOR_VERSION</string>
+        <key>CFBundleShortVersionString</key>
+        <string>$$QTCREATOR_VERSION</string>
         <key>UTExportedTypeDeclarations</key>
           <array>
             <dict>
diff --git a/share/qtcreator/qml/qmlobserver/qmlobserver.pro b/share/qtcreator/qml/qmlobserver/qmlobserver.pro
index 5ef9da0ed3cfe1e5e24e8775bdf36cae3536d125..3bafb54ca244077e7bd3a90bb10ce716e6f66e21 100644
--- a/share/qtcreator/qml/qmlobserver/qmlobserver.pro
+++ b/share/qtcreator/qml/qmlobserver/qmlobserver.pro
@@ -60,8 +60,9 @@ symbian {
         LIBS += -lavkon -lcone
     }
 }
+OTHER_FILES+=Info.plist
 mac {
-    QMAKE_INFO_PLIST=Info_mac.plist
+    QMAKE_INFO_PLIST=Info.plist
     TARGET=QMLObserver
     ICON=qml.icns
 } else {
diff --git a/share/qtcreator/static.pro b/share/qtcreator/static.pro
index 205ab9e6bd30b65ae89c2978ebfb04157664f43e..73105e5c19650958076635b2b8332fdfa10b9417 100644
--- a/share/qtcreator/static.pro
+++ b/share/qtcreator/static.pro
@@ -39,7 +39,43 @@ DATA_DIRS = \
     generic-highlighter \
     glsl
 
-# files that are to be unconditionally "deployed" to the build dir from src/share to share
+# conditionally deployed data
+!isEmpty(copydata) {
+
+    for(data_dir, DATA_DIRS) {
+        files = $$files($$PWD/$$data_dir/*, true)
+        win32:files ~= s|\\\\|/|g
+        for(file, files):!contains(file, ".*/Info\\.plist\\.in$"):!exists($$file/*):FILES += $$file
+    }
+
+    OTHER_FILES += $$FILES
+    copy2build.input = FILES
+    copy2build.output = $$IDE_DATA_PATH/${QMAKE_FUNC_FILE_IN_stripSrcDir}
+    isEmpty(vcproj):copy2build.variable_out = PRE_TARGETDEPS
+    win32:copy2build.commands = $$QMAKE_COPY \"${QMAKE_FILE_IN}\" \"${QMAKE_FILE_OUT}\"
+    unix:copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
+    copy2build.name = COPY ${QMAKE_FILE_IN}
+    copy2build.CONFIG += no_link
+    QMAKE_EXTRA_COMPILERS += copy2build
+}
+
+!macx {
+    for(data_dir, DATA_DIRS) {
+        eval($${data_dir}.files = $$quote($$PWD/$$data_dir))
+        eval($${data_dir}.path = /share/qtcreator)
+        INSTALLS += $$data_dir
+    }
+} else {
+   # do version magic for app bundles
+   dumpinfo.input = qml/qmldump/Info.plist.in
+   dumpinfo.output = $$IDE_DATA_PATH/qml/qmldump/Info.plist
+   QMAKE_SUBSTITUTES += dumpinfo
+   observerinfo.input = qml/qmlobserver/Info.plist.in
+   observerinfo.output = $$IDE_DATA_PATH/qml/qmlobserver/Info.plist
+   QMAKE_SUBSTITUTES += observerinfo
+}
+
+SRCRESOURCEDIR = $$IDE_SOURCE_TREE/src/share/qtcreator/
 defineReplace(stripSrcResourceDir) {
     win32 {
         !contains(1, ^.:.*):1 = $$OUT_PWD/$$1
@@ -47,19 +83,25 @@ defineReplace(stripSrcResourceDir) {
         !contains(1, ^/.*):1 = $$OUT_PWD/$$1
     }
     out = $$cleanPath($$1)
-    out ~= s|^$$re_escape($$IDE_SOURCE_TREE/src/share/qtcreator/)||$$i_flag
+    out ~= s|^$$re_escape($$SRCRESOURCEDIR)||$$i_flag
     return($$out)
 }
+
+# files that are to be unconditionally "deployed" to the build dir from src/share to share
+DATA_DIRS = \
+    externaltools
 DATA_FILES_SRC = \
     externaltools/lrelease.xml \
     externaltools/lupdate.xml \
     externaltools/sort.xml
-linux-*:DATA_FILES_SRC += externaltools/vi.xml
-macx:DATA_FILES_SRC += externaltools/vi_mac.xml
-win32:DATA_FILES_SRC += externaltools/notepad_win.xml
-win32:DATA_FILES_SRC ~= s|\\\\|/|g
-for(file, DATA_FILES_SRC):DATA_FILES += $$IDE_SOURCE_TREE/src/share/qtcreator/$$file
-macx:OTHER_FILES += $$DATA_FILES
+unix {
+    macx:DATA_FILES_SRC += externaltools/vi_mac.xml
+    else:DATA_FILES_SRC += externaltools/vi.xml
+} else {
+    DATA_FILES_SRC += externaltools/notepad_win.xml
+}
+for(file, DATA_FILES_SRC):DATA_FILES += $${SRCRESOURCEDIR}$$file
+OTHER_FILES += $$DATA_FILES
 unconditionalCopy2build.input = DATA_FILES
 unconditionalCopy2build.output = $$IDE_DATA_PATH/${QMAKE_FUNC_FILE_IN_stripSrcResourceDir}
 isEmpty(vcproj):unconditionalCopy2build.variable_out = PRE_TARGETDEPS
@@ -69,30 +111,11 @@ unconditionalCopy2build.name = COPY ${QMAKE_FILE_IN}
 unconditionalCopy2build.CONFIG += no_link
 QMAKE_EXTRA_COMPILERS += unconditionalCopy2build
 
-# conditionally deployed data
-!isEmpty(copydata) {
-
-    for(data_dir, DATA_DIRS) {
-        files = $$files($$PWD/$$data_dir/*, true)
-        win32:files ~= s|\\\\|/|g
-        for(file, files):!exists($$file/*):FILES += $$file
-    }
-
-    macx:OTHER_FILES += $$FILES
-    copy2build.input = FILES
-    copy2build.output = $$IDE_DATA_PATH/${QMAKE_FUNC_FILE_IN_stripSrcDir}
-    isEmpty(vcproj):copy2build.variable_out = PRE_TARGETDEPS
-    win32:copy2build.commands = $$QMAKE_COPY \"${QMAKE_FILE_IN}\" \"${QMAKE_FILE_OUT}\"
-    unix:copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
-    copy2build.name = COPY ${QMAKE_FILE_IN}
-    copy2build.CONFIG += no_link
-    QMAKE_EXTRA_COMPILERS += copy2build
-}
-
 !macx {
     for(data_dir, DATA_DIRS) {
-        eval($${data_dir}.files = $$quote($$PWD/$$data_dir))
+        eval($${data_dir}.files = $$IDE_DATA_PATH/$$data_dir)
         eval($${data_dir}.path = /share/qtcreator)
+        eval($${data_dir}.CONFIG += no_check_exist)
         INSTALLS += $$data_dir
     }
 }
diff --git a/share/qtcreator/templates/shared/app.desktop b/share/qtcreator/templates/shared/app.desktop
index 8ecd3ce3afd7a680d859c0dcf3713dfead2432c5..1bb7929aae4069da466c8101b5b6c0ad5d530b9a 100644
--- a/share/qtcreator/templates/shared/app.desktop
+++ b/share/qtcreator/templates/shared/app.desktop
@@ -4,7 +4,7 @@ Version=1.0
 Type=Application
 Terminal=false
 Name=thisApp
-Exec=/opt/usr/bin/thisApp
+Exec=/opt/thisApp/bin/thisApp
 Icon=thisApp
 X-Window-Icon=
 X-HildonDesk-ShowInToolbar=true
diff --git a/share/qtcreator/templates/shared/deployment.pri b/share/qtcreator/templates/shared/deployment.pri
index 7b06ed645f7442dc24ccdb9d3670c49868be231a..1afc989898eb1fb982a0736f5149ce72af6a198a 100644
--- a/share/qtcreator/templates/shared/deployment.pri
+++ b/share/qtcreator/templates/shared/deployment.pri
@@ -31,7 +31,14 @@ symbian {
         target = $$replace(target, /, \\)
         !isEqual(source,$$target) {
             !isEmpty(copyCommand):copyCommand += &&
-            copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
+            isEmpty(QMAKE_SH) {
+                copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
+            } else {
+                source = $$replace(source, \\\\, /)
+                target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
+                target = $$replace(target, \\\\, /)
+                copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
+            }
         }
     }
     !isEmpty(copyCommand) {
@@ -50,13 +57,13 @@ symbian {
         copyCommand =
         for(deploymentfolder, DEPLOYMENTFOLDERS) {
             source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
-            source = $$replace(source, \\, /)
+            source = $$replace(source, \\\\, /)
             macx {
                 target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
             } else {
                 target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
             }
-            target = $$replace(target, \\, /)
+            target = $$replace(target, \\\\, /)
             sourcePathSegments = $$split(source, /)
             targetFullPath = $$target/$$last(sourcePathSegments)
             !isEqual(source,$$targetFullPath) {
diff --git a/share/qtcreator/templates/wizards/qml-extension/project.pro b/share/qtcreator/templates/wizards/qml-extension/project.pro
index 1e98bd7a7657db0371d26040805881551a0d7251..9224d7a99b1ada8bc2ae9e96aa693a09d219dc66 100644
--- a/share/qtcreator/templates/wizards/qml-extension/project.pro
+++ b/share/qtcreator/templates/wizards/qml-extension/project.pro
@@ -29,7 +29,7 @@ qmldir.files = qmldir
 symbian {
     # ...
 } else:unix {
-    installPath = /usr/lib/qt4/imports/$$replace(uri, \., /)
+    installPath = /usr/lib/qt4/imports/$$replace(uri, \\., /)
     qmldir.path = $$installPath
     target.path = $$installPath
     INSTALLS += target qmldir
diff --git a/src/app/main.cpp b/src/app/main.cpp
index 4581ef38680aa198a9eb7e7101b803df1462e2a2..f99ef4bf5e1cb234164ad4ac6cce1338e9cf3402 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -255,15 +255,18 @@ int main(int argc, char **argv)
     }
 
     // Make sure we honor the system's proxy settings
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
+#if defined(Q_OS_UNIX)
     QUrl proxyUrl(QString::fromLatin1(qgetenv("http_proxy")));
     if (proxyUrl.isValid()) {
         QNetworkProxy proxy(QNetworkProxy::HttpProxy, proxyUrl.host(),
                             proxyUrl.port(), proxyUrl.userName(), proxyUrl.password());
         QNetworkProxy::setApplicationProxy(proxy);
     }
-#else
-    QNetworkProxyFactory::setUseSystemConfiguration(true);
+#if defined(Q_OS_MAC)
+    else {
+        QNetworkProxyFactory::setUseSystemConfiguration(true);
+    }
+#endif
 #endif
     // Load
     const QStringList pluginPaths = getPluginPaths();
diff --git a/src/libs/extensionsystem/plugindetailsview.ui b/src/libs/extensionsystem/plugindetailsview.ui
index 05be0ff9f22709ddfd9d9e1e8b01d6ce8c9a0c07..e806618b6338ffd4792efdbd4b8ba4096d88cbad 100644
--- a/src/libs/extensionsystem/plugindetailsview.ui
+++ b/src/libs/extensionsystem/plugindetailsview.ui
@@ -22,10 +22,17 @@
      <property name="alignment">
       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
      </property>
+     <property name="textInteractionFlags">
+      <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+     </property>
     </widget>
    </item>
    <item row="0" column="1">
-    <widget class="QLabel" name="name"/>
+    <widget class="QLabel" name="name">
+     <property name="textInteractionFlags">
+      <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+     </property>
+    </widget>
    </item>
    <item row="1" column="0">
     <widget class="QLabel" name="label_2">
@@ -35,10 +42,17 @@
      <property name="alignment">
       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
      </property>
+     <property name="textInteractionFlags">
+      <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+     </property>
     </widget>
    </item>
    <item row="1" column="1">
-    <widget class="QLabel" name="version"/>
+    <widget class="QLabel" name="version">
+     <property name="textInteractionFlags">
+      <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+     </property>
+    </widget>
    </item>
    <item row="2" column="0">
     <widget class="QLabel" name="label_3">
@@ -48,10 +62,17 @@
      <property name="alignment">
       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
      </property>
+     <property name="textInteractionFlags">
+      <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+     </property>
     </widget>
    </item>
    <item row="2" column="1">
-    <widget class="QLabel" name="compatVersion"/>
+    <widget class="QLabel" name="compatVersion">
+     <property name="textInteractionFlags">
+      <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+     </property>
+    </widget>
    </item>
    <item row="3" column="0">
     <widget class="QLabel" name="label_4">
@@ -61,10 +82,17 @@
      <property name="alignment">
       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
      </property>
+     <property name="textInteractionFlags">
+      <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+     </property>
     </widget>
    </item>
    <item row="3" column="1">
-    <widget class="QLabel" name="vendor"/>
+    <widget class="QLabel" name="vendor">
+     <property name="textInteractionFlags">
+      <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+     </property>
+    </widget>
    </item>
    <item row="5" column="0">
     <widget class="QLabel" name="label_6">
@@ -74,6 +102,9 @@
      <property name="alignment">
       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
      </property>
+     <property name="textInteractionFlags">
+      <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+     </property>
     </widget>
    </item>
    <item row="5" column="1">
@@ -81,6 +112,9 @@
      <property name="openExternalLinks">
       <bool>true</bool>
      </property>
+     <property name="textInteractionFlags">
+      <set>Qt::TextBrowserInteraction</set>
+     </property>
     </widget>
    </item>
    <item row="6" column="0">
@@ -91,6 +125,9 @@
      <property name="alignment">
       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
      </property>
+     <property name="textInteractionFlags">
+      <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+     </property>
     </widget>
    </item>
    <item row="6" column="1">
@@ -98,6 +135,9 @@
      <property name="wordWrap">
       <bool>false</bool>
      </property>
+     <property name="textInteractionFlags">
+      <set>Qt::TextBrowserInteraction</set>
+     </property>
     </widget>
    </item>
    <item row="7" column="0">
@@ -110,6 +150,9 @@
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
+       <property name="textInteractionFlags">
+        <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+       </property>
       </widget>
      </item>
      <item>
@@ -145,10 +188,17 @@
      <property name="alignment">
       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
      </property>
+     <property name="textInteractionFlags">
+      <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+     </property>
     </widget>
    </item>
    <item row="8" column="1">
-    <widget class="QLabel" name="copyright"/>
+    <widget class="QLabel" name="copyright">
+     <property name="textInteractionFlags">
+      <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+     </property>
+    </widget>
    </item>
    <item row="9" column="0">
     <layout class="QVBoxLayout">
@@ -160,6 +210,9 @@
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
+       <property name="textInteractionFlags">
+        <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+       </property>
       </widget>
      </item>
      <item>
@@ -197,6 +250,9 @@
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
+       <property name="textInteractionFlags">
+        <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+       </property>
       </widget>
      </item>
      <item>
@@ -225,6 +281,9 @@
      <property name="alignment">
       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
      </property>
+     <property name="textInteractionFlags">
+      <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+     </property>
     </widget>
    </item>
    <item row="4" column="1">
@@ -232,6 +291,9 @@
      <property name="text">
       <string/>
      </property>
+     <property name="textInteractionFlags">
+      <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
+     </property>
     </widget>
    </item>
   </layout>
diff --git a/src/libs/qtcreatorcdbext/containers.cpp b/src/libs/qtcreatorcdbext/containers.cpp
index 1e9d2147336519f65cdc0353561a15734fd2fe19..ed72cf946b9fc6bed7a097561be897d80afffa1c 100644
--- a/src/libs/qtcreatorcdbext/containers.cpp
+++ b/src/libs/qtcreatorcdbext/containers.cpp
@@ -81,7 +81,8 @@ static inline void dump64bitPointerArray(std::ostream &os, const void *a, int co
 static inline std::string fixInnerType(std::string type,
                                        const SymbolGroupValue &container)
 {
-    const std::string stripped = SymbolGroupValue::stripClassPrefixes(type);
+    const std::string stripped
+        = SymbolGroupValue::stripConst(SymbolGroupValue::stripClassPrefixes(type));
     const KnownType kt = knownType(stripped, 0);
     // Resolve types unless they are POD or pointers to POD (that is, qualify 'Foo' and 'Foo*')
     const bool needResolve = kt == KT_Unknown || kt ==  KT_PointerType || !(kt & KT_POD_Type);
diff --git a/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp b/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
index 2e06e7a44f72e4a5a2b11e83604199e1280275fa..8a77aa235d3e6cd5cf8e728555c75232a0009c42 100644
--- a/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
+++ b/src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp
@@ -1095,9 +1095,11 @@ extern "C" HRESULT CALLBACK test(CIDebugClient *client, PCSTR argsIn)
             break;
         case TestType: {
             const KnownType kt = knownType(testType, 0);
-            str << testType << ' ' << kt << " [";
+            const std::string fixed = SymbolGroupValue::stripConst(testType);
+            const unsigned size = SymbolGroupValue::sizeOf(fixed.c_str());
+            str << '"' << testType <<  "\" (" << fixed << ") " << kt << " [";
             formatKnownTypeFlags(str, kt);
-            str << ']';
+            str << "] size=" << size;
         }
             break;
         case TestFixWatchExpression:
diff --git a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp
index 09df78028ce1cb2ff03d136037588d5117bf72cf..59f3de12fd3702e84fb8a781ce071a200b8f4b6e 100644
--- a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp
+++ b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp
@@ -389,6 +389,31 @@ std::string SymbolGroupValue::stripClassPrefixes(const std::string &type)
     return rc;
 }
 
+// Strip " const" from end of type ("XX const", "XX const *[*]"
+std::string SymbolGroupValue::stripConst(const std::string &type)
+{
+    const std::string::size_type constPos = type.rfind(" const");
+    if (constPos == std::string::npos)
+        return type;
+    // Strip 'const' only if it is at the end 'QString const'
+    // or of some pointer like 'foo ***'
+    std::string rc = type;
+    const std::string::size_type size = rc.size();
+    std::string::size_type nextPos = constPos + 6;
+    if (nextPos == size) { // Ends with - easy.
+        rc.erase(constPos, nextPos - constPos);
+        return rc;
+    }
+    // Ensure it ends with ' ****'.
+    if (rc.at(nextPos) != ' ')
+        return rc;
+    for (std::string::size_type i = nextPos + 1; i < size; ++i)
+        if (rc.at(i) != '*')
+            return rc;
+    rc.erase(constPos, nextPos - constPos);
+    return rc;
+}
+
 std::string SymbolGroupValue::addPointerType(const std::string &t)
 {
     // 'char' -> 'char *' -> 'char **'
diff --git a/src/libs/qtcreatorcdbext/symbolgroupvalue.h b/src/libs/qtcreatorcdbext/symbolgroupvalue.h
index 6bb7cfbcf5039f2da2eae749f966921610b7dcd6..b9153249da67b3c2b49cf35c911da801f6434114 100644
--- a/src/libs/qtcreatorcdbext/symbolgroupvalue.h
+++ b/src/libs/qtcreatorcdbext/symbolgroupvalue.h
@@ -105,6 +105,9 @@ public:
     static std::string stripPointerType(const std::string &);
     // Strip "class ", "struct "
     static std::string stripClassPrefixes(const std::string &);
+    // Strip " const" from "char const*", (map key), "QString const", etc.
+    // which otherwise causes GetTypeSize to fail.
+    static std::string stripConst(const std::string &type);
     static std::string addPointerType(const std::string &);
     static std::string stripArrayType(const std::string &);
     static std::string stripModuleFromType(const std::string &type);
diff --git a/src/libs/utils/consoleprocess.cpp b/src/libs/utils/consoleprocess.cpp
index fe8ef8328875f339cebfe9d6f585c884710ecf33..74b0cc0f1e7bae169e606544776a401c4df1ffb8 100644
--- a/src/libs/utils/consoleprocess.cpp
+++ b/src/libs/utils/consoleprocess.cpp
@@ -65,6 +65,11 @@ QString ConsoleProcess::msgCannotCreateTempFile(const QString &why)
     return tr("Cannot create temporary file: %1").arg(why);
 }
 
+QString ConsoleProcess::msgCannotWriteTempFile()
+{
+    return tr("Cannot write temporary file. Disk full?");
+}
+
 QString ConsoleProcess::msgCannotCreateTempDir(const QString & dir, const QString &why)
 {
     return tr("Cannot create temporary directory '%1': %2").arg(dir, why);
diff --git a/src/libs/utils/consoleprocess.h b/src/libs/utils/consoleprocess.h
index 26ec85fff345d8903bf63d55ce56b994213a3898..9dd6283cb1bf4b7110213770ca7fe0566971558c 100644
--- a/src/libs/utils/consoleprocess.h
+++ b/src/libs/utils/consoleprocess.h
@@ -104,6 +104,7 @@ private:
     static QString msgCommChannelFailed(const QString &error);
     static QString msgPromptToClose();
     static QString msgCannotCreateTempFile(const QString &why);
+    static QString msgCannotWriteTempFile();
     static QString msgCannotCreateTempDir(const QString & dir, const QString &why);
     static QString msgUnexpectedOutput(const QByteArray &what);
     static QString msgCannotChangeToWorkDir(const QString & dir, const QString &why);
diff --git a/src/libs/utils/consoleprocess_unix.cpp b/src/libs/utils/consoleprocess_unix.cpp
index c4c745fc9b37ffa6fa3e6b7c50da55bc3afc19d9..737dc334bd731f245fd79a0f0e596372758dde4f 100644
--- a/src/libs/utils/consoleprocess_unix.cpp
+++ b/src/libs/utils/consoleprocess_unix.cpp
@@ -173,11 +173,18 @@ bool ConsoleProcess::start(const QString &program, const QString &args)
             d->m_tempFile = 0;
             return false;
         }
+        QByteArray contents;
         foreach (const QString &var, env) {
-            d->m_tempFile->write(var.toLocal8Bit());
-            d->m_tempFile->write("", 1);
+            QByteArray l8b = var.toLocal8Bit();
+            contents.append(l8b.constData(), l8b.size() + 1);
+        }
+        if (d->m_tempFile->write(contents) != contents.size() || !d->m_tempFile->flush()) {
+            stubServerShutdown();
+            emit processMessage(msgCannotWriteTempFile(), true);
+            delete d->m_tempFile;
+            d->m_tempFile = 0;
+            return false;
         }
-        d->m_tempFile->flush();
     }
 
     xtermArgs
diff --git a/src/libs/utils/consoleprocess_win.cpp b/src/libs/utils/consoleprocess_win.cpp
index f450e9265f9dd75781ce962049af94cc2378c940..6d8a2f4ec6a8da0b6f722065300e4b6a7567d32d 100644
--- a/src/libs/utils/consoleprocess_win.cpp
+++ b/src/libs/utils/consoleprocess_win.cpp
@@ -157,6 +157,16 @@ bool ConsoleProcess::start(const QString &program, const QString &args)
         foreach (const QString &var, fixWinEnvironment(env))
             out << var << QChar(0);
         out << QChar(0);
+#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
+        out.flush();
+        if (out.status() != QTextStream::Ok) {
+            stubServerShutdown();
+            emit processMessage(msgCannotWriteTempFile(), true);
+            delete d->m_tempFile;
+            d->m_tempFile = 0;
+            return false;
+        }
+#endif
     }
 
     STARTUPINFO si;
diff --git a/src/libs/utils/filesearch.cpp b/src/libs/utils/filesearch.cpp
index c576e32f9731ac12733488552c59ac121e2fca6f..c38d1606da3580067e78736cb02d178a81c61219 100644
--- a/src/libs/utils/filesearch.cpp
+++ b/src/libs/utils/filesearch.cpp
@@ -178,7 +178,8 @@ void runFileSearch(QFutureInterface<FileSearchResultList> &future,
         }
 
         ++numFilesSearched;
-        if (future.isProgressUpdateNeeded()) {
+        if (future.isProgressUpdateNeeded()
+                || future.progressValue() == 0 /*workaround for regression in Qt*/) {
             if (!results.isEmpty()) {
                 future.reportResult(results);
                 results.clear();
@@ -256,7 +257,8 @@ void runFileSearchRegExp(QFutureInterface<FileSearchResultList> &future,
             ++lineNr;
         }
         ++numFilesSearched;
-        if (future.isProgressUpdateNeeded()) {
+        if (future.isProgressUpdateNeeded()
+                || future.progressValue() == 0 /*workaround for regression in Qt*/) {
             if (!results.isEmpty()) {
                 future.reportResult(results);
                 results.clear();
diff --git a/src/libs/utils/navigationtreeview.cpp b/src/libs/utils/navigationtreeview.cpp
index 042624db3db1824d3b1710ece7fb94029e6295e5..0c1dd193a951a2cffcda53818e06f960213d9dee 100644
--- a/src/libs/utils/navigationtreeview.cpp
+++ b/src/libs/utils/navigationtreeview.cpp
@@ -61,8 +61,8 @@ NavigationTreeView::NavigationTreeView(QWidget *parent)
     setAttribute(Qt::WA_MacShowFocusRect, false);
 
     setHeaderHidden(true);
-
-    // show horizontal scrollbar
+    // We let the column adjust to contents, but note
+    // the setting of a minimum size in resizeEvent()
     header()->setResizeMode(QHeaderView::ResizeToContents);
     header()->setStretchLastSection(false);
 }
@@ -82,6 +82,12 @@ void NavigationTreeView::focusOutEvent(QFocusEvent *event)
         QTreeView::focusOutEvent(event);
 }
 
+void NavigationTreeView::resizeEvent(QResizeEvent *event)
+{
+    header()->setMinimumSectionSize(viewport()->width());
+    QTreeView::resizeEvent(event);
+}
+
 #ifdef Q_WS_MAC
 void NavigationTreeView::keyPressEvent(QKeyEvent *event)
 {
diff --git a/src/libs/utils/navigationtreeview.h b/src/libs/utils/navigationtreeview.h
index 2797e8aa35bb6654aea8942d340039f6a0cc5c35..ca89d9b053c16f91e3166c5b9b27508dc6a803b1 100644
--- a/src/libs/utils/navigationtreeview.h
+++ b/src/libs/utils/navigationtreeview.h
@@ -49,6 +49,7 @@ public:
 protected:
     void focusInEvent(QFocusEvent *event);
     void focusOutEvent(QFocusEvent *event);
+    void resizeEvent(QResizeEvent *event);
 
 #ifdef Q_WS_MAC
     void keyPressEvent(QKeyEvent *event);
diff --git a/src/libs/utils/qtcprocess.cpp b/src/libs/utils/qtcprocess.cpp
index 005e8ccea95f4db0ebf680438cbcf720916ba6c7..ef99096a2d8b9721c9f4da86e7148ee898c4433c 100644
--- a/src/libs/utils/qtcprocess.cpp
+++ b/src/libs/utils/qtcprocess.cpp
@@ -34,10 +34,7 @@
 #include "qtcprocess.h"
 #include "stringutils.h"
 
-#ifdef Q_OS_WIN
 #include <QtCore/QDir>
-#endif
-
 #include <QtCore/QDebug>
 
 using namespace Utils;
@@ -311,6 +308,16 @@ QStringList QtcProcess::splitArgs(const QString &args, bool abortOnMeta, SplitEr
         } while (c.isSpace());
         QString cret;
         bool hadWord = false;
+        if (c == QLatin1Char('~')) {
+            if (pos >= args.length()
+                || args.unicode()[pos].isSpace() || args.unicode()[pos] == QLatin1Char('/')) {
+                cret = QDir::homePath();
+                hadWord = true;
+                goto getc;
+            } else if (abortOnMeta) {
+                goto metaerr;
+            }
+        }
         do {
             if (c == QLatin1Char('\'')) {
                 int spos = pos;
@@ -449,6 +456,7 @@ QStringList QtcProcess::splitArgs(const QString &args, bool abortOnMeta, SplitEr
                 cret += c;
                 hadWord = true;
             }
+          getc:
             if (pos >= args.length())
                 break;
             c = args.unicode()[pos++];
diff --git a/src/plugins/analyzerbase/analyzermanager.cpp b/src/plugins/analyzerbase/analyzermanager.cpp
index 2ed67575e5b3a8545b63975155de8fab6d8ca9f8..8dd1629e4e747954d095ace30e439f203ef251c1 100644
--- a/src/plugins/analyzerbase/analyzermanager.cpp
+++ b/src/plugins/analyzerbase/analyzermanager.cpp
@@ -453,12 +453,21 @@ void AnalyzerManager::AnalyzerManagerPrivate::startTool()
 
     ProjectExplorer::ProjectExplorerPlugin *pe = ProjectExplorer::ProjectExplorerPlugin::instance();
 
-    ProjectExplorer::Project *pro = pe->startupProject();
     // ### not sure if we're supposed to check if the RunConFiguration isEnabled
-    if (!pro || !pro->activeTarget()->activeRunConfiguration()->isEnabled())
+    ProjectExplorer::Project *pro = pe->startupProject();
+    const ProjectExplorer::RunConfiguration *runConfig = 0;
+    ProjectExplorer::BuildConfiguration::BuildType buildType = ProjectExplorer::BuildConfiguration::Unknown;
+    if (pro) {
+        if (const ProjectExplorer::Target *target = pro->activeTarget()) {
+            runConfig = target->activeRunConfiguration();
+            // Build configuration is 0 for QML projects.
+            if (const ProjectExplorer::BuildConfiguration *buildConfig = target->activeBuildConfiguration())
+                buildType = buildConfig->buildType();
+        }
+    }
+    if (!runConfig || !runConfig->isEnabled())
         return;
 
-    ProjectExplorer::BuildConfiguration::BuildType buildType = pro->activeTarget()->activeBuildConfiguration()->buildType();
     IAnalyzerTool::ToolMode toolMode = q->currentTool()->mode();
 
     // check the project for whether the build config is in the correct mode
diff --git a/src/plugins/classview/classviewnavigationwidget.cpp b/src/plugins/classview/classviewnavigationwidget.cpp
index 82a9c4a8e3e036453361e015bf70762415146265..4523fe376045e974d3ff8874ba93ae1babebf98c 100644
--- a/src/plugins/classview/classviewnavigationwidget.cpp
+++ b/src/plugins/classview/classviewnavigationwidget.cpp
@@ -83,7 +83,6 @@ NavigationWidget::NavigationWidget(QWidget *parent) :
 
     // tree model
     d_ptr->treeModel = new TreeItemModel(this);
-    d_ptr->ui->treeView->header()->setStretchLastSection(true);
     d_ptr->ui->treeView->setModel(d_ptr->treeModel);
 
     // connect signal/slots
diff --git a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
index 50e0c96b6204ef6236d86ed0df7e46215a0307a6..26255702256ff51aeb727a1f71e3ba148e51e687 100644
--- a/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
@@ -292,23 +292,23 @@ void CMakeRunPage::initWidgets()
     if (m_cmakeWizard->cmakeManager()->isCMakeExecutableValid()) {
         m_cmakeExecutable = 0;
     } else {
-        QString text = tr("Please specify the path to the CMake executable. No CMake executable was found in the path.");
+        QString text = tr("Please specify the path to the cmake executable. No cmake executable was found in the path.");
         QString cmakeExecutable = m_cmakeWizard->cmakeManager()->cmakeExecutable();
         if (!cmakeExecutable.isEmpty()) {
             QFileInfo fi(cmakeExecutable);
             if (!fi.exists())
-                text += tr(" The CMake executable (%1) does not exist.").arg(cmakeExecutable);
+                text += tr(" The cmake executable (%1) does not exist.").arg(cmakeExecutable);
             else if (!fi.isExecutable())
                 text += tr(" The path %1 is not a executable.").arg(cmakeExecutable);
             else
-                text += tr(" The path %1 is not a valid CMake.").arg(cmakeExecutable);
+                text += tr(" The path %1 is not a valid cmake.").arg(cmakeExecutable);
         }
 
         fl->addRow(new QLabel(text, this));
         // Show a field for the user to enter
         m_cmakeExecutable = new Utils::PathChooser(this);
         m_cmakeExecutable->setExpectedKind(Utils::PathChooser::ExistingCommand);
-        fl->addRow("CMake Executable", m_cmakeExecutable);
+        fl->addRow("cmake Executable", m_cmakeExecutable);
     }
 
     // Run CMake Line (with arguments)
@@ -479,7 +479,7 @@ void CMakeRunPage::runCMake()
         m_runCMake->setEnabled(true);
         m_argumentsLineEdit->setEnabled(true);
         m_generatorComboBox->setEnabled(true);
-        m_output->appendPlainText(tr("No valid CMake executable specified."));
+        m_output->appendPlainText(tr("No valid cmake executable specified."));
     }
 }
 
@@ -523,7 +523,7 @@ void CMakeRunPage::cmakeFinished()
 
     if (m_cmakeProcess->exitCode() != 0) {
         m_exitCodeLabel->setVisible(true);
-        m_exitCodeLabel->setText(tr("CMake exited with errors. Please check cmake output."));
+        m_exitCodeLabel->setText(tr("CMake exited with errors. Please check CMake output."));
         m_complete = false;
     } else {
         m_exitCodeLabel->setVisible(false);
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
index dca8eb9359c4c8e7ce41784ec7c92788907305ce..46946be0e4395d8caf92e533334aabec90e9ee3c 100644
--- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
@@ -79,13 +79,13 @@ CMakeManager::CMakeManager(CMakeSettingsPage *cmakeSettingsPage)
     Core::ActionContainer *msubproject =
             am->actionContainer(ProjectExplorer::Constants::M_SUBPROJECTCONTEXT);
 
-    m_runCMakeAction = new QAction(QIcon(), tr("Run cmake"), this);
+    m_runCMakeAction = new QAction(QIcon(), tr("Run CMake"), this);
     Core::Command *command = am->registerAction(m_runCMakeAction, Constants::RUNCMAKE, m_projectContext);
     command->setAttribute(Core::Command::CA_Hide);
     mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_PROJECT);
     connect(m_runCMakeAction, SIGNAL(triggered()), this, SLOT(runCMake()));
 
-    m_runCMakeActionContextMenu = new QAction(QIcon(), tr("Run cmake"), this);
+    m_runCMakeActionContextMenu = new QAction(QIcon(), tr("Run CMake"), this);
     command = am->registerAction(m_runCMakeActionContextMenu, Constants::RUNCMAKECONTEXTMENU, m_projectContext);
     command->setAttribute(Core::Command::CA_Hide);
     mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD);
diff --git a/src/plugins/coreplugin/dialogs/settingsdialog.cpp b/src/plugins/coreplugin/dialogs/settingsdialog.cpp
index e0c01749743c52a79dbca6c847bb8ff5eb4c64ae..3c8599f55a7d1bf153245958f3fd3359c4386189 100644
--- a/src/plugins/coreplugin/dialogs/settingsdialog.cpp
+++ b/src/plugins/coreplugin/dialogs/settingsdialog.cpp
@@ -318,6 +318,8 @@ SettingsDialog::SettingsDialog(QWidget *parent) :
 
     // The order of the slot connection matters here, the filter slot
     // opens the matching page after the model has filtered.
+    connect(m_filterLineEdit, SIGNAL(filterChanged(QString)),
+            this, SLOT(ensureAllCategoryWidgets()));
     connect(m_filterLineEdit, SIGNAL(filterChanged(QString)),
                 m_proxyModel, SLOT(setFilterFixedString(QString)));
     connect(m_filterLineEdit, SIGNAL(filterChanged(QString)), this, SLOT(filter(QString)));
diff --git a/src/plugins/coreplugin/dialogs/settingsdialog.h b/src/plugins/coreplugin/dialogs/settingsdialog.h
index 3d82aae6e19d1ec818e79a7191062af430ce02f0..fc698a1726bf2b9c2cc3caf7277e3599b33eb1fd 100644
--- a/src/plugins/coreplugin/dialogs/settingsdialog.h
+++ b/src/plugins/coreplugin/dialogs/settingsdialog.h
@@ -88,6 +88,7 @@ private slots:
     void currentChanged(const QModelIndex &current);
     void currentTabChanged(int);
     void filter(const QString &text);
+    void ensureAllCategoryWidgets();
 
 private:
     SettingsDialog(QWidget *parent);
@@ -98,7 +99,6 @@ private:
     void showPage(const QString &categoryId, const QString &pageId);
     void updateEnabledTabs(Category *category, const QString &searchText);
     void ensureCategoryWidget(Category *category);
-    void ensureAllCategoryWidgets();
     void disconnectTabWidgets();
 
     const QList<Core::IOptionsPage*> m_pages;
diff --git a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp
index 72c6281c24d84b601e83cd2e9138d496a6161946..8208e3cfb6ef16564284a5aa85b440600d8a4987 100644
--- a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp
+++ b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp
@@ -390,7 +390,7 @@ int ShortcutSettings::translateModifiers(Qt::KeyboardModifiers state,
     // that is only reachable using the shift key anyway
     if ((state & Qt::ShiftModifier) && (text.size() == 0
                                         || !text.at(0).isPrint()
-                                        || text.at(0).isLetter()
+                                        || text.at(0).isLetterOrNumber()
                                         || text.at(0).isSpace()))
         result |= Qt::SHIFT;
     if (state & Qt::ControlModifier)
diff --git a/src/plugins/coreplugin/messageoutputwindow.cpp b/src/plugins/coreplugin/messageoutputwindow.cpp
index 65ce8dcdf17c52ff4de73d5cd8ce6b2bb502636f..e553dd1349678f91a314ce25b455fe1c10016fc4 100644
--- a/src/plugins/coreplugin/messageoutputwindow.cpp
+++ b/src/plugins/coreplugin/messageoutputwindow.cpp
@@ -33,13 +33,13 @@
 
 #include "messageoutputwindow.h"
 
-#include <QtGui/QTextEdit>
+#include <QtGui/QScrollBar>
 
 using namespace Core::Internal;
 
 MessageOutputWindow::MessageOutputWindow()
 {
-    m_widget = new QTextEdit;
+    m_widget = new TextView;
     m_widget->setReadOnly(true);
     m_widget->setFrameStyle(QFrame::NoFrame);
 }
@@ -86,7 +86,10 @@ void MessageOutputWindow::visibilityChanged(bool /*b*/)
 
 void MessageOutputWindow::append(const QString &text)
 {
+    bool scroll = m_widget->isScrollbarAtBottom() || !m_widget->isVisible();
     m_widget->append(text);
+    if (scroll)
+        m_widget->scrollToBottom();
 }
 
 int MessageOutputWindow::priorityInStatusBar() const
@@ -118,3 +121,34 @@ bool MessageOutputWindow::canNavigate()
 {
     return false;
 }
+
+// -------- Copied from OutputWindow which should be shared instead
+
+bool TextView::isScrollbarAtBottom() const
+{
+    return verticalScrollBar()->value() == verticalScrollBar()->maximum();
+}
+
+void TextView::scrollToBottom()
+{
+    verticalScrollBar()->setValue(verticalScrollBar()->maximum());
+}
+
+void TextView::showEvent(QShowEvent *e)
+{
+    bool atBottom = isScrollbarAtBottom();
+    QTextEdit::showEvent(e);
+    if (atBottom)
+        scrollToBottom();
+}
+
+void TextView::resizeEvent(QResizeEvent *e)
+{
+    //Keep scrollbar at bottom of window while resizing, to ensure we keep scrolling
+    //This can happen if window is resized while building, or if the horizontal scrollbar appears
+    bool atBottom = isScrollbarAtBottom();
+    QTextEdit::resizeEvent(e);
+    if (atBottom)
+        scrollToBottom();
+}
+
diff --git a/src/plugins/coreplugin/messageoutputwindow.h b/src/plugins/coreplugin/messageoutputwindow.h
index 3e4f18a8e5a3170f41188a79b3994a4056856d04..befdc7e74dce34ca88ee6cea5f6cfbec7dd636d3 100644
--- a/src/plugins/coreplugin/messageoutputwindow.h
+++ b/src/plugins/coreplugin/messageoutputwindow.h
@@ -36,13 +36,28 @@
 
 #include <coreplugin/ioutputpane.h>
 
-QT_BEGIN_NAMESPACE
-class QTextEdit;
-QT_END_NAMESPACE
+#include <QtGui/QShowEvent>
+#include <QtGui/QResizeEvent>
+#include <QtGui/QTextEdit>
 
 namespace Core {
 namespace Internal {
 
+class TextView : public QTextEdit
+{
+    Q_OBJECT
+
+public:
+    TextView(QWidget *parent = 0) : QTextEdit(parent) {}
+
+    void showEvent(QShowEvent *);
+    void scrollToBottom();
+    bool isScrollbarAtBottom() const;
+
+protected:
+    void resizeEvent(QResizeEvent *e);
+};
+
 class MessageOutputWindow : public Core::IOutputPane
 {
     Q_OBJECT
@@ -71,7 +86,7 @@ public:
     bool canNavigate();
 
 private:
-    QTextEdit *m_widget;
+    TextView *m_widget;
 };
 
 } // namespace Internal
diff --git a/src/plugins/coreplugin/variablechooser.cpp b/src/plugins/coreplugin/variablechooser.cpp
index 2799c13204a92b892f4d14505f8c3308639e9b4d..9dc674f1e94034be64129c1dae000db111f7c833 100644
--- a/src/plugins/coreplugin/variablechooser.cpp
+++ b/src/plugins/coreplugin/variablechooser.cpp
@@ -144,7 +144,16 @@ void VariableChooser::createIconButton()
     m_iconButton->setPixmap(QPixmap(QLatin1String(":/core/images/replace.png")));
     m_iconButton->setToolTip(tr("Insert variable"));
     m_iconButton->hide();
-    connect(m_iconButton, SIGNAL(clicked()), this, SLOT(show()));
+    connect(m_iconButton, SIGNAL(clicked()), this, SLOT(updatePositionAndShow()));
+}
+
+void VariableChooser::updatePositionAndShow()
+{
+    if (parentWidget()) {
+        QPoint parentCenter = parentWidget()->mapToGlobal(parentWidget()->geometry().center());
+        move(parentCenter.x() - width()/2, parentCenter.y() - height()/2);
+    }
+    show();
 }
 
 void VariableChooser::handleItemActivated(QListWidgetItem *item)
diff --git a/src/plugins/coreplugin/variablechooser.h b/src/plugins/coreplugin/variablechooser.h
index a39feff58d6afc9c8c526f7c05b043845a4904cb..456ba202d6c87d2e8749f3f221d987775e7a36ea 100644
--- a/src/plugins/coreplugin/variablechooser.h
+++ b/src/plugins/coreplugin/variablechooser.h
@@ -64,6 +64,7 @@ private slots:
     void updateCurrentEditor(QWidget *old, QWidget *widget);
     void handleItemActivated(QListWidgetItem *item);
     void insertVariable(const QString &variable);
+    void updatePositionAndShow();
 
 private:
     void createIconButton();
diff --git a/src/plugins/debugger/attachtcfdialog.ui b/src/plugins/debugger/attachtcfdialog.ui
deleted file mode 100644
index c890f11ff95362ba151e96813c4de28b86ef38c3..0000000000000000000000000000000000000000
--- a/src/plugins/debugger/attachtcfdialog.ui
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>AttachTcfDialog</class>
- <widget class="QDialog" name="AttachTcfDialog">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>310</width>
-    <height>224</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Start Debugger</string>
-  </property>
-  <layout class="QVBoxLayout">
-   <property name="spacing">
-    <number>6</number>
-   </property>
-   <property name="margin">
-    <number>9</number>
-   </property>
-   <item>
-    <layout class="QFormLayout" name="formLayout">
-     <property name="fieldGrowthPolicy">
-      <enum>QFormLayout::ExpandingFieldsGrow</enum>
-     </property>
-     <item row="0" column="0">
-      <widget class="QLabel" name="channelLabel">
-       <property name="text">
-        <string>Host and port:</string>
-       </property>
-      </widget>
-     </item>
-     <item row="0" column="1">
-      <widget class="QLineEdit" name="channelLineEdit">
-       <property name="text">
-        <string notr="true">localhost:5115</string>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="0">
-      <widget class="QLabel" name="architectureLabel">
-       <property name="text">
-        <string>Architecture:</string>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="1">
-      <widget class="QComboBox" name="architectureComboBox"/>
-     </item>
-     <item row="2" column="1">
-      <widget class="QCheckBox" name="useServerStartScriptCheckBox"/>
-     </item>
-     <item row="2" column="0">
-      <widget class="QLabel" name="useServerStartScriptLabel">
-       <property name="text">
-        <string>Use server start script:</string>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="1">
-      <widget class="Utils::PathChooser" name="serverStartScript" native="true"/>
-     </item>
-     <item row="3" column="0">
-      <widget class="QLabel" name="serverStartScriptLabel">
-       <property name="text">
-        <string>Server start script:</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <widget class="QDialogButtonBox" name="buttonBox">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons">
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>Utils::PathChooser</class>
-   <extends>QWidget</extends>
-   <header location="global">utils/pathchooser.h</header>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index b1db0f5d8720341e332fc7cf674344d5a36754a7..9d26124d854c54a20e67b20482ac0c3d85dea24d 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -106,8 +106,8 @@ static QString typeToString(BreakpointType type)
             return msgBreakpointAtSpecialFunc("fork");
         case BreakpointAtExec:
             return msgBreakpointAtSpecialFunc("exec");
-        case BreakpointAtVFork:
-            return msgBreakpointAtSpecialFunc("vfork");
+        //case BreakpointAtVFork:
+        //    return msgBreakpointAtSpecialFunc("vfork");
         case BreakpointAtSysCall:
             return msgBreakpointAtSpecialFunc("syscall");
         case BreakpointAtMain:
@@ -512,7 +512,7 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const
                         || data.type == BreakpointAtCatch
                         || data.type == BreakpointAtFork
                         || data.type == BreakpointAtExec
-                        || data.type == BreakpointAtVFork
+                        //|| data.type == BreakpointAtVFork
                         || data.type == BreakpointAtSysCall)
                     return typeToString(data.type);
                 if (data.type == Watchpoint)
diff --git a/src/plugins/debugger/breakpoint.cpp b/src/plugins/debugger/breakpoint.cpp
index c11963dc929647078e47bf3144bffb813898f471..5a3be3a7bc93bd2954739bffe79545fecd042a26 100644
--- a/src/plugins/debugger/breakpoint.cpp
+++ b/src/plugins/debugger/breakpoint.cpp
@@ -128,7 +128,7 @@ QString BreakpointParameters::toString() const
     case BreakpointAtMain:
     case BreakpointAtFork:
     case BreakpointAtExec:
-    case BreakpointAtVFork:
+    //case BreakpointAtVFork:
     case BreakpointAtSysCall:
     case UnknownType:
         break;
diff --git a/src/plugins/debugger/breakpoint.h b/src/plugins/debugger/breakpoint.h
index 85ad101bd5bc008d3df1c85c5f3b0816c6fbb71c..4fcf678793771b9d2615750d0f8da5ea2901f8b6 100644
--- a/src/plugins/debugger/breakpoint.h
+++ b/src/plugins/debugger/breakpoint.h
@@ -61,7 +61,7 @@ enum BreakpointType
     BreakpointAtMain,
     BreakpointAtFork,
     BreakpointAtExec,
-    BreakpointAtVFork,
+    //BreakpointAtVFork,
     BreakpointAtSysCall,
     Watchpoint
 };
diff --git a/src/plugins/debugger/breakwindow.cpp b/src/plugins/debugger/breakwindow.cpp
index 86740ea49df2de57e8c67dfb72b90a20a81f8500..046363c81f76d0742f428436b808067f0bf922d3 100644
--- a/src/plugins/debugger/breakwindow.cpp
+++ b/src/plugins/debugger/breakwindow.cpp
@@ -122,12 +122,16 @@ BreakpointDialog::BreakpointDialog(unsigned engineCapabilities, QWidget *parent)
     // Match BreakpointType (omitting unknown type).
     m_ui.setupUi(this);
     QStringList types;
-    types << tr("File and Line Number") << tr("Function Name") << tr("Address")
-          << tr("throw") << tr("catch")
-          << tr("Function \"main()\"")
-          << tr("fork") << tr("exec")
-          << tr("vfork") << tr("syscall")
-          << tr("Address (Watchpoint)");
+    types << tr("File and Line Number")
+          << tr("Function Name")
+          << tr("Address")
+          << tr("Break when C++ Exception is Thrown")
+          << tr("Break when C++ Exception is Caught")
+          << tr("Break when Function \"main()\" Starts")
+          << tr("Break when a new Process is Forked")
+          << tr("Break when a new Process is Executed")
+          << tr("Break when a System Call is Executed")
+          << tr("Break on Data Access (Watchpoint)");
     QTC_ASSERT(types.size() == Watchpoint, return; )
     m_ui.comboBoxType->addItems(types);
     m_ui.pathChooserFileName->setExpectedKind(Utils::PathChooser::File);
@@ -140,7 +144,7 @@ BreakpointDialog::BreakpointDialog(unsigned engineCapabilities, QWidget *parent)
     m_ui.lineEditModule->setToolTip(moduleToolTip);
     const QString commandToolTip =
         tr("Debugger command to be executed when the breakpoint is hit.\n"
-           "gdb allows for specifying a sequence of commands separated by "
+           "GDB allows for specifying a sequence of commands separated by "
            "the delimiter '\\n'.");
     m_ui.lineEditCommand->setToolTip(commandToolTip);
     m_ui.labelCommand->setToolTip(commandToolTip);
@@ -157,7 +161,7 @@ BreakpointDialog::BreakpointDialog(unsigned engineCapabilities, QWidget *parent)
            "<li><i>Use File Name</i>: Pass the file name only. This is "
                 "useful when using a source tree whose location does "
                 "not match the one used when building the modules. "
-                "It is the engine default for gdb as using full paths can "
+                "It is the engine default for GDB as using full paths can "
                 "be slow with this engine.</li>"
            "</ul></body></html>");
     m_ui.labelUseFullPath->setToolTip(pathToolTip);
@@ -339,7 +343,7 @@ void BreakpointDialog::typeChanged(int)
     case BreakpointAtMain:
     case BreakpointAtFork:
     case BreakpointAtExec:
-    case BreakpointAtVFork:
+    //case BreakpointAtVFork:
     case BreakpointAtSysCall:
         break;
     case BreakpointByAddress:
@@ -366,7 +370,7 @@ void BreakpointDialog::typeChanged(int)
     case BreakpointAtCatch:
     case BreakpointAtFork:
     case BreakpointAtExec:
-    case BreakpointAtVFork:
+    //case BreakpointAtVFork:
     case BreakpointAtSysCall:
         clearOtherParts(AllConditionParts|ModulePart|TracePointPart);
         setPartsEnabled(AllConditionParts|TracePointPart);
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp
index 4529004c77057205628e867aa83ed410a5f26ac1..5c8ee1b424fb17fc0f2b20b81c3989408d03168a 100644
--- a/src/plugins/debugger/cdb/cdbengine.cpp
+++ b/src/plugins/debugger/cdb/cdbengine.cpp
@@ -740,7 +740,7 @@ bool CdbEngine::launchCDB(const DebuggerStartParameters &sp, QString *errorMessa
     arguments << QLatin1String("-lines") << QLatin1String("-G")
     // register idle (debuggee stop) notification
               << QLatin1String("-c")
-              << QString::fromAscii(".idle_cmd " + m_extensionCommandPrefixBA + "idle");
+              << QLatin1String(".idle_cmd ") + QString::fromAscii(m_extensionCommandPrefixBA) + QLatin1String("idle");
     if (sp.useTerminal) // Separate console
         arguments << QLatin1String("-2");
     if (!m_options->symbolPaths.isEmpty())
@@ -2336,7 +2336,7 @@ bool CdbEngine::acceptsBreakpoint(BreakpointId id) const
     switch (data.type) {
     case UnknownType:
     case BreakpointAtFork:
-    case BreakpointAtVFork:
+    //case BreakpointAtVFork:
     case BreakpointAtSysCall:
         return false;
     case Watchpoint:
diff --git a/src/plugins/debugger/cdb/cdbparsehelpers.cpp b/src/plugins/debugger/cdb/cdbparsehelpers.cpp
index 736ea512c9ed53c3f79a7886fcd6a20385a2492a..446e50abf076d7d5a70ea59a191cfafed15a0e75 100644
--- a/src/plugins/debugger/cdb/cdbparsehelpers.cpp
+++ b/src/plugins/debugger/cdb/cdbparsehelpers.cpp
@@ -102,7 +102,7 @@ static BreakpointParameters fixWinMSVCBreakpoint(const BreakpointParameters &p)
     case BreakpointByFunction:
     case BreakpointByAddress:
     case BreakpointAtFork:
-    case BreakpointAtVFork:
+    //case BreakpointAtVFork:
     case BreakpointAtSysCall:
     case Watchpoint:
         break;
@@ -144,7 +144,8 @@ QByteArray cdbAddBreakpointCommand(const BreakpointParameters &bpIn,
         str << '~' << bp.threadSpec << ' ';
 
     // Currently use 'bu' so that the offset expression (including file name)
-    // is kept when reporting back breakpoints (which is otherwise discarded when resolving).
+    // is kept when reporting back breakpoints (which is otherwise discarded
+    // when resolving).
     str << (bp.type == Watchpoint ? "ba" : "bu");
     if (id != BreakpointId(-1))
         str << id;
@@ -154,7 +155,7 @@ QByteArray cdbAddBreakpointCommand(const BreakpointParameters &bpIn,
     switch (bp.type) {
     case BreakpointAtFork:
     case BreakpointAtExec:
-    case BreakpointAtVFork:
+    //case BreakpointAtVFork:
     case BreakpointAtSysCall:
     case UnknownType:
     case BreakpointAtCatch:
diff --git a/src/plugins/debugger/debugger.pro b/src/plugins/debugger/debugger.pro
index 53a19616463f110cd6ef33b64c127488c4b49047..766780435211ff7e5b0734d5f01212e3f1485c5c 100644
--- a/src/plugins/debugger/debugger.pro
+++ b/src/plugins/debugger/debugger.pro
@@ -110,7 +110,6 @@ SOURCES += breakhandler.cpp \
 
 FORMS += attachexternaldialog.ui \
     attachcoredialog.ui \
-    attachtcfdialog.ui \
     breakcondition.ui \
     breakpoint.ui \
     dumperoptionpage.ui \
@@ -140,5 +139,4 @@ include(pdb/pdb.pri)
 include(lldb/lldbhost.pri)
 include(qml/qml.pri)
 
-include(tcf/tcf.pri)
 include(shared/shared.pri)
diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp
index 0d0fc34d07cf02f7f2ecc3c090325991edc74652..d11436f86580f160a0001df2f1a038f23dc3369f 100644
--- a/src/plugins/debugger/debuggeractions.cpp
+++ b/src/plugins/debugger/debuggeractions.cpp
@@ -429,9 +429,6 @@ DebuggerSettings::DebuggerSettings(QSettings *settings)
     item = new SavedAction(this);
     item->setSettingsKey(debugModeGroup, QLatin1String("SkipKnownFrames"));
     item->setText(tr("Skip Known Frames"));
-    item->setToolTip(tr("Selecting this results in well-known but usually "
-      "not interesting frames belonging to reference counting and "
-      "signal emission being skipped while single-stepping."));
     item->setCheckable(true);
     item->setDefaultValue(false);
     insertItem(SkipKnownFrames, item);
diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp
index 7965cc21ca64140b77c030191094728ef89850d8..b6553f2f740f43c93ca1351ba63f114f498214d6 100644
--- a/src/plugins/debugger/debuggerdialogs.cpp
+++ b/src/plugins/debugger/debuggerdialogs.cpp
@@ -38,7 +38,6 @@
 
 #include "ui_attachcoredialog.h"
 #include "ui_attachexternaldialog.h"
-#include "ui_attachtcfdialog.h"
 #include "ui_startexternaldialog.h"
 #include "ui_startremotedialog.h"
 #include "ui_startremoteenginedialog.h"
@@ -513,96 +512,6 @@ void AttachExternalDialog::accept()
 }
 
 
-///////////////////////////////////////////////////////////////////////
-//
-// AttachTcfDialog
-//
-///////////////////////////////////////////////////////////////////////
-
-AttachTcfDialog::AttachTcfDialog(QWidget *parent)
-  : QDialog(parent),
-    m_ui(new Ui::AttachTcfDialog)
-{
-    setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
-    m_ui->setupUi(this);
-    m_ui->buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
-    m_ui->serverStartScript->setExpectedKind(PathChooser::File);
-    m_ui->serverStartScript->setPromptDialogTitle(tr("Select Executable"));
-
-    connect(m_ui->useServerStartScriptCheckBox, SIGNAL(toggled(bool)),
-        this, SLOT(updateState()));
-
-    connect(m_ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
-    connect(m_ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
-
-    updateState();
-}
-
-AttachTcfDialog::~AttachTcfDialog()
-{
-    delete m_ui;
-}
-
-void AttachTcfDialog::setRemoteChannel(const QString &channel)
-{
-    m_ui->channelLineEdit->setText(channel);
-}
-
-QString AttachTcfDialog::remoteChannel() const
-{
-    return m_ui->channelLineEdit->text();
-}
-
-void AttachTcfDialog::setRemoteArchitectures(const QStringList &list)
-{
-    m_ui->architectureComboBox->clear();
-    if (!list.isEmpty()) {
-        m_ui->architectureComboBox->insertItems(0, list);
-        m_ui->architectureComboBox->setCurrentIndex(0);
-    }
-}
-
-void AttachTcfDialog::setRemoteArchitecture(const QString &arch)
-{
-    int index = m_ui->architectureComboBox->findText(arch);
-    if (index != -1)
-        m_ui->architectureComboBox->setCurrentIndex(index);
-}
-
-QString AttachTcfDialog::remoteArchitecture() const
-{
-    int index = m_ui->architectureComboBox->currentIndex();
-    return m_ui->architectureComboBox->itemText(index);
-}
-
-void AttachTcfDialog::setServerStartScript(const QString &scriptName)
-{
-    m_ui->serverStartScript->setPath(scriptName);
-}
-
-QString AttachTcfDialog::serverStartScript() const
-{
-    return m_ui->serverStartScript->path();
-}
-
-void AttachTcfDialog::setUseServerStartScript(bool on)
-{
-    m_ui->useServerStartScriptCheckBox->setChecked(on);
-}
-
-bool AttachTcfDialog::useServerStartScript() const
-{
-    return m_ui->useServerStartScriptCheckBox->isChecked();
-}
-
-void AttachTcfDialog::updateState()
-{
-    bool enabled = m_ui->useServerStartScriptCheckBox->isChecked();
-    m_ui->serverStartScriptLabel->setEnabled(enabled);
-    m_ui->serverStartScript->setEnabled(enabled);
-}
-
-
 ///////////////////////////////////////////////////////////////////////
 //
 // StartExternalDialog
diff --git a/src/plugins/debugger/debuggerdialogs.h b/src/plugins/debugger/debuggerdialogs.h
index 2ebda013243b82b2a1458e6b4d3fc52ba3a0bbb0..bd9c4030f18442fa90582812e4aa7edcc7d87a9a 100644
--- a/src/plugins/debugger/debuggerdialogs.h
+++ b/src/plugins/debugger/debuggerdialogs.h
@@ -46,7 +46,6 @@ class QDialogButtonBox;
 namespace Ui {
 class AttachCoreDialog;
 class AttachExternalDialog;
-class AttachTcfDialog;
 class StartExternalDialog;
 class StartRemoteDialog;
 class StartRemoteEngineDialog;
@@ -133,33 +132,6 @@ private:
     ProcessListFilterModel *m_model;
 };
 
-class AttachTcfDialog : public QDialog
-{
-    Q_OBJECT
-
-public:
-    explicit AttachTcfDialog(QWidget *parent);
-    ~AttachTcfDialog();
-
-    QString remoteChannel() const;
-    void setRemoteChannel(const QString &host);
-
-    QString remoteArchitecture() const;
-    void setRemoteArchitecture(const QString &arch);
-    void setRemoteArchitectures(const QStringList &arches);
-
-    QString serverStartScript() const;
-    bool useServerStartScript() const;
-    void setUseServerStartScript(bool on);
-    void setServerStartScript(const QString &scriptName);
-
-private slots:
-    void updateState();
-
-private:
-    Ui::AttachTcfDialog *m_ui;
-};
-
 class StartExternalDialog : public QDialog
 {
     Q_OBJECT
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 4e265350df6f6c0737448acb0ae9ff4db289d7cf..d8e78fc8dbf8ab959cc55b7c1427eba9f56ce5f8 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -371,7 +371,6 @@ const char * const M_DEBUG_START_DEBUGGING = "QtCreator.Menu.Debug.StartDebuggin
 const char * const STARTEXTERNAL            = "Debugger.StartExternal";
 const char * const ATTACHEXTERNAL           = "Debugger.AttachExternal";
 const char * const ATTACHCORE               = "Debugger.AttachCore";
-const char * const ATTACHTCF                = "Debugger.AttachTcf";
 const char * const ATTACHREMOTE             = "Debugger.AttachRemote";
 const char * const ATTACHREMOTECDB          = "Debugger.AttachRemoteCDB";
 const char * const STARTREMOTELLDB          = "Debugger.StartRemoteLLDB";
@@ -700,7 +699,6 @@ public slots:
                     const ProjectExplorer::Abi &abi = ProjectExplorer::Abi(),
                     const QString &debuggerCommand = QString());
     void attachRemote(const QString &spec);
-    void attachRemoteTcf();
 
     void enableReverseDebuggingTriggered(const QVariant &value);
     void languagesChanged();
@@ -988,7 +986,6 @@ public:
     QAction *m_startRemoteLldbAction;
     QAction *m_attachExternalAction;
     QAction *m_attachCoreAction;
-    QAction *m_attachTcfAction;
     QAction *m_detachAction;
     QAction *m_continueAction;
     QAction *m_exitAction; // On application output button if "Stop" is possible
@@ -1104,7 +1101,6 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(DebuggerPlugin *plugin) :
     m_startRemoteLldbAction = 0;
     m_attachExternalAction = 0;
     m_attachCoreAction = 0;
-    m_attachTcfAction = 0;
     m_detachAction = 0;
 
     m_commonOptionsPage = 0;
@@ -1582,37 +1578,6 @@ void DebuggerPluginPrivate::enableReverseDebuggingTriggered(const QVariant &valu
     m_reverseDirectionAction->setEnabled(value.toBool());
 }
 
-void DebuggerPluginPrivate::attachRemoteTcf()
-{
-    DebuggerStartParameters sp;
-    AttachTcfDialog dlg(mainWindow());
-    QStringList arches;
-    arches.append(_("i386:x86-64:intel"));
-    dlg.setRemoteArchitectures(arches);
-    dlg.setRemoteChannel(
-            configValue(_("LastTcfRemoteChannel")).toString());
-    dlg.setRemoteArchitecture(
-            configValue(_("LastTcfRemoteArchitecture")).toString());
-    dlg.setServerStartScript(
-            configValue(_("LastTcfServerStartScript")).toString());
-    dlg.setUseServerStartScript(
-            configValue(_("LastTcfUseServerStartScript")).toBool());
-    if (dlg.exec() != QDialog::Accepted)
-        return;
-    setConfigValue(_("LastTcfRemoteChannel"), dlg.remoteChannel());
-    setConfigValue(_("LastTcfRemoteArchitecture"), dlg.remoteArchitecture());
-    setConfigValue(_("LastTcfServerStartScript"), dlg.serverStartScript());
-    setConfigValue(_("LastTcfUseServerStartScript"), dlg.useServerStartScript());
-    sp.remoteChannel = dlg.remoteChannel();
-    sp.remoteArchitecture = dlg.remoteArchitecture();
-    sp.serverStartScript = dlg.serverStartScript();
-    sp.startMode = AttachTcf;
-    if (dlg.useServerStartScript())
-        sp.serverStartScript = dlg.serverStartScript();
-    if (RunControl *rc = createDebugger(sp))
-        startDebugger(rc);
-}
-
 void DebuggerPluginPrivate::runScheduled()
 {
     foreach (const DebuggerStartParameters &sp, m_scheduledStarts) {
@@ -2755,12 +2720,6 @@ void DebuggerPluginPrivate::extensionsInitialized()
     act->setText(tr("Attach to Core..."));
     connect(act, SIGNAL(triggered()), SLOT(attachCore()));
 
-    act = m_attachTcfAction = new QAction(this);
-    act->setText(tr("Attach to Running Tcf Agent..."));
-    act->setToolTip(tr("This attaches to a running "
-        "'Target Communication Framework' agent."));
-    connect(act, SIGNAL(triggered()), SLOT(attachRemoteTcf()));
-
     act = m_startRemoteAction = new QAction(this);
     act->setText(tr("Start and Attach to Remote Application..."));
     connect(act, SIGNAL(triggered()), SLOT(startRemoteApplication()));
@@ -2808,10 +2767,6 @@ void DebuggerPluginPrivate::extensionsInitialized()
     cmd->setAttribute(Command::CA_Hide);
     mstart->addAction(cmd, CC::G_DEFAULT_ONE);
 
-    cmd = am->registerAction(m_attachTcfAction,
-        Constants::ATTACHTCF, globalcontext);
-    mstart->addAction(cmd, CC::G_DEFAULT_ONE);
-
     cmd = am->registerAction(m_startRemoteAction,
         Constants::ATTACHREMOTE, globalcontext);
     cmd->setAttribute(Command::CA_Hide);
diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp
index 2e8f4135f41b94efc98f75921d5220ad4b16a885..99a101d3eb5eb9259a4c3794f30925d5eb61bfd8 100644
--- a/src/plugins/debugger/debuggerrunner.cpp
+++ b/src/plugins/debugger/debuggerrunner.cpp
@@ -89,7 +89,6 @@ DebuggerEngine *createGdbEngine(const DebuggerStartParameters &sp,
 
 DebuggerEngine *createScriptEngine(const DebuggerStartParameters &sp);
 DebuggerEngine *createPdbEngine(const DebuggerStartParameters &sp);
-DebuggerEngine *createTcfEngine(const DebuggerStartParameters &sp);
 QmlEngine *createQmlEngine(const DebuggerStartParameters &sp,
     DebuggerEngine *masterEngine);
 DebuggerEngine *createQmlCppEngine(const DebuggerStartParameters &sp,
@@ -776,9 +775,6 @@ DebuggerEngine *
     case PdbEngineType:
         return createPdbEngine(sp);
         break;
-    case TcfEngineType:
-        return createTcfEngine(sp);
-        break;
     case QmlEngineType:
         return createQmlEngine(sp, masterEngine);
         break;
diff --git a/src/plugins/debugger/debuggertooltipmanager.cpp b/src/plugins/debugger/debuggertooltipmanager.cpp
index 906da96256fb2cefcd092428008526ac2372e0d2..92cb4fd0d1fe6e7b6b0ef4abe76dc8de6e27e7d4 100644
--- a/src/plugins/debugger/debuggertooltipmanager.cpp
+++ b/src/plugins/debugger/debuggertooltipmanager.cpp
@@ -1245,12 +1245,27 @@ void DebuggerToolTipManager::moveToolTipsBy(const QPoint &distance)
             tw->move (tw->pos() + distance);
 }
 
-bool DebuggerToolTipManager::eventFilter(QObject *, QEvent *e)
+bool DebuggerToolTipManager::eventFilter(QObject *o, QEvent *e)
 {
-    // Move along with parent (toplevel)
-    if (e->type() == QEvent::Move && hasToolTips()) {
+    if (!hasToolTips())
+        return false;
+    switch (e->type()) {
+    case QEvent::Move: { // Move along with parent (toplevel)
         const QMoveEvent *me = static_cast<const QMoveEvent *>(e);
         moveToolTipsBy(me->pos() - me->oldPos());
+    }
+        break;
+    case QEvent::WindowStateChange: { // Hide/Show along with parent (toplevel)
+        const QWindowStateChangeEvent *se = static_cast<const QWindowStateChangeEvent *>(e);
+        const bool wasMinimized = se->oldState() & Qt::WindowMinimized;
+        const bool isMinimized  = static_cast<const QWidget *>(o)->windowState() & Qt::WindowMinimized;
+        if (wasMinimized ^ isMinimized)
+            foreach (const QPointer<AbstractDebuggerToolTipWidget> &tw, purgeClosedToolTips())
+                tw->setVisible(!isMinimized);
+    }
+        break;
+    default:
+        break;
     }
     return false;
 }
diff --git a/src/plugins/debugger/gdb/abstractgdbadapter.cpp b/src/plugins/debugger/gdb/abstractgdbadapter.cpp
index b783fb6c1bc1f9aac8af373676880c9837765e1a..c73905fda06e485ac5eec40e4efd46797bb149fc 100644
--- a/src/plugins/debugger/gdb/abstractgdbadapter.cpp
+++ b/src/plugins/debugger/gdb/abstractgdbadapter.cpp
@@ -100,7 +100,7 @@ bool AbstractGdbAdapter::prepareCommand()
 
 QString AbstractGdbAdapter::msgGdbStopFailed(const QString &why)
 {
-    return tr("The Gdb process could not be stopped:\n%1").arg(why);
+    return tr("The gdb process could not be stopped:\n%1").arg(why);
 }
 
 QString AbstractGdbAdapter::msgInferiorStopFailed(const QString &why)
diff --git a/src/plugins/debugger/gdb/codagdbadapter.cpp b/src/plugins/debugger/gdb/codagdbadapter.cpp
index 427391961c7b9072da189ffbc8eb7d63d9fdfc9f..69dfaff888844e784e194e92dd7ae27e1e27d8df 100644
--- a/src/plugins/debugger/gdb/codagdbadapter.cpp
+++ b/src/plugins/debugger/gdb/codagdbadapter.cpp
@@ -433,7 +433,7 @@ void CodaGdbAdapter::readGdbServerCommand()
 
     logMessage("gdb: -> " + currentTime() + ' ' + QString::fromAscii(packet));
     if (packet != m_gdbReadBuffer)
-        logMessage("buffer: " + m_gdbReadBuffer);
+        logMessage(_("buffer: ") + m_gdbReadBuffer);
 
     QByteArray &ba = m_gdbReadBuffer;
     while (ba.size()) {
@@ -926,7 +926,7 @@ void CodaGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
                 CodaCallback(this, &CodaGdbAdapter::handleAndReportSetBreakpoint),
                 bp);
         } else {
-            logMessage("MISPARSED BREAKPOINT '" + cmd + "'')" , LogError);
+            logMessage(_("MISPARSED BREAKPOINT '") + cmd + "'')" , LogError);
         }
     }
 
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index d3c6632f90351b2bbcd05f4fa41bce168e5040d6..e14d76bd2bc19cafb7ce60e71ae3fcc4fae34a19 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -259,12 +259,12 @@ QString GdbEngine::errorMessage(QProcess::ProcessError error)
 {
     switch (error) {
         case QProcess::FailedToStart:
-            return tr("The Gdb process failed to start. Either the "
+            return tr("The gdb process failed to start. Either the "
                 "invoked program '%1' is missing, or you may have insufficient "
                 "permissions to invoke the program.\n%2")
                 .arg(m_gdb, gdbProc()->errorString());
         case QProcess::Crashed:
-            return tr("The Gdb process crashed some time after starting "
+            return tr("The gdb process crashed some time after starting "
                 "successfully.");
         case QProcess::Timedout:
             return tr("The last waitFor...() function timed out. "
@@ -272,13 +272,13 @@ QString GdbEngine::errorMessage(QProcess::ProcessError error)
                 "waitFor...() again.");
         case QProcess::WriteError:
             return tr("An error occurred when attempting to write "
-                "to the Gdb process. For example, the process may not be running, "
+                "to the gdb process. For example, the process may not be running, "
                 "or it may have closed its input channel.");
         case QProcess::ReadError:
             return tr("An error occurred when attempting to read from "
-                "the Gdb process. For example, the process may not be running.");
+                "the gdb process. For example, the process may not be running.");
         default:
-            return tr("An unknown error in the Gdb process occurred. ");
+            return tr("An unknown error in the gdb process occurred. ");
     }
 }
 
@@ -619,7 +619,7 @@ void GdbEngine::readGdbStandardError()
         return;
     if (err.startsWith("BFD: reopening"))
         return;
-    qWarning() << "Unexpected gdb stderr:" << err;
+    qWarning() << "Unexpected GDB stderr:" << err;
 }
 
 void GdbEngine::readGdbStandardOutput()
@@ -870,9 +870,9 @@ void GdbEngine::commandTimeout()
             "the operation.\nYou can choose between waiting "
             "longer or abort debugging.").arg(timeOut / 1000);
         QMessageBox *mb = showMessageBox(QMessageBox::Critical,
-            tr("Gdb not responding"), msg,
+            tr("GDB not responding"), msg,
             QMessageBox::Ok | QMessageBox::Cancel);
-        mb->button(QMessageBox::Cancel)->setText(tr("Give gdb more time"));
+        mb->button(QMessageBox::Cancel)->setText(tr("Give GDB more time"));
         mb->button(QMessageBox::Ok)->setText(tr("Stop debugging"));
         if (mb->exec() == QMessageBox::Ok) {
             showMessage(_("KILLING DEBUGGER AS REQUESTED BY USER"));
@@ -918,7 +918,7 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
                 //shutdown();
                 notifyInferiorIll();
             } else if (msg == "\"finish\" not meaningful in the outermost frame.") {
-                // Handle a case known to appear on gdb 6.4 symbianelf when
+                // Handle a case known to appear on GDB 6.4 symbianelf when
                 // the stack is cut due to access to protected memory.
                 //showMessage(_("APPLYING WORKAROUND #2"));
                 notifyInferiorStopOk();
@@ -2672,13 +2672,15 @@ void GdbEngine::insertBreakpoint(BreakpointId id)
     if (type == BreakpointAtFork) {
         postCommand("catch fork", NeedsStop | RebuildBreakpointModel,
             CB(handleCatchInsert), id);
-        return;
-    }
-    if (type == BreakpointAtVFork) {
         postCommand("catch vfork", NeedsStop | RebuildBreakpointModel,
             CB(handleCatchInsert), id);
         return;
     }
+    //if (type == BreakpointAtVFork) {
+    //    postCommand("catch vfork", NeedsStop | RebuildBreakpointModel,
+    //        CB(handleCatchInsert), id);
+    //    return;
+    //}
     if (type == BreakpointAtExec) {
         postCommand("catch exec", NeedsStop | RebuildBreakpointModel,
             CB(handleCatchInsert), id);
@@ -3908,7 +3910,7 @@ void GdbEngine::handleWatchPoint(const GdbResponse &response)
             const QByteArray addr = ba.mid(pos0x);
             if (addr.toULongLong(0, 0)) { // Non-null pointer
                 const QByteArray ns = qtNamespace();
-                const QByteArray type = ns.isEmpty() ? "QWidget*" : ("'" + ns + "QWidget'*");
+                const QByteArray type = ns.isEmpty() ? "QWidget*" : QByteArray("'" + ns + "QWidget'*");
                 const QString exp = _("(*(struct %1)%2)").arg(_(type)).arg(_(addr));
                 // qDebug() << posNs << posWidget << pos0x << addr << ns << type;
                 watchHandler()->watchExpression(exp);
@@ -4379,7 +4381,7 @@ bool GdbEngine::startGdb(const QStringList &args, const QString &settingsIdHint)
             const QString nativeGdb = QDir::toNativeSeparators(m_gdb);
             showMessage(_("GDB %1 CANNOT FIND THE PYTHON INSTALLATION.").arg(nativeGdb));
             showStatusMessage(_("%1 cannot find python").arg(nativeGdb));
-            const QString msg = tr("The gdb installed at %1 cannot "
+            const QString msg = tr("The GDB installed at %1 cannot "
                "find a valid python installation in its %2 subdirectory.\n"
                "You may set the environment variable PYTHONPATH to point to your installation.")
                     .arg(nativeGdb).arg(winPythonVersion);
@@ -4530,7 +4532,7 @@ void GdbEngine::handleGdbError(QProcess::ProcessError error)
     default:
         //gdbProc()->kill();
         //notifyEngineIll();
-        showMessageBox(QMessageBox::Critical, tr("Gdb I/O Error"), msg);
+        showMessageBox(QMessageBox::Critical, tr("GDB I/O Error"), msg);
         break;
     }
 }
@@ -4558,7 +4560,7 @@ void GdbEngine::handleGdbFinished(int code, QProcess::ExitStatus type)
         const QString msg = type == QProcess::CrashExit ?
                     tr("The gdb process crashed.") :
                     tr("The gdb process exited unexpectedly (code %1)").arg(code);
-        showMessageBox(QMessageBox::Critical, tr("Unexpected Gdb Exit"), msg);
+        showMessageBox(QMessageBox::Critical, tr("Unexpected GDB Exit"), msg);
         break;
     }
     }
diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp
index 1d4362a900a8c4d7b1cd1e17565a0438a3685e5c..5fc50f11ce3d010a79bd582fdfcbfc56bc09103d 100644
--- a/src/plugins/debugger/gdb/gdboptionspage.cpp
+++ b/src/plugins/debugger/gdb/gdboptionspage.cpp
@@ -57,7 +57,7 @@ QString GdbOptionsPage::settingsId()
 
 QString GdbOptionsPage::displayName() const
 {
-    return tr("Gdb");
+    return tr("GDB");
 }
 
 QString GdbOptionsPage::category() const
diff --git a/src/plugins/debugger/gdb/gdboptionspage.ui b/src/plugins/debugger/gdb/gdboptionspage.ui
index 1584f134d13ec190c29e8f8ba11f539f4d6b6272..253461fb511a8657e5d1d95a344213dbf58e1f12 100644
--- a/src/plugins/debugger/gdb/gdboptionspage.ui
+++ b/src/plugins/debugger/gdb/gdboptionspage.ui
@@ -2,11 +2,19 @@
 <ui version="4.0">
  <class>GdbOptionsPage</class>
  <widget class="QWidget" name="GdbOptionsPage">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>398</width>
+    <height>412</height>
+   </rect>
+  </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
     <widget class="QGroupBox" name="groupBoxLocations">
      <property name="title">
-      <string>Gdb</string>
+      <string>GDB</string>
      </property>
      <layout class="QFormLayout" name="formLayout">
       <property name="fieldGrowthPolicy">
@@ -24,20 +32,27 @@
       <item row="0" column="0">
        <widget class="QLabel" name="labelGdbStartupScript">
         <property name="toolTip">
-         <string>This is either empty or points to a file containing gdb commands that will be executed immediately after gdb starts up.</string>
+         <string>This is either empty or points to a file containing GDB commands that will be executed immediately after GDB starts up.</string>
         </property>
         <property name="text">
-         <string>Gdb startup script:</string>
+         <string>GDB startup script:</string>
         </property>
        </widget>
       </item>
       <item row="0" column="1">
-       <widget class="Utils::PathChooser" name="scriptFileChooser"/>
+       <widget class="Utils::PathChooser" name="scriptFileChooser" native="true"/>
       </item>
       <item row="1" column="0">
        <widget class="QLabel" name="labelGdbWatchdogTimeout">
+        <property name="toolTip">
+         <string>This is the number of seconds Qt Creator will wait before
+it terminates non-responsive gdb process. The default value of 20 seconds
+should be sufficient for most applications, but there are situations when
+loading big libraries or listing source files takes much longer than that
+on slow machines. In this case, the value should be increased.</string>
+        </property>
         <property name="text">
-         <string>Gdb timeout:</string>
+         <string>GDB timeout:</string>
         </property>
        </widget>
       </item>
@@ -68,51 +83,62 @@ on slow machines. In this case, the value should be increased.</string>
        </widget>
       </item>
       <item row="2" column="0" colspan="2">
-       <widget class="QCheckBox" name="checkBoxEnableReverseDebugging">
-        <property name="text">
-         <string>Enable reverse debugging</string>
-        </property>
-       </widget>
-      </item>
-      <item row="3" column="0" colspan="2">
        <widget class="QCheckBox" name="checkBoxSkipKnownFrames">
         <property name="toolTip">
-         <string>When this option is checked, 'Step Into' compresses several steps into one in certain situations, leading to 'less noisy' debugging. So will, e.g., the atomic
- reference counting code be skipped, and a single 'Step Into' for a signal emission will end up directly in the slot connected to it.</string>
+         <string>When this option is checked, 'Step Into' compresses several steps into one in certain situations, leading to 'less noisy' debugging. So will, e.g., the atomic reference counting code be skipped, and a single 'Step Into' for a signal emission will end up directly in the slot connected to it.</string>
         </property>
         <property name="text">
          <string>Skip known frames when stepping</string>
         </property>
        </widget>
       </item>
-      <item row="4" column="0" colspan="2">
+      <item row="3" column="0" colspan="2">
        <widget class="QCheckBox" name="checkBoxUseMessageBoxForSignals">
+        <property name="toolTip">
+         <string>This will show a message box as soon as your application receives a signal like SIGSEGV during debugging.</string>
+        </property>
         <property name="text">
          <string>Show a message box when receiving a signal</string>
         </property>
        </widget>
       </item>
-      <item row="5" column="0" colspan="2">
+      <item row="4" column="0" colspan="2">
        <widget class="QCheckBox" name="checkBoxAdjustBreakpointLocations">
+        <property name="toolTip">
+         <string>GDB allows setting breakpoints on source lines for which no code was generated. In such situations the breakpoint is shifted to the next source code line for which code was actually generated. This option reflects such temporary change by moving the breakpoint markers in the source code editor.</string>
+        </property>
         <property name="text">
          <string>Adjust breakpoint locations</string>
         </property>
        </widget>
       </item>
-      <item row="6" column="0" colspan="2">
+      <item row="5" column="0" colspan="2">
        <widget class="QCheckBox" name="checkBoxLoadGdbInit">
+        <property name="toolTip">
+         <string>This allows or inhibits reading the user's default .gdbinit file on debugger startup.</string>
+        </property>
         <property name="text">
          <string>Load .gdbinit file on startup</string>
         </property>
        </widget>
       </item>
-      <item row="7" column="0" colspan="2">
+      <item row="6" column="0" colspan="2">
        <widget class="QCheckBox" name="checkBoxTargetAsync">
         <property name="text">
          <string>Use asynchronous mode to control the inferior</string>
         </property>
        </widget>
       </item>
+      <item row="7" column="0" colspan="2">
+       <widget class="QCheckBox" name="checkBoxEnableReverseDebugging">
+        <property name="toolTip">
+         <string>Enable reverse debugging Selecting this enables reverse debugging. NOTE: This feature is very slow and unstable on the GDB side. It exhibits unpredictable behaviour when going backwards over system calls and is very likely to destroy your debugging session.</string>
+        </property>
+        <property name="text">
+         <string>Enable reverse debugging</string>
+        </property>
+       </widget>
+      </item>
      </layout>
     </widget>
    </item>
diff --git a/src/plugins/debugger/gdb/remotegdbprocess.cpp b/src/plugins/debugger/gdb/remotegdbprocess.cpp
index 54decf0eaaed0b789087dca0bf59d9653952a0b6..0df75dcbbecfb905c92c74056a67aa7bcd4140ec 100644
--- a/src/plugins/debugger/gdb/remotegdbprocess.cpp
+++ b/src/plugins/debugger/gdb/remotegdbprocess.cpp
@@ -193,12 +193,12 @@ void RemoteGdbProcess::handleGdbFinished(int exitStatus)
 
     switch (exitStatus) {
     case Utils::SshRemoteProcess::FailedToStart:
-        m_error = tr("Remote gdb failed to start.");
+        m_error = tr("Remote GDB failed to start.");
         setState(Inactive);
         emit startFailed();
         break;
     case Utils::SshRemoteProcess::KilledBySignal:
-        emitErrorExit(tr("Remote gdb crashed."));
+        emitErrorExit(tr("Remote GDB crashed."));
         break;
     case Utils::SshRemoteProcess::ExitedNormally:
         const int exitCode = m_gdbProc->exitCode();
diff --git a/src/plugins/debugger/gdb/trkgdbadapter.cpp b/src/plugins/debugger/gdb/trkgdbadapter.cpp
index fec80ce5962cd207e1d61e955b13c3879b66e20b..6b6ddd6ffb6762c8ad60d4e4684356286d83117d 100644
--- a/src/plugins/debugger/gdb/trkgdbadapter.cpp
+++ b/src/plugins/debugger/gdb/trkgdbadapter.cpp
@@ -214,8 +214,8 @@ QByteArray TrkGdbAdapter::trkStepRangeMessage()
     if (from <= pc && pc <= to) {
         //to = qMax(to - 4, from);
         //to = qMax(to - 4, from);
-        showMessage("STEP IN " + hexxNumber(from) + ' ' + hexxNumber(to)
-            + " INSTEAD OF " + hexxNumber(pc));
+        showMessage(_("STEP IN ") + hexxNumber(from) + ' ' + hexxNumber(to)
+            + _(" INSTEAD OF ") + hexxNumber(pc));
     } else {
         from = pc;
         to = pc;
@@ -301,7 +301,7 @@ void TrkGdbAdapter::readGdbServerCommand()
 
     logMessage("gdb: -> " + currentTime() + ' ' + QString::fromAscii(packet));
     if (packet != m_gdbReadBuffer)
-        logMessage("buffer: " + m_gdbReadBuffer);
+        logMessage(QLatin1String("buffer: ") + m_gdbReadBuffer);
 
     QByteArray &ba = m_gdbReadBuffer;
     while (ba.size()) {
@@ -781,7 +781,7 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
             const QByteArray ba = trkBreakpointMessage(addrLen.first, addrLen.second, armMode);
             sendTrkMessage(0x1B, TrkCB(handleAndReportSetBreakpoint), ba, QVariant(addrLen.first));
         } else {
-            logMessage("MISPARSED BREAKPOINT '" + cmd + "')", LogError);
+            logMessage(QLatin1String("MISPARSED BREAKPOINT '") + cmd + "')", LogError);
         }
     }
 
@@ -1015,14 +1015,14 @@ void TrkGdbAdapter::handleTrkResult(const TrkResult &result)
         case TrkNotifyException: { // 0x91 Notify Exception (obsolete)
             showMessage(_("RESET SNAPSHOT (NOTIFY EXCEPTION)"));
             m_snapshot.reset();
-            logMessage(prefix + "NOTE: EXCEPTION  " + str, AppError);
+            logMessage(prefix + _("NOTE: EXCEPTION  ") + str, AppError);
             sendTrkAck(result.token);
             break;
         }
         case 0x92: { //
             showMessage(_("RESET SNAPSHOT (NOTIFY INTERNAL ERROR)"));
             m_snapshot.reset();
-            logMessage(prefix + "NOTE: INTERNAL ERROR: " + str, LogError);
+            logMessage(prefix + _("NOTE: INTERNAL ERROR: ") + str, LogError);
             sendTrkAck(result.token);
             break;
         }
@@ -1105,22 +1105,22 @@ void TrkGdbAdapter::handleTrkResult(const TrkResult &result)
             break;
         }
         case 0xa2: { // NotifyProcessorStarted
-            logMessage(prefix + "NOTE: PROCESSOR STARTED: " + str);
+            logMessage(prefix + _("NOTE: PROCESSOR STARTED: ") + str);
             sendTrkAck(result.token);
             break;
         }
         case 0xa6: { // NotifyProcessorStandby
-            logMessage(prefix + "NOTE: PROCESSOR STANDBY: " + str);
+            logMessage(prefix + _("NOTE: PROCESSOR STANDBY: ") + str);
             sendTrkAck(result.token);
             break;
         }
         case 0xa7: { // NotifyProcessorReset
-            logMessage(prefix + "NOTE: PROCESSOR RESET: " + str);
+            logMessage(prefix + _("NOTE: PROCESSOR RESET: ") + str);
             sendTrkAck(result.token);
             break;
         }
         default: {
-            logMessage(prefix + "INVALID: " + str, LogError);
+            logMessage(prefix + _("INVALID: ") + str, LogError);
             break;
         }
     }
@@ -1133,8 +1133,8 @@ void TrkGdbAdapter::handleCpuType(const TrkResult &result)
     //    Error: 0x00
     // [80 03 00  04 00 00 04 00 00 00]
     if (result.data.size() < 7) {
-        logMessage("ERROR: CPUTYPE RESULT " + result.errorString()
-            + " NOT PARSABLE", LogError);
+        logMessage(_("ERROR: CPUTYPE RESULT ") + result.errorString()
+            + _(" NOT PARSABLE"), LogError);
         return;
     }
     m_session.cpuMajor = result.data[1];
@@ -1250,7 +1250,7 @@ static QString msgMemoryReadError(int code, uint addr, uint len = 0)
 void TrkGdbAdapter::handleReadMemoryBuffered(const TrkResult &result)
 {
     if (extractShort(result.data.data() + 1) + 3 != result.data.size())
-        logMessage("\n BAD MEMORY RESULT: " + result.data.toHex() + '\n', LogError);
+        logMessage(_("\n BAD MEMORY RESULT: ") + result.data.toHex() + '\n', LogError);
     const MemoryRange range = result.cookie.value<MemoryRange>();
     MEMORY_DEBUG("HANDLE READ MEMORY ***BUFFERED*** FOR " << range);
     if (const int errorCode = result.errorCode()) {
@@ -1270,7 +1270,7 @@ void TrkGdbAdapter::handleReadMemoryBuffered(const TrkResult &result)
 void TrkGdbAdapter::handleReadMemoryUnbuffered(const TrkResult &result)
 {
     if (extractShort(result.data.data() + 1) + 3 != result.data.size())
-        logMessage("\n BAD MEMORY RESULT: " + result.data.toHex() + '\n', LogError);
+        logMessage(_("\n BAD MEMORY RESULT: ") + result.data.toHex() + '\n', LogError);
     const MemoryRange range = result.cookie.value<MemoryRange>();
     MEMORY_DEBUG("HANDLE READ MEMORY UNBUFFERED FOR " << range);
     if (const int errorCode = result.errorCode()) {
@@ -1451,7 +1451,7 @@ void TrkGdbAdapter::handleSupportMask(const TrkResult &result)
         if (data[i] & (1 << j))
             str.append(QByteArray::number(i * 8 + j, 16));
     }
-    logMessage("SUPPORTED: " + str);
+    logMessage(_("SUPPORTED: ") + str);
  }
 
 void TrkGdbAdapter::handleTrkVersionsStartGdb(const TrkResult &result)
@@ -1776,7 +1776,7 @@ void TrkGdbAdapter::handleDirectWrite1(const TrkResult &response)
     } else {
         oldMem = response.data.mid(3);
         oldPC = m_snapshot.registerValue(m_session.tid, RegisterPC);
-        logMessage("READ MEM: " + oldMem.toHex());
+        logMessage(_("READ MEM: ") + oldMem.toHex());
         //qDebug("READ MEM: " + oldMem.toHex());
         QByteArray ba;
         appendByte(&ba, 0xaa);
diff --git a/src/plugins/debugger/lldb/ipcenginehost.cpp b/src/plugins/debugger/lldb/ipcenginehost.cpp
index aaf555a9cc9761a3bf7d680cd6d43e7be312c27c..905c2b809781ceae51204d8e1d1dcf4b06a89186 100644
--- a/src/plugins/debugger/lldb/ipcenginehost.cpp
+++ b/src/plugins/debugger/lldb/ipcenginehost.cpp
@@ -645,7 +645,7 @@ void IPCEngineHost::readyRead()
     char terminator;
     m_device->getChar(&terminator);
     if (terminator != 'T') {
-        showStatusMessage(tr("Fatal engine shutdown. Incompatible binary or ipc error."));
+        showStatusMessage(tr("Fatal engine shutdown. Incompatible binary or IPC error."));
         showMessage(QLatin1String("IPC Error: terminator missing"));
         nuke();
         return;
diff --git a/src/plugins/debugger/lldb/lldboptionspagewidget.ui b/src/plugins/debugger/lldb/lldboptionspagewidget.ui
index 0661cfa54064bc4fe11a2faa8a909426bf719b8d..9dc9b535045c056d08e117a31aca59d9578ce995 100644
--- a/src/plugins/debugger/lldb/lldboptionspagewidget.ui
+++ b/src/plugins/debugger/lldb/lldboptionspagewidget.ui
@@ -29,7 +29,7 @@
       <item>
        <widget class="QCheckBox" name="gdbEmu">
         <property name="text">
-         <string>Use Gdb python dumpers</string>
+         <string>Use GDB python dumpers</string>
         </property>
         <property name="checked">
          <bool>false</bool>
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp
index 176761bd8db06421104136f583bcf22358267be1..f36bbf24a3ec04ce4d46b27d2b267f64c89912ca 100644
--- a/src/plugins/debugger/qml/qmlengine.cpp
+++ b/src/plugins/debugger/qml/qmlengine.cpp
@@ -384,7 +384,11 @@ void QmlEngine::runEngine()
 void QmlEngine::startApplicationLauncher()
 {
     if (!d->m_applicationLauncher.isRunning()) {
-        appendMessage(tr("Starting %1 %2").arg(QDir::toNativeSeparators(startParameters().executable), startParameters().processArgs), NormalMessageFormat);
+        appendMessage(tr("Starting %1 %2").arg(
+                          QDir::toNativeSeparators(startParameters().executable),
+                          startParameters().processArgs)
+                      + QLatin1Char('\n')
+                     , NormalMessageFormat);
         d->m_applicationLauncher.start(ApplicationLauncher::Gui,
                                     startParameters().executable,
                                     startParameters().processArgs);
@@ -762,11 +766,12 @@ QString QmlEngine::toFileInProject(const QString &fileUrl)
     if (fileUrl.isEmpty())
         return fileUrl;
 
-    const QString path = QUrl(fileUrl).path();
+    const QString path = QUrl(fileUrl).toLocalFile();
+    if (path.isEmpty())
+        return fileUrl;
 
     // Try to find shadow-build file in source dir first
-    if (!QUrl(fileUrl).toLocalFile().isEmpty()
-            && isShadowBuildProject()) {
+    if (isShadowBuildProject()) {
         const QString sourcePath = fromShadowBuildFilename(path);
         if (QFileInfo(sourcePath).exists())
             return sourcePath;
diff --git a/src/plugins/debugger/startremotedialog.ui b/src/plugins/debugger/startremotedialog.ui
index 8495cc69a47a4b569ab1085cd3b588b69c587262..fdbd2f57378a34b56985ab772fa1d69498169b87 100644
--- a/src/plugins/debugger/startremotedialog.ui
+++ b/src/plugins/debugger/startremotedialog.ui
@@ -79,7 +79,7 @@
      <item row="4" column="0">
       <widget class="QLabel" name="gnuTargetLabel">
        <property name="text">
-        <string>&amp;GNU target</string>
+        <string>&amp;GNU target:</string>
        </property>
        <property name="buddy">
         <cstring>gnuTargetComboBox</cstring>
@@ -122,7 +122,7 @@
      <item row="7" column="0">
       <widget class="QLabel" name="serverStartScriptLabel">
        <property name="text">
-        <string>Server st&amp;art script:</string>
+        <string>&amp;Server start script:</string>
        </property>
        <property name="buddy">
         <cstring>serverStartScript</cstring>
diff --git a/src/plugins/debugger/tcf/json.cpp b/src/plugins/debugger/tcf/json.cpp
deleted file mode 100644
index f5404f5cde113c2379110635c76c81a369f4c499..0000000000000000000000000000000000000000
--- a/src/plugins/debugger/tcf/json.cpp
+++ /dev/null
@@ -1,376 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** No Commercial Usage
-**
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-**
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**************************************************************************/
-
-#include "json.h"
-
-#include <utils/qtcassert.h>
-
-#include <QtCore/QByteArray>
-#include <QtCore/QTextStream>
-
-#include <ctype.h>
-
-//#define DEBUG_JASON
-#ifdef DEBUG_JASON
-#define JDEBUG(s) qDebug() << s
-#else
-#define JDEBUG(s)
-#endif
-
-namespace Debugger {
-namespace Internal {
-
-static void skipSpaces(const char *&from, const char *to)
-{
-    while (from != to && isspace(*from))
-        ++from;
-}
-
-QTextStream &operator<<(QTextStream &os, const JsonValue &mi)
-{
-    return os << mi.toString();
-}
-
-void JsonValue::parsePair(const char *&from, const char *to)
-{
-    skipSpaces(from, to);
-    JDEBUG("parsePair: " << QByteArray(from, to - from));
-    m_name = parseCString(from, to);
-    skipSpaces(from, to);
-    while (from < to && *from != ':') {
-        JDEBUG("not a colon" << *from);
-        ++from;
-    }
-    ++from;
-    parseValue(from, to);
-    skipSpaces(from, to);
-}
-
-QByteArray JsonValue::parseNumber(const char *&from, const char *to)
-{
-    QByteArray result;
-    while (from < to && *from >= '0' && *from <= '9')
-        result.append(*from++);
-    return result;
-}
-
-QByteArray JsonValue::parseCString(const char *&from, const char *to)
-{
-    QByteArray result;
-    JDEBUG("parseCString: " << QByteArray(from, to - from));
-    if (*from != '"') {
-        qDebug() << "JSON Parse Error, double quote expected";
-        ++from; // So we don't hang
-        return QByteArray();
-    }
-    const char *ptr = from;
-    ++ptr;
-    while (ptr < to) {
-        if (*ptr == '"') {
-            ++ptr;
-            result = QByteArray(from + 1, ptr - from - 2);
-            break;
-        }
-        if (*ptr == '\\') {
-            ++ptr;
-            if (ptr == to) {
-                qDebug() << "JSON Parse Error, unterminated backslash escape";
-                from = ptr; // So we don't hang
-                return QByteArray();
-            }
-        }
-        ++ptr;
-    }
-    from = ptr;
-
-    int idx = result.indexOf('\\');
-    if (idx >= 0) {
-        char *dst = result.data() + idx;
-        const char *src = dst + 1, *end = result.data() + result.length();
-        do {
-            char c = *src++;
-            switch (c) {
-                case 'a': *dst++ = '\a'; break;
-                case 'b': *dst++ = '\b'; break;
-                case 'f': *dst++ = '\f'; break;
-                case 'n': *dst++ = '\n'; break;
-                case 'r': *dst++ = '\r'; break;
-                case 't': *dst++ = '\t'; break;
-                case 'v': *dst++ = '\v'; break;
-                case '"': *dst++ = '"'; break;
-                case '\\': *dst++ = '\\'; break;
-                default:
-                    {
-                        int chars = 0;
-                        uchar prod = 0;
-                        forever {
-                            if (c < '0' || c > '7') {
-                                --src;
-                                break;
-                            }
-                            prod = prod * 8 + c - '0';
-                            if (++chars == 3 || src == end)
-                                break;
-                            c = *src++;
-                        }
-                        if (!chars) {
-                            qDebug() << "JSON Parse Error, unrecognized backslash escape";
-                            return QByteArray();
-                        }
-                        *dst++ = prod;
-                    }
-            }
-            while (src != end) {
-                char c = *src++;
-                if (c == '\\')
-                    break;
-                *dst++ = c;
-            }
-        } while (src != end);
-        *dst = 0;
-        result.truncate(dst - result.data());
-    }
-
-    JDEBUG("parseCString, got " << result);
-    return result;
-}
-
-void JsonValue::parseValue(const char *&from, const char *to)
-{
-    JDEBUG("parseValue: " << QByteArray(from, to - from));
-    switch (*from) {
-        case '{':
-            parseObject(from, to);
-            break;
-        case '[':
-            parseArray(from, to);
-            break;
-        case '"':
-            m_type = String;
-            m_data = parseCString(from, to);
-            break;
-        case '0': case '1': case '2': case '3': case '4':
-        case '5': case '6': case '7': case '8': case '9':
-            m_type = Number;
-            m_data = parseNumber(from, to);
-        default:
-            break;
-    }
-}
-
-void JsonValue::parseObject(const char *&from, const char *to)
-{
-    JDEBUG("parseObject: " << QByteArray(from, to - from));
-    QTC_ASSERT(*from == '{', /**/);
-    ++from;
-    m_type = Object;
-    while (from < to) {
-        if (*from == '}') {
-            ++from;
-            break;
-        }
-        JsonValue child;
-        child.parsePair(from, to);
-        if (!child.isValid())
-            return;
-        m_children += child;
-        if (*from == ',')
-            ++from;
-    }
-}
-
-void JsonValue::parseArray(const char *&from, const char *to)
-{
-    JDEBUG("parseArray: " << QByteArray(from, to - from));
-    QTC_ASSERT(*from == '[', /**/);
-    ++from;
-    m_type = Array;
-    while (from < to) {
-        if (*from == ']') {
-            ++from;
-            break;
-        }
-        JsonValue child;
-        child.parseValue(from, to);
-        if (child.isValid())
-            m_children += child;
-        if (*from == ',')
-            ++from;
-    }
-}
-
-void JsonValue::setStreamOutput(const QByteArray &name, const QByteArray &content)
-{
-    if (content.isEmpty())
-        return;
-    JsonValue child;
-    child.m_type = String;
-    child.m_name = name;
-    child.m_data = content;
-    m_children += child;
-    if (m_type == Invalid)
-        m_type = Object;
-}
-
-static QByteArray ind(int indent)
-{
-    return QByteArray(2 * indent, ' ');
-}
-
-void JsonValue::dumpChildren(QByteArray * str, bool multiline, int indent) const
-{
-    for (int i = 0; i < m_children.size(); ++i) {
-        if (i != 0) {
-            *str += ',';
-            if (multiline)
-                *str += '\n';
-        }
-        if (multiline)
-            *str += ind(indent);
-        *str += m_children.at(i).toString(multiline, indent);
-    }
-}
-
-class MyString : public QString {
-public:
-    ushort at(int i) const { return constData()[i].unicode(); }
-};
-
-template<class ST, typename CT>
-inline ST escapeCStringTpl(const ST &ba)
-{
-    ST ret;
-    ret.reserve(ba.length() * 2);
-    for (int i = 0; i < ba.length(); ++i) {
-        CT c = ba.at(i);
-        switch (c) {
-            case '\\': ret += "\\\\"; break;
-            case '\a': ret += "\\a"; break;
-            case '\b': ret += "\\b"; break;
-            case '\f': ret += "\\f"; break;
-            case '\n': ret += "\\n"; break;
-            case '\r': ret += "\\r"; break;
-            case '\t': ret += "\\t"; break;
-            case '\v': ret += "\\v"; break;
-            case '"': ret += "\\\""; break;
-            default:
-                if (c < 32 || c == 127) {
-                    ret += '\\';
-                    ret += '0' + (c >> 6);
-                    ret += '0' + ((c >> 3) & 7);
-                    ret += '0' + (c & 7);
-                } else {
-                    ret += c;
-                }
-        }
-    }
-    return ret;
-}
-
-QString JsonValue::escapeCString(const QString &ba)
-{
-    return escapeCStringTpl<MyString, ushort>(static_cast<const MyString &>(ba));
-}
-
-QByteArray JsonValue::escapeCString(const QByteArray &ba)
-{
-    return escapeCStringTpl<QByteArray, uchar>(ba);
-}
-
-QByteArray JsonValue::toString(bool multiline, int indent) const
-{
-    QByteArray result;
-    switch (m_type) {
-        case Invalid:
-            if (multiline)
-                result += ind(indent) + "Invalid\n";
-            else
-                result += "Invalid";
-            break;
-        case String:
-            if (!m_name.isEmpty())
-                result += m_name + '=';
-            result += '"' + escapeCString(m_data) + '"';
-            break;
-        case Number:
-            if (!m_name.isEmpty())
-                result += '"' + m_name + "\":";
-            result += m_data;
-            break;
-        case Object:
-            if (!m_name.isEmpty())
-                result += m_name + '=';
-            if (multiline) {
-                result += "{\n";
-                dumpChildren(&result, multiline, indent + 1);
-                result += '\n' + ind(indent) + '}';
-            } else {
-                result += '{';
-                dumpChildren(&result, multiline, indent + 1);
-                result += '}';
-            }
-            break;
-        case Array:
-            if (!m_name.isEmpty())
-                result += m_name + '=';
-            if (multiline) {
-                result += "[\n";
-                dumpChildren(&result, multiline, indent + 1);
-                result += '\n' + ind(indent) + ']';
-            } else {
-                result += '[';
-                dumpChildren(&result, multiline, indent + 1);
-                result += ']';
-            }
-            break;
-    }
-    return result;
-}
-
-void JsonValue::fromString(const QByteArray &ba)
-{
-    const char *from = ba.constBegin();
-    const char *to = ba.constEnd();
-    parseValue(from, to);
-}
-
-JsonValue JsonValue::findChild(const char *name) const
-{
-    for (int i = 0; i < m_children.size(); ++i)
-        if (m_children.at(i).m_name == name)
-            return m_children.at(i);
-    return JsonValue();
-}
-
-} // namespace Internal
-} // namespace Debugger
diff --git a/src/plugins/debugger/tcf/json.h b/src/plugins/debugger/tcf/json.h
deleted file mode 100644
index 3daf594b0ca7be72b38732c1d560d639ed13a7f9..0000000000000000000000000000000000000000
--- a/src/plugins/debugger/tcf/json.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** No Commercial Usage
-**
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-**
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**************************************************************************/
-
-#ifndef DEBUGGER_JSON_H
-#define DEBUGGER_JSON_H
-
-#include <QtCore/QByteArray>
-#include <QtCore/QList>
-
-namespace Debugger {
-namespace Internal {
-
-class JsonValue
-{
-public:
-    JsonValue() : m_type(Invalid) {}
-    explicit JsonValue(const QByteArray &str) { fromString(str); }
-
-    QByteArray m_name;
-    QByteArray m_data;
-    QList<JsonValue> m_children;
-
-    enum Type {
-        Invalid,
-        String,
-        Number,
-        Object,
-        Array
-    };
-
-    Type m_type;
-
-    inline Type type() const { return m_type; }
-    inline QByteArray name() const { return m_name; }
-    inline bool hasName(const char *name) const { return m_name == name; }
-
-    inline bool isValid() const { return m_type != Invalid; }
-    inline bool isNumber() const { return m_type == Number; }
-    inline bool isString() const { return m_type == String; }
-    inline bool isObject() const { return m_type == Object; }
-    inline bool isArray() const { return m_type == Array; }
-
-
-    inline QByteArray data() const { return m_data; }
-    inline const QList<JsonValue> &children() const { return m_children; }
-    inline int childCount() const { return m_children.size(); }
-
-    const JsonValue &childAt(int index) const { return m_children[index]; }
-    JsonValue &childAt(int index) { return m_children[index]; }
-    JsonValue findChild(const char *name) const;
-
-    QByteArray toString(bool multiline = false, int indent = 0) const;
-    void fromString(const QByteArray &str);
-    void setStreamOutput(const QByteArray &name, const QByteArray &content);
-
-private:
-    static QByteArray parseCString(const char *&from, const char *to);
-    static QByteArray parseNumber(const char *&from, const char *to);
-    static QByteArray escapeCString(const QByteArray &ba);
-    static QString escapeCString(const QString &ba);
-    void parsePair(const char *&from, const char *to);
-    void parseValue(const char *&from, const char *to);
-    void parseObject(const char *&from, const char *to);
-    void parseArray(const char *&from, const char *to);
-
-    void dumpChildren(QByteArray *str, bool multiline, int indent) const;
-};
-
-} // namespace Internal
-} // namespace Debugger
-
-//Q_DECLARE_METATYPE(GdbDebugger::Internal::JsonValue)
-
-#endif // DEBUGGER_JSON_H
diff --git a/src/plugins/debugger/tcf/tcf.pri b/src/plugins/debugger/tcf/tcf.pri
deleted file mode 100644
index faaad28f759a676bdaca748967127250ef02e2a9..0000000000000000000000000000000000000000
--- a/src/plugins/debugger/tcf/tcf.pri
+++ /dev/null
@@ -1,11 +0,0 @@
-HEADERS += \
-    $$PWD/json.h \
-    $$PWD/tcfengine.h \
-
-SOURCES += \
-    $$PWD/json.cpp \
-    $$PWD/tcfengine.cpp \
-
-FORMS += 
-
-RESOURCES += 
diff --git a/src/plugins/debugger/tcf/tcfengine.cpp b/src/plugins/debugger/tcf/tcfengine.cpp
deleted file mode 100644
index 97e4f4e4058b832917ecd14c67af5056b4744fb0..0000000000000000000000000000000000000000
--- a/src/plugins/debugger/tcf/tcfengine.cpp
+++ /dev/null
@@ -1,577 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** No Commercial Usage
-**
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-**
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**************************************************************************/
-
-#include "tcfengine.h"
-
-#include "debuggerstartparameters.h"
-#include "debuggerconstants.h"
-#include "debuggerdialogs.h"
-#include "debuggerstringutils.h"
-#include "json.h"
-
-#include "breakhandler.h"
-#include "moduleshandler.h"
-#include "registerhandler.h"
-#include "stackhandler.h"
-#include "watchhandler.h"
-#include "watchutils.h"
-#include <utils/qtcassert.h>
-
-#include <QtCore/QDateTime>
-#include <QtCore/QDebug>
-#include <QtCore/QDir>
-#include <QtCore/QFileInfo>
-#include <QtCore/QTimer>
-
-#include <QtGui/QAction>
-#include <QtGui/QApplication>
-#include <QtGui/QMainWindow>
-#include <QtGui/QMessageBox>
-#include <QtGui/QToolTip>
-
-#include <QtNetwork/QTcpSocket>
-
-#define DEBUG_TCF 1
-#if DEBUG_TCF
-#   define SDEBUG(s) qDebug() << s
-#else
-#   define SDEBUG(s)
-#endif
-# define XSDEBUG(s) qDebug() << s
-
-#define CB(callback) &TcfEngine::callback, STRINGIFY(callback)
-
-//#define USE_CONGESTION_CONTROL
-
-static QByteArray C(const QByteArray &ba1,
-    const QByteArray &ba2 = QByteArray(),
-    const QByteArray &ba3 = QByteArray(),
-    const QByteArray &ba4 = QByteArray(),
-    const QByteArray &ba5 = QByteArray())
-{
-    QByteArray result = ba1;
-    if (!ba2.isEmpty()) { result += '\0'; result += ba2; }
-    if (!ba3.isEmpty()) { result += '\0'; result += ba3; }
-    if (!ba4.isEmpty()) { result += '\0'; result += ba4; }
-    if (!ba5.isEmpty()) { result += '\0'; result += ba5; }
-    return result;
-}
-
-namespace Debugger {
-namespace Internal {
-
-///////////////////////////////////////////////////////////////////////
-//
-// TcfCommand
-//
-///////////////////////////////////////////////////////////////////////
-
-
-QString TcfEngine::TcfCommand::toString() const
-{
-    return quoteUnprintableLatin1(command);
-}
-
-
-///////////////////////////////////////////////////////////////////////
-//
-// TcfEngine
-//
-///////////////////////////////////////////////////////////////////////
-
-TcfEngine::TcfEngine(const DebuggerStartParameters &startParameters)
-    : DebuggerEngine(startParameters)
-{
-    setObjectName(QLatin1String("TcfEngine"));
-    m_congestion = 0;
-    m_inAir = 0;
-
-    m_sendTimer.setSingleShot(true);
-    m_sendTimer.setInterval(100); // ms
-    connect(&m_sendTimer, SIGNAL(timeout()), this, SLOT(handleSendTimer()));
-
-    m_socket = new QTcpSocket(this);
-    connect(m_socket, SIGNAL(connected()), this, SLOT(socketConnected()));
-    connect(m_socket, SIGNAL(disconnected()), this, SLOT(socketDisconnected()));
-    connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)),
-        this, SLOT(socketError(QAbstractSocket::SocketError)));
-
-    //void aboutToClose ()
-    //void bytesWritten ( qint64 bytes )
-    //void readChannelFinished ()
-    connect(m_socket, SIGNAL(readyRead()), this, SLOT(socketReadyRead()));
-
-    //connect(m_socket, SIGNAL(hostFound())
-    //connect(m_socket, SIGNAL(proxyAuthenticationRequired(QNetworkProxy, QAuthenticator *)))
-    //connect(m_socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)),
-    //    thism SLOT(socketStateChanged(QAbstractSocket::SocketState)));
-}
-
-TcfEngine::~TcfEngine()
-{
-}
-
-void TcfEngine::socketReadyRead()
-{
-    //XSDEBUG("TcfEngine::socketReadyRead()");
-    m_inbuffer.append(m_socket->readAll());
-    int pos = 0;
-    while (1) {
-        // the  "\3" is followed by either "\1" or "\2"
-        int next = m_inbuffer.indexOf("\3", pos);
-        //qDebug() << "pos: " << pos << "next: " << next;
-        if (next == -1)
-            break;
-        handleResponse(m_inbuffer.mid(pos, next - pos));
-        pos = next + 2; 
-    }
-    m_inbuffer.clear();
-}
-
-void TcfEngine::socketConnected()
-{
-    showStatusMessage("Socket connected.");
-}
-
-void TcfEngine::socketDisconnected()
-{
-    showStatusMessage("Socket disconnected.");
-    XSDEBUG("FIXME:  TcfEngine::socketDisconnected()");
-}
-
-void TcfEngine::socketError(QAbstractSocket::SocketError)
-{
-    QString msg = tr("%1.").arg(m_socket->errorString());
-    //QMessageBox::critical(q->mainWindow(), tr("Error"), msg);
-    showStatusMessage(msg);
-    notifyEngineIll();
-}
-
-void TcfEngine::executeDebuggerCommand(const QString &command)
-{
-    QByteArray cmd = command.toUtf8();
-    cmd = cmd.mid(cmd.indexOf(' ') + 1);
-    QByteArray null;
-    null.append('\0');
-    // FIXME: works for single-digit escapes only
-    cmd.replace("\\0", null);
-    cmd.replace("\\1", "\1");
-    cmd.replace("\\3", "\3");
-    TcfCommand tcf;
-    tcf.command = cmd;
-    enqueueCommand(tcf);
-}
-
-void TcfEngine::setupEngine()
-{
-    QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
-    showStatusMessage(tr("Running requested..."), 5000);
-    const DebuggerStartParameters &sp = startParameters();
-    const int pos = sp.remoteChannel.indexOf(QLatin1Char(':'));
-    const QString host = sp.remoteChannel.left(pos);
-    const quint16 port = sp.remoteChannel.mid(pos + 1).toInt();
-    m_socket->connectToHost(host, port);
-    if (m_socket->waitForConnected())
-        notifyEngineSetupOk();
-    else
-        notifyEngineSetupFailed();
-}
-
-void TcfEngine::setupInferior()
-{
-    QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
-    notifyInferiorSetupOk();
-}
-
-void TcfEngine::runEngine()
-{
-    QTC_ASSERT(state() == EngineRunRequested, qDebug() << state());
-    //notifyEngineRunOk(); 
-}
-
-void TcfEngine::shutdownInferior()
-{
-    QTC_ASSERT(state() == InferiorShutdownRequested, qDebug() << state());
-    notifyInferiorShutdownOk();
-}
-
-void TcfEngine::shutdownEngine()
-{
-    QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << state());
-    m_congestion = 0;
-    m_inAir = 0;
-    m_services.clear();
-    notifyEngineShutdownOk();
-}
-
-void TcfEngine::continueInferior()
-{
-    SDEBUG("TcfEngine::continueInferior()");
-}
-
-void TcfEngine::interruptInferior()
-{
-    XSDEBUG("TcfEngine::interruptInferior()");
-}
-
-void TcfEngine::executeStep()
-{
-    //SDEBUG("TcfEngine::executeStep()");
-}
-
-void TcfEngine::executeStepI()
-{
-    //SDEBUG("TcfEngine::executeStepI()");
-}
-
-void TcfEngine::executeStepOut()
-{
-    //SDEBUG("TcfEngine::executeStepOut()");
-}
-
-void TcfEngine::executeNext()
-{
-    //SDEBUG("TcfEngine::nextExec()");
-}
-
-void TcfEngine::executeNextI()
-{
-    //SDEBUG("TcfEngine::executeNextI()");
-}
-
-void TcfEngine::executeRunToLine(const ContextData &data)
-{
-    Q_UNUSED(data)
-    SDEBUG("FIXME:  TcfEngine::executeRunToLine()");
-}
-
-void TcfEngine::executeRunToFunction(const QString &functionName)
-{
-    Q_UNUSED(functionName)
-    XSDEBUG("FIXME:  TcfEngine::executeRunToFunction()");
-}
-
-void TcfEngine::executeJumpToLine(const ContextData &data)
-{
-    Q_UNUSED(data)
-    XSDEBUG("FIXME:  TcfEngine::executeJumpToLine()");
-}
-
-void TcfEngine::activateFrame(int index)
-{
-    Q_UNUSED(index)
-}
-
-void TcfEngine::selectThread(int index)
-{
-    Q_UNUSED(index)
-}
-
-void TcfEngine::attemptBreakpointSynchronization()
-{
-}
-
-void TcfEngine::loadSymbols(const QString &moduleName)
-{
-    Q_UNUSED(moduleName)
-}
-
-void TcfEngine::loadAllSymbols()
-{
-}
-
-void TcfEngine::reloadModules()
-{
-}
-
-void TcfEngine::requestModuleSymbols(const QString &moduleName)
-{
-    Q_UNUSED(moduleName)
-}
-
-
-void TcfEngine::handleResponse(const QByteArray &response)
-{
-    static QTime lastTime;
-
-    //showMessage(_("            "), currentTime(), LogTime);
-    QList<QByteArray> parts = response.split('\0');
-    if (parts.size() < 2 || !parts.last().isEmpty()) {
-        SDEBUG("WRONG RESPONSE PACKET LAYOUT" << parts);
-        //if (response.isEmpty())
-            acknowledgeResult();
-        return;
-    }
-    parts.removeLast(); // always empty
-    QByteArray tag = parts.at(0);
-    int n = parts.size();
-    if (n == 2 && tag == "N") { // unidentified command
-        int token = parts.at(1).toInt();
-        TcfCommand tcf = m_cookieForToken[token];
-        SDEBUG("COMMAND NOT RECOGNIZED FOR TOKEN" << token << tcf.toString());
-        showMessage(QString::number(token) + '^'
-               + "NOT RECOQNIZED: " + quoteUnprintableLatin1(response),
-                LogOutput);
-        acknowledgeResult();
-    } else if (n == 2 && tag == "F") { // flow control
-        m_congestion = parts.at(1).toInt();
-        SDEBUG("CONGESTION: " << m_congestion);
-    } else if (n == 4 && tag == "R") { // result data
-        acknowledgeResult();
-        int token = parts.at(1).toInt();
-        QByteArray message = parts.at(2);
-        JsonValue data(parts.at(3));
-        showMessage(QString("%1^%2%3").arg(token)
-            .arg(quoteUnprintableLatin1(response))
-            .arg(QString::fromUtf8(data.toString())), LogOutput);
-        TcfCommand tcf = m_cookieForToken[token];
-        JsonValue result(data);
-        SDEBUG("GOOD RESPONSE: " << quoteUnprintableLatin1(response));
-        if (tcf.callback)
-            (this->*(tcf.callback))(result, tcf.cookie);
-    } else if (n == 3 && tag == "P") { // progress data (partial result)
-        //int token = parts.at(1).toInt();
-        QByteArray data = parts.at(2);
-        SDEBUG(_("\nTCF PARTIAL:") << quoteUnprintableLatin1(response));
-    } else if (n == 4 && tag == "E") { // an event
-        QByteArray service = parts.at(1);
-        QByteArray eventName = parts.at(2);
-        JsonValue data(parts.at(3));
-        if (eventName != "peerHeartBeat")
-            SDEBUG(_("\nTCF EVENT:") << quoteUnprintableLatin1(response)
-                << data.toString());
-        if (service == "Locator" && eventName == "Hello") {
-            m_services.clear();
-            foreach (const JsonValue &service, data.children())
-                m_services.append(service.data());
-            QTimer::singleShot(0, this, SLOT(startDebugging()));
-        }
-    } else {
-        SDEBUG("UNKNOWN RESPONSE PACKET:"
-            << quoteUnprintableLatin1(response) << parts);
-    }
-}
-
-void TcfEngine::startDebugging()
-{
-    //foreach (const QByteArray &service, m_services) {
-    //    postCommand(CB(handleRunControlGetChildren),
-    //        service, "getChildren", "\"\"");
-    //}
-
-    postCommand(C("Diagnostics", "getChildren", "\"\""),
-        CB(handleRunControlGetChildren));
-    postCommand(C("Streams", "getChildren", "\"\""));
-    postCommand(C("Expressions", "getChildren", "\"\""));
-    postCommand(C("SysMonitor", "getChildren", "\"\""));
-    //postCommand(C("FileSystem", "getChildren", "\"\""));
-    //postCommand(C("Processes", "getChildren", "\"\""));
-    //postCommand(CB(handleRunControlGetChildren), "LineNumbers", "getChildren");
-    //postCommand(CB(handleRunControlGetChildren), "Symbols", "getChildren");
-    //postCommand(CB(handleRunControlGetChildren), "StackTrace", "getChildren");
-    //postCommand(CB(handleRunControlGetChildren), "Registers", "getChildren");
-    //postCommand(CB(handleRunControlGetChildren), "Memory", "getChildren");
-    //postCommand(CB(handleRunControlGetChildren), "Breakpoints", "getChildren");
-    //postCommand(CB(handleRunControlGetChildren), "RunControl", "getChildren");
-    //postCommand(CB(handleRunControlGetChildren), "Locator", "getChildren");
-
-
-    //postCommand(CB(handleRunControlSuspend),
-    //    "RunControl", "suspend", "\"Thread1\"");
-    //postCommand(CB(handleRunControlSuspend),
-    //    "RunControl", "getContext", "\"P12318\"");
-
-    //postCommand(C("Locator", "sync"), CB(handleRunControlGetChildren));
-    //postCommand("Locator", "redirect", "ID");
-
-    //postCommand(C("FileSystem", "open", "\"/bin/ls\"", "1", "2", "3"),
-    //    CB(handleRunControlGetChildren));
-    postCommand(C("FileSystem", "stat", "\"/bin/ls\""),
-        CB(handleRunControlGetChildren));
-}
-
-void TcfEngine::postCommand(const QByteArray &cmd,
-    TcfCommandCallback callback, const char *callbackName)
-{
-    static int token = 20;
-    ++token;
-    
-    //const char marker_eom = -1;
-    //const char marker_eos = -2;
-    //const char marker_null = -3;
-
-    QByteArray ba = "C";
-    ba.append('\0');
-    ba.append(QByteArray::number(token));
-    ba.append('\0');
-    ba.append(cmd);
-    ba.append('\0');
-    ba.append('\3');
-    ba.append('\1');
-
-    TcfCommand tcf;
-    tcf.command = ba;
-    tcf.callback = callback;
-    tcf.callbackName = callbackName;
-    tcf.token = token;
-
-    m_cookieForToken[token] = tcf;
-
-    enqueueCommand(tcf);
-}
-
-// Congestion control does not seem to work that way. Basically it's
-// already too late when we get a flow control packet
-void TcfEngine::enqueueCommand(const TcfCommand &cmd)
-{
-#ifdef USE_CONGESTION_CONTROL
-    // congestion controled
-    if (m_congestion <= 0 && m_sendQueue.isEmpty()) {
-        //SDEBUG("DIRECT SEND" << cmd.toString());
-        sendCommandNow(cmd);
-    } else {
-        SDEBUG("QUEUE " << cmd.toString());
-        m_sendQueue.enqueue(cmd);
-        m_sendTimer.start();
-    }
-#else
-    // synchrounously
-    if (m_inAir == 0)
-        sendCommandNow(cmd);
-    else
-        m_sendQueue.enqueue(cmd);
-#endif
-}
-
-void TcfEngine::handleSendTimer()
-{
-    QTC_ASSERT(!m_sendQueue.isEmpty(), return);
-
-    if (m_congestion > 0) {
-        // not ready...
-        SDEBUG("WAITING FOR CONGESTION TO GO DOWN...");
-        m_sendTimer.start();
-    } else {
-        // go!
-        sendCommandNow(m_sendQueue.dequeue());
-    }
-}
-
-void TcfEngine::sendCommandNow(const TcfCommand &cmd)
-{
-    ++m_inAir;
-    int result = m_socket->write(cmd.command);
-    Q_UNUSED(result)
-    m_socket->flush();
-    showMessage(QString::number(cmd.token) + ' ' + cmd.toString(), LogInput);
-    SDEBUG("SEND " <<  cmd.toString()); //<< ' ' << QString::number(result));
-}
-
-void TcfEngine::acknowledgeResult()
-{
-#if !defined(USE_CONGESTION_CONTROL)
-    QTC_ASSERT(m_inAir == 1, /**/);
-    m_inAir = 0;
-    if (!m_sendQueue.isEmpty())
-        sendCommandNow(m_sendQueue.dequeue());
-#endif
-}
-
-void TcfEngine::handleRunControlSuspend(const JsonValue &data, const QVariant &)
-{
-    SDEBUG("HANDLE RESULT" << data.toString());
-}
-
-void TcfEngine::handleRunControlGetChildren(const JsonValue &data, const QVariant &)
-{
-    SDEBUG("HANDLE RUN CONTROL GET CHILDREN" << data.toString());
-}
-
-void TcfEngine::handleSysMonitorGetChildren(const JsonValue &data, const QVariant &)
-{
-    SDEBUG("HANDLE RUN CONTROL GET CHILDREN" << data.toString());
-}
-
-
-//////////////////////////////////////////////////////////////////////
-//
-// Tooltip specific stuff
-//
-//////////////////////////////////////////////////////////////////////
-
-static WatchData m_toolTip;
-static QPoint m_toolTipPos;
-static QHash<QString, WatchData> m_toolTipCache;
-
-bool TcfEngine::setToolTipExpression(const QPoint &mousePos, TextEditor::ITextEditor *editor, const DebuggerToolTipContext &)
-{
-    Q_UNUSED(mousePos)
-    Q_UNUSED(editor)
-    return false;
-}
-
-//////////////////////////////////////////////////////////////////////
-//
-// Watch specific stuff
-//
-//////////////////////////////////////////////////////////////////////
-
-void TcfEngine::assignValueInDebugger(const Internal::WatchData *, const QString &expression, const QVariant &value)
-{
-    XSDEBUG("ASSIGNING: " << expression + '=' + value.toString());
-    updateLocals();
-}
-
-void TcfEngine::updateLocals()
-{
-}
-
-void TcfEngine::updateWatchData(const WatchData &, const WatchUpdateFlags &)
-{
-    //qq->watchHandler()->rebuildModel();
-    showStatusMessage(tr("Stopped."), 5000);
-}
-
-void TcfEngine::updateSubItem(const WatchData &data0)
-{
-    Q_UNUSED(data0)
-    QTC_ASSERT(false, return);
-}
-
-DebuggerEngine *createTcfEngine(const DebuggerStartParameters &sp)
-{
-    return new TcfEngine(sp);
-}
-
-} // namespace Internal
-} // namespace Debugger
diff --git a/src/plugins/debugger/tcf/tcfengine.h b/src/plugins/debugger/tcf/tcfengine.h
deleted file mode 100644
index f2d96c73f31f41f9153068e25a940f03672d404c..0000000000000000000000000000000000000000
--- a/src/plugins/debugger/tcf/tcfengine.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** No Commercial Usage
-**
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-**
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**************************************************************************/
-
-#ifndef DEBUGGER_TCFENGINE_H
-#define DEBUGGER_TCFENGINE_H
-
-#include <QtCore/QByteArray>
-#include <QtCore/QHash>
-#include <QtCore/QMap>
-#include <QtCore/QObject>
-#include <QtCore/QPoint>
-#include <QtCore/QProcess>
-#include <QtCore/QQueue>
-#include <QtCore/QSet>
-#include <QtCore/QTimer>
-#include <QtCore/QVariant>
-
-#include <QtNetwork/QAbstractSocket>
-
-QT_BEGIN_NAMESPACE
-class QTcpSocket;
-QT_END_NAMESPACE
-
-#include "debuggerengine.h"
-#include "json.h"
-
-namespace Debugger {
-namespace Internal {
-
-class ScriptAgent;
-class WatchData;
-
-class TcfEngine : public Debugger::DebuggerEngine
-{
-    Q_OBJECT
-
-public:
-    explicit TcfEngine(const DebuggerStartParameters &startParameters);
-    ~TcfEngine();
-
-private:
-    // DebuggerEngine implementation
-    void executeStep();
-    void executeStepOut();
-    void executeNext();
-    void executeStepI();
-    void executeNextI();
-
-    void setupEngine();
-    void setupInferior();
-    void runEngine();
-    void shutdownInferior();
-    void shutdownEngine();
-
-    bool setToolTipExpression(const QPoint &mousePos,
-        TextEditor::ITextEditor *editor, const DebuggerToolTipContext &);
-
-    void continueInferior();
-    void interruptInferior();
-
-    void executeRunToLine(const ContextData &data);
-    void executeRunToFunction(const QString &functionName);
-    void executeJumpToLine(const ContextData &data);
-
-    void activateFrame(int index);
-    void selectThread(int index);
-
-    void attemptBreakpointSynchronization();
-    bool acceptsBreakpoint(BreakpointId) const { return false; }
-
-    void assignValueInDebugger(const WatchData *data,
-        const QString &expr, const QVariant &value);
-    void executeDebuggerCommand(const QString &command);
-
-    void loadSymbols(const QString &moduleName);
-    void loadAllSymbols();
-    void requestModuleSymbols(const QString &moduleName);
-    void reloadModules();
-    void reloadRegisters() {}
-    void reloadSourceFiles() {}
-    void reloadFullStack() {}
-
-    bool supportsThreads() const { return true; }
-    void maybeBreakNow(bool byFunction);
-    void updateWatchData(const WatchData &data, const WatchUpdateFlags &flags);
-    void updateLocals();
-    void updateSubItem(const WatchData &data);
-
-    Q_SLOT void socketConnected();
-    Q_SLOT void socketDisconnected();
-    Q_SLOT void socketError(QAbstractSocket::SocketError);
-    Q_SLOT void socketReadyRead();
-
-    void handleResponse(const QByteArray &ba);
-    void handleRunControlSuspend(const JsonValue &response, const QVariant &);
-    void handleRunControlGetChildren(const JsonValue &response, const QVariant &);
-    void handleSysMonitorGetChildren(const JsonValue &response, const QVariant &);
-
-private:
-    Q_SLOT void startDebugging();
-
-    typedef void (TcfEngine::*TcfCommandCallback)
-        (const JsonValue &record, const QVariant &cookie);
-
-    struct TcfCommand
-    {
-        TcfCommand() : flags(0), token(-1), callback(0), callbackName(0) {}
-
-        QString toString() const;
-
-        int flags;
-        int token;
-        TcfCommandCallback callback;
-        const char *callbackName;
-        QByteArray command;
-        QVariant cookie;
-    };
-
-    void postCommand(const QByteArray &cmd,
-        TcfCommandCallback callback = 0, const char *callbackName = 0);
-    void sendCommandNow(const TcfCommand &command);
-
-    QHash<int, TcfCommand> m_cookieForToken;
-
-    QQueue<TcfCommand> m_sendQueue;
-    
-    // timer based congestion control. does not seem to work well.
-    void enqueueCommand(const TcfCommand &command);
-    Q_SLOT void handleSendTimer();
-    int m_congestion;
-    QTimer m_sendTimer;
-
-    // synchrounous communication
-    void acknowledgeResult();
-    int m_inAir;
-
-    QTcpSocket *m_socket;
-    QByteArray m_inbuffer;
-    QList<QByteArray> m_services;
-};
-
-} // namespace Internal
-} // namespace Debugger
-
-#endif // DEBUGGER_TCFENGINE_H
diff --git a/src/plugins/designer/editorwidget.cpp b/src/plugins/designer/editorwidget.cpp
index 3765f9982c822d908682a4105f8c132520e71e0b..04b7099eb680de150917a4fc71522f1e51cd7899 100644
--- a/src/plugins/designer/editorwidget.cpp
+++ b/src/plugins/designer/editorwidget.cpp
@@ -35,6 +35,8 @@
 #include "formeditorw.h"
 #include "formeditorstack.h"
 
+#include <coreplugin/editormanager/ieditor.h>
+
 #include <utils/qtcassert.h>
 
 #include <QtGui/QVBoxLayout>
@@ -109,9 +111,9 @@ void EditorWidget::add(const EditorData &d)
     m_stack->add(d);
 }
 
-bool EditorWidget::removeFormWindowEditor(Core::IEditor *xmlEditor)
+void EditorWidget::removeFormWindowEditor(Core::IEditor *xmlEditor)
 {
-    return m_stack->removeFormWindowEditor(xmlEditor);
+    m_stack->removeFormWindowEditor(xmlEditor);
 }
 
 bool EditorWidget::setVisibleEditor(Core::IEditor *xmlEditor)
diff --git a/src/plugins/designer/editorwidget.h b/src/plugins/designer/editorwidget.h
index 9ee0477636abcb7766fabdfb4837dfbc928b0b70..35a469a5f14032e6437c81894a5b085a7435ff69 100644
--- a/src/plugins/designer/editorwidget.h
+++ b/src/plugins/designer/editorwidget.h
@@ -68,7 +68,7 @@ public:
 
     // Form editor stack API
     void add(const EditorData &d);
-    bool removeFormWindowEditor(Core::IEditor *xmlEditor);
+    void removeFormWindowEditor(Core::IEditor *xmlEditor);
     bool setVisibleEditor(Core::IEditor *xmlEditor);
     SharedTools::WidgetHost *formWindowEditorForXmlEditor(const Core::IEditor *xmlEditor) const;
     SharedTools::WidgetHost *formWindowEditorForFormWindow(const QDesignerFormWindowInterface *fw) const;
diff --git a/src/plugins/designer/formeditorstack.cpp b/src/plugins/designer/formeditorstack.cpp
index 3df5e1f1901ec0e4aaf77bf1c117c5ff7f280686..8c684373e9244913c91f56f8d5185a69c4e817e1 100644
--- a/src/plugins/designer/formeditorstack.cpp
+++ b/src/plugins/designer/formeditorstack.cpp
@@ -78,12 +78,17 @@ void FormEditorStack::add(const EditorData &data)
 
     m_formEditors.append(data);
     addWidget(data.widgetHost);
+    // Editors are normally removed by listening to EditorManager::editorsClosed.
+    // However, in the case opening a file fails, EditorManager just deletes the editor, which
+    // is caught by the destroyed() signal.
+    connect(data.formWindowEditor, SIGNAL(destroyed(QObject*)),
+            this, SLOT(removeFormWindowEditor(QObject*)));
 
     connect(data.widgetHost, SIGNAL(formWindowSizeChanged(int,int)),
             this, SLOT(formSizeChanged(int,int)));
 
     if (Designer::Constants::Internal::debug)
-        qDebug() << "FormEditorStack::add" << data.widgetHost;
+        qDebug() << "FormEditorStack::add" << data.widgetHost << m_formEditors.size();
 
     // Since we have 1 pixel splitters we enforce no frame
     // on the content widget
@@ -91,7 +96,7 @@ void FormEditorStack::add(const EditorData &data)
         frame->setFrameStyle(QFrame::NoFrame);
 }
 
-int FormEditorStack::indexOf(const QDesignerFormWindowInterface *fw) const
+int FormEditorStack::indexOfFormWindow(const QDesignerFormWindowInterface *fw) const
 {
     const int count = m_formEditors.size();
      for(int i = 0; i < count; ++i)
@@ -100,7 +105,7 @@ int FormEditorStack::indexOf(const QDesignerFormWindowInterface *fw) const
      return -1;
 }
 
-int FormEditorStack::indexOf(const Core::IEditor *xmlEditor) const
+int FormEditorStack::indexOfFormEditor(const QObject *xmlEditor) const
 {
     const int count = m_formEditors.size();
     for(int i = 0; i < count; ++i)
@@ -113,7 +118,7 @@ EditorData FormEditorStack::activeEditor() const
 {
     // Should actually be in sync with current index.
     if (QDesignerFormWindowInterface *afw = m_designerCore->formWindowManager()->activeFormWindow()) {
-        const int index = indexOf(afw);
+        const int index = indexOfFormWindow(afw);
         if (index >= 0)
             return m_formEditors.at(index);
     }
@@ -122,28 +127,28 @@ EditorData FormEditorStack::activeEditor() const
 
 SharedTools::WidgetHost *FormEditorStack::formWindowEditorForFormWindow(const QDesignerFormWindowInterface *fw) const
 {
-    const int i = indexOf(fw);
+    const int i = indexOfFormWindow(fw);
     return i != -1 ? m_formEditors[i].widgetHost : static_cast<SharedTools::WidgetHost *>(0);
 }
 
-bool FormEditorStack::removeFormWindowEditor(Core::IEditor *xmlEditor)
+void FormEditorStack::removeFormWindowEditor(QObject *xmlEditor)
 {
+    const int i = indexOfFormEditor(xmlEditor);
     if (Designer::Constants::Internal::debug)
-        qDebug() << "FormEditorStack::removeFormWindowEditor"  << xmlEditor;
-    const int i = indexOf(xmlEditor);
-    if (i == -1) // Fail silently as this is invoked for all editors.
-        return false;
+        qDebug() << "FormEditorStack::removeFormWindowEditor"  << xmlEditor << i << " of " << m_formEditors.size() ;
+    if (i == -1) // Fail silently as this is invoked for all editors from EditorManager
+        return;  // and editor deletion signal.
+
     removeWidget(m_formEditors[i].widgetHost);
     m_formEditors[i].widgetHost->deleteLater();
     m_formEditors.removeAt(i);
-    return true;
 }
 
 bool FormEditorStack::setVisibleEditor(Core::IEditor *xmlEditor)
 {
     if (Designer::Constants::Internal::debug)
         qDebug() << "FormEditorStack::setVisibleEditor"  << xmlEditor;
-    const int i = indexOf(xmlEditor);
+    const int i = indexOfFormEditor(xmlEditor);
     QTC_ASSERT(i != -1, return false);
 
     if (i != currentIndex())
@@ -177,7 +182,7 @@ void FormEditorStack::formSizeChanged(int w, int h)
 
 SharedTools::WidgetHost *FormEditorStack::formWindowEditorForXmlEditor(const Core::IEditor *xmlEditor) const
 {
-    const int i = indexOf(xmlEditor);
+    const int i = indexOfFormEditor(xmlEditor);
     return i != -1 ? m_formEditors.at(i).widgetHost : static_cast<SharedTools::WidgetHost *>(0);
 }
 
diff --git a/src/plugins/designer/formeditorstack.h b/src/plugins/designer/formeditorstack.h
index 446a046255aa09e1dfd3169478f541fda4a637c2..3bb35858be857659cd3702bd87618c36518b078a 100644
--- a/src/plugins/designer/formeditorstack.h
+++ b/src/plugins/designer/formeditorstack.h
@@ -66,7 +66,6 @@ public:
     explicit FormEditorStack(QWidget *parent = 0);
 
     void add(const EditorData &d);
-    bool removeFormWindowEditor(Core::IEditor *xmlEditor);
 
     bool setVisibleEditor(Core::IEditor *xmlEditor);
     SharedTools::WidgetHost *formWindowEditorForXmlEditor(const Core::IEditor *xmlEditor) const;
@@ -74,14 +73,17 @@ public:
 
     EditorData activeEditor() const;
 
+public slots:
+    void removeFormWindowEditor(QObject *);
+
 private slots:
     void updateFormWindowSelectionHandles();
     void modeAboutToChange(Core::IMode *);
     void formSizeChanged(int w, int h);
 
 private:
-    inline int indexOf(const QDesignerFormWindowInterface *) const;
-    inline int indexOf(const Core::IEditor *xmlEditor) const;
+    inline int indexOfFormWindow(const QDesignerFormWindowInterface *) const;
+    inline int indexOfFormEditor(const QObject *xmlEditor) const;
 
     QList<EditorData> m_formEditors;
     QDesignerFormEditorInterface *m_designerCore;
diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp
index c9323093938220cc38a0854b3297d746f3674fd6..b9f7a8bdd10e0eb3367aad6c850c171a07dc7075 100644
--- a/src/plugins/designer/qtcreatorintegration.cpp
+++ b/src/plugins/designer/qtcreatorintegration.cpp
@@ -510,6 +510,8 @@ bool QtCreatorIntegration::navigateToSlot(const QString &objectName,
                                           const QStringList &parameterNames,
                                           QString *errorMessage)
 {
+    typedef QMap<int, Document::Ptr> DocumentMap;
+
     const EditorData ed = m_few->activeEditor();
     QTC_ASSERT(ed, return false)
     const QString currentUiFile = ed.formWindowEditor->file()->fileName();
@@ -522,6 +524,7 @@ bool QtCreatorIntegration::navigateToSlot(const QString &objectName,
     // be generating the ui_<>.h file for it, and the .pro file knows what the generated file's name and its absolute path will be.
     // So we should somehow get that info from project manager (?)
     const QFileInfo fi(currentUiFile);
+    const QString uiFolder = fi.absolutePath();
     const QString uicedName = QLatin1String("ui_") + fi.completeBaseName() + QLatin1String(".h");
 
     // Retrieve code model snapshot restricted to project of ui file.
@@ -542,11 +545,18 @@ bool QtCreatorIntegration::navigateToSlot(const QString &objectName,
     docTable = newDocTable;
 
     // take all docs, find the ones that include the ui_xx.h.
-    QList<Document::Ptr> docList = findDocumentsIncluding(docTable, uicedName, true); // change to false when we know the absolute path to generated ui_<>.h file
+    // Sort into a map, putting the ones whose path closely matches the ui-folder path
+    // first in case there are project subdirectories that contain identical file names.
+    const QList<Document::Ptr> docList = findDocumentsIncluding(docTable, uicedName, true); // change to false when we know the absolute path to generated ui_<>.h file
+    DocumentMap docMap;
+    foreach (const Document::Ptr &d, docList) {
+        const QFileInfo docFi(d->fileName());
+        docMap.insert(qAbs(docFi.absolutePath().compare(uiFolder, Qt::CaseInsensitive)), d);
+    }
 
     if (Designer::Constants::Internal::debug)
         qDebug() << Q_FUNC_INFO << objectName << signalSignature << "Looking for " << uicedName << " returned " << docList.size();
-    if (docList.isEmpty()) {
+    if (docMap.isEmpty()) {
         *errorMessage = tr("No documents matching '%1' could be found.\nRebuilding the project might help.").arg(uicedName);
         return false;
     }
@@ -564,7 +574,7 @@ bool QtCreatorIntegration::navigateToSlot(const QString &objectName,
     const Class *cl = 0;
     Document::Ptr doc;
 
-    foreach (const Document::Ptr &d, docList) {
+    foreach (const Document::Ptr &d, docMap) {
         const ClassDocumentPtrPair cd = findClassRecursively(docTable, d, uiClass, 1u , &namespaceName);
         if (cd.first) {
             cl = cd.first;
diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp
index 5b121f1820b597cb1ee7be948f50ba1465eb39c0..8fc232e0f8d5684b21503106b0671db5c7604c83 100644
--- a/src/plugins/fakevim/fakevimhandler.cpp
+++ b/src/plugins/fakevim/fakevimhandler.cpp
@@ -409,7 +409,13 @@ public:
 
     bool is(int c) const
     {
-        return m_xkey == c && m_modifiers != Qt::ControlModifier;
+        return m_xkey == c && m_modifiers !=
+#ifdef Q_WS_MAC
+                Qt::MetaModifier
+#else
+                Qt::ControlModifier
+#endif
+        ;
     }
 
     bool isControl(int c) const
@@ -510,21 +516,25 @@ class History
 {
 public:
     History() : m_index(0) {}
-    void append(const QString &item)
-        { //qDebug() << "APP: " << item << m_items;
-            m_items.removeAll(item);
-            m_items.append(item); m_index = m_items.size() - 1;  }
+    void append(const QString &item);
     void down() { m_index = qMin(m_index + 1, m_items.size()); }
     void up() { m_index = qMax(m_index - 1, 0); }
-    //void clear() { m_items.clear(); m_index = 0; }
     void restart() { m_index = m_items.size(); }
     QString current() const { return m_items.value(m_index, QString()); }
     QStringList items() const { return m_items; }
+
 private:
     QStringList m_items;
     int m_index;
 };
 
+void History::append(const QString &item)
+{
+    if (item.isEmpty())
+        return;
+    m_items.removeAll(item);
+    m_items.append(item); m_index = m_items.size() - 1;
+}
 
 // Mappings for a specific mode.
 class ModeMapping : public QList<QPair<Inputs, Inputs> >
@@ -2945,6 +2955,7 @@ EventResult FakeVimHandler::Private::handleSearchSubSubMode(const Input &input)
 {
     if (input.isEscape()) {
         m_commandBuffer.clear();
+        g.searchHistory.append(m_searchCursor.selectedText());
         m_searchCursor = QTextCursor();
         updateSelection();
         enterCommandMode();
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp
index 1ed8d8de635d71b529a485c64ca389f91265395c..b82e67c864728204b19c1e0727612fa389d078ea 100644
--- a/src/plugins/git/gitclient.cpp
+++ b/src/plugins/git/gitclient.cpp
@@ -108,7 +108,7 @@ public:
         layout->setContentsMargins(3, 0, 3, 0);
         layout->setSpacing(2);
 
-        m_patience->setToolTip(tr("Use the patience algorithmn for calculating the diff"));
+        m_patience->setToolTip(tr("Use the patience algorithm for calculating the diff"));
         m_patience->setText(tr("Patience"));
         layout->addWidget(m_patience);
         m_patience->setCheckable(true);
diff --git a/src/plugins/locator/directoryfilter.cpp b/src/plugins/locator/directoryfilter.cpp
index 2779ebae14520c0a7fcc93c1e9836bd07b0517dc..45d1319a65326d5f928d671b92d92199c5eb9965 100644
--- a/src/plugins/locator/directoryfilter.cpp
+++ b/src/plugins/locator/directoryfilter.cpp
@@ -203,7 +203,8 @@ void DirectoryFilter::refresh(QFutureInterface<void> &future)
     QStringList filesFound;
     while (!future.isCanceled() && it.hasNext()) {
         filesFound << it.next();
-        if (future.isProgressUpdateNeeded()) {
+        if (future.isProgressUpdateNeeded()
+                || future.progressValue() == 0 /*workaround for regression in Qt*/) {
             future.setProgressValueAndText(it.currentProgress(),
                                            tr("%1 filter update: %n files", 0, filesFound.size()).arg(m_name));
         }
diff --git a/src/plugins/memcheck/memchecktool.cpp b/src/plugins/memcheck/memchecktool.cpp
index 9d1e9df5d84c00b7dfe9903898c541bf87f9939a..e6d0f4ddd74ec4d27ddb544c73df233876baf49a 100644
--- a/src/plugins/memcheck/memchecktool.cpp
+++ b/src/plugins/memcheck/memchecktool.cpp
@@ -238,7 +238,7 @@ MemcheckTool::MemcheckTool(QObject *parent) :
     m_filterProjectAction->setCheckable(true);
 
     m_suppressionSeparator->setSeparator(true);
-    m_suppressionSeparator->setToolTip(tr("These suppression files where used in the last memory analyzer run."));
+    m_suppressionSeparator->setToolTip(tr("These suppression files were used in the last memory analyzer run."));
 }
 
 void MemcheckTool::settingsDestroyed(QObject *settings)
diff --git a/src/plugins/projectexplorer/applicationlauncher_x11.cpp b/src/plugins/projectexplorer/applicationlauncher_x11.cpp
index 18f30f6af9ca272fa9fe6cc605028529cb92df08..60131d380235495daa09f4741f4d8b9825fe9962 100644
--- a/src/plugins/projectexplorer/applicationlauncher_x11.cpp
+++ b/src/plugins/projectexplorer/applicationlauncher_x11.cpp
@@ -166,7 +166,7 @@ void ApplicationLauncher::guiProcessError()
     default:
         error = tr("Some error has occurred while running the program.");
     }
-    emit appendMessage(error, ErrorMessageFormat);
+    emit appendMessage(error + QLatin1Char('\n'), ErrorMessageFormat);
     emit processExited(d->m_guiProcess.exitCode());
 }
 
diff --git a/src/plugins/projectexplorer/buildstepspage.cpp b/src/plugins/projectexplorer/buildstepspage.cpp
index 0b92b935afa589c121588da48dd7f73f076d98ad..6ff18778a5d0a0776fe0974db21bc32652efead5 100644
--- a/src/plugins/projectexplorer/buildstepspage.cpp
+++ b/src/plugins/projectexplorer/buildstepspage.cpp
@@ -112,11 +112,6 @@ void BuildStepListWidget::init(BuildStepList *bsl)
 
     m_addButton->setText(tr("Add %1 Step").arg(m_buildStepList->displayName()));
 
-    // make sure widget is updated
-    foreach(BuildStepsWidgetStruct s, m_buildSteps) {
-        s.widget->init();
-        s.detailsWidget->setSummaryText(s.widget->summaryText());
-    }
     updateBuildStepButtonsState();
 
     static QLatin1String buttonStyle(
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp
index b804b9aced7f423b3370e709e6d409d407c0e9f1..acdbd16fbd0bc6ced7145fbf4c364218da315d04 100644
--- a/src/plugins/projectexplorer/gcctoolchain.cpp
+++ b/src/plugins/projectexplorer/gcctoolchain.cpp
@@ -37,6 +37,7 @@
 #include "linuxiccparser.h"
 #include "headerpath.h"
 #include "projectexplorerconstants.h"
+#include "toolchainmanager.h"
 
 #include <utils/environment.h>
 #include <utils/synchronousprocess.h>
@@ -287,7 +288,9 @@ void GccToolChain::updateId()
 {
     QString i = id();
     i = i.left(i.indexOf(QLatin1Char(':')));
-    setId(QString::fromLatin1("%1:%2.%3").arg(i).arg(m_compilerPath).arg(m_targetAbi.toString()));
+    setId(QString::fromLatin1("%1:%2.%3.%4")
+          .arg(i).arg(m_compilerPath)
+          .arg(m_targetAbi.toString()).arg(m_debuggerCommand));
 }
 
 QString GccToolChain::typeName() const
@@ -521,11 +524,13 @@ QList<ToolChain *> Internal::GccToolChainFactory::autoDetectToolchains(const QSt
     if (!abiList.contains(requiredAbi))
         return result;
 
-    QString debuggerPath; // Find the first debugger
-    foreach (const QString &debugger, debuggers) {
-        debuggerPath = systemEnvironment.searchInPath(debugger);
-        if (!debuggerPath.isEmpty())
-            break;
+    QString debuggerPath = ToolChainManager::instance()->defaultDebugger(requiredAbi); // Find the first debugger
+    if (debuggerPath.isEmpty()) {
+        foreach (const QString &debugger, debuggers) {
+            debuggerPath = systemEnvironment.searchInPath(debugger);
+            if (!debuggerPath.isEmpty())
+                break;
+        }
     }
 
     foreach (const Abi &abi, abiList) {
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index 3f86bfe6d0a2cbfab7a898d5473b827c19fd6475..bd19b6a13e70e08e58af1ad9390bf4719014a985 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -363,8 +363,8 @@ MsvcToolChain::MsvcToolChain(const QString &name, const Abi &abi,
     Q_ASSERT(abi.binaryFormat() == Abi::PEFormat);
     Q_ASSERT(abi.osFlavor() != Abi::WindowsMSysFlavor);
 
-    setId(QString::fromLatin1("%1:%2.%3").arg(Constants::MSVC_TOOLCHAIN_ID).arg(m_varsBat)
-            .arg(m_varsBatArg));
+    setId(QString::fromLatin1("%1:%2.%3.%4").arg(Constants::MSVC_TOOLCHAIN_ID).arg(m_varsBat)
+            .arg(m_varsBatArg).arg(m_debuggerCommand));
 
     setDisplayName(name);
 }
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 06f9dc4901b2cd759cdeb3ce72c12010ba3d9711..56dddf980419480777dc27d488ad34de78cd4cf8 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -1579,7 +1579,8 @@ void ProjectExplorerPlugin::updateActions()
     d->m_rebuildProjectOnlyAction->setEnabled(enableBuildActions);
     d->m_cleanProjectOnlyAction->setEnabled(enableBuildActions);
 
-    d->m_clearSession->setEnabled(hasProjects && enabledSessionBuildActions);
+    d->m_clearSession->setEnabled(hasProjects);
+
     d->m_buildSessionAction->setEnabled(hasProjects && enabledSessionBuildActions);
     d->m_rebuildSessionAction->setEnabled(hasProjects && enabledSessionBuildActions);
     d->m_cleanSessionAction->setEnabled(hasProjects && enabledSessionBuildActions);
diff --git a/src/plugins/projectexplorer/projecttreewidget.cpp b/src/plugins/projectexplorer/projecttreewidget.cpp
index ae536cd781e5fcd4d09f30ef2c15297c8b5383cf..bdf7d45bd05158d13b3a452239c96acff0c57561 100644
--- a/src/plugins/projectexplorer/projecttreewidget.cpp
+++ b/src/plugins/projectexplorer/projecttreewidget.cpp
@@ -117,7 +117,6 @@ ProjectTreeWidget::ProjectTreeWidget(QWidget *parent)
             this, SLOT(filesAboutToBeRemoved(FolderNode *, const QList<FileNode*> &)));
 
     m_view = new ProjectTreeView;
-    m_view->header()->setStretchLastSection(true);
     m_view->setModel(m_model);
     setFocusProxy(m_view);
     initView();
diff --git a/src/plugins/projectexplorer/toolchainmanager.cpp b/src/plugins/projectexplorer/toolchainmanager.cpp
index 514e638d443bc2783f348a31a5732edd833c6bca..7393e33c1d77624f6b01f4507d60855c9673b96c 100644
--- a/src/plugins/projectexplorer/toolchainmanager.cpp
+++ b/src/plugins/projectexplorer/toolchainmanager.cpp
@@ -47,6 +47,9 @@
 static const char *const TOOLCHAIN_DATA_KEY = "ToolChain.";
 static const char *const TOOLCHAIN_COUNT_KEY = "ToolChain.Count";
 static const char *const TOOLCHAIN_FILE_VERSION_KEY = "Version";
+static const char *const DEFAULT_DEBUGGER_COUNT_KEY = "DefaultDebugger.Count";
+static const char *const DEFAULT_DEBUGGER_ABI_KEY = "DefaultDebugger.Abi.";
+static const char *const DEFAULT_DEBUGGER_PATH_KEY = "DefaultDebugger.Path.";
 static const char *const TOOLCHAIN_FILENAME = "/toolChains.xml";
 
 static QString settingsFileName()
@@ -70,6 +73,7 @@ class ToolChainManagerPrivate
 {
 public:
     QList<ToolChain *> m_toolChains;
+    QMap<QString, QString> m_abiToDebugger;
 };
 
 } // namespace Internal
@@ -96,6 +100,11 @@ ToolChainManager::ToolChainManager(QObject *parent) :
 
 void ToolChainManager::restoreToolChains()
 {
+    // Restore SDK settings first
+    restoreToolChains(Core::ICore::instance()->resourcePath()
+                      + QLatin1String("/Nokia") + QLatin1String(TOOLCHAIN_FILENAME), true);
+
+    // Then auto detect
     ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
     QList<ToolChainFactory *> factories = pm->getObjects<ToolChainFactory>();
     // Autodetect tool chains:
@@ -105,9 +114,8 @@ void ToolChainManager::restoreToolChains()
             registerToolChain(tc);
     }
 
+    // Then restore user settings
     restoreToolChains(settingsFileName(), false);
-    restoreToolChains(Core::ICore::instance()->resourcePath()
-                      + QLatin1String("/Nokia") + QLatin1String(TOOLCHAIN_FILENAME), true);
 }
 
 ToolChainManager::~ToolChainManager()
@@ -138,6 +146,8 @@ void ToolChainManager::saveToolChains()
     }
     writer.saveValue(QLatin1String(TOOLCHAIN_COUNT_KEY), count);
     writer.save(settingsFileName(), "QtCreatorToolChains");
+
+    // Do not save default debuggers! Those are set by the SDK!
 }
 
 void ToolChainManager::restoreToolChains(const QString &fileName, bool autoDetected)
@@ -152,10 +162,22 @@ void ToolChainManager::restoreToolChains(const QString &fileName, bool autoDetec
     if (version < 1)
         return;
 
+    // Read default debugger settings (if any)
+    int count = data.value(QLatin1String(DEFAULT_DEBUGGER_COUNT_KEY)).toInt();
+    for (int i = 0; i < count; ++i) {
+        const QString abiKey = QString::fromLatin1(DEFAULT_DEBUGGER_ABI_KEY) + QString::number(i);
+        if (!data.contains(abiKey))
+            continue;
+        const QString pathKey = QString::fromLatin1(DEFAULT_DEBUGGER_PATH_KEY) + QString::number(i);
+        if (!data.contains(abiKey))
+            continue;
+        m_d->m_abiToDebugger.insert(data.value(abiKey).toString(), data.value(pathKey).toString());
+    }
+
     ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
     QList<ToolChainFactory *> factories = pm->getObjects<ToolChainFactory>();
 
-    int count = data.value(QLatin1String(TOOLCHAIN_COUNT_KEY), 0).toInt();
+    count = data.value(QLatin1String(TOOLCHAIN_COUNT_KEY), 0).toInt();
     for (int i = 0; i < count; ++i) {
         const QString key = QString::fromLatin1(TOOLCHAIN_DATA_KEY) + QString::number(i);
         if (!data.contains(key))
@@ -207,6 +229,11 @@ ToolChain *ToolChainManager::findToolChain(const QString &id) const
     return 0;
 }
 
+QString ToolChainManager::defaultDebugger(const Abi &abi) const
+{
+    return m_d->m_abiToDebugger.value(abi.toString());
+}
+
 void ToolChainManager::notifyAboutUpdate(ProjectExplorer::ToolChain *tc)
 {
     if (!tc || !m_d->m_toolChains.contains(tc))
diff --git a/src/plugins/projectexplorer/toolchainmanager.h b/src/plugins/projectexplorer/toolchainmanager.h
index fd3fa0dbf3732c52f31d67c28cb35d659e2903f9..bd6c36f087313c0f73dd5414b98d87ee693bedd8 100644
--- a/src/plugins/projectexplorer/toolchainmanager.h
+++ b/src/plugins/projectexplorer/toolchainmanager.h
@@ -68,6 +68,8 @@ public:
     QList<ToolChain *> findToolChains(const Abi &abi) const;
     ToolChain *findToolChain(const QString &id) const;
 
+    QString defaultDebugger(const Abi &abi) const;
+
 public slots:
     bool registerToolChain(ProjectExplorer::ToolChain *tc);
     void deregisterToolChain(ProjectExplorer::ToolChain *tc);
diff --git a/src/plugins/projectexplorer/toolchainoptionspage.cpp b/src/plugins/projectexplorer/toolchainoptionspage.cpp
index 65a5a26376b497c84289b2405f830798a09c9c87..789cb41bacfc0876e72d29739eebfa9844b34d85 100644
--- a/src/plugins/projectexplorer/toolchainoptionspage.cpp
+++ b/src/plugins/projectexplorer/toolchainoptionspage.cpp
@@ -452,7 +452,7 @@ void ToolChainModel::removeToolChain(ToolChain *tc)
 // --------------------------------------------------------------------------
 
 ToolChainOptionsPage::ToolChainOptionsPage() :
-    m_ui(0), m_cloneAction(0), m_model(0), m_selectionModel(0), m_currentTcWidget(0)
+    m_ui(0), m_model(0), m_selectionModel(0), m_currentTcWidget(0)
 { }
 
 QString ToolChainOptionsPage::id() const
@@ -496,7 +496,7 @@ QWidget *ToolChainOptionsPage::createPage(QWidget *parent)
 
     m_ui->toolChainView->setModel(m_model);
     m_ui->toolChainView->header()->setResizeMode(0, QHeaderView::ResizeToContents);
-    m_ui->toolChainView->header()->setResizeMode(1, QHeaderView::ResizeToContents);
+    m_ui->toolChainView->header()->setResizeMode(1, QHeaderView::Stretch);
     m_ui->toolChainView->expandAll();
 
     m_selectionModel = m_ui->toolChainView->selectionModel();
@@ -521,14 +521,9 @@ QWidget *ToolChainOptionsPage::createPage(QWidget *parent)
             addMenu->addAction(action);
         }
     }
-    m_cloneAction = new QAction(addMenu);
-    m_cloneAction->setText(tr("Clone ..."));
-    connect(m_cloneAction, SIGNAL(triggered()), mapper, SLOT(map()));
-    mapper->setMapping(m_cloneAction, static_cast<QObject *>(0));
-
-    if (!addMenu->isEmpty())
-        addMenu->addSeparator();
-    addMenu->addAction(m_cloneAction);
+    connect(m_ui->cloneButton, SIGNAL(clicked()), mapper, SLOT(map()));
+    mapper->setMapping(m_ui->cloneButton, static_cast<QObject *>(0));
+
     m_ui->addButton->setMenu(addMenu);
 
     connect(m_ui->delButton, SIGNAL(clicked()), this, SLOT(removeToolChain()));
@@ -619,7 +614,7 @@ void ToolChainOptionsPage::updateState()
         canDelete = !tc->isAutoDetected();
     }
 
-    m_cloneAction->setEnabled(canCopy);
+    m_ui->cloneButton->setEnabled(canCopy);
     m_ui->delButton->setEnabled(canDelete);
 }
 
diff --git a/src/plugins/projectexplorer/toolchainoptionspage.h b/src/plugins/projectexplorer/toolchainoptionspage.h
index dd14b2d812103c5537031027550131005dc3680f..44bc46c09a949e866e9fe19d96a8a079a6b9b50d 100644
--- a/src/plugins/projectexplorer/toolchainoptionspage.h
+++ b/src/plugins/projectexplorer/toolchainoptionspage.h
@@ -144,7 +144,6 @@ private:
     Ui::ToolChainOptionsPage *m_ui;
     QWidget *m_configWidget;
     QString m_searchKeywords;
-    QAction *m_cloneAction;
 
     ToolChainModel *m_model;
     QList<ToolChainFactory *> m_factories;
diff --git a/src/plugins/projectexplorer/toolchainoptionspage.ui b/src/plugins/projectexplorer/toolchainoptionspage.ui
index 5c23b4ae281c5aab8d62db8cb0063825c208342f..3f5bb0eab9a0f1d9430bf82ffd072afb63a66be0 100644
--- a/src/plugins/projectexplorer/toolchainoptionspage.ui
+++ b/src/plugins/projectexplorer/toolchainoptionspage.ui
@@ -50,6 +50,25 @@
          </property>
         </widget>
        </item>
+       <item>
+        <widget class="QPushButton" name="cloneButton">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize">
+          <size>
+           <width>21</width>
+           <height>23</height>
+          </size>
+         </property>
+         <property name="text">
+          <string>Clone</string>
+         </property>
+        </widget>
+       </item>
        <item>
         <widget class="QPushButton" name="delButton">
          <property name="sizePolicy">
diff --git a/src/plugins/projectexplorer/winguiprocess.cpp b/src/plugins/projectexplorer/winguiprocess.cpp
index 94ce64938f7783eb9a6527214bf44b9a15992387..f216bea0efb6e373db7c7a25ca8c89c317993515 100644
--- a/src/plugins/projectexplorer/winguiprocess.cpp
+++ b/src/plugins/projectexplorer/winguiprocess.cpp
@@ -134,6 +134,7 @@ void WinGuiProcess::run()
         if (!started) {
             emit processMessage(tr("The process could not be started: %1").
                                 arg(Utils::winErrorMessage(GetLastError())), true);
+            emit processFinished(0);
             break;
         }
 
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp
index d7ca5fb7c90ff27795b3a360d92e43fbf698cb96..c114725d5c3cab36cd7cca7832df4c1abf6ec7c0 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp
@@ -285,13 +285,13 @@ AbstractFormEditorTool* FormEditorView::currentTool() const
     return m_currentTool;
 }
 
-void FormEditorView::changeToMoveTool()
+bool FormEditorView::changeToMoveTool()
 {
     if (m_currentTool == m_moveTool)
-        return;
+        return true;
 
     if (!isMoveToolAvailable())
-        return;
+        return false;
 
     scene()->setPaintMode(FormEditorScene::NormalMode);
     m_scene->updateAllFormEditorItems();
@@ -300,6 +300,7 @@ void FormEditorView::changeToMoveTool()
     m_currentTool = m_moveTool;
     m_currentTool->clear();
     m_currentTool->setItems(scene()->itemsForQmlItemNodes(selectedQmlItemNodes()));
+    return true;
 }
 
 void FormEditorView::changeToDragTool()
@@ -317,13 +318,13 @@ void FormEditorView::changeToDragTool()
 }
 
 
-void FormEditorView::changeToMoveTool(const QPointF &beginPoint)
+bool FormEditorView::changeToMoveTool(const QPointF &beginPoint)
 {
     if (m_currentTool == m_moveTool)
-        return;
+        return true;
 
     if (!isMoveToolAvailable())
-        return;
+        return false;
 
     scene()->setPaintMode(FormEditorScene::NormalMode);
     m_scene->updateAllFormEditorItems();
@@ -333,6 +334,7 @@ void FormEditorView::changeToMoveTool(const QPointF &beginPoint)
     m_currentTool->clear();
     m_currentTool->setItems(scene()->itemsForQmlItemNodes(selectedQmlItemNodes()));
     m_moveTool->beginWithPoint(beginPoint);
+    return true;
 }
 
 void FormEditorView::changeToSelectionTool()
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorview.h b/src/plugins/qmldesigner/components/formeditor/formeditorview.h
index 452f61914b627a216060a6e40f364ff6485102f8..d094e20c3bbb3e7d35dc5b3a76c0c3ff2fe47e92 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditorview.h
+++ b/src/plugins/qmldesigner/components/formeditor/formeditorview.h
@@ -91,8 +91,8 @@ public:
     AbstractFormEditorTool *currentTool() const;
     FormEditorScene *scene() const;
 
-    void changeToMoveTool();
-    void changeToMoveTool(const QPointF &beginPoint);
+    bool changeToMoveTool();
+    bool changeToMoveTool(const QPointF &beginPoint);
     void changeToDragTool();
     void changeToSelectionTool();
     void changeToItemCreatorTool();
diff --git a/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp b/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp
index 483eca155056c620a9a08c797964cc5235a461c7..8125ae21e2b6f6e513661f8119c8c24d0fe9a408 100644
--- a/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp
@@ -210,8 +210,8 @@ void SelectionTool::keyPressEvent(QKeyEvent *event)
         case Qt::Key_Right:
         case Qt::Key_Up:
         case Qt::Key_Down:
-            view()->changeToMoveTool();
-            view()->currentTool()->keyPressEvent(event);
+            if (view()->changeToMoveTool())
+                view()->currentTool()->keyPressEvent(event);
             break;
     }
 }
diff --git a/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp b/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
index eaed395efabb2e743be03f7de2aaab63e44b4afd..1ce51b83e5c567f4c681a6f9a53de546e8c2f9ed 100644
--- a/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
+++ b/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
@@ -507,8 +507,7 @@ void DesignDocumentController::deleteSelected()
 
 void DesignDocumentController::copySelected()
 {
-    QScopedPointer<Model> model(Model::create("Qt/Rectangle"));
-    model->setMetaInfo(m_d->model->metaInfo());
+    QScopedPointer<Model> model(Model::create("QtQuick.Rectangle", 1, 0, this->model()));
     model->setFileUrl(m_d->model->fileUrl());
     model->changeImports(m_d->model->imports(), QList<Import>());
 
@@ -552,7 +551,7 @@ void DesignDocumentController::copySelected()
         foreach (ModelNode node, view.rootModelNode().allDirectSubModelNodes()) {
             node.destroy();
         }
-        view.changeRootNodeType("Qt/Rectangle", 4, 7);
+        view.changeRootNodeType("QtQuick.Rectangle", 1, 0);
         view.rootModelNode().setId("designer__Selection");
 
         foreach (const ModelNode &selectedNode, selectedNodes) {
@@ -603,8 +602,7 @@ static void scatterItem(ModelNode pastedNode, const ModelNode targetNode, int of
 
 void DesignDocumentController::paste()
 {
-    QScopedPointer<Model> model(Model::create("empty"));
-    model->setMetaInfo(m_d->model->metaInfo());
+    QScopedPointer<Model> model(Model::create("empty", 1, 0, this->model()));
     model->setFileUrl(m_d->model->fileUrl());
     model->changeImports(m_d->model->imports(), QList<Import>());
 
diff --git a/src/plugins/qmldesigner/components/integration/designdocumentcontrollerview.cpp b/src/plugins/qmldesigner/components/integration/designdocumentcontrollerview.cpp
index 097604c6046799830127e8563ff93fe21d366762..0fb87afda864c903e009a2dd4701e8bd47165e58 100644
--- a/src/plugins/qmldesigner/components/integration/designdocumentcontrollerview.cpp
+++ b/src/plugins/qmldesigner/components/integration/designdocumentcontrollerview.cpp
@@ -155,13 +155,22 @@ void DesignDocumentControllerView::fromClipboard()
 
 QString DesignDocumentControllerView::toText() const
 {
-    QScopedPointer<Model> outputModel(Model::create("QtQuick.Rectangle", 1, 0));
-    outputModel->setMetaInfo(model()->metaInfo());
+    QScopedPointer<Model> outputModel(Model::create("QtQuick.Rectangle", 1, 0, model()));
     QPlainTextEdit textEdit;
-    textEdit.setPlainText("import Qt 4.7; Item {}");
+
+    QString imports;
+    foreach (const Import &import, model()->imports()) {
+        if (import.isFileImport())
+            imports += QLatin1String("import ") + QLatin1String("\"") + import.file() + QLatin1String("\"")+ QLatin1String(";\n");
+        else
+            imports += QLatin1String("import ") + import.url() + QLatin1String(" ") + import.version() + QLatin1String(";\n");
+    }
+
+    textEdit.setPlainText(imports +  QLatin1String("Item {\n}\n"));
     NotIndentingTextEditModifier modifier(&textEdit);
 
     QScopedPointer<RewriterView> rewriterView(new RewriterView(RewriterView::Amend, 0));
+    rewriterView->setCheckSemanticErrors(false);
     rewriterView->setTextModifier(&modifier);
     outputModel->attachView(rewriterView.data());
 
@@ -177,8 +186,7 @@ QString DesignDocumentControllerView::toText() const
 
 void DesignDocumentControllerView::fromText(QString text)
 {
-    QScopedPointer<Model> inputModel(Model::create("QtQuick.Rectangle", 1, 0));
-    inputModel->setMetaInfo(model()->metaInfo());
+    QScopedPointer<Model> inputModel(Model::create("QtQuick.Rectangle", 1, 0, model()));
     inputModel->setFileUrl(model()->fileUrl());
     QPlainTextEdit textEdit;
     QString imports;
@@ -189,6 +197,7 @@ void DesignDocumentControllerView::fromText(QString text)
     NotIndentingTextEditModifier modifier(&textEdit);
 
     QScopedPointer<RewriterView> rewriterView(new RewriterView(RewriterView::Amend, 0));
+    rewriterView->setCheckSemanticErrors(false);
     rewriterView->setTextModifier(&modifier);
     inputModel->attachView(rewriterView.data());
 
diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
index 7e22888a42f4b309e9aacaa904a6d609de6a4dd2..f9af9ad57ff84c7dd9b6c3c7d8c2bf4cdf2f5f2d 100644
--- a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
+++ b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp
@@ -315,7 +315,7 @@ void NavigatorTreeModel::handleChangedItem(QStandardItem *item)
 
     ItemRow itemRow = itemRowForNode(node);
     if (item == itemRow.idItem) {
-         if (node.isValidId(item->text())) {
+         if (node.isValidId(item->text())  && !node.view()->modelNodeForId(item->text()).isValid()) {
              if (node.id().isEmpty() || item->text().isEmpty()) { //no id
                  try {
                      node.setId(item->text());
@@ -327,8 +327,14 @@ void NavigatorTreeModel::handleChangedItem(QStandardItem *item)
                      node.view()->rewriterView()->renameId(node.id(), item->text());
              }
         } else {
-            QMessageBox::warning(0, tr("Invalid Id"),  tr("%1 is an invalid id").arg(item->text()));
-            item->setText(node.id());
+
+             if (!node.isValidId(item->text()))
+                 QMessageBox::warning(0, tr("Invalid Id"),  tr("%1 is an invalid id").arg(item->text()));
+             else
+                 QMessageBox::warning(0, tr("Invalid Id"),  tr("%1 already exists").arg(item->text()));
+             bool blockSingals = blockItemChangedSignal(true);
+             item->setText(node.id());
+             blockItemChangedSignal(blockSingals);
         }
     } else if (item == itemRow.visibilityItem) {
         bool invisible = (item->checkState() == Qt::Unchecked);
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
index 8b13aacbe6b8a9e4468319f5b8393b26211067e3..50f32723f5bf56e3320239f1cc553c52c53acb45 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
@@ -368,12 +368,17 @@ void PropertyEditor::changeValue(const QString &propertyName)
         PropertyEditorValue *value = qobject_cast<PropertyEditorValue*>(QDeclarativeMetaType::toQObject(m_currentType->m_backendValuesPropertyMap.value(propertyName)));
         const QString newId = value->value().toString();
 
-        if (m_selectedNode.isValidId(newId)) {
+        if (newId == m_selectedNode.id())
+            return;
+
+        if (m_selectedNode.isValidId(newId)  && !modelNodeForId(newId).isValid() ) {
             if (m_selectedNode.id().isEmpty() || newId.isEmpty()) { //no id
                 try {
                     m_selectedNode.setId(newId);
                 } catch (InvalidIdException &e) { //better save then sorry
+                    m_locked = true;
                     value->setValue(m_selectedNode.id());
+                    m_locked = false;
                     QMessageBox::warning(0, tr("Invalid Id"), e.description());
                 }
             } else { //there is already an id, so we refactor
@@ -381,8 +386,13 @@ void PropertyEditor::changeValue(const QString &propertyName)
                     rewriterView()->renameId(m_selectedNode.id(), newId);
             }
         } else {
+            m_locked = true;
             value->setValue(m_selectedNode.id());
-            QMessageBox::warning(0, tr("Invalid Id"),  tr("%1 is an invalid id").arg(newId));
+            m_locked = false;
+            if (!m_selectedNode.isValidId(newId))
+                QMessageBox::warning(0, tr("Invalid Id"),  tr("%1 is an invalid id").arg(newId));
+            else
+                QMessageBox::warning(0, tr("Invalid Id"),  tr("%1 already exists").arg(newId));
         }
         return;
     }
@@ -454,51 +464,57 @@ void PropertyEditor::changeExpression(const QString &name)
 
     RewriterTransaction transaction = beginRewriterTransaction();
 
-    QString underscoreName(name);
-    underscoreName.replace(QLatin1Char('.'), QLatin1Char('_'));
-
-    QmlObjectNode fxObjectNode(m_selectedNode);
-    PropertyEditorValue *value = qobject_cast<PropertyEditorValue*>(QDeclarativeMetaType::toQObject(m_currentType->m_backendValuesPropertyMap.value(underscoreName)));
-
-    if (fxObjectNode.modelNode().metaInfo().isValid() && fxObjectNode.modelNode().metaInfo().hasProperty(name)) {
-        if (fxObjectNode.modelNode().metaInfo().propertyTypeName(name) == QLatin1String("QColor")) {
-            if (QColor(value->expression().remove('"')).isValid()) {
-                fxObjectNode.setVariantProperty(name, QColor(value->expression().remove('"')));
-                return;
-            }
-        } else if (fxObjectNode.modelNode().metaInfo().propertyTypeName(name) == QLatin1String("bool")) {
-            if (value->expression().compare("false", Qt::CaseInsensitive) == 0 || value->expression().compare("true", Qt::CaseInsensitive) == 0) {
-                if (value->expression().compare("true", Qt::CaseInsensitive) == 0)
-                    fxObjectNode.setVariantProperty(name, true);
-                else
-                    fxObjectNode.setVariantProperty(name, false);
-                return;
-            }
-        } else if (fxObjectNode.modelNode().metaInfo().propertyTypeName(name) == QLatin1String("int")) {
-            bool ok;
-            int intValue = value->expression().toInt(&ok);
-            if (ok) {
-                fxObjectNode.setVariantProperty(name, intValue);
-                return;
-            }
-        } else if (fxObjectNode.modelNode().metaInfo().propertyTypeName(name) == QLatin1String("qreal")) {
-            bool ok;
-            qreal realValue = value->expression().toFloat(&ok);
-            if (ok) {
-                fxObjectNode.setVariantProperty(name, realValue);
-                return;
+    try {
+        QString underscoreName(name);
+        underscoreName.replace(QLatin1Char('.'), QLatin1Char('_'));
+
+        QmlObjectNode fxObjectNode(m_selectedNode);
+        PropertyEditorValue *value = qobject_cast<PropertyEditorValue*>(QDeclarativeMetaType::toQObject(m_currentType->m_backendValuesPropertyMap.value(underscoreName)));
+
+        if (fxObjectNode.modelNode().metaInfo().isValid() && fxObjectNode.modelNode().metaInfo().hasProperty(name)) {
+            if (fxObjectNode.modelNode().metaInfo().propertyTypeName(name) == QLatin1String("QColor")) {
+                if (QColor(value->expression().remove('"')).isValid()) {
+                    fxObjectNode.setVariantProperty(name, QColor(value->expression().remove('"')));
+                    transaction.commit(); //committing in the try block
+                    return;
+                }
+            } else if (fxObjectNode.modelNode().metaInfo().propertyTypeName(name) == QLatin1String("bool")) {
+                if (value->expression().compare("false", Qt::CaseInsensitive) == 0 || value->expression().compare("true", Qt::CaseInsensitive) == 0) {
+                    if (value->expression().compare("true", Qt::CaseInsensitive) == 0)
+                        fxObjectNode.setVariantProperty(name, true);
+                    else
+                        fxObjectNode.setVariantProperty(name, false);
+                    transaction.commit(); //committing in the try block
+                    return;
+                }
+            } else if (fxObjectNode.modelNode().metaInfo().propertyTypeName(name) == QLatin1String("int")) {
+                bool ok;
+                int intValue = value->expression().toInt(&ok);
+                if (ok) {
+                    fxObjectNode.setVariantProperty(name, intValue);
+                    transaction.commit(); //committing in the try block
+                    return;
+                }
+            } else if (fxObjectNode.modelNode().metaInfo().propertyTypeName(name) == QLatin1String("qreal")) {
+                bool ok;
+                qreal realValue = value->expression().toFloat(&ok);
+                if (ok) {
+                    fxObjectNode.setVariantProperty(name, realValue);
+                    transaction.commit(); //committing in the try block
+                    return;
+                }
             }
         }
-    }
 
-    if (!value) {
-        qWarning() << "PropertyEditor::changeExpression no value for " << underscoreName;
-        return;
-    }
+        if (!value) {
+            qWarning() << "PropertyEditor::changeExpression no value for " << underscoreName;
+            return;
+        }
 
-    try {
         if (fxObjectNode.expression(name) != value->expression() || !fxObjectNode.propertyAffectedByCurrentState(name))
             fxObjectNode.setBindingProperty(name, value->expression());
+
+        transaction.commit(); //committing in the try block
     }
 
     catch (RewritingException &e) {
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
index df547f031f0167469db55af140da3984d918d85a..00b427bae7aabdf7725398e7b3bd1eaf1d69fa12 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
@@ -156,7 +156,7 @@ void PropertyEditorValue::setExpression(const QString &expression)
 bool PropertyEditorValue::isInSubState() const
 {
     const QmlDesigner::QmlObjectNode objectNode(modelNode());
-    return objectNode.isValid() && objectNode.propertyAffectedByCurrentState(name());
+    return objectNode.isValid() && objectNode.currentState().isValid() && objectNode.propertyAffectedByCurrentState(name());
 }
 
 bool PropertyEditorValue::isBound() const
diff --git a/src/plugins/qmldesigner/designercore/include/model.h b/src/plugins/qmldesigner/designercore/include/model.h
index 2445a7389d89172affceee4a826595f3eb11e360..3e28205dbee0418ce25f4e2852eb27b81d68132c 100644
--- a/src/plugins/qmldesigner/designercore/include/model.h
+++ b/src/plugins/qmldesigner/designercore/include/model.h
@@ -84,7 +84,7 @@ public:
 
     virtual ~Model();
 
-    static Model *create(QString type, int major = 4, int minor = 7);
+    static Model *create(QString type, int major = 4, int minor = 7, Model *metaInfoPropxyModel = 0);
 
     Model *masterModel() const;
     void setMasterModel(Model *model);
@@ -96,7 +96,6 @@ public:
     MetaInfo metaInfo();
     NodeMetaInfo metaInfo(const QString &typeName, int majorVersion = -1, int minorVersion = -1);
     bool hasNodeMetaInfo(const QString &typeName, int majorVersion = -1, int minorVersion = -1);
-    void setMetaInfo(const MetaInfo &metaInfo);
 
     void attachView(AbstractView *view);
     void detachView(AbstractView *view, ViewNotification emitDetachNotify = NotifyView);
@@ -109,6 +108,8 @@ public:
 
     RewriterView *rewriterView() const;
 
+    Model *metaInfoProxyModel();
+
 protected:
     Model();
 
diff --git a/src/plugins/qmldesigner/designercore/include/rewriterview.h b/src/plugins/qmldesigner/designercore/include/rewriterview.h
index 3a03ca4b0dcad750274c2a19fd9efbe8d270c3c3..01969472ba068cae86820278bcf07e37cdab8aa7 100644
--- a/src/plugins/qmldesigner/designercore/include/rewriterview.h
+++ b/src/plugins/qmldesigner/designercore/include/rewriterview.h
@@ -187,6 +187,12 @@ public:
     QmlJS::LookupContext *lookupContext() const;
     QmlJS::Document *document() const;
 
+    bool checkSemanticErrors() const
+    { return m_checkErrors; }
+
+    void setCheckSemanticErrors(bool b)
+    { m_checkErrors = b; }
+
 signals:
     void errorsChanged(const QList<RewriterView::Error> &errors);
 
@@ -213,6 +219,7 @@ private: //variables
     RewriterTransaction m_removeDefaultPropertyTransaction;
     QString m_rewritingErrorMessage;
     QString lastCorrectQmlSource;
+    bool m_checkErrors;
 };
 
 } //QmlDesigner
diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
index f5a96f3b7538b611fc0f3fe44b3b6f01d41ace91..906b919536577aec44dcb8438822c2c87482e310 100644
--- a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
+++ b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
@@ -599,7 +599,7 @@ bool NodeMetaInfoPrivate::isPropertyEnum(const QString &propertyName) const
         if (objectInfo->isValid())
             return objectInfo->isPropertyEnum(rawPropertyName);
         else
-            return true;
+            return false;
     }
 
     QList<const Interpreter::ObjectValue *> objects;
diff --git a/src/plugins/qmldesigner/designercore/model/model.cpp b/src/plugins/qmldesigner/designercore/model/model.cpp
index a5652fa76a648646a40955e042329689530a2fb3..f63d67170c6d12d11a40a21b5b38b7a71f791213 100644
--- a/src/plugins/qmldesigner/designercore/model/model.cpp
+++ b/src/plugins/qmldesigner/designercore/model/model.cpp
@@ -121,10 +121,11 @@ void ModelPrivate::detachAllViews()
     }
 }
 
-Model *ModelPrivate::create(QString type, int major, int minor)
+Model *ModelPrivate::create(QString type, int major, int minor, Model *metaInfoPropxyModel)
 {
     Model *model = new Model;
 
+    model->m_d->m_metaInfoProxyModel = metaInfoPropxyModel;
     model->m_d->rootNode()->setType(type);
     model->m_d->rootNode()->setMajorVersion(major);
     model->m_d->rootNode()->setMinorVersion(minor);
@@ -1628,9 +1629,9 @@ Model::~Model()
 }
 
 
-Model *Model::create(QString type, int major, int minor)
+Model *Model::create(QString type, int major, int minor, Model *metaInfoPropxyModel)
 {
-    return Internal::ModelPrivate::create(type, major, minor);
+    return Internal::ModelPrivate::create(type, major, minor, metaInfoPropxyModel);
 }
 
 
@@ -1686,6 +1687,18 @@ RewriterView *Model::rewriterView() const
     return m_d->rewriterView();
 }
 
+/*!
+ \brief Returns the model that is used for metainfo
+ \return Return itself if not other metaInfoProxyModel does exist
+*/
+Model *Model::metaInfoProxyModel()
+{
+    if (m_d->m_metaInfoProxyModel)
+        return m_d->m_metaInfoProxyModel->metaInfoProxyModel();
+    else
+        return this;
+}
+
 #if 0
 /*!
  \brief Creates a new empty model
@@ -1746,15 +1759,6 @@ NodeMetaInfo Model::metaInfo(const QString &typeName, int majorVersion, int mino
     return NodeMetaInfo(this, typeName, majorVersion, minorVersion);
 }
 
-/*!
-  \brief Sets a specific Metainfo on this Model
-  */
-void Model::setMetaInfo(const MetaInfo &metaInfo)
-{
-    Internal::WriteLocker locker(m_d);
-    m_d->setMetaInfo(metaInfo);
-}
-
 /*!
   \brief Returns list of QML types available within the model.
   */
diff --git a/src/plugins/qmldesigner/designercore/model/model_p.h b/src/plugins/qmldesigner/designercore/model/model_p.h
index 2f15c18082f47dff510d75c38775bddc63fa887a..fbd9df9e71d5573acecb1ae7a10ef10741f0ec6e 100644
--- a/src/plugins/qmldesigner/designercore/model/model_p.h
+++ b/src/plugins/qmldesigner/designercore/model/model_p.h
@@ -97,7 +97,7 @@ public:
      ModelPrivate(Model *model);
     ~ModelPrivate();
 
-    static Model *create(QString type, int major, int minor);
+    static Model *create(QString type, int major, int minor, Model *metaInfoPropxyModel);
 
     QUrl fileUrl() const;
     void setFileUrl(const QUrl &url);
@@ -240,6 +240,8 @@ private:
     QWeakPointer<Model> m_masterModel;
     QWeakPointer<RewriterView> m_rewriterView;
     QWeakPointer<NodeInstanceView> m_nodeInstanceView;
+    QWeakPointer<Model> m_metaInfoProxyModel;
+
     bool m_writeLock;
     qint32 m_internalIdCounter;
 };
diff --git a/src/plugins/qmldesigner/designercore/model/modelmerger.cpp b/src/plugins/qmldesigner/designercore/model/modelmerger.cpp
index b87d831ee60959c69d2a65f2cc478be06a02a655..dcabd74ed7ca51a316384a12b0e4bb9a69b65ec9 100644
--- a/src/plugins/qmldesigner/designercore/model/modelmerger.cpp
+++ b/src/plugins/qmldesigner/designercore/model/modelmerger.cpp
@@ -172,12 +172,12 @@ ModelNode ModelMerger::insertModel(const ModelNode &modelNode)
 
 void ModelMerger::replaceModel(const ModelNode &modelNode)
 {
-    try {
-        RewriterTransaction transaction(view()->beginRewriterTransaction());
-
         view()->model()->changeImports(modelNode.model()->imports(), QList<Import>());
         view()->model()->setFileUrl(modelNode.model()->fileUrl());
 
+    try {
+        RewriterTransaction transaction(view()->beginRewriterTransaction());
+
         ModelNode rootNode(view()->rootModelNode());
 
         foreach (const QString &propertyName, rootNode.propertyNames())
diff --git a/src/plugins/qmldesigner/designercore/model/modelnode.cpp b/src/plugins/qmldesigner/designercore/model/modelnode.cpp
index d00769284281a81d21f798554b462b8137da165e..d738810418fc5bb24792a43921abddf2b58ea27a 100644
--- a/src/plugins/qmldesigner/designercore/model/modelnode.cpp
+++ b/src/plugins/qmldesigner/designercore/model/modelnode.cpp
@@ -740,7 +740,7 @@ const NodeMetaInfo ModelNode::metaInfo() const
         throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__);
     }
 
-    return NodeMetaInfo(model(), type(), majorVersion(), minorVersion());
+    return NodeMetaInfo(model()->metaInfoProxyModel(), type(), majorVersion(), minorVersion());
 }
 
 /*! \brief has a node the selection of the model
diff --git a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp
index f07a31e24ad78749581d72620f55b8277705177e..3dd701015d9a5258cc16ea8e112a52eab91083e6 100644
--- a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp
+++ b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp
@@ -133,7 +133,8 @@ RewriterView::RewriterView(DifferenceHandling differenceHandling, QObject *paren
         m_modelToTextMerger(new Internal::ModelToTextMerger(this)),
         m_textToModelMerger(new Internal::TextToModelMerger(this)),
         m_textModifier(0),
-        transactionLevel(0)
+        transactionLevel(0),
+        m_checkErrors(true)
 {
 }
 
diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
index 50446049e2c3431dbca9aef244b88061d7f6010e..4d58ca087431a08c3e750079f4110efc8426bf30 100644
--- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
+++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
@@ -43,6 +43,7 @@
 #include "texttomodelmerger.h"
 #include "rewriterview.h"
 #include "variantproperty.h"
+#include "nodemetainfo.h"
 
 #include <languageutils/componentversion.h>
 #include <qmljs/qmljsevaluate.h>
@@ -662,16 +663,18 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH
             errors.append(RewriterView::Error(diagnosticMessage, QUrl::fromLocalFile(doc->fileName())));
         }
 
-        Check check(doc, snapshot, m_lookupContext->context());
-        check.setOptions(check.options() & ~Check::ErrCheckTypeErrors);
-        foreach (const QmlJS::DiagnosticMessage &diagnosticMessage, check())
-            if (diagnosticMessage.isError())
-            errors.append(RewriterView::Error(diagnosticMessage, QUrl::fromLocalFile(doc->fileName())));
+        if (view()->checkSemanticErrors()) {
+            Check check(doc, snapshot, m_lookupContext->context());
+            check.setOptions(check.options() & ~Check::ErrCheckTypeErrors);
+            foreach (const QmlJS::DiagnosticMessage &diagnosticMessage, check())
+                if (diagnosticMessage.isError())
+                    errors.append(RewriterView::Error(diagnosticMessage, QUrl::fromLocalFile(doc->fileName())));
 
-        if (!errors.isEmpty()) {
-            m_rewriterView->setErrors(errors);
-            setActive(false);
-            return false;
+            if (!errors.isEmpty()) {
+                m_rewriterView->setErrors(errors);
+                setActive(false);
+                return false;
+            }
         }
 
         setupImports(doc, differenceHandler);
@@ -725,6 +728,8 @@ void TextToModelMerger::syncNode(ModelNode &modelNode,
     int majorVersion;
     int minorVersion;
     context->lookup(astObjectType, typeName, majorVersion, minorVersion, defaultPropertyName);
+    if (defaultPropertyName.isEmpty()) //fallback and use the meta system of the model
+        defaultPropertyName = modelNode.metaInfo().defaultPropertyName();
 
     if (typeName.isEmpty()) {
         qWarning() << "Skipping node with unknown type" << flatten(astObjectType);
diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp
index a8953d764de633cf127df32e4bfa7634c4cc8600..ac49825e60af5a8bdfa1cb1bda8ffc7f02f5fe71 100644
--- a/src/plugins/qmlprojectmanager/qmlproject.cpp
+++ b/src/plugins/qmlprojectmanager/qmlproject.cpp
@@ -108,7 +108,7 @@ void QmlProject::parseProject(RefreshOptions options)
                     messageManager->printToOutputPane(component->errorString(), true);
                 }
             } else {
-                messageManager->printToOutputPane(tr("Error while loading `project file %1.").arg(m_fileName), true);
+                messageManager->printToOutputPane(tr("Error while loading project file %1.").arg(m_fileName), true);
             }
         }
         if (m_projectItem) {
diff --git a/src/plugins/qt4projectmanager/debugginghelper.ui b/src/plugins/qt4projectmanager/debugginghelper.ui
index d890e3e0a6b3941a5dff5612ba10623b1bb2e13b..7f0de1c71866687c622d86a2a9203276cdcd146e 100644
--- a/src/plugins/qt4projectmanager/debugginghelper.ui
+++ b/src/plugins/qt4projectmanager/debugginghelper.ui
@@ -127,10 +127,10 @@
      <item row="4" column="0">
       <widget class="QLabel" name="gdbHelperLabel">
        <property name="toolTip">
-        <string>Helps showing content of Qt types. Only used in older versions of gdb.</string>
+        <string>Helps showing content of Qt types. Only used in older versions of GDB.</string>
        </property>
        <property name="text">
-        <string>Gdb Helper:</string>
+        <string>GDB Helper:</string>
        </property>
       </widget>
      </item>
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoconfigtestdialog.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoconfigtestdialog.cpp
index 1b64298b08744b33bbacb1c0a40eb1af5aeceb0e..771d5edf80b811c643813d04270d1d61221c3a17 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemoconfigtestdialog.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemoconfigtestdialog.cpp
@@ -173,9 +173,15 @@ void MaemoConfigTestDialog::handleMadDeveloperTestResult(int exitStatus)
         m_ui->testResultEdit->setPlainText(tr("Remote process failed: %1")
             .arg(m_testProcessRunner->process()->errorString()));
     } else if (m_testProcessRunner->process()->exitCode() != 0) {
-        m_ui->errorLabel->setText(m_ui->errorLabel->text()
-            + QLatin1String("<br>") + tr("Mad Developer is not installed.<br>"
-                  "You will not be able to deploy to this device."));
+        QString errorMsg = m_ui->errorLabel->text() + QLatin1String("<br>")
+            + tr("%1 is not installed.<br>You will not be able to deploy "
+                 "to this device.")
+                .arg(MaemoGlobal::madDeveloperUiName(m_config->osVersion()));
+        if (m_config->osVersion() == MaemoGlobal::Maemo6) {
+            errorMsg += QLatin1String("<br>")
+                + tr("Please switch the device to developer mode via Settings -> Security.");
+        }
+        m_ui->errorLabel->setText(errorMsg);
     }
     testPorts();
 }
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
deleted file mode 100644
index 6813e33143fa6c2d3b06314f51579096e7490131..0000000000000000000000000000000000000000
--- a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
+++ /dev/null
@@ -1,782 +0,0 @@
-/**************************************************************************
-**
-** This file is part of Qt Creator
-**
-** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** No Commercial Usage
-**
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-**
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**************************************************************************/
-
-#include "maemodeploystep.h"
-
-#include "maemoconstants.h"
-#include "maemodeploymentmounter.h"
-#include "maemodeploystepwidget.h"
-#include "maemoglobal.h"
-#include "maemopackagecreationstep.h"
-#include "maemopackageinstaller.h"
-#include "maemopackageuploader.h"
-#include "maemopertargetdeviceconfigurationlistmodel.h"
-#include "maemoqemumanager.h"
-#include "maemoremotecopyfacility.h"
-#include "maemorunconfiguration.h"
-#include "maemotoolchain.h"
-#include "qt4maemodeployconfiguration.h"
-#include "qt4maemotarget.h"
-
-#include <utils/ssh/sshconnection.h>
-#include <utils/ssh/sshremoteprocess.h>
-
-#include <projectexplorer/buildconfiguration.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/target.h>
-
-#include <qt4projectmanager/qt4buildconfiguration.h>
-#include <qt4projectmanager/qt4projectmanagerconstants.h>
-#include <qt4projectmanager/qt4target.h>
-
-#include <utils/ssh/sshconnectionmanager.h>
-
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtCore/QEventLoop>
-#include <QtCore/QFileInfo>
-#include <QtCore/QTimer>
-
-#define ASSERT_STATE(state) ASSERT_STATE_GENERIC(State, state, m_state)
-
-using namespace Core;
-using namespace Utils;
-using namespace ProjectExplorer;
-
-namespace Qt4ProjectManager {
-namespace Internal {
-
-const QLatin1String MaemoDeployStep::Id("Qt4ProjectManager.MaemoDeployStep");
-
-MaemoDeployStep::MaemoDeployStep(ProjectExplorer::BuildStepList *parent)
-    : BuildStep(parent, Id)
-{
-    ctor();
-}
-
-MaemoDeployStep::MaemoDeployStep(ProjectExplorer::BuildStepList *parent,
-    MaemoDeployStep *other)
-    : BuildStep(parent, other), m_lastDeployed(other->m_lastDeployed)
-{
-    ctor();
-}
-
-MaemoDeployStep::~MaemoDeployStep() { }
-
-void MaemoDeployStep::ctor()
-{
-    //: MaemoDeployStep default display name
-    if (target()->id() == QLatin1String(Constants::MAEMO5_DEVICE_TARGET_ID))
-        setDefaultDisplayName(tr("Deploy to Maemo5 device"));
-    else if (target()->id() == QLatin1String(Constants::HARMATTAN_DEVICE_TARGET_ID))
-        setDefaultDisplayName(tr("Deploy to Harmattan device"));
-    else if (target()->id() == QLatin1String(Constants::MEEGO_DEVICE_TARGET_ID))
-        setDefaultDisplayName(tr("Deploy to Meego device"));
-
-    m_state = Inactive;
-    m_deviceConfig = maemotarget()->deviceConfigurationsModel()->defaultDeviceConfig();
-    m_needsInstall = false;
-
-    m_mounter = new MaemoDeploymentMounter(this);
-    connect(m_mounter, SIGNAL(setupDone()), this, SLOT(handleMounted()));
-    connect(m_mounter, SIGNAL(tearDownDone()), this, SLOT(handleUnmounted()));
-    connect(m_mounter, SIGNAL(error(QString)), this,
-        SLOT(handleMountError(QString)));
-    connect(m_mounter, SIGNAL(reportProgress(QString)), this,
-        SLOT(handleProgressReport(QString)));
-    connect(m_mounter, SIGNAL(debugOutput(QString)), this,
-        SLOT(handleMountDebugOutput(QString)));
-
-    m_uploader = new MaemoPackageUploader(this);
-    connect(m_uploader, SIGNAL(progress(QString)),
-        SLOT(handleProgressReport(QString)));
-    connect(m_uploader, SIGNAL(uploadFinished(QString)),
-        SLOT(handleUploadFinished(QString)));
-
-    if (qobject_cast<AbstractDebBasedQt4MaemoTarget *>(target()))
-        m_installer = new MaemoDebianPackageInstaller(this);
-    else
-        m_installer = new MaemoRpmPackageInstaller(this);
-    connect(m_installer, SIGNAL(stdout(QString)),
-        SLOT(handleRemoteStdout(QString)));
-    connect(m_installer, SIGNAL(stderr(QString)),
-        SLOT(handleRemoteStderr(QString)));
-    connect(m_installer, SIGNAL(finished(QString)),
-        SLOT(handleInstallationFinished(QString)));
-
-    m_copyFacility = new MaemoRemoteCopyFacility(this);
-    connect(m_copyFacility, SIGNAL(stdout(QString)),
-        SLOT(handleRemoteStdout(QString)));
-    connect(m_copyFacility, SIGNAL(stderr(QString)),
-        SLOT(handleRemoteStderr(QString)));
-    connect(m_copyFacility, SIGNAL(progress(QString)),
-        SLOT(handleProgressReport(QString)));
-    connect(m_copyFacility, SIGNAL(fileCopied(MaemoDeployable)),
-        SLOT(handleFileCopied(MaemoDeployable)));
-    connect(m_copyFacility, SIGNAL(finished(QString)),
-        SLOT(handleCopyingFinished(QString)));
-
-    connect(maemotarget()->deviceConfigurationsModel(), SIGNAL(updated()),
-        SLOT(handleDeviceConfigurationsUpdated()));
-}
-
-bool MaemoDeployStep::init()
-{
-    return true;
-}
-
-void MaemoDeployStep::run(QFutureInterface<bool> &fi)
-{
-    // Move to GUI thread.
-    QTimer::singleShot(0, this, SLOT(start()));
-
-    MaemoDeployEventHandler eventHandler(this, fi);
-}
-
-BuildStepConfigWidget *MaemoDeployStep::createConfigWidget()
-{
-    return new MaemoDeployStepWidget(this);
-}
-
-QVariantMap MaemoDeployStep::toMap() const
-{
-    QVariantMap map(BuildStep::toMap());
-    addDeployTimesToMap(map);
-    map.insert(DeviceIdKey,
-        MaemoDeviceConfigurations::instance()->internalId(m_deviceConfig));
-    return map;
-}
-
-void MaemoDeployStep::addDeployTimesToMap(QVariantMap &map) const
-{
-    QVariantList hostList;
-    QVariantList fileList;
-    QVariantList remotePathList;
-    QVariantList timeList;
-    typedef QHash<DeployablePerHost, QDateTime>::ConstIterator DepIt;
-    for (DepIt it = m_lastDeployed.begin(); it != m_lastDeployed.end(); ++it) {
-        fileList << it.key().first.localFilePath;
-        remotePathList << it.key().first.remoteDir;
-        hostList << it.key().second;
-        timeList << it.value();
-    }
-    map.insert(LastDeployedHostsKey, hostList);
-    map.insert(LastDeployedFilesKey, fileList);
-    map.insert(LastDeployedRemotePathsKey, remotePathList);
-    map.insert(LastDeployedTimesKey, timeList);
-}
-
-bool MaemoDeployStep::fromMap(const QVariantMap &map)
-{
-    if (!BuildStep::fromMap(map))
-        return false;
-    getDeployTimesFromMap(map);
-    setDeviceConfig(map.value(DeviceIdKey, MaemoDeviceConfig::InvalidId).toULongLong());
-    return true;
-}
-
-void MaemoDeployStep::getDeployTimesFromMap(const QVariantMap &map)
-{
-    const QVariantList &hostList = map.value(LastDeployedHostsKey).toList();
-    const QVariantList &fileList = map.value(LastDeployedFilesKey).toList();
-    const QVariantList &remotePathList
-        = map.value(LastDeployedRemotePathsKey).toList();
-    const QVariantList &timeList = map.value(LastDeployedTimesKey).toList();
-    const int elemCount
-        = qMin(qMin(hostList.size(), fileList.size()),
-            qMin(remotePathList.size(), timeList.size()));
-    for (int i = 0; i < elemCount; ++i) {
-        const MaemoDeployable d(fileList.at(i).toString(),
-            remotePathList.at(i).toString());
-        m_lastDeployed.insert(DeployablePerHost(d, hostList.at(i).toString()),
-            timeList.at(i).toDateTime());
-    }
-}
-
-const AbstractMaemoPackageCreationStep *MaemoDeployStep::packagingStep() const
-{
-    return MaemoGlobal::earlierBuildStep<AbstractMaemoPackageCreationStep>(maemoDeployConfig());
-}
-
-void MaemoDeployStep::raiseError(const QString &errorString)
-{
-    emit addTask(Task(Task::Error, errorString, QString(), -1,
-        ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
-    m_hasError = true;
-    emit error();
-}
-
-void MaemoDeployStep::writeOutput(const QString &text, OutputFormat format)
-{
-    emit addOutput(text, format);
-}
-
-void MaemoDeployStep::stop()
-{
-    if (m_state == StopRequested || m_state == Inactive)
-        return;
-
-    const State oldState = m_state;
-    setState(StopRequested);
-    switch (oldState) {
-    case Connecting:
-        m_connection->disconnectFromHost();
-        setState(Inactive);
-        break;
-    case Installing:
-        m_installer->cancelInstallation();
-        setState(Inactive);
-        break;
-    case Copying:
-        m_copyFacility->cancel();
-        setState(Inactive);
-        break;
-    case Uploading:
-        m_uploader->cancelUpload();
-        setState(Inactive);
-        break;
-    case Mounting:
-    case Unmounting:
-        break; // Nothing to do here.
-    default:
-        qFatal("Missing switch case in %s.", Q_FUNC_INFO);
-    }
-}
-
-QString MaemoDeployStep::uploadDir() const
-{
-    return MaemoGlobal::homeDirOnDevice(m_connection->connectionParameters().userName);
-}
-
-bool MaemoDeployStep::currentlyNeedsDeployment(const QString &host,
-    const MaemoDeployable &deployable) const
-{
-    const QDateTime &lastDeployed
-        = m_lastDeployed.value(DeployablePerHost(deployable, host));
-    return !lastDeployed.isValid()
-        || QFileInfo(deployable.localFilePath).lastModified() > lastDeployed;
-}
-
-void MaemoDeployStep::setDeployed(const QString &host,
-    const MaemoDeployable &deployable)
-{
-    m_lastDeployed.insert(DeployablePerHost(deployable, host),
-        QDateTime::currentDateTime());
-}
-
-void MaemoDeployStep::handleDeviceConfigurationsUpdated()
-{
-    setDeviceConfig(MaemoDeviceConfigurations::instance()->internalId(m_deviceConfig));
-}
-
-void MaemoDeployStep::setDeviceConfig(MaemoDeviceConfig::Id internalId)
-{
-    m_deviceConfig = maemotarget()->deviceConfigurationsModel()->find(internalId);
-    emit deviceConfigChanged();
-}
-
-void MaemoDeployStep::setDeviceConfig(int i)
-{
-    m_deviceConfig = maemotarget()->deviceConfigurationsModel()->deviceAt(i);
-    emit deviceConfigChanged();
-}
-
-void MaemoDeployStep::start()
-{
-    if (m_state != Inactive) {
-        raiseError(tr("Cannot deploy: Still cleaning up from last time."));
-        emit done();
-        return;
-    }
-
-    m_cachedDeviceConfig = m_deviceConfig;
-    if (!m_cachedDeviceConfig) {
-        raiseError(tr("Deployment failed: No valid device set."));
-        emit done();
-        return;
-    }
-
-    Q_ASSERT(!m_needsInstall);
-    Q_ASSERT(m_filesToCopy.isEmpty());
-    m_hasError = false;
-    const AbstractMaemoPackageCreationStep * const pStep = packagingStep();
-    const QString hostName = m_cachedDeviceConfig->sshParameters().host;
-    if (pStep) {
-        const MaemoDeployable d(pStep->packageFilePath(), QString());
-        if (currentlyNeedsDeployment(hostName, d))
-            m_needsInstall = true;
-    } else {
-        const QSharedPointer<MaemoDeployables> deployables
-            = maemoDeployConfig()->deployables();
-        const int deployableCount = deployables->deployableCount();
-        for (int i = 0; i < deployableCount; ++i) {
-            const MaemoDeployable &d = deployables->deployableAt(i);
-            if (currentlyNeedsDeployment(hostName, d))
-                m_filesToCopy << d;
-        }
-    }
-
-    if (m_needsInstall || !m_filesToCopy.isEmpty()) {
-        if (m_cachedDeviceConfig->type() == MaemoDeviceConfig::Emulator
-                && !MaemoQemuManager::instance().qemuIsRunning()) {
-            MaemoQemuManager::instance().startRuntime();
-            raiseError(tr("Deployment failed: Qemu was not running. "
-                "It has now been started up for you, but it will take "
-                "a bit of time until it is ready."));
-            m_needsInstall = false;
-            m_filesToCopy.clear();
-            emit done();
-            return;
-        }
-
-        connectToDevice();
-    } else {
-        writeOutput(tr("All files up to date, no installation necessary."));
-        emit done();
-    }
-}
-
-void MaemoDeployStep::handleConnectionFailure()
-{
-    if (m_state == Inactive)
-        return;
-
-    const QString errorMsg = m_state == Connecting
-        ? MaemoGlobal::failedToConnectToServerMessage(m_connection, m_cachedDeviceConfig)
-        : tr("Connection error: %1").arg(m_connection->errorString());
-    raiseError(errorMsg);
-    setState(Inactive);
-}
-
-void MaemoDeployStep::handleUploadFinished(const QString &errorMsg)
-{
-    ASSERT_STATE(QList<State>() << Uploading << StopRequested);
-    if (m_state == StopRequested)
-        return;
-
-    if (!errorMsg.isEmpty()) {
-        raiseError(errorMsg);
-        setState(Inactive);
-    } else {
-        writeOutput(tr("Successfully uploaded package file."));
-        const QString remoteFilePath = uploadDir() + QLatin1Char('/')
-            + QFileInfo(packagingStep()->packageFilePath()).fileName();
-        runPackageInstaller(remoteFilePath);
-    }
-}
-
-void MaemoDeployStep::handleMounted()
-{
-    ASSERT_STATE(QList<State>() << Mounting << StopRequested << Inactive);
-
-    switch (m_state) {
-    case Mounting:
-        if (m_needsInstall) {
-            const QString remoteFilePath = deployMountPoint() + QLatin1Char('/')
-                + QFileInfo(packagingStep()->packageFilePath()).fileName();
-            runPackageInstaller(remoteFilePath);
-        } else {
-            setState(Copying);
-            m_copyFacility->copyFiles(m_connection, m_filesToCopy,
-                deployMountPoint());
-        }
-        break;
-    case StopRequested:
-        m_mounter->tearDownMounts();
-        break;
-    case Inactive:
-    default:
-        break;
-    }
-}
-
-void MaemoDeployStep::handleUnmounted()
-{
-    ASSERT_STATE(QList<State>() << Unmounting << StopRequested << Inactive);
-
-    switch (m_state) {
-    case StopRequested:
-        setState(Inactive);
-        break;
-    case Unmounting:
-        setDeploymentFinished();
-        break;
-    case Inactive:
-    default:
-        break;
-    }
-}
-
-void MaemoDeployStep::handleMountError(const QString &errorMsg)
-{
-    ASSERT_STATE(QList<State>() << Mounting << Unmounting << StopRequested
-        << Inactive);
-
-    switch (m_state) {
-    case Mounting:
-    case Unmounting:
-    case StopRequested:
-        raiseError(errorMsg);
-        setState(Inactive);
-        break;
-    case Inactive:
-    default:
-        break;
-    }
-}
-
-void MaemoDeployStep::handleMountDebugOutput(const QString &output)
-{
-    ASSERT_STATE(QList<State>() << Mounting << Unmounting << StopRequested
-        << Inactive);
-
-    switch (m_state) {
-    case Mounting:
-    case Unmounting:
-    case StopRequested:
-        writeOutput(output, ErrorOutput);
-        break;
-    case Inactive:
-    default:
-        break;
-    }
-}
-
-void MaemoDeployStep::mount()
-{
-    ASSERT_STATE(Connecting);
-    setState(Mounting);
-
-    Q_ASSERT(m_needsInstall || !m_filesToCopy.isEmpty());
-    QList<MaemoMountSpecification> mountSpecs;
-    if (m_needsInstall) {
-        const QString localDir
-            = QFileInfo(packagingStep()->packageFilePath()).absolutePath();
-        mountSpecs << MaemoMountSpecification(localDir, deployMountPoint());
-    } else {
-#ifdef Q_OS_WIN
-        bool drivesToMount[26];
-        qFill(drivesToMount, drivesToMount + sizeof drivesToMount / sizeof drivesToMount[0], false);
-        for (int i = 0; i < m_filesToCopy.count(); ++i) {
-            const QString localDir
-                = QFileInfo(m_filesToCopy.at(i).localFilePath).canonicalPath();
-            const char driveLetter = localDir.at(0).toLower().toLatin1();
-            if (driveLetter < 'a' || driveLetter > 'z') {
-                qWarning("Weird: drive letter is '%c'.", driveLetter);
-                continue;
-            }
-
-            const int index = driveLetter - 'a';
-            if (drivesToMount[index])
-                continue;
-
-            const QString mountPoint = deployMountPoint() + QLatin1Char('/')
-                + QLatin1Char(driveLetter);
-            const MaemoMountSpecification mountSpec(localDir.left(3),
-                mountPoint);
-            mountSpecs << mountSpec;
-            drivesToMount[index] = true;
-        }
-#else
-        mountSpecs << MaemoMountSpecification(QLatin1String("/"),
-            deployMountPoint());
-#endif
-    }
-    m_mounter->setupMounts(m_connection, mountSpecs, freePorts(),
-        qt4BuildConfiguration());
-}
-
-void MaemoDeployStep::upload()
-{
-    writeOutput(tr(""));
-    setState(Uploading);
-    const QString localFilePath = packagingStep()->packageFilePath();
-    const QString fileName = QFileInfo(localFilePath).fileName();
-    const QString remoteFilePath = uploadDir() + QLatin1Char('/') + fileName;
-    m_uploader->uploadPackage(m_connection, localFilePath, remoteFilePath);
-}
-
-void MaemoDeployStep::connectToDevice()
-{
-    ASSERT_STATE(QList<State>() << Inactive);
-    setState(Connecting);
-
-    m_connection = SshConnectionManager::instance().acquireConnection(m_cachedDeviceConfig->sshParameters());
-    const bool canReUse = m_connection->state() == SshConnection::Connected
-        && m_connection->connectionParameters() == m_cachedDeviceConfig->sshParameters();
-    connect(m_connection.data(), SIGNAL(connected()), this,
-        SLOT(handleConnected()));
-    connect(m_connection.data(), SIGNAL(error(Utils::SshError)), this,
-        SLOT(handleConnectionFailure()));
-    if (canReUse) {
-        handleConnected();
-    } else {
-        writeOutput(tr("Connecting to device..."));
-        m_connection->connectToHost();
-    }
-}
-
-void MaemoDeployStep::handleConnected()
-{
-    ASSERT_STATE(QList<State>() << Connecting << StopRequested);
-
-    if (m_state == Connecting) {
-        if (maemotarget()->allowsRemoteMounts())
-            mount();
-        else
-            upload();
-    }
-}
-
-void MaemoDeployStep::runPackageInstaller(const QString &packageFilePath)
-{
-    ASSERT_STATE(QList<State>() << Mounting << Uploading);
-    setState(Installing);
-
-    writeOutput(tr("Installing package to device..."));
-    m_installer->installPackage(m_connection, packageFilePath,
-        m_state == Uploading);
-}
-
-void MaemoDeployStep::handleProgressReport(const QString &progressMsg)
-{
-    ASSERT_STATE(QList<State>() << Mounting << Unmounting << Uploading
-        << Copying << StopRequested << Inactive);
-
-    switch (m_state) {
-    case Mounting:
-    case Unmounting:
-    case Uploading:
-    case Copying:
-    case StopRequested:
-        writeOutput(progressMsg);
-        break;
-    case Inactive:
-    default:
-        break;
-    }
-}
-
-void MaemoDeployStep::handleFileCopied(const MaemoDeployable &deployable)
-{
-    setDeployed(m_connection->connectionParameters().host, deployable);
-}
-
-void MaemoDeployStep::handleCopyingFinished(const QString &errorMsg)
-{
-    ASSERT_STATE(QList<State>() << Copying << StopRequested << Inactive);
-
-    switch (m_state) {
-    case Copying:
-        if (!errorMsg.isEmpty())
-            raiseError(errorMsg);
-        else
-            writeOutput(tr("All files copied."));
-        setState(Unmounting);
-        m_mounter->tearDownMounts();
-        break;
-    case StopRequested:
-        m_mounter->tearDownMounts();
-        break;
-    case Inactive:
-    default:
-        break;
-    }
-}
-
-QString MaemoDeployStep::deployMountPoint() const
-{
-    return MaemoGlobal::homeDirOnDevice(m_cachedDeviceConfig->sshParameters().userName)
-        + QLatin1String("/deployMountPoint_") + target()->project()->displayName();
-}
-
-const MaemoToolChain *MaemoDeployStep::toolChain() const
-{
-    return static_cast<MaemoToolChain *>(qt4BuildConfiguration()->toolChain());
-}
-
-const AbstractQt4MaemoTarget *MaemoDeployStep::maemotarget() const
-{
-    return static_cast<AbstractQt4MaemoTarget *>(qt4BuildConfiguration()->target());
-}
-
-void MaemoDeployStep::handleInstallationFinished(const QString &errorMsg)
-{
-    ASSERT_STATE(QList<State>() << Installing << StopRequested << Inactive);
-
-    switch (m_state) {
-    case Installing:
-        if (errorMsg.isEmpty()) {
-            m_needsInstall = false;
-            setDeployed(m_connection->connectionParameters().host,
-                MaemoDeployable(packagingStep()->packageFilePath(), QString()));
-            writeOutput(tr("Package installed."));
-        } else {
-            raiseError(errorMsg);
-        }
-        if (maemotarget()->allowsRemoteMounts()) {
-            setState(Unmounting);
-            m_mounter->tearDownMounts();
-        } else {
-            setDeploymentFinished();
-        }
-        break;
-    case StopRequested:
-        if (maemotarget()->allowsRemoteMounts()) {
-            setState(Unmounting);
-            m_mounter->tearDownMounts();
-        } else {
-            setDeploymentFinished();
-        }
-        break;
-    case Inactive:
-    default:
-        break;
-    }
-}
-
-void MaemoDeployStep::setDeploymentFinished()
-{
-    if (m_hasError)
-        writeOutput(tr("Deployment failed."), ErrorMessageOutput);
-    else
-        writeOutput(tr("Deployment finished."));
-    setState(Inactive);
-}
-
-void MaemoDeployStep::setState(State newState)
-{
-    if (newState == m_state)
-        return;
-    m_state = newState;
-    if (m_state == Inactive) {
-        m_needsInstall = false;
-        m_filesToCopy.clear();
-        if (m_connection) {
-            disconnect(m_connection.data(), 0, this, 0);
-            SshConnectionManager::instance().releaseConnection(m_connection);
-        }
-        emit done();
-    }
-}
-
-void MaemoDeployStep::handleRemoteStdout(const QString &output)
-{
-    ASSERT_STATE(QList<State>() << Installing << Copying << StopRequested);
-
-    switch (m_state) {
-    case Installing:
-    case Copying:
-    case StopRequested:
-        writeOutput(output, NormalOutput);
-        break;
-    default:
-        break;
-    }
-}
-
-void MaemoDeployStep::handleRemoteStderr(const QString &output)
-{
-    ASSERT_STATE(QList<State>() << Installing << Copying << StopRequested);
-
-    switch (m_state) {
-    case Installing:
-    case Copying:
-    case StopRequested:
-        writeOutput(output, ErrorOutput);
-        break;
-    default:
-        break;
-    }
-}
-
-MaemoPortList MaemoDeployStep::freePorts() const
-{
-    const Qt4BuildConfiguration * const qt4bc = qt4BuildConfiguration();
-    const MaemoDeviceConfig::ConstPtr &devConf
-        = m_cachedDeviceConfig ? m_cachedDeviceConfig : m_deviceConfig;
-    if (!devConf)
-        return MaemoPortList();
-    if (devConf->type() == MaemoDeviceConfig::Emulator && qt4bc) {
-        MaemoQemuRuntime rt;
-        const int id = qt4bc->qtVersion()->uniqueId();
-        if (MaemoQemuManager::instance().runtimeForQtVersion(id, &rt))
-            return rt.m_freePorts;
-    }
-    return devConf->freePorts();
-}
-
-const Qt4BuildConfiguration *MaemoDeployStep::qt4BuildConfiguration() const
-{
-    return static_cast<Qt4BuildConfiguration *>(buildConfiguration());
-}
-
-Qt4MaemoDeployConfiguration *MaemoDeployStep::maemoDeployConfig() const
-{
-    return qobject_cast<Qt4MaemoDeployConfiguration *>(deployConfiguration());
-}
-
-MaemoDeployEventHandler::MaemoDeployEventHandler(MaemoDeployStep *deployStep,
-    QFutureInterface<bool> &future)
-    : m_deployStep(deployStep), m_future(future), m_eventLoop(new QEventLoop),
-      m_error(false)
-{
-    connect(m_deployStep, SIGNAL(done()), this, SLOT(handleDeployingDone()));
-    connect(m_deployStep, SIGNAL(error()), this, SLOT(handleDeployingFailed()));
-    QTimer cancelChecker;
-    connect(&cancelChecker, SIGNAL(timeout()), this, SLOT(checkForCanceled()));
-    cancelChecker.start(500);
-    future.reportResult(m_eventLoop->exec() == 0);
-}
-
-void MaemoDeployEventHandler::handleDeployingDone()
-{
-    m_eventLoop->exit(m_error ? 1 : 0);
-}
-
-void MaemoDeployEventHandler::handleDeployingFailed()
-{
-    m_error = true;
-}
-
-void MaemoDeployEventHandler::checkForCanceled()
-{
-    if (!m_error && m_future.isCanceled()) {
-        QMetaObject::invokeMethod(m_deployStep, "stop");
-        m_error = true;
-        handleDeployingDone();
-    }
-}
-
-} // namespace Internal
-} // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystepwidget.ui b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystepwidget.ui
index e48d8fa1544ee10958c04d18d8e812cfeb3e6de7..a724ba6ad6a9230fb62644dae686fd6e381e2558 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemodeploystepwidget.ui
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeploystepwidget.ui
@@ -33,7 +33,7 @@
      <item>
       <widget class="QLabel" name="manageDevConfsLabel">
        <property name="text">
-        <string>&lt;a href=irrelevant&gt;Manage device configurations&lt;/a&gt;</string>
+        <string>&lt;a href=&quot;irrelevant&quot;&gt;Manage device configurations&lt;/a&gt;</string>
        </property>
       </widget>
      </item>
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.cpp
index 14eb944ce9cfa2177e41bfb312b83b7615edf229..839df6108f4346e36dcf33756c14618d16c87ed1 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurationssettingswidget.cpp
@@ -181,7 +181,8 @@ void MaemoDeviceConfigurationsSettingsWidget::addConfig()
         wizard.createDeviceConfig();
         m_ui->removeConfigButton->setEnabled(true);
         m_ui->configurationComboBox->setCurrentIndex(m_ui->configurationComboBox->count()-1);
-        testConfig();
+        if (currentConfig()->type() != MaemoDeviceConfig::Emulator)
+            testConfig();
     }
 }
 
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigwizard.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigwizard.cpp
index 01a49f5143738855d4e74e93ab2d8b9119a9f765..ea83cc39950f904bbdc4ddfc0dd9f92d2c6dc8c0 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigwizard.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigwizard.cpp
@@ -356,8 +356,6 @@ public:
         m_ui->setupUi(this);
         setTitle(tr("Key Creation"));
         setSubTitle(QLatin1String(" ")); // For Qt bug (background color)
-        connect(m_ui->keyDirPathChooser, SIGNAL(changed(QString)),
-            SLOT(enableOrDisableButton()));
         connect(m_ui->createKeysButton, SIGNAL(clicked()), SLOT(createKeys()));
     }
 
@@ -381,20 +379,20 @@ public:
     virtual bool isComplete() const { return m_isComplete; }
 
 private:
-    Q_SLOT void enableOrDisableButton()
-    {
-        m_ui->createKeysButton->setEnabled(m_ui->keyDirPathChooser->isValid());
-    }
 
     Q_SLOT void createKeys()
     {
         const QString &dirPath = m_ui->keyDirPathChooser->path();
-        QDir dir(dirPath);
-        QDir parentDir = QDir(dirPath + QLatin1String("/.."));
-        if ((!dir.exists() && !parentDir.mkdir(dir.dirName()))
-                || !QFileInfo(dirPath).isWritable()) {
+        QFileInfo fi(dirPath);
+        if (fi.exists() && !fi.isDir()) {
             QMessageBox::critical(this, tr("Cannot Create Keys"),
-                tr("You have not entered a writable directory."));
+                tr("The path you have entered is not a directory."));
+            return;
+        }
+        if (!fi.exists() && !QDir::root().mkpath(dirPath)) {
+            QMessageBox::critical(this, tr("Cannot Create Keys"),
+                tr("The directory you have entered does not exist and "
+                   "cannot be created."));
             return;
         }
 
@@ -438,7 +436,7 @@ private:
     void enableInput()
     {
         m_ui->keyDirPathChooser->setEnabled(true);
-        enableOrDisableButton();
+        m_ui->createKeysButton->setEnabled(true);
         m_ui->statusLabel->clear();
     }
 
@@ -458,6 +456,7 @@ public:
               m_keyDeployer(new MaemoKeyDeployer(this))
     {
         m_ui->setupUi(this);
+        m_instructionTextTemplate = m_ui->instructionLabel->text();
         setTitle(tr("Key Deployment"));
         setSubTitle(QLatin1String(" ")); // For Qt bug (background color)
         connect(m_ui->deviceAddressLineEdit, SIGNAL(textChanged(QString)),
@@ -475,6 +474,9 @@ public:
     {
         m_isComplete = false;
         m_ui->deviceAddressLineEdit->setText(m_wizardData.hostName);
+        m_ui->instructionLabel->setText(QString(m_instructionTextTemplate)
+            .replace(QLatin1String("%%%maddev%%%"),
+                MaemoGlobal::madDeveloperUiName(m_wizardData.osVersion)));
         m_ui->passwordLineEdit->clear();
         enableInput();
     }
@@ -519,7 +521,8 @@ private:
     {
         QMessageBox::information(this, tr("Key Deployment Success"),
             tr("The key was successfully deployed. You may now close "
-               "the \"Mad Developer\" application and continue."));
+               "the \"%1\" application and continue.")
+               .arg(MaemoGlobal::madDeveloperUiName(m_wizardData.osVersion)));
         m_ui->statusLabel->setText(m_ui->statusLabel->text() + tr("Done."));
         m_isComplete = true;
         emit completeChanged();
@@ -542,6 +545,7 @@ private:
     bool m_isComplete;
     const WizardData &m_wizardData;
     MaemoKeyDeployer * const m_keyDeployer;
+    QString m_instructionTextTemplate;
 };
 
 class MaemoDeviceConfigWizardFinalPage : public QWizardPage
@@ -563,14 +567,14 @@ public:
 
     virtual void initializePage()
     {
-        QString infoText = tr("The new device configuration will now be "
-            "created and a test procedure will be run to check whether "
-            "Qt Creator can connect to the device and to provide some "
-            "information about its features.");
-        if (m_wizardData.deviceType == MaemoDeviceConfig::Emulator) {
-            infoText += QLatin1Char('\n')
-                + tr("Please make sure that Qemu is running, otherwise "
-                     "the test will fail.");
+        QString infoText;
+        if (m_wizardData.deviceType == MaemoDeviceConfig::Physical) {
+            infoText = tr("The new device configuration will now be "
+                "created and a test procedure will be run to check whether "
+                "Qt Creator can connect to the device and to provide some "
+                "information about its features.");
+        } else {
+            infoText = tr("The new device configuration will now be created.");
         }
         m_infoLabel->setText(infoText);
     }
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigwizardkeydeploymentpage.ui b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigwizardkeydeploymentpage.ui
index a9eabf26758bbdf620d5059caad12547daba0cf7..ec9069fff55e9632e40324e5dc7abe22335ed965 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigwizardkeydeploymentpage.ui
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigwizardkeydeploymentpage.ui
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>452</width>
-    <height>235</height>
+    <width>470</width>
+    <height>322</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -20,9 +20,9 @@
       <string>To deploy the public key to your device, please execute the following steps:
 &lt;ul&gt;
 &lt;li&gt;Connect the device to your computer (unless you plan to connect via WLAN).&lt;/li&gt;
-&lt;li&gt;On the device, start the &quot;Mad Developer&quot; application.&lt;/li&gt;
-&lt;li&gt;In &quot;Mad Developer&quot;, configure the device's IP address to the one shown below (or edit the field below to match the address you have configured).&lt;/li&gt;
-&lt;li&gt;In &quot;Mad Developer&quot;, press &quot;Developer Password&quot; and enter it in the field below.&lt;/li&gt;
+&lt;li&gt;On the device, start the &quot;%%%maddev%%%&quot; application.&lt;/li&gt;
+&lt;li&gt;In &quot;%%%maddev%%%&quot;, configure the device's IP address to the one shown below (or edit the field below to match the address you have configured).&lt;/li&gt;
+&lt;li&gt;In &quot;%%%maddev%%%&quot;, press &quot;Developer Password&quot; and enter it in the field below.&lt;/li&gt;
 &lt;li&gt;Click &quot;Deploy Key&quot;&lt;/li&gt;
 </string>
      </property>
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
index 7a0df26b3ecbc47cd90e8e3cc3fe98ba0a4ae4a5..6cb6ce87d9746d31a721e012f7cd3dccd3245650 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
@@ -203,6 +203,12 @@ QString MaemoGlobal::madCommand(const QtVersion *qtVersion)
     return maddeRoot(qtVersion) + QLatin1String("/bin/mad");
 }
 
+QString MaemoGlobal::madDeveloperUiName(OsVersion maemoVersion)
+{
+    return maemoVersion == Maemo6
+        ? tr("SDK Connectivity") : tr("Mad Developer");
+}
+
 MaemoGlobal::OsVersion MaemoGlobal::version(const QtVersion *qtVersion)
 {
     const QString &name = targetName(qtVersion);
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
index 1f0bf15163e6389d64ada872306151b0843cb531..8c9d60be879bbb167e0a422224e2832fa76022f5 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
@@ -95,7 +95,9 @@ public:
     static QString targetRoot(const QtVersion *qtVersion);
     static QString targetName(const QtVersion *qtVersion);
     static QString madCommand(const QtVersion *qtVersion);
+    static QString madDeveloperUiName(OsVersion maemoVersion);
     static OsVersion version(const QtVersion *qtVersion);
+
     // TODO: IS this still needed with Qt Version having an Abi?
     static QString architecture(const QtVersion *version);
 
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp
index 53aa0da54e2aeafa5c7cf01168a9abdb4166bae6..cf6cce4d5d212b22b8b9df0dbd8305118226284d 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp
@@ -141,10 +141,12 @@ void AbstractMaemoPackageCreationStep::handleBuildOutput()
     QProcess * const buildProc = qobject_cast<QProcess *>(sender());
     if (!buildProc)
         return;
-    const QByteArray &stdOut = buildProc->readAllStandardOutput();
+    QByteArray stdOut = buildProc->readAllStandardOutput();
+    stdOut.replace('\0', QByteArray()); // Output contains NUL characters.
     if (!stdOut.isEmpty())
         emit addOutput(QString::fromLocal8Bit(stdOut), BuildStep::NormalOutput);
-    const QByteArray &errorOut = buildProc->readAllStandardError();
+    QByteArray errorOut = buildProc->readAllStandardError();
+    errorOut.replace('\0', QByteArray());
     if (!errorOut.isEmpty()) {
         emit addOutput(QString::fromLocal8Bit(errorOut), BuildStep::ErrorOutput);
     }
@@ -504,7 +506,7 @@ void MaemoDebianPackageCreationStep::adaptRulesFile(const QString &rulesFilePath
     if (makeInstallEol == -1)
         return;
     QString desktopFileDir = QFileInfo(rulesFile).dir().path()
-        + QLatin1Char('/') + projectName()
+        + QLatin1Char('/') + maemoTarget()->packageName()
         + QLatin1String("/usr/share/applications/");
     const Qt4BuildConfiguration * const bc = qt4BuildConfiguration();
     const MaemoGlobal::OsVersion version
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp
index b1c0a27605e49760ebb1079d932ae0678e7c63d7..541d50603d0799418c938674e5e0655c1bb3518f 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp
@@ -585,14 +585,17 @@ QStringList MaemoPublisherFremantleFree::findProblems() const
         = qobject_cast<Qt4Maemo5Target *>(m_buildConfig->target());
     const QString &description = target->shortDescription();
     if (description.trimmed().isEmpty()) {
-        problems << tr("The package description is empty.");
+        problems << tr("The package description is empty. You must set one "
+            "in Projects -> Run -> Create Package -> Details.");
     } else if (description.contains(QLatin1String("insert up to"))) {
         problems << tr("The package description is '%1', which is probably "
-                       "not what you want.").arg(description);
+            "not what you want. Please change it in "
+            "Projects -> Run -> Create Package -> Details.").arg(description);
     }
     QString dummy;
     if (target->packageManagerIcon(&dummy).isNull())
-        problems << tr("You have not set an icon for the package manager.");
+        problems << tr("You have not set an icon for the package manager. "
+            "The icon must be set in Projects -> Run -> Create Package -> Details.");
     return problems;
 }
 
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopublishingbuildsettingspagefremantlefree.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopublishingbuildsettingspagefremantlefree.cpp
index 50d55954836d68e44ff533f0b68acd07d97096b9..464345a5e0b4cbce2780bf3ce6675b3f021423eb 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemopublishingbuildsettingspagefremantlefree.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemopublishingbuildsettingspagefremantlefree.cpp
@@ -87,6 +87,11 @@ void MaemoPublishingBuildSettingsPageFremantleFree::collectBuildConfigurations(c
     }
 }
 
+void MaemoPublishingBuildSettingsPageFremantleFree::initializePage()
+{
+    ui->skipUploadCheckBox->setChecked(true);
+}
+
 bool MaemoPublishingBuildSettingsPageFremantleFree::validatePage()
 {
     m_publisher->setBuildConfiguration(m_buildConfigs.at(ui->buildConfigComboBox->currentIndex()));
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopublishingbuildsettingspagefremantlefree.h b/src/plugins/qt4projectmanager/qt-maemo/maemopublishingbuildsettingspagefremantlefree.h
index 42610abbc7c08599557abce93c4fbd748813672e..f7d855e9b1e72a90c33dbc4e6594a1d07784d88a 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemopublishingbuildsettingspagefremantlefree.h
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemopublishingbuildsettingspagefremantlefree.h
@@ -61,6 +61,7 @@ public:
 
 private:
     Q_SLOT void handleNoUploadSettingChanged();
+    virtual void initializePage();
     virtual bool validatePage();
     void collectBuildConfigurations(const ProjectExplorer::Project *project);
     bool skipUpload() const;
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopublishinguploadsettingspagefremantlefree.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemopublishinguploadsettingspagefremantlefree.cpp
index 4e1f32921eec70f9cd855d1d5c9cae816c4e7daf..123b97e79a908b869f30611ff7a661fd3b688db2 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemopublishinguploadsettingspagefremantlefree.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemopublishinguploadsettingspagefremantlefree.cpp
@@ -49,8 +49,30 @@ MaemoPublishingUploadSettingsPageFremantleFree::MaemoPublishingUploadSettingsPag
     ui(new Ui::MaemoPublishingUploadSettingsPageFremantleFree)
 {
     ui->setupUi(this);
+    ui->serverAddressLabel->hide();
+    ui->serverAddressLineEdit->hide();
+    ui->targetDirectoryOnServerLabel->hide();
+    ui->targetDirectoryOnServerLineEdit->hide();
     setTitle(tr("Publishing to Fremantle's \"Extras-devel/free\" Repository"));
     setSubTitle(tr("Upload options"));
+    connect(ui->garageAccountLineEdit, SIGNAL(textChanged(QString)),
+        SIGNAL(completeChanged()));
+    connect(ui->privateKeyPathChooser, SIGNAL(changed(QString)),
+        SIGNAL(completeChanged()));
+    connect(ui->serverAddressLineEdit, SIGNAL(textChanged(QString)),
+        SIGNAL(completeChanged()));
+    connect(ui->targetDirectoryOnServerLineEdit, SIGNAL(textChanged(QString)),
+        SIGNAL(completeChanged()));
+}
+
+MaemoPublishingUploadSettingsPageFremantleFree::~MaemoPublishingUploadSettingsPageFremantleFree()
+{
+    delete ui;
+}
+
+void MaemoPublishingUploadSettingsPageFremantleFree::initializePage()
+{
+    ui->garageAccountLineEdit->clear();
     ui->privateKeyPathChooser->setExpectedKind(Utils::PathChooser::File);
     ui->privateKeyPathChooser->setPromptDialogTitle(tr("Choose a private key file"));
     ui->privateKeyPathChooser->setPath(QDir::toNativeSeparators(QDir::homePath() + QLatin1String("/.ssh/id_rsa")));
@@ -58,16 +80,36 @@ MaemoPublishingUploadSettingsPageFremantleFree::MaemoPublishingUploadSettingsPag
     ui->targetDirectoryOnServerLineEdit->setText(QLatin1String("/var/www/extras-devel/incoming-builder/fremantle/"));
 }
 
-MaemoPublishingUploadSettingsPageFremantleFree::~MaemoPublishingUploadSettingsPageFremantleFree()
+bool MaemoPublishingUploadSettingsPageFremantleFree::isComplete() const
 {
-    delete ui;
+    return !garageAccountName().isEmpty() && !privateKeyFilePath().isEmpty()
+        && !serverName().isEmpty() && !directoryOnServer().isEmpty();
+}
+
+QString MaemoPublishingUploadSettingsPageFremantleFree::garageAccountName() const
+{
+    return ui->garageAccountLineEdit->text().trimmed();
+}
+
+QString MaemoPublishingUploadSettingsPageFremantleFree::privateKeyFilePath() const
+{
+    return ui->privateKeyPathChooser->path();
+}
+
+QString MaemoPublishingUploadSettingsPageFremantleFree::serverName() const
+{
+    return ui->serverAddressLineEdit->text().trimmed();
+}
+
+QString MaemoPublishingUploadSettingsPageFremantleFree::directoryOnServer() const
+{
+    return ui->targetDirectoryOnServerLineEdit->text().trimmed();
 }
 
 bool MaemoPublishingUploadSettingsPageFremantleFree::validatePage()
 {
-    m_publisher->setSshParams(ui->serverAddressLineEdit->text(),
-        ui->garageAccountLineEdit->text(), ui->privateKeyPathChooser->path(),
-        ui->targetDirectoryOnServerLineEdit->text());
+    m_publisher->setSshParams(serverName(), garageAccountName(),
+        privateKeyFilePath(), directoryOnServer());
     return true;
 }
 
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemopublishinguploadsettingspagefremantlefree.h b/src/plugins/qt4projectmanager/qt-maemo/maemopublishinguploadsettingspagefremantlefree.h
index d15a47a600750440e4c92ac65b786982b9c923e9..6f50895438dfcf183557f091be8d8ed1f4b33a67 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemopublishinguploadsettingspagefremantlefree.h
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemopublishinguploadsettingspagefremantlefree.h
@@ -55,8 +55,15 @@ public:
     ~MaemoPublishingUploadSettingsPageFremantleFree();
 
 private:
+    virtual void initializePage();
+    virtual bool isComplete() const;
     virtual bool validatePage();
 
+    QString garageAccountName() const;
+    QString privateKeyFilePath() const;
+    QString serverName() const;
+    QString directoryOnServer() const;
+
     MaemoPublisherFremantleFree * const m_publisher;
     Ui::MaemoPublishingUploadSettingsPageFremantleFree *ui;
 };
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp
index f1fcc7f3e003da97e4b2d18eef8f48ac0df6b356..bb5e43be32770ce8d3e1905f84266b8d4df488cf 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp
@@ -193,7 +193,7 @@ void MaemoRunConfigurationWidget::addDebuggingWidgets(QVBoxLayout *mainLayout)
     QFormLayout *debugLayout = new QFormLayout(debugWidget);
     QHBoxLayout *debugRadioButtonsLayout = new QHBoxLayout;
     debugLayout->addRow(debugRadioButtonsLayout);
-    QRadioButton *gdbButton = new QRadioButton(tr("Use remote gdb"));
+    QRadioButton *gdbButton = new QRadioButton(tr("Use remote GDB"));
     QRadioButton *gdbServerButton = new QRadioButton(tr("Use remote gdbserver"));
     debugRadioButtonsLayout->addWidget(gdbButton);
     debugRadioButtonsLayout->addWidget(gdbServerButton);
@@ -425,7 +425,7 @@ void MaemoRunConfigurationWidget::handleDebuggingTypeChanged(bool useGdb)
 {
     m_runConfiguration->setUseRemoteGdb(useGdb);
     const QString detailsText = useGdb ?
-                tr("<b>Debugging details:</b> Use gdb") :
+                tr("<b>Debugging details:</b> Use GDB") :
                 tr("<b>Debugging details:</b> Use gdbserver");
     m_debugDetailsContainer->setSummaryText(detailsText);
 }
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosettingspages.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemosettingspages.cpp
index 32070694f75f339d94b68829669d8a0738cbcd6f..0a5c97766f54347da0aa4f7c55de56df702759ae 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemosettingspages.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemosettingspages.cpp
@@ -181,20 +181,20 @@ public:
         : m_settingsPage(settingsPage)
     {
         setWindowTitle(tr("Qemu error"));
-        QString message = tr("Qemu crashed.");
+        QString message = tr("Qemu crashed.") + QLatin1String(" <p>");
         const MaemoQemuSettings::OpenGlMode openGlMode
             = MaemoQemuSettings::openGlMode();
-        const QString linkString = QLatin1String("<p><a href=\"dummy\">")
+        const QString linkString = QLatin1String("</p><a href=\"dummy\">")
             + tr("Click here to change the OpenGL mode.")
             + QLatin1String("</a>");
         if (openGlMode == MaemoQemuSettings::HardwareAcceleration) {
-            message += tr("<p>You have configured Qemu to use OpenGL "
+            message += tr("You have configured Qemu to use OpenGL "
                 "hardware acceleration, which might not be supported by "
                 "your system. You could try using software rendering instead.");
             message += linkString;
         } else if (openGlMode == MaemoQemuSettings::AutoDetect) {
-            message += tr("<p>Qemu is currently configured to auto-detect the "
-                "OpenGL mode, which is known to not work in some cases."
+            message += tr("Qemu is currently configured to auto-detect the "
+                "OpenGL mode, which is known to not work in some cases. "
                 "You might want to use software rendering instead.");
             message += linkString;
         }
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemotoolchain.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemotoolchain.cpp
index 1b2687aac537dd4541e10ce0e2077960caf9a0a3..5419a69f418a1517f13e5bc01ca4334423cac8b4 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemotoolchain.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemotoolchain.cpp
@@ -208,7 +208,8 @@ int MaemoToolChain::qtVersionId() const
 
 void MaemoToolChain::updateId()
 {
-    setId(QString::fromLatin1("%1:%2").arg(Constants::MAEMO_TOOLCHAIN_ID).arg(m_qtVersionId));
+    setId(QString::fromLatin1("%1:%2.%3").arg(Constants::MAEMO_TOOLCHAIN_ID)
+          .arg(m_qtVersionId).arg(debuggerCommand()));
 }
 
 // --------------------------------------------------------------------------
@@ -222,9 +223,13 @@ MaemoToolChainConfigWidget::MaemoToolChainConfigWidget(MaemoToolChain *tc) :
     QLabel *label = new QLabel;
     QtVersion *v = QtVersionManager::instance()->version(tc->qtVersionId());
     Q_ASSERT(v);
-    label->setText(tr("MADDE Root: %1<br>Target Root: %2")
-                   .arg(MaemoGlobal::maddeRoot(v))
-                   .arg(MaemoGlobal::targetRoot(v)));
+    label->setText(tr("<html><head/><body><table>"
+                      "<tr><td>Path to MADDE:</td><td>%1</td></tr>"
+                      "<tr><td>Path to MADDE target:</td><td>%2</td></tr>"
+                      "<tr><td>Debugger:</td/><td>%3</td></tr></body></html>")
+                   .arg(QDir::toNativeSeparators(MaemoGlobal::maddeRoot(v)),
+                        QDir::toNativeSeparators(MaemoGlobal::targetRoot(v)),
+                        QDir::toNativeSeparators(tc->debuggerCommand())));
     layout->addWidget(label);
 }
 
@@ -317,6 +322,9 @@ QList<ProjectExplorer::ToolChain *> MaemoToolChainFactory::createToolChainList(c
                 target = "Meego";
             mTc->setDisplayName(tr("%1 GCC (%2)").arg(target).arg(MaemoGlobal::maddeRoot(v)));
             mTc->setCompilerPath(MaemoGlobal::targetRoot(v) + QLatin1String("/bin/gcc"));
+            mTc->setDebuggerCommand(ProjectExplorer::ToolChainManager::instance()->defaultDebugger(v->qtAbis().at(0)));
+            if (mTc->debuggerCommand().isEmpty())
+                mTc->setDebuggerCommand(MaemoGlobal::targetRoot(v) + QLatin1String("/bin/gdb"));
             result.append(mTc);
         }
     }
diff --git a/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp b/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp
index b9cb5921d677a8b3f77a740d5a97ba505c4485c0..b83acfc696cfe71325c20fb27c55a95346c35927 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp
@@ -518,21 +518,39 @@ QString AbstractDebBasedQt4MaemoTarget::packageName() const
 
 bool AbstractDebBasedQt4MaemoTarget::setPackageNameInternal(const QString &packageName)
 {
+    const QString oldPackageName = this->packageName();
+
     if (!setControlFieldValue(NameFieldName, packageName.toUtf8()))
         return false;
     if (!setControlFieldValue("Source", packageName.toUtf8()))
         return false;
-    QSharedPointer<QFile> file
+
+    QSharedPointer<QFile> changelogFile
         = openFile(changeLogFilePath(), QIODevice::ReadWrite, 0);
-    if (!file)
+    if (!changelogFile)
         return false;
-    QString contents = QString::fromUtf8(file->readAll());
+    QString changelogContents = QString::fromUtf8(changelogFile->readAll());
     QRegExp pattern(QLatin1String("[^\\s]+( \\(\\d\\.\\d\\.\\d\\))"));
-    contents.replace(pattern, packageName + QLatin1String("\\1"));
-    if (!file->resize(0))
+    changelogContents.replace(pattern, packageName + QLatin1String("\\1"));
+    if (!changelogFile->resize(0))
+        return false;
+    changelogFile->write(changelogContents.toUtf8());
+
+    QSharedPointer<QFile> rulesFile
+        = openFile(rulesFilePath(), QIODevice::ReadWrite, 0);
+    if (!rulesFile)
+        return false;
+    QByteArray rulesContents = rulesFile->readAll();
+    const QString oldString = QLatin1String("debian/") + oldPackageName;
+    const QString newString = QLatin1String("debian/") + packageName;
+    rulesContents.replace(oldString.toUtf8(), newString.toUtf8());
+    rulesFile->resize(0);
+    rulesFile->write(rulesContents);
+    if (rulesFile->error() != QFile::NoError
+            || changelogFile->error() != QFile::NoError) {
         return false;
-    const QByteArray &baContents = contents.toUtf8();
-    return file->write(baContents) == baContents.count();
+    }
+    return true;
 }
 
 QString AbstractDebBasedQt4MaemoTarget::packageManagerName() const
@@ -600,6 +618,11 @@ QString AbstractDebBasedQt4MaemoTarget::controlFilePath() const
     return debianDirPath() + QLatin1String("/control");
 }
 
+QString AbstractDebBasedQt4MaemoTarget::rulesFilePath() const
+{
+    return debianDirPath() + QLatin1String("/rules");
+}
+
 QByteArray AbstractDebBasedQt4MaemoTarget::controlFileFieldValue(const QString &key,
     bool multiLine) const
 {
@@ -661,6 +684,14 @@ bool AbstractDebBasedQt4MaemoTarget::adaptControlFileField(QByteArray &document,
 
 void AbstractDebBasedQt4MaemoTarget::handleTargetAddedSpecial()
 {
+    if (controlFileFieldValue(IconFieldName, true).isEmpty()) {
+        // Such a file is created by the mobile wizards.
+        const QString iconPath = project()->projectDirectory()
+            + QLatin1Char('/') + project()->displayName()
+            + QLatin1String(".png");
+        if (QFileInfo(iconPath).exists())
+            setPackageManagerIcon(iconPath);
+    }
     m_filesWatcher->addPath(debianDirPath());
     m_filesWatcher->addPath(changeLogFilePath());
     m_filesWatcher->addPath(controlFilePath());
@@ -753,11 +784,10 @@ AbstractQt4MaemoTarget::ActionStatus AbstractDebBasedQt4MaemoTarget::createSpeci
 
 bool AbstractDebBasedQt4MaemoTarget::adaptRulesFile()
 {
-    const QString rulesFilePath = debianDirPath() + "/rules";
-    QFile rulesFile(rulesFilePath);
+    QFile rulesFile(rulesFilePath());
     if (!rulesFile.open(QIODevice::ReadWrite)) {
         raiseError(tr("Packaging Error: Cannot open file '%1'.")
-                   .arg(QDir::toNativeSeparators(rulesFilePath)));
+                   .arg(QDir::toNativeSeparators(rulesFilePath())));
         return false;
     }
     QByteArray rulesContents = rulesFile.readAll();
@@ -777,7 +807,7 @@ bool AbstractDebBasedQt4MaemoTarget::adaptRulesFile()
     rulesFile.close();
     if (rulesFile.error() != QFile::NoError) {
         raiseError(tr("Packaging Error: Cannot write file '%1'.")
-                   .arg(QDir::toNativeSeparators(rulesFilePath)));
+                   .arg(QDir::toNativeSeparators(rulesFilePath())));
         return false;
     }
     return true;
diff --git a/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.h b/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.h
index b2163934f6aecb4fa3cece8e1b6b4712b48f64b2..2159f5d2081599d3b8c076ddb3ea97206f792f81 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.h
+++ b/src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.h
@@ -172,6 +172,7 @@ private:
 
     QString changeLogFilePath() const;
     QString controlFilePath() const;
+    QString rulesFilePath() const;
     QByteArray controlFileFieldValue(const QString &key, bool multiLine) const;
     bool setControlFieldValue(const QByteArray &fieldName,
         const QByteArray &fieldValue);
diff --git a/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp b/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp
index aa888db7710815c46133231d051ffdc3c439cdcf..e38e96420eb470f1c1c3d529a3c36bdf416138fb 100644
--- a/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/gccetoolchain.cpp
@@ -33,6 +33,7 @@
 
 #include "gccetoolchain.h"
 #include "qt4projectmanagerconstants.h"
+#include "qtversionmanager.h"
 
 #include <utils/environment.h>
 #include <utils/synchronousprocess.h>
@@ -149,6 +150,21 @@ QList<ProjectExplorer::ToolChain *> GcceToolChainFactory::autoDetect()
 {
     QList<ProjectExplorer::ToolChain *> result;
 
+    // Compatibility to pre-2.2:
+    while (true) {
+        const QString path = QtVersionManager::instance()->popPendingGcceUpdate();
+        if (path.isNull())
+            break;
+
+        QFileInfo fi(path + QLatin1String("/bin/arm-none-symbianelf-g++.exe"));
+        if (fi.exists() && fi.isExecutable()) {
+            GcceToolChain *tc = new GcceToolChain(false);
+            tc->setCompilerPath(fi.absoluteFilePath());
+            tc->setDisplayName(tr("GCCE from Qt version"));
+            result.append(tc);
+        }
+    }
+
     QString fullPath = Utils::Environment::systemEnvironment().searchInPath(QLatin1String("arm-none-symbianelf-gcc"));
     if (!fullPath.isEmpty()) {
         GcceToolChain *tc = new GcceToolChain(true);
diff --git a/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.cpp b/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.cpp
index aa9c4e86c2a2e00ee28d0609b04a8fcafbd6ac6f..424624014f21da2f519a33ebfc960c67d3cf2c49 100644
--- a/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.cpp
@@ -91,6 +91,19 @@ static Utils::Environment baseEnvironment(RvctToolChain *tc)
     return result;
 }
 
+static QString toString(const RvctToolChain::ArmVersion &v)
+{
+    switch (v)
+    {
+    case RvctToolChain::ARMv5:
+        return QString::fromAscii("armv5");
+    case RvctToolChain::ARMv6:
+        return QString::fromAscii("armv6");
+    default:
+        return QString::fromAscii("unknown");
+    }
+}
+
 // ==========================================================================
 // RvctToolChain
 // ==========================================================================
@@ -349,7 +362,8 @@ bool RvctToolChain::fromMap(const QVariantMap &data)
 
 void RvctToolChain::updateId()
 {
-    setId(QString::fromLatin1("%1:%2").arg(Constants::RVCT_TOOLCHAIN_ID).arg(m_compilerPath));
+    setId(QString::fromLatin1("%1:%2.%3.%4").arg(Constants::RVCT_TOOLCHAIN_ID)
+          .arg(m_compilerPath).arg(toString(m_armVersion)).arg(m_debuggerCommand));
 }
 
 QString RvctToolChain::varName(const QString &postFix) const
@@ -373,6 +387,12 @@ RvctToolChainConfigWidget::RvctToolChainConfigWidget(RvctToolChain *tc) :
     m_ui->environmentView->setModel(m_model);
     m_ui->environmentView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
     m_ui->environmentView->horizontalHeader()->setStretchLastSection(true);
+    m_ui->environmentView->setGridStyle(Qt::NoPen);
+    m_ui->environmentView->horizontalHeader()->setHighlightSections(false);
+    m_ui->environmentView->verticalHeader()->hide();
+    QFontMetrics fm(font());
+    m_ui->environmentView->verticalHeader()->setDefaultSectionSize(qMax(static_cast<int>(fm.height() * 1.2), fm.height() + 4));
+
     connect(m_model, SIGNAL(userChangesChanged()), this, SLOT(emitDirty()));
 
     m_ui->compilerPath->setExpectedKind(Utils::PathChooser::ExistingCommand);
@@ -437,6 +457,20 @@ QList<Utils::EnvironmentItem> RvctToolChainConfigWidget::environmentChanges() co
     return baseEnv.diff(resultEnv);
 }
 
+void RvctToolChainConfigWidget::changeEvent(QEvent *ev)
+{
+    if (ev->type() == QEvent::EnabledChange) {
+        if (isEnabled()) {
+            m_ui->environmentView->horizontalHeader()->setVisible(true);
+            m_ui->environmentView->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
+        } else {
+            m_ui->environmentView->horizontalHeader()->setVisible(false);
+            m_ui->environmentView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+        }
+    }
+    ToolChainConfigWidget::changeEvent(ev);
+}
+
 // ==========================================================================
 // RvctToolChainFactory
 // ==========================================================================
diff --git a/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.h b/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.h
index d8c3acb2ccca346c979031f217d48431eca357c6..e34d8c0de64c9dced2ecb82ecc54bdbcfd11d392 100644
--- a/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.h
+++ b/src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.h
@@ -148,6 +148,7 @@ public:
     void discard() { setFromToolChain(); }
     bool isDirty() const;
     void makeReadOnly();
+    void changeEvent(QEvent *ev);
 
 private:
     void setFromToolChain();
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp b/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp
index 36b586af7b1701142500630ec8852e31dd64affe..09f7cc50df815cf15df80ae56641e392b8da06a5 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60runcontrolbase.cpp
@@ -149,7 +149,7 @@ bool S60RunControlBase::promptToStop(bool *optionalPrompt) const
     // We override the settings prompt
     QTC_ASSERT(isRunning(), return true;)
 
-    const QString question = tr("<html><head/><body><center><i>%1</i> is still running on the device.<center/>"
+    const QString question = tr("<html><head/><body><center><i>%1</i> is still running on the device.</center>"
                                         "<center>Terminating it can leave the target in an inconsistent state.</center>"
                                         "<center>Would you still like to terminate it?</center></body></html>").arg(displayName());
     return showPromptToStopDialog(tr("Application Still Running"), question,
diff --git a/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp b/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp
index c6893ac7558262a03251bbf45abb527fc9272246..42047db5fcf5a1b43f99066a1cdc726120a929c9 100644
--- a/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/winscwtoolchain.cpp
@@ -34,6 +34,7 @@
 #include "winscwtoolchain.h"
 
 #include "qt4projectmanager/qt4projectmanagerconstants.h"
+#include "qtversionmanager.h"
 
 #include "ui_winscwtoolchainconfigwidget.h"
 #include "winscwparser.h"
@@ -44,6 +45,7 @@
 
 #include <QtCore/QDir>
 #include <QtCore/QFileInfo>
+#include <QtCore/QStringList>
 
 namespace Qt4ProjectManager {
 namespace Internal {
@@ -377,6 +379,22 @@ QString WinscwToolChainFactory::id() const
 QList<ProjectExplorer::ToolChain *> WinscwToolChainFactory::autoDetect()
 {
     QList<ProjectExplorer::ToolChain *> result;
+
+    // Compatibility to pre-2.2:
+    while (true) {
+        const QString path = QtVersionManager::instance()->popPendingMwcUpdate();
+        if (path.isNull())
+            break;
+
+        QFileInfo fi(path + QLatin1String("/x86Build/Symbian_Tools/Command_Line_Tools/mwwinrc.exe"));
+        if (fi.exists() && fi.isExecutable()) {
+            WinscwToolChain *tc = new WinscwToolChain(false);
+            tc->setCompilerPath(fi.absoluteFilePath());
+            tc->setDisplayName(tr("WINSCW from Qt version"));
+            result.append(tc);
+        }
+    }
+
     QString cc = Utils::Environment::systemEnvironment().searchInPath(QLatin1String("mwwinrc"));
     if (!cc.isEmpty()) {
         WinscwToolChain *tc = new WinscwToolChain(true);
diff --git a/src/plugins/qt4projectmanager/qtoutputformatter.cpp b/src/plugins/qt4projectmanager/qtoutputformatter.cpp
index f85f311642f81a513e66e681774fb4ec3107502f..1dae5e5a9f14ff3dc685e233699028e12bf06ca0 100644
--- a/src/plugins/qt4projectmanager/qtoutputformatter.cpp
+++ b/src/plugins/qt4projectmanager/qtoutputformatter.cpp
@@ -53,9 +53,8 @@ QtOutputFormatter::QtOutputFormatter(ProjectExplorer::Project *project)
                                "(?::\\d+)?)"     // colon, column (optional)
                                ":"))             // colon
     , m_qtError(QLatin1String("Object::.*in (.*:\\d+)"))
-    , m_qtAssert(QLatin1String("^(?:\\[Qt Message\\] )?" // '[Qt Message] ' prefix (optional, on Symbian)
-                               "ASSERT: .* in file (.+, line \\d+)$"))
-    , m_qtTestFail(QLatin1String("^   Loc: \\[(.*)\\]$"))
+    , m_qtAssert(QLatin1String("ASSERT: .* in file (.+, line \\d+)"))
+    , m_qtTestFail(QLatin1String("^   Loc: \\[(.*)\\]"))
     , m_project(project)
 {
     if(project) {
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp
index cbdc342596540b8a0f9de42faa26be88dc88b496..825009a4a53c2a28e5d183a6155f011f2c9b3eaf 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.cpp
+++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp
@@ -176,8 +176,8 @@ QtVersionManager::QtVersionManager()
         version->setSystemRoot(s->value("S60SDKDirectory").toString());
         version->setSbsV2Directory(s->value(QLatin1String("SBSv2Directory")).toString());
 
-        // Update from 2.1 or earlier:
-        QString mingwDir = s->value(QLatin1String("MingwDirectory")).toString();
+        // Update from pre-2.2:
+        const QString mingwDir = s->value(QLatin1String("MingwDirectory")).toString();
         if (!mingwDir.isEmpty()) {
             QFileInfo fi(mingwDir + QLatin1String("/bin/g++.exe"));
             if (fi.exists() && fi.isExecutable()) {
@@ -189,30 +189,12 @@ QtVersionManager::QtVersionManager()
                 }
             }
         }
-        QString mwcDir = s->value(QLatin1String("MwcDirectory")).toString();
-        if (!mwcDir.isEmpty()) {
-            QFileInfo fi(mwcDir + QLatin1String("/x86Build/Symbian_Tools/Command_Line_Tools/mwwinrc.exe"));
-            if (fi.exists() && fi.isExecutable()) {
-                WinscwToolChain *tc = createToolChain<WinscwToolChain>(Constants::WINSCW_TOOLCHAIN_ID);
-                if (tc) {
-                    tc->setCompilerPath(fi.absoluteFilePath());
-                    tc->setDisplayName(tr("WINSCW from %1").arg(version->displayName()));
-                    ProjectExplorer::ToolChainManager::instance()->registerToolChain(tc);
-                }
-            }
-        }
-        QString gcceDir = s->value(QLatin1String("GcceDirectory")).toString();
-        if (!gcceDir.isEmpty()) {
-            QFileInfo fi(gcceDir + QLatin1String("/bin/arm-none-symbianelf-g++.exe"));
-            if (fi.exists() && fi.isExecutable()) {
-                GcceToolChain *tc = createToolChain<GcceToolChain>(Constants::GCCE_TOOLCHAIN_ID);
-                if (tc) {
-                    tc->setCompilerPath(fi.absoluteFilePath());
-                    tc->setDisplayName(tr("GCCE from %1").arg(version->displayName()));
-                    ProjectExplorer::ToolChainManager::instance()->registerToolChain(tc);
-                }
-            }
-        }
+        const QString mwcDir = s->value(QLatin1String("MwcDirectory")).toString();
+        if (!mwcDir.isEmpty())
+            m_pendingMwcUpdates.append(mwcDir);
+        const QString gcceDir = s->value(QLatin1String("GcceDirectory")).toString();
+        if (!gcceDir.isEmpty())
+            m_pendingGcceUpdates.append(gcceDir);
 
         m_versions.insert(version->uniqueId(), version);
     }
@@ -413,6 +395,20 @@ bool QtVersionManager::isValidId(int id) const
     return m_versions.contains(id);
 }
 
+QString QtVersionManager::popPendingMwcUpdate()
+{
+    if (m_pendingMwcUpdates.isEmpty())
+        return QString();
+    return m_pendingMwcUpdates.takeFirst();
+}
+
+QString QtVersionManager::popPendingGcceUpdate()
+{
+    if (m_pendingGcceUpdates.isEmpty())
+        return QString();
+    return m_pendingGcceUpdates.takeFirst();
+}
+
 QtVersion *QtVersionManager::version(int id) const
 {
     QMap<int, QtVersion *>::const_iterator it = m_versions.find(id);
@@ -751,6 +747,12 @@ bool QtVersion::supportsShadowBuilds() const
         // We can not support shadow building with the ABLD system
         return false;
     }
+#ifdef Q_OS_WIN
+    if (targets.contains(Constants::MEEGO_DEVICE_TARGET_ID)
+        || targets.contains(Constants::MAEMO5_DEVICE_TARGET_ID)
+        || targets.contains(Constants::HARMATTAN_DEVICE_TARGET_ID))
+        return false;
+#endif
     return true;
 }
 
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.h b/src/plugins/qt4projectmanager/qtversionmanager.h
index b5cb91336027ea1fcfb514ea0a1492670ed3f03d..92b335a8c94f5584dfa6168f5a1ac30d1018413e 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.h
+++ b/src/plugins/qt4projectmanager/qtversionmanager.h
@@ -42,6 +42,7 @@
 #include <QtCore/QSet>
 #include <QtCore/QSharedPointer>
 #include <QtCore/QFutureInterface>
+#include <QtCore/QStringList>
 
 namespace Utils {
 class Environment;
@@ -294,6 +295,10 @@ public:
     static QString findQMakeBinaryFromMakefile(const QString &directory);
     bool isValidId(int id) const;
 
+    // Compatibility with pre-2.2:
+    QString popPendingMwcUpdate();
+    QString popPendingGcceUpdate();
+
 signals:
     void qtVersionsChanged(const QList<int> &uniqueIds);
     void updateExamples(QString, QString, QString);
@@ -328,6 +333,10 @@ private:
     int m_idcount;
     // managed by QtProjectManagerPlugin
     static QtVersionManager *m_self;
+
+    // Compatibility with pre-2.2:
+    QStringList m_pendingMwcUpdates;
+    QStringList m_pendingGcceUpdates;
 };
 
 } // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp b/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp
index 5245cb1aa05289cf10469b2243192ef682f0a1cf..244bb36eed0a7a82019b59828d6937715f0e5b70 100644
--- a/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp
+++ b/src/plugins/qt4projectmanager/wizards/abstractmobileapp.cpp
@@ -58,7 +58,7 @@ const QString AbstractMobileApp::ProFileComment(QLatin1String("#"));
 const QString AbstractMobileApp::DeploymentPriFileName(QLatin1String("deployment.pri"));
 const QString AbstractMobileApp::FileChecksum(QLatin1String("checksum"));
 const QString AbstractMobileApp::FileStubVersion(QLatin1String("version"));
-const int AbstractMobileApp::StubVersion = 3;
+const int AbstractMobileApp::StubVersion = 4;
 
 AbstractMobileApp::AbstractMobileApp()
     : m_orientation(ScreenOrientationAuto)
diff --git a/src/plugins/vcsbase/VCSBase.mimetypes.xml b/src/plugins/vcsbase/VCSBase.mimetypes.xml
index 73203bfdd83160fda6eb9e9447b1fcfc3259c9c3..3b48f22206dbbd8c2f56a089d0964a057a930dea 100644
--- a/src/plugins/vcsbase/VCSBase.mimetypes.xml
+++ b/src/plugins/vcsbase/VCSBase.mimetypes.xml
@@ -10,7 +10,7 @@
 	     rule for C++ as we want diffs to take preference when looking
 	     at a C++ patch.
 	  -->
-        <magic priority="10">
+        <magic priority="60">
            <match value="&#x0a;+++ " type="string" offset="0:10000"/>
         </magic>
     </mime-type>
diff --git a/src/share/README b/src/share/README
new file mode 100644
index 0000000000000000000000000000000000000000..6b930079d4a7f14901195d21490c740eeb85e955
--- /dev/null
+++ b/src/share/README
@@ -0,0 +1,2 @@
+This directory contains *only* data files which are installed conditionally.
+The installation code is in ../../share/qtcreator/static.pro
diff --git a/src/shared/symbianutils/launcher.cpp b/src/shared/symbianutils/launcher.cpp
index ae59b88751dc3f8e76c078fb952d263d17babe16..87152572f78db5ad4e036e1dc2ba1445c1531195 100644
--- a/src/shared/symbianutils/launcher.cpp
+++ b/src/shared/symbianutils/launcher.cpp
@@ -447,9 +447,9 @@ void Launcher::handleResult(const TrkResult &result)
         case TrkNotifyAck:
             break;
         case TrkNotifyNak: { // NAK
-            logMessage(prefix + "NAK: " + str);
+            logMessage(prefix + QLatin1String("NAK: ") + str);
             //logMessage(prefix << "TOKEN: " << result.token);
-            logMessage(prefix + "ERROR: " + errorMessage(result.data.at(0)));
+            logMessage(prefix + QLatin1String("ERROR: ") + errorMessage(result.data.at(0)));
             break;
         }
         case TrkNotifyStopped: { // Notified Stopped
@@ -464,12 +464,12 @@ void Launcher::handleResult(const TrkResult &result)
             break;
         }
         case TrkNotifyException: { // Notify Exception (obsolete)
-            logMessage(prefix + "NOTE: EXCEPTION  " + str);
+            logMessage(prefix + QLatin1String("NOTE: EXCEPTION  ") + str);
             d->m_device->sendTrkAck(result.token);
             break;
         }
         case TrkNotifyInternalError: { //
-            logMessage(prefix + "NOTE: INTERNAL ERROR: " + str);
+            logMessage(prefix + QLatin1String("NOTE: INTERNAL ERROR: ") + str);
             d->m_device->sendTrkAck(result.token);
             break;
         }
@@ -528,22 +528,22 @@ void Launcher::handleResult(const TrkResult &result)
             break;
         }
         case TrkNotifyProcessorStarted: { // NotifyProcessorStarted
-            logMessage(prefix + "NOTE: PROCESSOR STARTED: " + str);
+            logMessage(prefix + QLatin1String("NOTE: PROCESSOR STARTED: ") + str);
             d->m_device->sendTrkAck(result.token);
             break;
         }
         case TrkNotifyProcessorStandBy: { // NotifyProcessorStandby
-            logMessage(prefix + "NOTE: PROCESSOR STANDBY: " + str);
+            logMessage(prefix + QLatin1String("NOTE: PROCESSOR STANDBY: ") + str);
             d->m_device->sendTrkAck(result.token);
             break;
         }
         case TrkNotifyProcessorReset: { // NotifyProcessorReset
-            logMessage(prefix + "NOTE: PROCESSOR RESET: " + str);
+            logMessage(prefix + QLatin1String("NOTE: PROCESSOR RESET: ") + str);
             d->m_device->sendTrkAck(result.token);
             break;
         }
         default: {
-            logMessage(prefix + "INVALID: " + str);
+            logMessage(prefix + QLatin1String("INVALID: ") + str);
             break;
         }
     }
diff --git a/src/tools/qmlpuppet/Info.plist b/src/tools/qmlpuppet/Info.plist.in
similarity index 83%
rename from src/tools/qmlpuppet/Info.plist
rename to src/tools/qmlpuppet/Info.plist.in
index 6d42d6331a62321077c75ad9289d863168571fa9..7d0d6a1039b692ea94ce1e07d34a82195696836e 100644
--- a/src/tools/qmlpuppet/Info.plist
+++ b/src/tools/qmlpuppet/Info.plist.in
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
+<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
+<plist version=\"1.0\">
 <dict>
         <key>NSHumanReadableCopyright</key>
         <string>(C) 2008-2011 Nokia Corporation
@@ -20,9 +20,9 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
 	<key>CFBundleIdentifier</key>
     <string>com.nokia.qtcreator.qmlpuppet</string>
 	<key>CFBundleVersion</key>
-	<string>2.1.83</string>
+	<string>$$QTCREATOR_VERSION</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.1.83</string>
+	<string>$$QTCREATOR_VERSION</string>
     <key>LSUIElement</key>
     <string>1</string>
 </dict>
diff --git a/src/tools/qmlpuppet/qmlpuppet.pro b/src/tools/qmlpuppet/qmlpuppet.pro
index b4edaf1f3f23c83ea4f0cee8f32b0092f24ad671..f59765e533fc88d740cd0b2e3da46a3a561fd67c 100644
--- a/src/tools/qmlpuppet/qmlpuppet.pro
+++ b/src/tools/qmlpuppet/qmlpuppet.pro
@@ -23,5 +23,9 @@ QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
 SOURCES += main.cpp
 RESOURCES += qmlpuppet.qrc
 
-OTHER_FILES += Info.plist
-macx:QMAKE_INFO_PLIST = Info.plist
+OTHER_FILES += Info.plist.in
+macx {
+    info.input = Info.plist.in
+    info.output = $$IDE_BIN_PATH/$${TARGET}.app/Contents/Info.plist
+    QMAKE_SUBSTITUTES += info
+}
diff --git a/tests/auto/qtcprocess/tst_qtcprocess.cpp b/tests/auto/qtcprocess/tst_qtcprocess.cpp
index bf8ebbbf239d7a56f81631b295420e921af33485..55105e315e59d00edb68a3d71b8ccd984c36717a 100644
--- a/tests/auto/qtcprocess/tst_qtcprocess.cpp
+++ b/tests/auto/qtcprocess/tst_qtcprocess.cpp
@@ -76,10 +76,19 @@ private slots:
 private:
     Environment env;
     MacroMapExpander mx;
+#ifdef Q_OS_UNIX
+    QString homeStr;
+    QString home;
+#endif
 };
 
 void tst_QtcProcess::initTestCase()
 {
+#ifdef Q_OS_UNIX
+    homeStr = QLatin1String("@HOME@");
+    home = QDir::homePath();
+#endif
+
     env.set("empty", "");
     env.set("word", "hi");
     env.set("words", "hi ho");
@@ -161,12 +170,20 @@ void tst_QtcProcess::splitArgs_data()
         { "hi'", "", QtcProcess::BadQuoting },
         { "hi\"dood", "", QtcProcess::BadQuoting },
         { "$var", "'$var'", QtcProcess::SplitOk },
+        { "~", "@HOME@", QtcProcess::SplitOk },
+        { "~ foo", "@HOME@ foo", QtcProcess::SplitOk },
+        { "foo ~", "foo @HOME@", QtcProcess::SplitOk },
+        { "~/foo", "@HOME@/foo", QtcProcess::SplitOk },
+        { "~foo", "'~foo'", QtcProcess::SplitOk },
 #endif
     };
 
     for (unsigned i = 0; i < sizeof(vals)/sizeof(vals[0]); i++)
         QTest::newRow(vals[i].in) << QString::fromLatin1(vals[i].in)
                                   << QString::fromLatin1(vals[i].out)
+#ifdef Q_OS_UNIX
+                                     .replace(homeStr, home)
+#endif
                                   << vals[i].err;
 }
 
@@ -221,12 +238,19 @@ void tst_QtcProcess::prepareArgs_data()
         { "hi'", "", QtcProcess::BadQuoting },
         { "hi\"dood", "", QtcProcess::BadQuoting },
         { "$var", "", QtcProcess::FoundMeta },
+        { "~", "@HOME@", QtcProcess::SplitOk },
+        { "~ foo", "@HOME@ foo", QtcProcess::SplitOk },
+        { "~/foo", "@HOME@/foo", QtcProcess::SplitOk },
+        { "~foo", "", QtcProcess::FoundMeta },
 #endif
     };
 
     for (unsigned i = 0; i < sizeof(vals)/sizeof(vals[0]); i++)
         QTest::newRow(vals[i].in) << QString::fromLatin1(vals[i].in)
                                   << QString::fromLatin1(vals[i].out)
+#ifdef Q_OS_UNIX
+                                     .replace(homeStr, home)
+#endif
                                   << vals[i].err;
 }