Debugger: Move external terminal into separate RunWorker

Change-Id: Ifb9701f840195ba90db48a0f6fa07b28e0409648
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-09-27 08:22:02 +02:00
parent 6f481bd9da
commit 895acd23e3
13 changed files with 223 additions and 230 deletions

View File

@@ -28,7 +28,15 @@
#include <QCoreApplication>
#include <QSocketNotifier>
#include <projectexplorer/runconfiguration.h>
#include <projectexplorer/runnables.h>
#include <utils/consoleprocess.h>
namespace Debugger {
class DebuggerRunTool;
namespace Internal {
class Terminal : public QObject
@@ -60,5 +68,28 @@ private:
QByteArray m_slaveName;
};
class TerminalRunner : public ProjectExplorer::RunWorker
{
public:
explicit TerminalRunner(DebuggerRunTool *runControl);
qint64 applicationPid() const { return m_applicationPid; }
qint64 applicationMainThreadId() const { return m_applicationMainThreadId; }
private:
void start() final;
void stop() final;
void stubStarted();
void stubExited();
void stubError(const QString &msg);
Utils::ConsoleProcess m_stubProc;
ProjectExplorer::StandardRunnable m_stubRunnable;
qint64 m_applicationPid = 0;
qint64 m_applicationMainThreadId = 0;
};
} // namespace Internal
} // namespace Debugger