diff --git a/doc/images/qmldesigner-anchor-buttons.png b/doc/images/qmldesigner-anchor-buttons.png
index 29654362f3c4429a4d117bd3d989e62b2e073f5d..9833f80b45a38723ffd983597cdbde441bbe6ce5 100644
Binary files a/doc/images/qmldesigner-anchor-buttons.png and b/doc/images/qmldesigner-anchor-buttons.png differ
diff --git a/doc/images/qmldesigner-anchors.png b/doc/images/qmldesigner-anchors.png
index 47a36605366f4b7701d0cf7cadec7fdb0232cdf2..6fb2047ceeb4c5b95681e8312028720d6529ab70 100644
Binary files a/doc/images/qmldesigner-anchors.png and b/doc/images/qmldesigner-anchors.png differ
diff --git a/doc/images/qmldesigner-boolean-false-blue.png b/doc/images/qmldesigner-boolean-false-blue.png
index 43bf11751169c30e13bf88f3cbbc6482a524ed75..dd607f12b71090750a91f687e4ace87993c1c3b7 100644
Binary files a/doc/images/qmldesigner-boolean-false-blue.png and b/doc/images/qmldesigner-boolean-false-blue.png differ
diff --git a/doc/images/qmldesigner-boolean-false.png b/doc/images/qmldesigner-boolean-false.png
index 9226583632f834a7e8aef2f59a09c3bd2dda8e41..2210d905ff369f2a154e41c297f0ad952cd67682 100644
Binary files a/doc/images/qmldesigner-boolean-false.png and b/doc/images/qmldesigner-boolean-false.png differ
diff --git a/doc/images/qmldesigner-boolean-true-blue.png b/doc/images/qmldesigner-boolean-true-blue.png
index c7f667d1c5f0496d0de0b323eec3f101d8036c52..7cf1cad420e02eda532b12790757425c19d65e7d 100644
Binary files a/doc/images/qmldesigner-boolean-true-blue.png and b/doc/images/qmldesigner-boolean-true-blue.png differ
diff --git a/doc/images/qmldesigner-boolean-true.png b/doc/images/qmldesigner-boolean-true.png
index e2817922ec097c93f790f262c9af652b629e1252..8b5c4ddb01cad21bed16dbd1ed1870f8d52d498d 100644
Binary files a/doc/images/qmldesigner-boolean-true.png and b/doc/images/qmldesigner-boolean-true.png differ
diff --git a/doc/images/qmldesigner-element-properties.png b/doc/images/qmldesigner-element-properties.png
index d66206e3034482d8f162c3b349d728c096d5f239..db4ccb5f498c5bda17c37e8703827553b4f0cbef 100644
Binary files a/doc/images/qmldesigner-element-properties.png and b/doc/images/qmldesigner-element-properties.png differ
diff --git a/doc/images/qmldesigner-element-size.png b/doc/images/qmldesigner-element-size.png
index 7bd1d42ae26431a18c0f9131f80ecb2118564255..8ecd6562a3ffedb67198199f466666d0dc30566e 100644
Binary files a/doc/images/qmldesigner-element-size.png and b/doc/images/qmldesigner-element-size.png differ
diff --git a/doc/images/qmldesigner-navigator-arrows.png b/doc/images/qmldesigner-navigator-arrows.png
index f04a337f192de3af695cc751e4388572efaf8459..69c162344664aa65abad5f94545021b567ae36d1 100644
Binary files a/doc/images/qmldesigner-navigator-arrows.png and b/doc/images/qmldesigner-navigator-arrows.png differ
diff --git a/doc/images/qmldesigner-navigator.png b/doc/images/qmldesigner-navigator.png
index b130b88df8b83947825792760609cd053d784380..63773500b0cb8d4cc75863ac00e95b512251774b 100644
Binary files a/doc/images/qmldesigner-navigator.png and b/doc/images/qmldesigner-navigator.png differ
diff --git a/doc/images/qmldesigner-preview-size.png b/doc/images/qmldesigner-preview-size.png
index 9d96d0bce5cfa237a3117145e91baf3cae981ef3..eda646e9c2d74a38bafe3446ae1ecf2dd2bfc773 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-properties-explicit-base.png b/doc/images/qmldesigner-properties-explicit-base.png
index 4833624639defdf4715a8b5f584f0ff08182d9f8..7401a59ef18c403e0450cc3d904ec188697592c8 100644
Binary files a/doc/images/qmldesigner-properties-explicit-base.png and b/doc/images/qmldesigner-properties-explicit-base.png differ
diff --git a/doc/images/qmldesigner-properties-explicit-state1.png b/doc/images/qmldesigner-properties-explicit-state1.png
index 2a58312204b4608845e3666e077d4dae2421d955..66fccad9bea973f92f5018519123f2239cb5f436 100644
Binary files a/doc/images/qmldesigner-properties-explicit-state1.png and b/doc/images/qmldesigner-properties-explicit-state1.png differ
diff --git a/doc/images/qmldesigner-qml-components.png b/doc/images/qmldesigner-qml-components.png
index 4bd622fcf2632c1f9412350506f8e6f9c6e7815c..937e556082a2281dd5a2be20aca2f6cba9ed6f20 100644
Binary files a/doc/images/qmldesigner-qml-components.png and b/doc/images/qmldesigner-qml-components.png differ
diff --git a/doc/images/qmldesigner-run-custom-exe.png b/doc/images/qmldesigner-run-custom-exe.png
index ed76941c7ba34a7efdfe9bdadd78382e4737c6fe..b3d4c2ceaa7a66f8414aaafd0ddc7d1e6110019c 100644
Binary files a/doc/images/qmldesigner-run-custom-exe.png and b/doc/images/qmldesigner-run-custom-exe.png differ
diff --git a/doc/images/qmldesigner-set-expression.png b/doc/images/qmldesigner-set-expression.png
index 3ba9bfe6ff87b3ce4705f488cc4d5ed48c111b53..8e7a5c66d3162f9e823db4a68e943c0d9b74c47f 100644
Binary files a/doc/images/qmldesigner-set-expression.png and b/doc/images/qmldesigner-set-expression.png differ
diff --git a/doc/images/qmldesigner-snap-margins.png b/doc/images/qmldesigner-snap-margins.png
index 05f2cd45f6a5508418c081226739381af148bc44..dc1dde29d8139020c7b89161e430683b2f71bee4 100644
Binary files a/doc/images/qmldesigner-snap-margins.png and b/doc/images/qmldesigner-snap-margins.png differ
diff --git a/doc/images/qmldesigner-text-property-tr.png b/doc/images/qmldesigner-text-property-tr.png
index bf013d514b3d3cd922430e946f4c7033d2beaee3..4690df99ec38c34db1004d27215d37d622ddc8d5 100644
Binary files a/doc/images/qmldesigner-text-property-tr.png and b/doc/images/qmldesigner-text-property-tr.png differ
diff --git a/doc/images/qmldesigner-transitions.png b/doc/images/qmldesigner-transitions.png
index f2e3a7275287863567d9251367a52729279d8268..1fee9d1827522cbe2913759b7d36dee2feb375b2 100644
Binary files a/doc/images/qmldesigner-transitions.png and b/doc/images/qmldesigner-transitions.png differ
diff --git a/doc/images/qmldesigner-visual-editor.png b/doc/images/qmldesigner-visual-editor.png
index eb975d5024e90f0001df5a7c18a3d98f52bcf7c2..012faea5f72875e47c03a5552909398f54cd45c3 100644
Binary files a/doc/images/qmldesigner-visual-editor.png and b/doc/images/qmldesigner-visual-editor.png differ
diff --git a/doc/src/qtquick/qtquick-designer.qdoc b/doc/src/qtquick/qtquick-designer.qdoc
index 264584e746edbad0de2864d1999598185d940118..c071786d0dbeb633e5708a9ba7b20b0a85c04d48 100644
--- a/doc/src/qtquick/qtquick-designer.qdoc
+++ b/doc/src/qtquick/qtquick-designer.qdoc
@@ -44,22 +44,22 @@
 
     \list
 
