aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-07-23 23:50:56 -0300
committerflow <flowlnlnln@gmail.com>2022-07-23 23:50:56 -0300
commit3aa2003951eee6a25a43fc8a78480f1512306429 (patch)
tree80290658396beb9ec7dc20f521febfc7857bba7c /launcher
parent0e473f4570f49ba212459365c7971b5d3988a3ff (diff)
downloadPrismLauncher-3aa2003951eee6a25a43fc8a78480f1512306429.tar.gz
PrismLauncher-3aa2003951eee6a25a43fc8a78480f1512306429.tar.bz2
PrismLauncher-3aa2003951eee6a25a43fc8a78480f1512306429.zip
fix: filter in external resource pages not working
For some reason, using setFilterFixedString() doesn't seem to update the QRegularExpression object with a new value, instead leaving it empty. It updates QRegExp just fine, so maybe that's an Qt bug? o.O Anyway, using regex in the filter is kinda cool actually :D Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher')
-rw-r--r--launcher/ui/pages/instance/ExternalResourcesPage.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/launcher/ui/pages/instance/ExternalResourcesPage.cpp b/launcher/ui/pages/instance/ExternalResourcesPage.cpp
index d06f412b..69c20309 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(filterRegularExpression()))
+ if (filterRegularExpression().match(mod.name()).hasMatch())
return true;
- if (mod.description().contains(filterRegularExpression()))
+ if (filterRegularExpression().match(mod.description()).hasMatch())
return true;
for (auto& author : mod.authors()) {
- if (author.contains(filterRegularExpression())) {
+ if (filterRegularExpression().match(author).hasMatch()) {
return true;
}
}
@@ -182,7 +182,7 @@ void ExternalResourcesPage::retranslate()
void ExternalResourcesPage::filterTextChanged(const QString& newContents)
{
m_viewFilter = newContents;
- m_filterModel->setFilterFixedString(m_viewFilter);
+ m_filterModel->setFilterRegularExpression(m_viewFilter);
}
void ExternalResourcesPage::runningStateChanged(bool running)