From 8bcd27cedf3e6b4513f459ea26f9f37daedceb89 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 9 Dec 2018 00:26:37 +0100 Subject: [PATCH] fix rich text being accidentally parsed through message history in split text input --- src/widgets/splits/SplitInput.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/widgets/splits/SplitInput.cpp b/src/widgets/splits/SplitInput.cpp index 54519de3..58ccb2cd 100644 --- a/src/widgets/splits/SplitInput.cpp +++ b/src/widgets/splits/SplitInput.cpp @@ -208,7 +208,7 @@ void SplitInput::installKeyPressedEvent() if (!(event->modifiers() & Qt::ControlModifier)) { this->currMsg_ = QString(); - this->ui_.textEdit->setText(QString()); + this->ui_.textEdit->setPlainText(QString()); } this->prevIndex_ = this->prevMsg_.size(); } @@ -237,7 +237,7 @@ void SplitInput::installKeyPressedEvent() } this->prevIndex_--; - this->ui_.textEdit->setText( + this->ui_.textEdit->setPlainText( this->prevMsg_.at(this->prevIndex_)); QTextCursor cursor = this->ui_.textEdit->textCursor(); @@ -275,7 +275,7 @@ void SplitInput::installKeyPressedEvent() this->prevIndex_ != this->prevMsg_.size()) { this->prevIndex_++; - this->ui_.textEdit->setText( + this->ui_.textEdit->setPlainText( this->prevMsg_.at(this->prevIndex_)); } else @@ -285,7 +285,7 @@ void SplitInput::installKeyPressedEvent() { // If user has just come from a message history // Then simply get currMsg_. - this->ui_.textEdit->setText(this->currMsg_); + this->ui_.textEdit->setPlainText(this->currMsg_); } else if (message != this->currMsg_) {