-        \o  \gui {Navigator} pane displays the QML elements in the current QML
+        \o  \gui {Navigator} pane (1) displays the QML elements in the current QML
             file as tree structure.
 
-        \o  \gui {Library} pane displays the building blocks that you can use to
+        \o  \gui {Library} pane (2) displays the building blocks that you can use to
             design applications: predefined QML elements, your own QML
             components, Qt Quick components that you import to the project, and
             other resources.
 
-        \o  \gui Canvas is the working area where you create QML components and
+        \o  \gui Canvas (3) is the working area where you create QML components and
             design applications.
 
-        \o  \gui {Properties} pane organizes the properties of the selected QML
+        \o  \gui {Properties} pane (4) organizes the properties of the selected QML
             element or QML component. You can change the properties also in the
             code editor.
 
-        \o  \gui {State} pane displays the different states of the component.
+        \o  \gui {State} pane (5) displays the different states of the component.
             QML states typically describe user interface configurations, such as
             the UI  elements, their properties and behavior and the available
             actions.
@@ -70,8 +70,8 @@
 
     The \gui Navigator pane displays the
     \l{http://doc.qt.nokia.com/4.7/qdeclarativeelements.html}{QML elements}
-    in the current QML file and their relationships. Elements are listed in a
-    tree structure, below their parent.
+    in the current QML file and their relationships. Elements (1) are listed in a
+    tree structure, below their parent (2).
 
     \image qmldesigner-navigator.png "Navigator pane"
 
@@ -83,7 +83,7 @@
     Typically, child elements are located within the parent element on the
     canvas. However, they do not necessarily have to fit inside the parent
     element. For example, you might want to make a mouse area larger than the
-    rectangle or image beneath it.
+    rectangle or image beneath it (1).
 
     \image qmldesigner-element-size.png "Mouse area for a button"
 
@@ -121,7 +121,7 @@
     To change the stacking order of an item, right-click it on the canvas and
     select \gui {Stack (z)}. You can raise or lower the stack value of an item
     or move the item to the front or back of all its siblings. To remove the
-    \c z property, select \gui Reset.
+    \c z property, select \gui {Reset z Property}.
 
     \section2 Switching Parent Elements
 
@@ -136,7 +136,7 @@
 
     You can change the parent of an element also in the \gui Navigator pane.
     Drag and drop the element to another position in the tree or use the arrow
-    buttons to move the element in the tree.
+    buttons (1) to move the element in the tree.
 
     \image qmldesigner-navigator-arrows.png "Navigator arrow buttons"
 
@@ -154,7 +154,8 @@
     \list
 
         \if defined(qcmanual)
-        \o  \c {import com.nokia.symbian 1.0} for Symbian
+        \o  \c {import com.nokia.symbian 1.0} for Symbian (Qt 4.7)
+        \o  \c {import com.nokia.symbian 1.1} for Symbian (Qt 4.8)
         \endif
 
         \o  \c {import com.nokia.meego 1.0} for MeeGo
@@ -178,7 +179,7 @@
 
     The bottom part of the pane displays properties that are specific to each
     element type. For example, the following image displays the properties you
-    can set for \gui Rectangle and \gui Text elements.
+    can set for \gui Rectangle (1) and \gui Text (2) elements.
 
     \image qmldesigner-element-properties.png
 
@@ -202,12 +203,12 @@
     When editing states, you can easily see which values are explicitly set in
     the current state and which values are derived from the base state.
 
-    The following images illustrate this. In the base state, the \gui Position,
-    \gui Size, and \gui Colors values are explicitly set and highlighted.
+    The following images illustrate this. In the base state, the \gui Size (1)
+    and \gui Colors (2) values are explicitly set and highlighted.
 
     \image qmldesigner-properties-explicit-base.png "Explicitly set properties"
 
-    In \gui State1, only the color is explicitly set and highlighted.
+    In \gui State1, only the color (1) is explicitly set and highlighted.
 
     \image qmldesigner-properties-explicit-state1.png "Explicitly set properties"
 
@@ -265,7 +266,7 @@
     \section2 Marking Text Elements for Translation
 
     To support translators, mark each text element that should be translated.
-    In the \gui Properties pane, \gui Text field, select \gui tr.
+    In the \gui Properties pane, \gui Text field, select \gui tr (1).
 
     \image qmldesigner-text-property-tr.png "Text properties"
 
@@ -360,8 +361,8 @@
     to the opposite side: \c {anchor.left: sibling.right}. This allows you to keep
     sibling elements together.
 
-    In the following image, \gui{Rectangle 2} is anchored to its siblings on its
-    right and left and to the bottom of its parent.
+    In the following image, \gui{Rectangle 2} is anchored to \gui{Rectangle 1}
+    on its left and to the bottom of its parent.
 
     \image qmldesigner-anchors.png "Anchoring sibling elements"
 
@@ -370,8 +371,6 @@
     \qml
     Rectangle {
         id: rectangle2
-        anchors.right: rectangle3.left
-        anchors.rightMargin: 15
         anchors.left: rectangle1.right
         anchors.leftMargin: 15
         anchors.bottom: parent.bottom
@@ -466,7 +465,8 @@
     \inlineimage qmldesigner-snap-to-guides-button.png
     button to have the elements snap to the guides.
 
-    Choose \gui {Tools > Options > Qt Quick} to specify settings for snap to
+    Choose \gui {Tools > Options > Qt Quick > Qt Quick Designer} to specify
+    settings for snap to
     margins. In the \gui {Snap margin} field, specify the position of the guides
     as pixels  from the edge of the canvas. In the \gui {Item spacing} field,
     specify the space in pixels to leave between elements on the screen.
@@ -503,16 +503,17 @@
     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
+    \gui Height and \gui Width fields (1) on the canvas toolbar. The changes are
+    displayed in the \gui States pane (2) and on the canvas (3), but the property
     values are not changed permanently in the QML file. You can permanently
-    change the property values in the \gui Properties pane.
+    change the property values in the \gui Properties pane (4).
 
     \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
+    To change the canvas size, select \gui {Tools > Options > Qt Quick
+    > Qt Quick Designer} and
     specify the canvas width and height in the \gui Canvas group.
 
     \section1 Refreshing the Canvas
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 19aa868c8784bae889fce292fa7e191a10a3b036..0eb329b346eb8f5f53e2b5b53d86eac19e0d6865 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1115,6 +1115,7 @@ public slots:
     void maybeEnrichParameters(DebuggerStartParameters *sp);
 
     void gdbServerStarted(const QString &channel, const QString &sysroot, const QString &localExecutable);
+    void attachedToProcess(const QString &channel, const QString &sysroot, const QString &localExecutable);
 
 public:
     DebuggerMainWindow *m_mainWindow;
@@ -1672,11 +1673,6 @@ void DebuggerPluginPrivate::attachToRemoteServer()
     }
 }
 
-void DebuggerPluginPrivate::attachToRemoteProcess()
-{
-    startRemoteServer();
-}
-
 void DebuggerPluginPrivate::startRemoteServer()
 {
     PluginManager *pm = PluginManager::instance();
@@ -1689,6 +1685,24 @@ void DebuggerPluginPrivate::startRemoteServer()
 
 void DebuggerPluginPrivate::gdbServerStarted(const QString &channel,
     const QString &sysroot, const QString &remoteCommandLine)
+{
+    Q_UNUSED(remoteCommandLine);
+    Q_UNUSED(sysroot);
+    showStatusMessage(tr("gdbserver is now listening at %1").arg(channel));
+}
+
+void DebuggerPluginPrivate::attachToRemoteProcess()
+{
+    PluginManager *pm = PluginManager::instance();
+    QTC_ASSERT(pm, return);
+    QObject *rl = pm->getObjectByName(_("RemoteLinuxPlugin"));
+    QTC_ASSERT(rl, return);
+    QMetaObject::invokeMethod(rl, "attachToRemoteProcess", Qt::QueuedConnection);
+    // This will call back attachedtToProcess() below.
+}
+
+void DebuggerPluginPrivate::attachedToProcess(const QString &channel,
+    const QString &sysroot, const QString &remoteCommandLine)
 {
     QString binary = remoteCommandLine.section(QLatin1Char(' '), 0, 0);
     QString localExecutable;
@@ -3075,7 +3089,7 @@ void DebuggerPluginPrivate::extensionsInitialized()
     connect(act, SIGNAL(triggered()), SLOT(attachToRemoteServer()));
 
     act = m_startRemoteServerAction = new QAction(this);
-    act->setText(tr("Start Remote Debug Server..."));
+    act->setText(tr("Start Remote Debug Server Attached to Process..."));
     connect(act, SIGNAL(triggered()), SLOT(startRemoteServer()));
 
     act = m_attachToRemoteProcessAction = new QAction(this);
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index a73f04eb959c55f58e8619bb691c7fa69c63554a..74e0f1ffae0143cf8a1e7f59cd6b8110dcb807be 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -45,6 +45,7 @@
 #include <utils/qtcassert.h>
 
 #include <QDir>
+#include <QFileInfo>
 #include <QProcess>
 #include <QSettings>
 #include <QUrl>
@@ -646,6 +647,7 @@ QList<ToolChain *> MsvcToolChainFactory::autoDetect()
     return results;
 }
 
+// Detect CDB, return a pair of <32bit, 64bit> executables.
 QPair<Utils::FileName, Utils::FileName> MsvcToolChain::autoDetectCdbDebugger()
 {
     QPair<Utils::FileName, Utils::FileName> result;
@@ -660,6 +662,29 @@ QPair<Utils::FileName, Utils::FileName> MsvcToolChain::autoDetectCdbDebugger()
         if (dirName.isEmpty())
             continue;
         QDir dir(dirName);
+        // Windows SDK's starting from version 8 live in
+        // "ProgramDir\Windows Kits\<version>"
+        const QString windowsKitsFolderName = QLatin1String("Windows Kits");
+        if (dir.exists(windowsKitsFolderName)) {
+            QDir windowKitsFolder = dir;
+            if (windowKitsFolder.cd(windowsKitsFolderName)) {
+                // Check in reverse order (latest first)
+                const QFileInfoList kitFolders =
+                    windowKitsFolder.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot,
+                                                   QDir::Time|QDir::Reversed);
+                foreach (const QFileInfo &kitFolderFi, kitFolders) {
+                    const QString path = kitFolderFi.absoluteFilePath();
+                    const QFileInfo cdb32(path + QLatin1String("/Debuggers/x86/cdb.exe"));
+                    if (cdb32.isExecutable())
+                        cdbs.push_back(Utils::FileName::fromString(cdb32.absoluteFilePath()));
+                    const QFileInfo cdb64(path + QLatin1String("/Debuggers/x64/cdb.exe"));
+                    if (cdb64.isExecutable())
+                        cdbs.push_back(Utils::FileName::fromString(cdb64.absoluteFilePath()));
+                } // for Kits
+            } // can cd to "Windows Kits"
+        } // "Windows Kits" exists
+
+        // Pre Windows SDK 8: Check 'Debugging Tools for Windows'
         foreach (const QFileInfo &fi, dir.entryInfoList(QStringList(QLatin1String("Debugging Tools for Windows*")),
                                                         QDir::Dirs | QDir::NoDotAndDotDot)) {
             Utils::FileName filePath(fi);
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp
index 21bb70db66236d5761acc8c481b4703e348c0638..88ae5c677e15e8727c729ae58e1ee0088c2fe6c0 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp
@@ -286,7 +286,7 @@ void FormEditorView::nodeIdChanged(const ModelNode& node, const QString& newId,
     QmlModelView::nodeIdChanged(node, newId, oldId);
     QmlItemNode itemNode(node);
 
-    if (itemNode.isValid()) {
+    if (itemNode.isValid() && node.nodeSourceType() == ModelNode::NodeWithoutSource) {
         FormEditorItem *item = m_scene->itemForQmlItemNode(itemNode);
         item->update();
     }
diff --git a/src/plugins/remotelinux/remotelinuxplugin.cpp b/src/plugins/remotelinux/remotelinuxplugin.cpp
index 6a21e597b3839e198caa897221d5c4bb9e23416e..0cf91f4fdfe25338eb1bab9b33934eb683c45881 100644
--- a/src/plugins/remotelinux/remotelinuxplugin.cpp
+++ b/src/plugins/remotelinux/remotelinuxplugin.cpp
@@ -91,41 +91,20 @@ RemoteLinuxPlugin::~RemoteLinuxPlugin()
 
 void RemoteLinuxPlugin::extensionsInitialized()
 {
-    /*
-    using namespace Core;
-    ICore *core = ICore::instance();
-    ActionManager *am = core->actionManager();
-    ActionContainer *mstart =
-        am->actionContainer(ProjectExplorer::Constants::M_DEBUG_STARTDEBUGGING);
-
-    const Context globalcontext(Core::Constants::C_GLOBAL);
-
-    QAction *act = 0;
-    Command *cmd = 0;
-
-    act = new QAction(tr("Start Remote Debug Server..."), 0);
-    cmd = am->registerAction(act, "StartGdbServer", globalcontext);
-    cmd->setDescription(tr("Start Gdbserver"));
-    mstart->addAction(cmd, Debugger::Constants::G_MANUAL_REMOTE);
-    connect(act, SIGNAL(triggered()), SLOT(startGdbServer()));
-
-    act = new QAction(tr("Attach to Running Remote Process..."), 0);
-    cmd = am->registerAction(act, "AttachRemoteProcess", globalcontext);
-    cmd->setDescription(tr("Attach to Remote Process"));
-    mstart->addAction(cmd, Debugger::Constants::G_AUTOMATIC_REMOTE);
-    connect(act, SIGNAL(triggered()), SLOT(startGdbServer()));
-    */
 }
 
 void RemoteLinuxPlugin::startGdbServer()
 {
     StartGdbServerDialog dlg;
-    int result = dlg.exec();
-    if (result == QDialog::Rejected)
-        return;
     dlg.startGdbServer();
 }
 
+void RemoteLinuxPlugin::attachToRemoteProcess()
+{
+    StartGdbServerDialog dlg;
+    dlg.attachToRemoteProcess();
+}
+
 } // namespace Internal
 } // namespace RemoteLinux
 
diff --git a/src/plugins/remotelinux/remotelinuxplugin.h b/src/plugins/remotelinux/remotelinuxplugin.h
index f8cc714074a4b26ed87cac3c40e9fb17f380b368..7307bc8ea4dafb987c3b2f2a8b583444946a15ef 100644
--- a/src/plugins/remotelinux/remotelinuxplugin.h
+++ b/src/plugins/remotelinux/remotelinuxplugin.h
@@ -52,6 +52,7 @@ public:
 
 private slots:
     void startGdbServer();
+    void attachToRemoteProcess();
 };
 
 } // namespace Internal
