Commit bb955d0f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix Bug 419473 - kmail crashed on sending mail

I can't reproduce it but we will disconnect it before deleting it.

BUG: 419473
FIXED-IN: 5.14.0
parent 612fa47c
......@@ -73,6 +73,7 @@ public:
};
UndoHtmlVersion undoHtmlVersion;
bool blockClearUndoHtmlVersion = false;
QMetaObject::Connection mRichTextChangedConnection;
};
RichTextComposer::RichTextComposer(QWidget *parent)
......@@ -80,7 +81,7 @@ RichTextComposer::RichTextComposer(QWidget *parent)
, d(new RichTextComposerPrivate(this))
{
setAcceptRichText(false);
connect(this, &RichTextComposer::textChanged, this, [this]() {
d->mRichTextChangedConnection = connect(this, &RichTextComposer::textChanged, this, [this]() {
if (!d->blockClearUndoHtmlVersion && d->undoHtmlVersion.isValid() && (d->mode == RichTextComposer::Plain)) {
if (toPlainText() != d->undoHtmlVersion.plainText) {
d->undoHtmlVersion.clear();
......@@ -91,6 +92,7 @@ RichTextComposer::RichTextComposer(QWidget *parent)
RichTextComposer::~RichTextComposer()
{
disconnect(d->mRichTextChangedConnection);
delete d;
}
......
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