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
*.sln.iml
/shadPS4/game/*
/shadPS4/psf.txt

View File

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