summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/game_list.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp
index 465084fea..b5a02700d 100644
--- a/src/yuzu/game_list.cpp
+++ b/src/yuzu/game_list.cpp
@@ -214,13 +214,17 @@ void GameList::OnTextChanged(const QString& new_text) {
214 const int children_count = folder->rowCount(); 214 const int children_count = folder->rowCount();
215 for (int j = 0; j < children_count; ++j) { 215 for (int j = 0; j < children_count; ++j) {
216 ++children_total; 216 ++children_total;
217
217 const QStandardItem* child = folder->child(j, 0); 218 const QStandardItem* child = folder->child(j, 0);
219
220 const auto program_id = child->data(GameListItemPath::ProgramIdRole).toULongLong();
221
218 const QString file_path = 222 const QString file_path =
219 child->data(GameListItemPath::FullPathRole).toString().toLower(); 223 child->data(GameListItemPath::FullPathRole).toString().toLower();
220 const QString file_title = 224 const QString file_title =
221 child->data(GameListItemPath::TitleRole).toString().toLower(); 225 child->data(GameListItemPath::TitleRole).toString().toLower();
222 const QString file_program_id = 226 const QString file_program_id =
223 child->data(GameListItemPath::ProgramIdRole).toString().toLower(); 227 QStringLiteral("%1").arg(program_id, 16, 16, QLatin1Char{'0'});
224 228
225 // Only items which filename in combination with its title contains all words 229 // Only items which filename in combination with its title contains all words
226 // that are in the searchfield will be visible in the gamelist 230 // that are in the searchfield will be visible in the gamelist
@@ -231,7 +235,7 @@ void GameList::OnTextChanged(const QString& new_text) {
231 file_path.mid(file_path.lastIndexOf(QLatin1Char{'/'}) + 1) + QLatin1Char{' '} + 235 file_path.mid(file_path.lastIndexOf(QLatin1Char{'/'}) + 1) + QLatin1Char{' '} +
232 file_title; 236 file_title;
233 if (ContainsAllWords(file_name, edit_filter_text) || 237 if (ContainsAllWords(file_name, edit_filter_text) ||
234 (file_program_id.count() == 16 && edit_filter_text.contains(file_program_id))) { 238 (file_program_id.count() == 16 && file_program_id.contains(edit_filter_text))) {
235 tree_view->setRowHidden(j, folder_index, false); 239 tree_view->setRowHidden(j, folder_index, false);
236 ++result_count; 240 ++result_count;
237 } else { 241 } else {