Replace QRegExp with QRegularExpression.

Fix timeline viewport saving.
Fix invitation dialog. #124
This commit is contained in:
Black Hat
2018-11-29 10:41:38 +08:00
parent e7b2698521
commit 5192a91391
6 changed files with 48 additions and 31 deletions

View File

@@ -9,7 +9,6 @@
#include <events/roommemberevent.h>
#include <events/simplestateevents.h>
#include <QRegExp>
#include <QtCore/QDebug>
#include <QtQml> // for qmlRegisterType()
@@ -265,9 +264,7 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const {
}
if (role == MessageRole) {
static const QRegExp rmReplyRegExp("^> <@.*:.*> .*\n\n(.*)");
return utils::eventToString(evt, m_currentRoom)
.replace(rmReplyRegExp, "\\1");
return utils::removeReply(utils::eventToString(evt, m_currentRoom));
}
if (role == Qt::ToolTipRole) {