Skip to content
Snippets Groups Projects
Commit 42ec512e authored by mae's avatar mae
Browse files

For application output, use QPlainTextEdit::appendPlainText() whenever

possible, to get the automatic scrolling to the bottom.
parent c964d64d
No related branches found
No related tags found
No related merge requests found
...@@ -335,7 +335,14 @@ void OutputWindow::appendOutput(const QString &out) ...@@ -335,7 +335,14 @@ void OutputWindow::appendOutput(const QString &out)
void OutputWindow::appendOutputInline(const QString &out) void OutputWindow::appendOutputInline(const QString &out)
{ {
moveCursor(QTextCursor::End); 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() void OutputWindow::insertLine()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment