aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/remotelinux/remotelinuxsignaloperation.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2025-04-08 17:17:23 +0200
committerhjk <[email protected]>2025-04-11 09:38:34 +0000
commit9e9bbf215cb72467ec71be144b24b177e31afe0a (patch)
tree3a921f3cb8cace118182ff43ae29079b3067ead4 /src/plugins/remotelinux/remotelinuxsignaloperation.cpp
parent133cdb8e80894b0438e441a61ada13da5694ceaa (diff)
Utils: Replace Result class by type alias to std::expected<T, QString>
... to be able to conveniently return also non-void cases without being exposed to the syntax of expected. The price for the more general approach is some uglification of the void case: The previous 'Result' is now equivalent to 'Result<>', which needs to be spelled out in function signatures, and some changes to the special cases. Change-Id: Ic5026e237ef2077a0765cdb8287122cae99d699f Reviewed-by: Marcus Tillmanns <[email protected]> Reviewed-by: Eike Ziller <[email protected]>
Diffstat (limited to 'src/plugins/remotelinux/remotelinuxsignaloperation.cpp')
-rw-r--r--src/plugins/remotelinux/remotelinuxsignaloperation.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/remotelinux/remotelinuxsignaloperation.cpp b/src/plugins/remotelinux/remotelinuxsignaloperation.cpp
index b48ea1f7504..0ba08f2d04e 100644
--- a/src/plugins/remotelinux/remotelinuxsignaloperation.cpp
+++ b/src/plugins/remotelinux/remotelinuxsignaloperation.cpp
@@ -77,11 +77,11 @@ void RemoteLinuxSignalOperation::interruptProcess(qint64 pid)
void RemoteLinuxSignalOperation::runnerDone()
{
- Result result = Result::Ok;
+ Result<> result = ResultOk;
if (m_process->exitStatus() != QProcess::NormalExit) {
- result = Result::Error(m_process->errorString());
+ result = ResultError(m_process->errorString());
} else if (m_process->exitCode() != 0) {
- result = Result::Error(Tr::tr("Exit code is %1. stderr:").arg(m_process->exitCode())
+ result = ResultError(Tr::tr("Exit code is %1. stderr:").arg(m_process->exitCode())
+ ' ' + QString::fromLatin1(m_process->rawStdErr()));
}
m_process.release()->deleteLater();