Add runConfiguration to remote tool starters

Most of them need a run configuration. It's better to pass the
right one than to use various hacky ways to work around it.

Change-Id: Ic21b0ef33bdd79b526b1e1a1ead5ca87d9f32c4d
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2016-01-22 17:08:50 +01:00
parent 0f4db8a32f
commit a1dd1e4c5b
9 changed files with 26 additions and 52 deletions

View File

@@ -187,11 +187,11 @@ void ValgrindPlugin::extensionsInitialized()
action->setActionId("Memcheck.Remote");
action->setToolId("Memcheck");
action->setWidgetCreator(mcWidgetCreator);
action->setCustomToolStarter([mcTool] {
action->setCustomToolStarter([mcTool](ProjectExplorer::RunConfiguration *runConfig) {
StartRemoteDialog dlg;
if (dlg.exec() != QDialog::Accepted)
return;
ValgrindRunControl *rc = mcTool->createRunControl(0, MEMCHECK_RUN_MODE);
ValgrindRunControl *rc = mcTool->createRunControl(runConfig, MEMCHECK_RUN_MODE);
QTC_ASSERT(rc, return);
AnalyzerRunnable runnable;
runnable.debuggee = dlg.executable();
@@ -214,11 +214,11 @@ void ValgrindPlugin::extensionsInitialized()
action->setActionId(CallgrindRemoteActionId);
action->setToolId(CallgrindToolId);
action->setWidgetCreator(cgWidgetCreator);
action->setCustomToolStarter([cgTool] {
action->setCustomToolStarter([cgTool](ProjectExplorer::RunConfiguration *runConfig) {
StartRemoteDialog dlg;
if (dlg.exec() != QDialog::Accepted)
return;
ValgrindRunControl *rc = cgTool->createRunControl(0);
ValgrindRunControl *rc = cgTool->createRunControl(runConfig);
QTC_ASSERT(rc, return);
AnalyzerRunnable runnable;
runnable.debuggee = dlg.executable();