Debugger: Streamline DebuggerRun{Control,Tool}Setup

Only one code path needed once we have a RunConfiguration.

Change-Id: Ib65f471a929a0c70694dd142b4f83be7eebbe151
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-04-11 13:45:37 +02:00
parent cd47065bf0
commit ee27248a56
4 changed files with 83 additions and 66 deletions

View File

@@ -476,19 +476,21 @@ private:
class DebuggerRunTool : public ProjectExplorer::ToolRunner
{
public:
DebuggerRunTool(ProjectExplorer::RunControl *runControl, const DebuggerRunParameters &rp);
DebuggerRunTool(ProjectExplorer::RunControl *runControl,
const DebuggerRunParameters &rp,
QString *errorMessage = nullptr);
~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();
private:
bool fixup();
DebuggerRunParameters m_rp;
DebuggerEngine *m_engine = nullptr; // Master engine
QStringList m_errors;
@@ -508,8 +510,7 @@ private:
};
DebuggerEngine *createEngine(DebuggerEngineType et, const DebuggerRunParameters &rp, QStringList *errors);
DebuggerRunControl *createAndScheduleRun(const DebuggerRunParameters &rp, const ProjectExplorer::Kit *kit);
ProjectExplorer::RunControl *createAndScheduleRun(const DebuggerRunParameters &rp, ProjectExplorer::Kit *kit);
} // namespace Internal
} // namespace Debugger