From c767f193ce09135f04a70927b034a212b8d09add Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 19 Sep 2022 09:46:48 +0200 Subject: [PATCH] VcsBaseClient: Use cleanedStdOut() Instead of connecting to stdOutText() signal. Change-Id: Ib05113bf624d58a4f66e6c1f64217b579c8de1a9 Reviewed-by: Orgad Shaneh Reviewed-by: --- src/plugins/vcsbase/vcsbaseclient.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/vcsbase/vcsbaseclient.cpp b/src/plugins/vcsbase/vcsbaseclient.cpp index 16ba4657791..adf70c831a8 100644 --- a/src/plugins/vcsbase/vcsbaseclient.cpp +++ b/src/plugins/vcsbase/vcsbaseclient.cpp @@ -81,7 +81,8 @@ VcsCommand *VcsBaseClientImpl::createCommand(const FilePath &workingDirectory, if (editor) // assume that the commands output is the important thing cmd->addFlags(VcsCommand::SilentOutput); } else if (editor) { - connect(cmd, &VcsCommand::stdOutText, editor, &VcsBaseEditorWidget::setPlainText); + connect(cmd, &VcsCommand::finished, editor, + [editor, cmd] { editor->setPlainText(cmd->cleanedStdOut()); }); } return cmd; @@ -453,7 +454,7 @@ void VcsBaseClient::emitParsedStatus(const FilePath &repository, const QStringLi QStringList args(vcsCommandString(StatusCommand)); args << extraOptions; VcsCommand *cmd = createCommand(repository); - connect(cmd, &VcsCommand::stdOutText, this, &VcsBaseClient::statusParser); + connect(cmd, &VcsCommand::finished, this, [this, cmd] { statusParser(cmd->cleanedStdOut()); }); enqueueJob(cmd, args); }