forked from qt-creator/qt-creator
GitBaseDiffEditorController: Use cleanedStdOut()
Instead of connecting to stdOutText() signal. Change-Id: Ia9d1d38934e254a8824620947a409fc52f7f531f Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -320,7 +320,7 @@ void GitBaseDiffEditorController::updateBranchList()
|
|||||||
|
|
||||||
VcsCommand *command = m_instance->vcsExec(baseDirectory(),
|
VcsCommand *command = m_instance->vcsExec(baseDirectory(),
|
||||||
{"branch", noColorOption, "-a", "--contains", revision});
|
{"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 remotePrefix = "remotes/";
|
||||||
const QString localPrefix = "<Local>";
|
const QString localPrefix = "<Local>";
|
||||||
const int prefixLength = remotePrefix.length();
|
const int prefixLength = remotePrefix.length();
|
||||||
@@ -328,7 +328,7 @@ void GitBaseDiffEditorController::updateBranchList()
|
|||||||
QStringList branches;
|
QStringList branches;
|
||||||
QString previousRemote = localPrefix;
|
QString previousRemote = localPrefix;
|
||||||
bool first = true;
|
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();
|
const QString b = branch.mid(2).trimmed();
|
||||||
if (b.isEmpty())
|
if (b.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user