Debugger: Move engine construction into RunTool constructor

Makes using code closer to the intended run control/tool setup
pattern.

Change-Id: Id898338008588227e778fe3835b96740996c3691
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-04-11 10:06:56 +02:00
parent 49b98f1149
commit 27c8c74813
2 changed files with 36 additions and 30 deletions

View File

@@ -476,16 +476,22 @@ private:
class DebuggerRunTool : public ProjectExplorer::ToolRunner
{
public:
DebuggerRunTool(DebuggerRunControl *runControl, DebuggerEngine *engine);
DebuggerRunTool(ProjectExplorer::RunControl *runControl, const DebuggerRunParameters &rp);
~DebuggerRunTool();
DebuggerEngine *engine() const { return m_engine; }
DebuggerRunControl *runControl() const;
QStringList errors() const { return m_errors; }
void showMessage(const QString &msg, int channel, int timeout = -1);
void handleFinished();
DebuggerEngine *engine() const { return m_engine; }
private:
DebuggerEngine *m_engine; // Master engine
DebuggerRunParameters m_rp;
DebuggerEngine *m_engine = nullptr; // Master engine
QStringList m_errors;
};
class LocationMark : public TextEditor::TextMark