Commit 04b03f79 authored by hjk's avatar hjk

Valgrind: Use Runnable to pass device information

... in case of "External Application" starts.

Change-Id: I6a5c215831f16c51e3cf98c35dbb792f53128d42
Reviewed-by: Christian Kandeler's avatarChristian Kandeler <christian.kandeler@qt.io>
parent 95300f08
......@@ -128,19 +128,11 @@ void StartRemoteDialog::validate()
d->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(valid);
}
QUrl StartRemoteDialog::serverUrl() const
{
QUrl url;
Kit *kit = d->kitChooser->currentKit();
IDevice::ConstPtr device = DeviceKitInformation::device(kit);
url.setHost(device->sshParameters().host);
url.setPort(device->sshParameters().port);
return url;
}
StandardRunnable StartRemoteDialog::runnable() const
{
Kit *kit = d->kitChooser->currentKit();
StandardRunnable r;
r.device = DeviceKitInformation::device(kit);
r.executable = d->executable->text();
r.commandLineArguments = d->arguments->text();
r.workingDirectory = d->workingDirectory->text();
......
......@@ -28,7 +28,6 @@
#include <debugger/debugger_global.h>
#include <QDialog>
#include <QUrl>
namespace ProjectExplorer { class StandardRunnable; }
......@@ -44,7 +43,6 @@ public:
explicit StartRemoteDialog(QWidget *parent = 0);
~StartRemoteDialog() override;
QUrl serverUrl() const;
ProjectExplorer::StandardRunnable runnable() const;
private:
......
......@@ -289,7 +289,6 @@ CallgrindTool::CallgrindTool(QObject *parent)
auto runControl = new RunControl(runConfig, CALLGRIND_RUN_MODE);
const auto runnable = dlg.runnable();
runControl->setRunnable(runnable);
runControl->setConnection(UrlConnection(dlg.serverUrl()));
runControl->setDisplayName(runnable.executable);
createRunTool(runControl);
ProjectExplorerPlugin::startRunControl(runControl);
......
......@@ -454,7 +454,6 @@ MemcheckTool::MemcheckTool(QObject *parent)
rc->createWorker(MEMCHECK_RUN_MODE);
const auto runnable = dlg.runnable();
rc->setRunnable(runnable);
rc->setConnection(UrlConnection(dlg.serverUrl()));
rc->setDisplayName(runnable.executable);
ProjectExplorerPlugin::startRunControl(rc);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment