summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/terminal.h
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2017-09-27 08:22:02 +0200
committerhjk <hjk@qt.io>2017-09-27 12:16:19 +0000
commit895acd23e33408dd967519f1e3a277b0ac28387b (patch)
tree9763d50e97d50bbf6f12d0a6231786a0208c31db /src/plugins/debugger/terminal.h
parent6f481bd9da32b79fc0aa361c30406b2f4a6af918 (diff)
downloadqt-creator-895acd23e33408dd967519f1e3a277b0ac28387b.tar.gz
Debugger: Move external terminal into separate RunWorker
Change-Id: Ifb9701f840195ba90db48a0f6fa07b28e0409648 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/debugger/terminal.h')
-rw-r--r--src/plugins/debugger/terminal.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/plugins/debugger/terminal.h b/src/plugins/debugger/terminal.h
index 67b3bf851a..0745373e0e 100644
--- a/src/plugins/debugger/terminal.h
+++ b/src/plugins/debugger/terminal.h
@@ -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