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

@@ -63,6 +63,7 @@
#include <projectexplorer/devicesupport/deviceprocess.h>
#include <projectexplorer/itaskhandler.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/taskhub.h>
#include <utils/algorithm.h>
@@ -3327,7 +3328,9 @@ void GdbEngine::handleMakeSnapshot(const DebuggerResponse &response, const QStri
}
rp.displayName = function + ": " + QDateTime::currentDateTime().toString();
rp.isSnapshot = true;
createAndScheduleRun(rp, 0);
auto rc = new DebuggerRunControl(runControl()->runConfiguration(), ProjectExplorer::Constants::DEBUG_RUN_MODE);
(void) new DebuggerRunTool(rc, rp);
ProjectExplorerPlugin::startRunControl(rc, ProjectExplorer::Constants::DEBUG_RUN_MODE);
} else {
QString msg = response.data["msg"].data();
AsynchronousMessageBox::critical(tr("Snapshot Creation Error"),