refactor: replace QRegExp with QRegularExpression
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
@ -32,13 +32,13 @@ class SortProxy : public QSortFilterProxyModel {
|
||||
|
||||
const auto& mod = model->at(source_row);
|
||||
|
||||
if (mod.name().contains(filterRegExp()))
|
||||
if (mod.name().contains(filterRegularExpression()))
|
||||
return true;
|
||||
if (mod.description().contains(filterRegExp()))
|
||||
if (mod.description().contains(filterRegularExpression()))
|
||||
return true;
|
||||
|
||||
for (auto& author : mod.authors()) {
|
||||
if (author.contains(filterRegExp())) {
|
||||
if (author.contains(filterRegularExpression())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include <QClipboard>
|
||||
#include <QKeyEvent>
|
||||
#include <QMenu>
|
||||
#include <QRegularExpression>
|
||||
|
||||
#include <Application.h>
|
||||
|
||||
@ -154,7 +155,7 @@ public:
|
||||
if (role == Qt::DisplayRole || role == Qt::EditRole)
|
||||
{
|
||||
QVariant result = sourceModel()->data(mapToSource(proxyIndex), role);
|
||||
return result.toString().remove(QRegExp("\\.png$"));
|
||||
return result.toString().remove(QRegularExpression("\\.png$"));
|
||||
}
|
||||
if (role == Qt::DecorationRole)
|
||||
{
|
||||
|
Reference in New Issue
Block a user