forked from qt-creator/qt-creator
Introduce Utils::SynchronousProcess::normalizeNewlines
Replaces \r\n? with \n. Some console applications (e.g. git-push, git-rebase) use \r alone to move the cursor to the line's beginning. This should be replaced by \n rather than just be erased. Change-Id: I8d614d2b471e59decdbfa7f173ffa7fbdb11759b Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
1b13122cd1
commit
208aeb79ed
@@ -863,15 +863,15 @@ static SynchronousProcessResponse runVcsFullySynchronously(const QString &workin
|
||||
&stdOut, &stdErr, true);
|
||||
|
||||
if (!stdErr.isEmpty()) {
|
||||
response.stdErr = (outputCodec ? outputCodec->toUnicode(stdErr) : QString::fromLocal8Bit(stdErr));
|
||||
response.stdErr.remove(QLatin1Char('\r'));
|
||||
response.stdErr = Utils::SynchronousProcess::normalizeNewlines(
|
||||
outputCodec ? outputCodec->toUnicode(stdErr) : QString::fromLocal8Bit(stdErr));
|
||||
if (!(flags & VcsBasePlugin::SuppressStdErrInLogWindow))
|
||||
outputWindow->append(response.stdErr);
|
||||
}
|
||||
|
||||
if (!stdOut.isEmpty()) {
|
||||
response.stdOut = (outputCodec ? outputCodec->toUnicode(stdOut) : QString::fromLocal8Bit(stdOut));
|
||||
response.stdOut.remove(QLatin1Char('\r'));
|
||||
response.stdOut = Utils::SynchronousProcess::normalizeNewlines(
|
||||
outputCodec ? outputCodec->toUnicode(stdOut) : QString::fromLocal8Bit(stdOut));
|
||||
if (flags & VcsBasePlugin::ShowStdOutInLogWindow) {
|
||||
if (flags & VcsBasePlugin::SilentOutput)
|
||||
outputWindow->appendSilently(response.stdOut);
|
||||
|
||||
Reference in New Issue
Block a user