diff options
author | Bernd Weimer <bernd.weimer@pelagicore.com> | 2019-10-10 13:43:46 +0200 |
---|---|---|
committer | Bernd Weimer <bernd.weimer@pelagicore.com> | 2019-11-09 02:15:17 +0100 |
commit | 161bd31824126ee38a33b9267347440af09cabd8 (patch) | |
tree | a4bdb603917790b522f46bfac8689140c9da9d3f | |
parent | a334d8cca02be61891d87f38c9e530ee226b3ffd (diff) | |
download | qtapplicationmanager-161bd31824126ee38a33b9267347440af09cabd8.tar.gz |
Fix error string in sudo client
The client error string was not updated when the server was called
directly (short-circuite).
Change-Id: Ie4ed81008f16eb89e3397a195f4864300abfa18b
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
-rw-r--r-- | src/installer-lib/sudo.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/installer-lib/sudo.cpp b/src/installer-lib/sudo.cpp index a9d661fe..b7e5578b 100644 --- a/src/installer-lib/sudo.cpp +++ b/src/installer-lib/sudo.cpp @@ -349,8 +349,11 @@ QByteArray SudoClient::call(const QByteArray &msg) { QMutexLocker locker(&m_mutex); - if (m_shortCircuit) - return m_shortCircuit->receive(msg); + if (m_shortCircuit) { + const QByteArray res = m_shortCircuit->receive(msg); + m_errorString = m_shortCircuit->lastError(); + return res; + } #ifdef Q_OS_LINUX if (m_socket >= 0) { |