diff --git a/src/libs/utils/deviceshell.cpp b/src/libs/utils/deviceshell.cpp index 807ac2c4bd5..7256b9cb3a9 100644 --- a/src/libs/utils/deviceshell.cpp +++ b/src/libs/utils/deviceshell.cpp @@ -277,8 +277,8 @@ void DeviceShell::startupFailed(const CommandLine &cmdLine) bool DeviceShell::start() { m_shellProcess = new QtcProcess(); - connect(m_shellProcess, &QtcProcess::done, this, [this] { emit done(); }); - connect(m_shellProcess, &QtcProcess::errorOccurred, this, &DeviceShell::errorOccurred); + connect(m_shellProcess, &QtcProcess::done, m_shellProcess, + [this] { emit done(m_shellProcess->resultData()); }); connect(m_shellProcess, &QObject::destroyed, this, [this] { m_shellProcess = nullptr; }); connect(&m_thread, &QThread::finished, m_shellProcess, [this] { closeShellProcess(); }); diff --git a/src/libs/utils/deviceshell.h b/src/libs/utils/deviceshell.h index 8def78f6d3c..d25746ddf12 100644 --- a/src/libs/utils/deviceshell.h +++ b/src/libs/utils/deviceshell.h @@ -36,6 +36,7 @@ namespace Utils { class CommandLine; +class ProcessResultData; class QtcProcess; class DeviceShellImpl; @@ -69,8 +70,7 @@ public: State state() const; signals: - void done(); - void errorOccurred(QProcess::ProcessError error); + void done(const ProcessResultData &resultData); protected: virtual void startupFailed(const CommandLine &cmdLine); diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index 888884b3a19..04f1a1ab043 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -450,8 +450,11 @@ void DockerDevicePrivate::startContainer() LOG("Container via process: " << m_container); m_shell = std::make_unique(m_container); - connect(m_shell.get(), &DeviceShell::errorOccurred, this, [this] (QProcess::ProcessError error) { - qCWarning(dockerDeviceLog) << "Container shell encountered error:" << error; + connect(m_shell.get(), &DeviceShell::done, this, [this] (const ProcessResultData &resultData) { + if (resultData.m_error != QProcess::UnknownError) + return; + + qCWarning(dockerDeviceLog) << "Container shell encountered error:" << resultData.m_error; m_shell.reset(); DockerApi::recheckDockerDaemon();