Commit 5be92c63 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Don't add empty QChar

Bug reported by Bastian M. Wojek

CCMAIL: bastian@wojek.de
parent 2749671c
Pipeline #59281 skipped
...@@ -853,7 +853,12 @@ void RichTextComposerControler::addQuotes(const QString &defaultQuote) ...@@ -853,7 +853,12 @@ void RichTextComposerControler::addQuotes(const QString &defaultQuote)
lastCharacterIsAParagraphChar = true; lastCharacterIsAParagraphChar = true;
} }
} }
richTextComposer()->insertPlainText(d->addQuotesToText(selectedText, defaultQuote) + (lastCharacterIsAParagraphChar ? QChar::ParagraphSeparator : QChar())); QString text = d->addQuotesToText(selectedText, defaultQuote);
if (lastCharacterIsAParagraphChar) {
text += QChar::ParagraphSeparator;
}
richTextComposer()->insertPlainText(text);
cursor.endEditBlock(); cursor.endEditBlock();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment