From ee6bf38ea21e3b644b87fed489be5f14758a818a Mon Sep 17 00:00:00 2001
From: Christian Kandeler <christian.kandeler@nokia.com>
Date: Wed, 15 Dec 2010 16:37:21 +0100
Subject: [PATCH] Maemo: Fix remote debugging.

Was broken by 77e3bfe8451343be5478027154a027cbcfe4b778.
---
 src/plugins/debugger/gdb/remotegdbserveradapter.cpp | 6 +++---
 src/plugins/debugger/gdb/remotegdbserveradapter.h   | 5 +++--
 src/plugins/debugger/gdb/remoteplaingdbadapter.cpp  | 4 ++--
 src/plugins/debugger/gdb/remoteplaingdbadapter.h    | 4 ++--
 4 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp
index 14a1286b898..7e874d90a7e 100644
--- a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp
+++ b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp
@@ -159,7 +159,7 @@ void RemoteGdbServerAdapter::uploadProcFinished()
         && m_uploadProc.exitCode() == 0)
         handleSetupDone();
     else
-        handleSetupFailed(m_uploadProc.errorString());
+        handleRemoteSetupFailed(m_uploadProc.errorString());
 }
 
 void RemoteGdbServerAdapter::setupInferior()
@@ -300,7 +300,7 @@ void RemoteGdbServerAdapter::shutdownAdapter()
     m_engine->notifyAdapterShutdownOk();
 }
 
-void RemoteGdbServerAdapter::handleSetupDone(int gdbServerPort, int qmlPort)
+void RemoteGdbServerAdapter::handleRemoteSetupDone(int gdbServerPort, int qmlPort)
 {
     QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
 
@@ -323,7 +323,7 @@ void RemoteGdbServerAdapter::handleSetupDone()
         m_engine->handleAdapterStarted();
 }
 
-void RemoteGdbServerAdapter::handleSetupFailed(const QString &reason)
+void RemoteGdbServerAdapter::handleRemoteSetupFailed(const QString &reason)
 {
     QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
 
diff --git a/src/plugins/debugger/gdb/remotegdbserveradapter.h b/src/plugins/debugger/gdb/remotegdbserveradapter.h
index e635f4926c3..d3626bc9d15 100644
--- a/src/plugins/debugger/gdb/remotegdbserveradapter.h
+++ b/src/plugins/debugger/gdb/remotegdbserveradapter.h
@@ -48,8 +48,6 @@ class RemoteGdbServerAdapter : public AbstractGdbAdapter
 
 public:
     RemoteGdbServerAdapter(GdbEngine *engine, int toolChainType, QObject *parent = 0);
-    void handleSetupDone(int gdbServerPort, int qmlPort);
-    void handleSetupFailed(const QString &reason);
 
 private:
     DumperHandling dumperHandling() const;
@@ -82,6 +80,9 @@ private:
     Q_SLOT void uploadProcError(QProcess::ProcessError error);
     Q_SLOT void uploadProcFinished();
 
+    virtual void handleRemoteSetupDone(int gdbServerPort, int qmlPort);
+    virtual void handleRemoteSetupFailed(const QString &reason);
+
     void handleSetTargetAsync(const GdbResponse &response);
     void handleFileExecAndSymbols(const GdbResponse &response);
     void callTargetRemote();
diff --git a/src/plugins/debugger/gdb/remoteplaingdbadapter.cpp b/src/plugins/debugger/gdb/remoteplaingdbadapter.cpp
index 53bf78dfcbe..c7c7e2f9d75 100644
--- a/src/plugins/debugger/gdb/remoteplaingdbadapter.cpp
+++ b/src/plugins/debugger/gdb/remoteplaingdbadapter.cpp
@@ -100,7 +100,7 @@ void RemotePlainGdbAdapter::shutdownAdapter()
     m_engine->notifyAdapterShutdownOk();
 }
 
-void RemotePlainGdbAdapter::handleSetupDone(int gdbServerPort, int qmlPort)
+void RemotePlainGdbAdapter::handleRemoteSetupDone(int gdbServerPort, int qmlPort)
 {
     Q_UNUSED(gdbServerPort);
     QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
@@ -128,7 +128,7 @@ void RemotePlainGdbAdapter::handleGdbStartFailed()
     m_engine->handleAdapterStartFailed(m_gdbProc.errorString());
 }
 
-void RemotePlainGdbAdapter::handleSetupFailed(const QString &reason)
+void RemotePlainGdbAdapter::handleRemoteSetupFailed(const QString &reason)
 {
     QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state());
 
diff --git a/src/plugins/debugger/gdb/remoteplaingdbadapter.h b/src/plugins/debugger/gdb/remoteplaingdbadapter.h
index a7b41d7d91c..4df08b44664 100644
--- a/src/plugins/debugger/gdb/remoteplaingdbadapter.h
+++ b/src/plugins/debugger/gdb/remoteplaingdbadapter.h
@@ -43,8 +43,6 @@ class RemotePlainGdbAdapter : public AbstractPlainGdbAdapter
 public:
     friend class RemoteGdbProcess;
     explicit RemotePlainGdbAdapter(GdbEngine *engine, QObject *parent = 0);
-    void handleSetupDone(int gdbServerPort, int qmlPort);
-    void handleSetupFailed(const QString &reason);
 
 private slots:
     void handleGdbStarted();
@@ -56,6 +54,8 @@ private:
     void interruptInferior();
     void shutdownInferior();
     void shutdownAdapter();
+    void handleRemoteSetupDone(int gdbServerPort, int qmlPort);
+    void handleRemoteSetupFailed(const QString &reason);
     AbstractGdbProcess *gdbProc() { return &m_gdbProc; }
     DumperHandling dumperHandling() const { return DumperLoadedByGdbPreload; }
 
-- 
GitLab