From 42ec512e93ab1f869d4313c9ee56e7677fbe6432 Mon Sep 17 00:00:00 2001 From: mae <qt-info@nokia.com> Date: Wed, 25 Mar 2009 13:48:08 +0100 Subject: [PATCH] For application output, use QPlainTextEdit::appendPlainText() whenever possible, to get the automatic scrolling to the bottom. --- src/plugins/projectexplorer/outputwindow.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/outputwindow.cpp b/src/plugins/projectexplorer/outputwindow.cpp index 853e94a250a..c4839ba7853 100644 --- a/src/plugins/projectexplorer/outputwindow.cpp +++ b/src/plugins/projectexplorer/outputwindow.cpp @@ -335,7 +335,14 @@ void OutputWindow::appendOutput(const QString &out) void OutputWindow::appendOutputInline(const QString &out) { moveCursor(QTextCursor::End); - insertPlainText(out); + int newline = out.indexOf(QLatin1Char('\n')); + if (newline < 0) { + insertPlainText(out); + return; + } + insertPlainText(out.left(newline)); + if (newline < out.length()) + appendPlainText(out.mid(newline+1)); } void OutputWindow::insertLine() -- GitLab