diff options
author | bunnei <bunneidev@gmail.com> | 2018-09-27 17:09:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-27 17:09:11 -0400 |
commit | f7da74d18e977aa94d19e7dc6a19e75df48708e4 (patch) | |
tree | 10092377231b349f48fb0c98ad98ebfe7905ba58 /src/yuzu/game_list.cpp | |
parent | fc2419e441dbd2270460c8fe7a92e515c0789fa5 (diff) | |
parent | 44228ee3ed5ab70c47f766a597893152027f8153 (diff) |
Merge pull request #1360 from FearlessTobi/port-3979
Port citra-emu/citra#3979 game_list: move SearchField to game_list_p.h and fix untranslated text
Diffstat (limited to 'src/yuzu/game_list.cpp')
-rw-r--r-- | src/yuzu/game_list.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index 991ae10cd..67890455a 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp @@ -26,10 +26,10 @@ #include "yuzu/main.h" #include "yuzu/ui_settings.h" -GameList::SearchField::KeyReleaseEater::KeyReleaseEater(GameList* gamelist) : gamelist{gamelist} {} +GameListSearchField::KeyReleaseEater::KeyReleaseEater(GameList* gamelist) : gamelist{gamelist} {} // EventFilter in order to process systemkeys while editing the searchfield -bool GameList::SearchField::KeyReleaseEater::eventFilter(QObject* obj, QEvent* event) { +bool GameListSearchField::KeyReleaseEater::eventFilter(QObject* obj, QEvent* event) { // If it isn't a KeyRelease event then continue with standard event processing if (event->type() != QEvent::KeyRelease) return QObject::eventFilter(obj, event); @@ -88,21 +88,21 @@ bool GameList::SearchField::KeyReleaseEater::eventFilter(QObject* obj, QEvent* e return QObject::eventFilter(obj, event); } -void GameList::SearchField::setFilterResult(int visible, int total) { +void GameListSearchField::setFilterResult(int visible, int total) { label_filter_result->setText(tr("%1 of %n result(s)", "", total).arg(visible)); } -void GameList::SearchField::clear() { +void GameListSearchField::clear() { edit_filter->setText(""); } -void GameList::SearchField::setFocus() { +void GameListSearchField::setFocus() { if (edit_filter->isVisible()) { edit_filter->setFocus(); } } -GameList::SearchField::SearchField(GameList* parent) : QWidget{parent} { +GameListSearchField::GameListSearchField(GameList* parent) : QWidget{parent} { KeyReleaseEater* keyReleaseEater = new KeyReleaseEater(parent); layout_filter = new QHBoxLayout; layout_filter->setMargin(8); @@ -202,7 +202,7 @@ GameList::GameList(FileSys::VirtualFilesystem vfs, GMainWindow* parent) this->main_window = parent; layout = new QVBoxLayout; tree_view = new QTreeView; - search_field = new SearchField(this); + search_field = new GameListSearchField(this); item_model = new QStandardItemModel(tree_view); tree_view->setModel(item_model); |