Commit bb400d67 authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Port QRegExp to QRegularExpression

parent 267652c1
Pipeline #29251 passed with stage
in 8 minutes and 9 seconds
......@@ -11,6 +11,7 @@
#include <kmime/kmime_message.h>
#include "akonadi_notes_debug.h"
#include <QRegularExpression>
#include <QString>
#include <QUuid>
#include <qdom.h>
......@@ -557,11 +558,10 @@ QString NoteMessageWrapper::toPlainText() const
}
//From cleanHtml in kdepimlibs/kcalutils/incidenceformatter.cpp
QRegExp rx(QStringLiteral("<body[^>]*>(.*)</body>"), Qt::CaseInsensitive);
rx.indexIn(d->text);
QString body = rx.cap(1);
const QRegularExpression rx(QStringLiteral("<body[^>]*>(.*)</body>"), QRegularExpression::CaseInsensitiveOption);
QString body = rx.match(d->text).captured(1);
return body.remove(QRegExp(QStringLiteral("<[^>]*>"))).trimmed().toHtmlEscaped();
return body.remove(QRegularExpression(QStringLiteral("<[^>]*>"))).trimmed().toHtmlEscaped();
}
QVector<Attachment> &NoteMessageWrapper::attachments()
......
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