fixed search field in gamelistviewer

This commit is contained in:
georgemoralis 2022-10-28 09:43:56 +03:00
parent 7101247fd5
commit cc30f83990
2 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View File

@ -397,3 +397,4 @@ FodyWeavers.xsd
# JetBrains Rider # JetBrains Rider
*.sln.iml *.sln.iml
/shadPS4/game/* /shadPS4/game/*
/shadPS4/psf.txt

View File

@ -6,6 +6,7 @@
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QDirIterator> #include <QDirIterator>
#include <QLineEdit> #include <QLineEdit>
#include <QRegularExpression>
#include "../emulator/fileFormat/PSF.h" #include "../emulator/fileFormat/PSF.h"
GameListViewer::GameListViewer(QWidget* parent) GameListViewer::GameListViewer(QWidget* parent)
@ -66,8 +67,8 @@ void GameListViewer::searchGame(QString searchText)
{ {
proxyModel->setFilterKeyColumn(1); //filter Name column only proxyModel->setFilterKeyColumn(1); //filter Name column only
QString strPattern = searchText; QString strPattern = searchText;
//TODO QRegExp regExp(strPattern, Qt::CaseInsensitive); QRegularExpression regExp(strPattern, QRegularExpression::CaseInsensitiveOption);
//TODO proxyModel->setFilterRegExp(regExp); proxyModel->setFilterRegularExpression(regExp);
} }
void GameListViewer::AddEntry(const QList<QStandardItem*>& entry_items) { void GameListViewer::AddEntry(const QList<QStandardItem*>& entry_items) {
item_model->invisibleRootItem()->appendRow(entry_items); item_model->invisibleRootItem()->appendRow(entry_items);