From b92b0d410042c1f92c0ebe5d2748ce8aaf2e231a Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Sun, 21 Jan 2024 22:01:14 +0100 Subject: [PATCH] Perforce: Move logging the error directly into the synchronousProcess() Change-Id: I9d090f2da36d3868e9b4ca2a7f297be62e36e65a Reviewed-by: Orgad Shaneh --- src/plugins/perforce/perforceplugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp index d6ad9cfd4ca..8026092b9e6 100644 --- a/src/plugins/perforce/perforceplugin.cpp +++ b/src/plugins/perforce/perforceplugin.cpp @@ -1220,6 +1220,9 @@ PerforceResponse PerforcePluginPrivate::synchronousProcess(const FilePath &worki response.stdErr = process.cleanedStdErr(); response.stdOut = process.cleanedStdOut(); response.message = process.exitMessage(); + + if (response.error && (flags & ErrorToWindow)) + VcsOutputWindow::appendError(process.exitMessage()); return response; } @@ -1261,9 +1264,6 @@ PerforceResponse PerforcePluginPrivate::runP4Cmd(const FilePath &workingDir, if (flags & ShowBusyCursor) QGuiApplication::restoreOverrideCursor(); - - if (response.error && (flags & ErrorToWindow)) - VcsOutputWindow::appendError(response.message); return response; }