forked from qt-creator/qt-creator
VcsBaseClient: Use cleanedStdOut()
Instead of connecting to stdOutText() signal. Change-Id: Ib05113bf624d58a4f66e6c1f64217b579c8de1a9 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -81,7 +81,8 @@ VcsCommand *VcsBaseClientImpl::createCommand(const FilePath &workingDirectory,
|
|||||||
if (editor) // assume that the commands output is the important thing
|
if (editor) // assume that the commands output is the important thing
|
||||||
cmd->addFlags(VcsCommand::SilentOutput);
|
cmd->addFlags(VcsCommand::SilentOutput);
|
||||||
} else if (editor) {
|
} else if (editor) {
|
||||||
connect(cmd, &VcsCommand::stdOutText, editor, &VcsBaseEditorWidget::setPlainText);
|
connect(cmd, &VcsCommand::finished, editor,
|
||||||
|
[editor, cmd] { editor->setPlainText(cmd->cleanedStdOut()); });
|
||||||
}
|
}
|
||||||
|
|
||||||
return cmd;
|
return cmd;
|
||||||
@@ -453,7 +454,7 @@ void VcsBaseClient::emitParsedStatus(const FilePath &repository, const QStringLi
|
|||||||
QStringList args(vcsCommandString(StatusCommand));
|
QStringList args(vcsCommandString(StatusCommand));
|
||||||
args << extraOptions;
|
args << extraOptions;
|
||||||
VcsCommand *cmd = createCommand(repository);
|
VcsCommand *cmd = createCommand(repository);
|
||||||
connect(cmd, &VcsCommand::stdOutText, this, &VcsBaseClient::statusParser);
|
connect(cmd, &VcsCommand::finished, this, [this, cmd] { statusParser(cmd->cleanedStdOut()); });
|
||||||
enqueueJob(cmd, args);
|
enqueueJob(cmd, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user