diff --git a/src/SeerGdbLogWidget.cpp b/src/SeerGdbLogWidget.cpp index 7df6ac0..8799075 100644 --- a/src/SeerGdbLogWidget.cpp +++ b/src/SeerGdbLogWidget.cpp @@ -30,11 +30,6 @@ void SeerGdbLogWidget::processText (const QString& text) { str.chop(1); } - // Remove trailing "\n" - if (str.back() == '\n') { - str.chop(1); - } - // Remove leading "&" // &"p name // " @@ -52,12 +47,6 @@ void SeerGdbLogWidget::processText (const QString& text) { str.chop(1); } - // Remove trailing "\n" - if (str.back() == '\n') { - str.chop(1); - } - - // Remove leading "@" // @"memcheck monitor commands: // " @@ -75,12 +64,6 @@ void SeerGdbLogWidget::processText (const QString& text) { str.chop(1); } - // Remove trailing "\n" - if (str.back() == '\n') { - str.chop(1); - } - - // Use string as it is. }else{ str = text; @@ -88,11 +71,12 @@ void SeerGdbLogWidget::processText (const QString& text) { // Filter out \n and \t. // Should probably do something better and expand them. - str.replace("\\t", ""); - str.replace("\\n", ""); + str.replace("\\t", "\t"); + str.replace("\\n", "\n"); + str.replace("\\\"", "\""); // Write the string to the log. - textEdit->append(str); + textEdit->insertPlainText(str); // If there is breakpoint message (via a manual command), ask // for the breakpoint list to be refreshed. diff --git a/src/SeerLogWidget.cpp b/src/SeerLogWidget.cpp index 9f5ecca..31edc76 100644 --- a/src/SeerLogWidget.cpp +++ b/src/SeerLogWidget.cpp @@ -54,10 +54,12 @@ void SeerLogWidget::setLogEnabled (bool flag) { void SeerLogWidget::moveToEnd () { + /* XXX // Move to the end and then to the beginning of that line. QTextCursor cursor = textEdit->textCursor(); textEdit->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor); textEdit->moveCursor(QTextCursor::StartOfBlock, QTextCursor::MoveAnchor); + */ textEdit->verticalScrollBar()->setValue(textEdit->verticalScrollBar()->maximum()); } diff --git a/src/SeerTildeLogWidget.cpp b/src/SeerTildeLogWidget.cpp index a02616f..5838aaa 100644 --- a/src/SeerTildeLogWidget.cpp +++ b/src/SeerTildeLogWidget.cpp @@ -22,10 +22,6 @@ void SeerTildeLogWidget::processText (const QString& text) { str = Seer::filterEscapes(str); - if (str.back() == '\n') { // Remove trailing "\n" - str.chop(1); - } - - textEdit->append(str); + textEdit->insertPlainText(str); }