ProjectExplorer: Add RunControl::set{Kit,Target}

For cases where no genuine RunConfiguration is available.

Use it in the debugger for the cases triggered from the menu.

Change-Id: I5671f4f5db2547c4a7a70bd34292bb6ccc8e6bf4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-03-12 17:04:08 +01:00
parent efb7d8deb7
commit ceb0fe429d
7 changed files with 65 additions and 45 deletions

View File

@@ -403,10 +403,10 @@ void StartApplicationDialog::run(bool attachRemote)
return;
Kit *k = dialog.d->kitChooser->currentKit();
IDevice::ConstPtr dev = DeviceKitAspect::device(k);
auto runControl = new RunControl(ProjectExplorer::Constants::DEBUG_RUN_MODE);
auto debugger = new DebuggerRunTool(runControl, k);
runControl->setKit(k);
auto debugger = new DebuggerRunTool(runControl);
const StartApplicationParameters newParameters = dialog.parameters();
if (newParameters != history.back()) {
@@ -423,6 +423,7 @@ void StartApplicationDialog::run(bool attachRemote)
settings->endGroup();
}
IDevice::ConstPtr dev = DeviceKitAspect::device(k);
Runnable inferior = newParameters.runnable;
const QString inputAddress = dialog.d->channelOverrideEdit->text();
if (!inputAddress.isEmpty())