From 3db6699018917060744654c40db30df7ed6d554d Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 31 Oct 2021 14:48:42 +0100 Subject: [PATCH] WorkerPool: Use variable --- ext/libstrawberry-common/core/workerpool.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/libstrawberry-common/core/workerpool.h b/ext/libstrawberry-common/core/workerpool.h index 4c23660c..ff453212 100644 --- a/ext/libstrawberry-common/core/workerpool.h +++ b/ext/libstrawberry-common/core/workerpool.h @@ -374,8 +374,9 @@ void WorkerPool::ProcessReadyReadStandardOutput() { Q_ASSERT(QThread::currentThread() == thread()); QProcess *process = qobject_cast(sender()); + QByteArray data = process->readAllStandardOutput(); - fprintf(stdout, "%s", process->readAllStandardOutput().data()); + fprintf(stdout, "%s", data.data()); fflush(stdout); } @@ -386,8 +387,9 @@ void WorkerPool::ProcessReadyReadStandardError() { Q_ASSERT(QThread::currentThread() == thread()); QProcess *process = qobject_cast(sender()); + QByteArray data = process->readAllStandardError(); - fprintf(stderr, "%s", process->readAllStandardError().data()); + fprintf(stderr, "%s", data.data()); fflush(stderr); }