diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-05-02 19:48:37 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-07-10 12:17:52 +0200 |
commit | ff2cd50bfaeaab89ab830f1223c1e3649642dfa3 (patch) | |
tree | 7ba32b95bfe3fbaa18a37d271134b62172990a21 /launcher/ui/pages | |
parent | 984692dc629ca3712d482b174a67557dd9e635a8 (diff) | |
download | PrismLauncher-ff2cd50bfaeaab89ab830f1223c1e3649642dfa3.tar.gz PrismLauncher-ff2cd50bfaeaab89ab830f1223c1e3649642dfa3.tar.bz2 PrismLauncher-ff2cd50bfaeaab89ab830f1223c1e3649642dfa3.zip |
refactor: replace QRegExp with QRegularExpression
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/ui/pages')
-rw-r--r-- | launcher/ui/pages/instance/ExternalResourcesPage.cpp | 6 | ||||
-rw-r--r-- | launcher/ui/pages/instance/ScreenshotsPage.cpp | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/launcher/ui/pages/instance/ExternalResourcesPage.cpp b/launcher/ui/pages/instance/ExternalResourcesPage.cpp index 02eeae3d..d06f412b 100644 --- a/launcher/ui/pages/instance/ExternalResourcesPage.cpp +++ b/launcher/ui/pages/instance/ExternalResourcesPage.cpp @@ -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; } } diff --git a/launcher/ui/pages/instance/ScreenshotsPage.cpp b/launcher/ui/pages/instance/ScreenshotsPage.cpp index 75eb5a3f..c97253e4 100644 --- a/launcher/ui/pages/instance/ScreenshotsPage.cpp +++ b/launcher/ui/pages/instance/ScreenshotsPage.cpp @@ -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) { |