Valgrind: Use Runnable to pass device information

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

Change-Id: I6a5c215831f16c51e3cf98c35dbb792f53128d42
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2017-06-29 16:42:18 +02:00
parent 95300f08e3
commit 04b03f79d9
4 changed files with 2 additions and 14 deletions

View File

@@ -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();

View File

@@ -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:

View File

@@ -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);

View File

@@ -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);
});