aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2018-11-16 00:18:13 +0200
committerOrgad Shaneh <orgads@gmail.com>2018-11-20 08:37:42 +0000
commitd5888363613274a269f4b05f18986b0f0f154b00 (patch)
tree0e07a88780109f270b330bd11990bd28fd00a59a
parente52ea7771f1b373f30210937d718e262c64eab97 (diff)
OutputWindow: Do not prepend newline unconditionally
This breaks continuous output that uses \r. For example, create a Custom Executable run configuration with: curl -O http://ftp.fau.de/qtproject/official_releases/qtcreator/4.7/4.7.2/qt-creator-opensource-linux-x86_64-4.7.2.run and watch the output. Change-Id: Ic320d210b31c229748c9eedc2b9514adb19bd365 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
-rw-r--r--src/plugins/coreplugin/outputwindow.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/outputwindow.cpp b/src/plugins/coreplugin/outputwindow.cpp
index 90b06ba39f..d53abdd32d 100644
--- a/src/plugins/coreplugin/outputwindow.cpp
+++ b/src/plugins/coreplugin/outputwindow.cpp
@@ -322,7 +322,9 @@ void OutputWindow::appendMessage(const QString &output, OutputFormat format)
bool enforceNewline = d->enforceNewline;
d->enforceNewline = false;
- if (!enforceNewline) {
+ if (enforceNewline) {
+ out.prepend('\n');
+ } else {
newline = out.indexOf(QLatin1Char('\n'));
moveCursor(QTextCursor::End);
if (newline != -1 && d->formatter)
@@ -338,7 +340,7 @@ void OutputWindow::appendMessage(const QString &output, OutputFormat format)
s.chop(1);
}
if (d->formatter)
- d->formatter->appendMessage(QLatin1Char('\n') + s, format);
+ d->formatter->appendMessage(s, format);
}
} else {
if (d->formatter)