From eda8a4244f2b291916eeea774a2f16147ddefbaa Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 19 Sep 2022 08:57:24 +0200 Subject: [PATCH] GitBaseDiffEditorController: Use cleanedStdOut() Instead of connecting to stdOutText() signal. Change-Id: Ia9d1d38934e254a8824620947a409fc52f7f531f Reviewed-by: Reviewed-by: Orgad Shaneh --- src/plugins/git/gitclient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 252568b382a..fac03a8efa6 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -320,7 +320,7 @@ void GitBaseDiffEditorController::updateBranchList() VcsCommand *command = m_instance->vcsExec(baseDirectory(), {"branch", noColorOption, "-a", "--contains", revision}); - connect(command, &VcsCommand::stdOutText, this, [this](const QString &text) { + connect(command, &VcsCommand::finished, this, [this, command] { const QString remotePrefix = "remotes/"; const QString localPrefix = ""; const int prefixLength = remotePrefix.length(); @@ -328,7 +328,7 @@ void GitBaseDiffEditorController::updateBranchList() QStringList branches; QString previousRemote = localPrefix; bool first = true; - for (const QString &branch : text.split('\n')) { + for (const QString &branch : command->cleanedStdOut().split('\n')) { const QString b = branch.mid(2).trimmed(); if (b.isEmpty()) continue;