diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-02-12 11:40:15 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-02-12 13:11:17 +0000 |
commit | 4b5841292e9c18fc4ced4bd69d2e5e80d65d0cdd (patch) | |
tree | 28875e99474ba75a4d16a89ac997a1a82180e8e1 /src/plugins/remotelinux | |
parent | c6415e265234ad7e3d97f23ef48ce7642a05f71e (diff) |
LinuxDeviceProcess: Only look for processId on freshly started process
There may be additional output being retrieved after the process is
finished. We don't want that to get mangled by the processId mechanism.
Change-Id: I9ad3146ace66288de1a4d8f1e94b9999719862c8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/remotelinux')
-rw-r--r-- | src/plugins/remotelinux/linuxdeviceprocess.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/remotelinux/linuxdeviceprocess.cpp b/src/plugins/remotelinux/linuxdeviceprocess.cpp index 1dac2e4408..004ca63d2a 100644 --- a/src/plugins/remotelinux/linuxdeviceprocess.cpp +++ b/src/plugins/remotelinux/linuxdeviceprocess.cpp @@ -42,6 +42,9 @@ LinuxDeviceProcess::LinuxDeviceProcess(const QSharedPointer<const ProjectExplore : ProjectExplorer::SshDeviceProcess(device, parent), m_processId(0) { connect(this, &DeviceProcess::finished, this, [this]() { + m_processId = -1; + }); + connect(this, &DeviceProcess::started, this, [this]() { m_processId = 0; }); } @@ -70,7 +73,7 @@ QByteArray LinuxDeviceProcess::readAllStandardOutput() qint64 LinuxDeviceProcess::processId() const { - return m_processId; + return m_processId < 0 ? 0 : m_processId; } QString LinuxDeviceProcess::fullCommandLine(const Runnable &runnable) const |