forked from qt-creator/qt-creator
Valgrind: Simplify device setup and handling
Make isLocal() less intrusively used and correct. Use the stored device more often, also handle errors more quickly. Change-Id: I146d1f5788ea79d0a9d7b058c81908d451cf00d0 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#define VALGRINDPROCESS_H
|
||||
|
||||
#include <projectexplorer/applicationlauncher.h>
|
||||
#include <projectexplorer/devicesupport/idevice.h>
|
||||
#include <projectexplorer/runnables.h>
|
||||
|
||||
#include <ssh/sshremoteprocess.h>
|
||||
@@ -45,8 +46,7 @@ class ValgrindProcess : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ValgrindProcess(const QSsh::SshConnectionParameters &sshParams,
|
||||
QSsh::SshConnection *connection, QObject *parent);
|
||||
ValgrindProcess(const ProjectExplorer::IDevice::ConstPtr &device, QObject *parent);
|
||||
|
||||
bool isRunning() const;
|
||||
|
||||
@@ -63,6 +63,8 @@ public:
|
||||
void setProcessChannelMode(QProcess::ProcessChannelMode mode);
|
||||
QString workingDirectory() const;
|
||||
|
||||
ProjectExplorer::IDevice::ConstPtr device() const { return m_device; }
|
||||
|
||||
qint64 pid() const;
|
||||
QSsh::SshConnection *connection() const;
|
||||
bool isLocal() const;
|
||||
@@ -90,6 +92,7 @@ private:
|
||||
ProjectExplorer::StandardRunnable m_debuggee;
|
||||
ProjectExplorer::ApplicationLauncher m_localProcess;
|
||||
qint64 m_pid;
|
||||
ProjectExplorer::IDevice::ConstPtr m_device;
|
||||
|
||||
struct Remote {
|
||||
QSsh::SshConnection *m_connection;
|
||||
|
||||
Reference in New Issue
Block a user