forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -42,6 +42,9 @@ LinuxDeviceProcess::LinuxDeviceProcess(const QSharedPointer<const ProjectExplore
|
|||||||
: ProjectExplorer::SshDeviceProcess(device, parent), m_processId(0)
|
: ProjectExplorer::SshDeviceProcess(device, parent), m_processId(0)
|
||||||
{
|
{
|
||||||
connect(this, &DeviceProcess::finished, this, [this]() {
|
connect(this, &DeviceProcess::finished, this, [this]() {
|
||||||
|
m_processId = -1;
|
||||||
|
});
|
||||||
|
connect(this, &DeviceProcess::started, this, [this]() {
|
||||||
m_processId = 0;
|
m_processId = 0;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -70,7 +73,7 @@ QByteArray LinuxDeviceProcess::readAllStandardOutput()
|
|||||||
|
|
||||||
qint64 LinuxDeviceProcess::processId() const
|
qint64 LinuxDeviceProcess::processId() const
|
||||||
{
|
{
|
||||||
return m_processId;
|
return m_processId < 0 ? 0 : m_processId;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString LinuxDeviceProcess::fullCommandLine(const Runnable &runnable) const
|
QString LinuxDeviceProcess::fullCommandLine(const Runnable &runnable) const
|
||||||
|
Reference in New Issue
Block a user