From 0d0ce383be825dcb3cd904d4fd791d107ec75182 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 3 Feb 2023 11:54:23 +0100 Subject: [PATCH] RemoteLinux: Reuse StringUtils::joinStrings() Change-Id: I5be99df99a4b3952374b9f3b719d032d897b691c Reviewed-by: Christian Kandeler --- src/plugins/remotelinux/linuxdevice.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/plugins/remotelinux/linuxdevice.cpp b/src/plugins/remotelinux/linuxdevice.cpp index a61a5586d66..d64bf92253c 100644 --- a/src/plugins/remotelinux/linuxdevice.cpp +++ b/src/plugins/remotelinux/linuxdevice.cpp @@ -640,11 +640,8 @@ void LinuxProcessInterface::handleDone(const ProcessResultData &resultData) ProcessResultData finalData = resultData; if (!m_pidParsed) { finalData.m_error = QProcess::FailedToStart; - if (!m_error.isEmpty()) { - if (!finalData.m_errorString.isEmpty()) - finalData.m_errorString += "\n"; - finalData.m_errorString += QString::fromLocal8Bit(m_error); - } + finalData.m_errorString = Utils::joinStrings({finalData.m_errorString, + QString::fromLocal8Bit(m_error)}, '\n'); } emit done(finalData); }