diff --git a/src/plugins/remotelinux/startgdbserverdialog.cpp b/src/plugins/remotelinux/startgdbserverdialog.cpp
index cd2ab8ace2b64654196c0318b31194589da0d47f..384d2c2d742c28029ac3de73ddb99f26847a5b2a 100644
--- a/src/plugins/remotelinux/startgdbserverdialog.cpp
+++ b/src/plugins/remotelinux/startgdbserverdialog.cpp
@@ -93,6 +93,7 @@ public:
     }
 
     StartGdbServerDialog *q;
+    bool startServerOnly;
     AbstractRemoteLinuxProcessList *processList;
     QSortFilterProxyModel proxyModel;
 
@@ -111,7 +112,7 @@ public:
 };
 
 StartGdbServerDialogPrivate::StartGdbServerDialogPrivate(StartGdbServerDialog *q)
-    : q(q), processList(0)
+    : q(q), startServerOnly(true), processList(0)
 {
     settings = ICore::settings();
 
@@ -321,13 +322,20 @@ void StartGdbServerDialog::portListReady()
 
 void StartGdbServerDialog::startGdbServer()
 {
+    d->startServerOnly = true;
+    if (exec() == QDialog::Rejected)
+        return;
     LinuxDeviceConfiguration::ConstPtr device = d->currentDevice();
     d->gatherer.start(SshConnection::create(device->sshParameters()), device);
 }
 
 void StartGdbServerDialog::attachToRemoteProcess()
 {
-    startGdbServer();
+    d->startServerOnly = false;
+    if (exec() == QDialog::Rejected)
+        return;
+    LinuxDeviceConfiguration::ConstPtr device = d->currentDevice();
+    d->gatherer.start(SshConnection::create(device->sshParameters()), device);
 }
 
 void StartGdbServerDialog::handleConnectionError()
@@ -351,29 +359,31 @@ void StartGdbServerDialog::handleProcessErrorOutput(const QByteArray &ba)
     logMessage(QString::fromUtf8(ba.trimmed()));
     // "Attached; pid = 16740"
     // "Listening on port 10000"
-    int pos = ba.indexOf("Listening on port");
-    if (pos == -1)
-        return;
-    const int port = ba.mid(pos + 18).trimmed().toInt();
-    logMessage(tr("Port %1 is now accessible.").arg(port));
-    reportOpenPort(port);
+    foreach (const QByteArray &line, ba.split('\n')) {
+        if (line.startsWith("Listening on port")) {
+            const int port = line.mid(18).trimmed().toInt();
+            reportOpenPort(port);
+        }
+    }
 }
 
 void StartGdbServerDialog::reportOpenPort(int port)
 {
-    ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
-    QObject *ob = pm->getObjectByName("DebuggerCore");
-    if (!ob)
-        return;
-
+    logMessage(tr("Port %1 is now accessible.").arg(port));
     LinuxDeviceConfiguration::ConstPtr device = d->currentDevice();
     QString channel = QString("%1:%2").arg(device->sshParameters().host).arg(port);
     logMessage(tr("Server started on %1").arg(channel));
 
-    QMetaObject::invokeMethod(ob, "gdbServerStarted", Qt::QueuedConnection,
-        Q_ARG(QString, channel),
-        Q_ARG(QString, d->sysrootPathChooser->path()),
-        Q_ARG(QString, d->remoteCommandLine));
+    const char *member = d->startServerOnly ? "gdbServerStarted" : "attachedToProcess";
+    ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
+    QObject *ob = pm->getObjectByName("DebuggerCore");
+    if (ob) {
+        QMetaObject::invokeMethod(ob, member, Qt::QueuedConnection,
+            Q_ARG(QString, channel),
+            Q_ARG(QString, d->sysrootPathChooser->path()),
+            Q_ARG(QString, d->remoteCommandLine));
+    }
+    close();
 }
 
 void StartGdbServerDialog::handleProcessClosed(int status)
diff --git a/tests/system/shared/build_utils.py b/tests/system/shared/build_utils.py
index 746d5fa4a8a0c8e0659ba41010f73e1f3e357b2f..ed39e0606906c530f8fd16b60fb25a859def0569 100644
--- a/tests/system/shared/build_utils.py
+++ b/tests/system/shared/build_utils.py
@@ -122,8 +122,8 @@ def createTasksFile(list):
         # the following is currently a bad work-around
         fData = index.data(Qt.UserRole).toString() # file
         lData = index.data(Qt.UserRole + 1).toString() # line -> linenumber or empty
-        tData = index.data(Qt.UserRole + 4).toString() # type -> 1==error 2==warning
-        dData = index.data(Qt.UserRole + 2).toString() # description
+        tData = index.data(Qt.UserRole + 5).toString() # type -> 1==error 2==warning
+        dData = index.data(Qt.UserRole + 3).toString() # description
         if lData == "":
             lData = "-1"
         if tData == "1":