citra-emu
/
citra
Archived
1
0
Fork 0

Merge pull request #5574 from FearlessTobi/port-4733

Port yuzu-emu/yuzu#4733: "qt/game_list: Give GameListSearchField::KeyReleaseEater a parent"
This commit is contained in:
Pengfei Zhu 2020-10-14 10:09:45 -05:00 committed by GitHub
commit 1bb20571b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -32,7 +32,8 @@
#include "core/file_sys/archive_source_sd_savedata.h" #include "core/file_sys/archive_source_sd_savedata.h"
#include "core/hle/service/fs/archive.h" #include "core/hle/service/fs/archive.h"
GameListSearchField::KeyReleaseEater::KeyReleaseEater(GameList* gamelist) : gamelist{gamelist} {} GameListSearchField::KeyReleaseEater::KeyReleaseEater(GameList* gamelist, QObject* parent)
: QObject(parent), gamelist{gamelist} {}
// EventFilter in order to process systemkeys while editing the searchfield // EventFilter in order to process systemkeys while editing the searchfield
bool GameListSearchField::KeyReleaseEater::eventFilter(QObject* obj, QEvent* event) { bool GameListSearchField::KeyReleaseEater::eventFilter(QObject* obj, QEvent* event) {
@ -128,7 +129,7 @@ void GameListSearchField::setFocus() {
} }
GameListSearchField::GameListSearchField(GameList* parent) : QWidget{parent} { GameListSearchField::GameListSearchField(GameList* parent) : QWidget{parent} {
auto* const key_release_eater = new KeyReleaseEater(parent); auto* const key_release_eater = new KeyReleaseEater(parent, this);
layout_filter = new QHBoxLayout; layout_filter = new QHBoxLayout;
layout_filter->setMargin(8); layout_filter->setMargin(8);
label_filter = new QLabel; label_filter = new QLabel;

View File

@ -432,7 +432,7 @@ public:
private: private:
class KeyReleaseEater : public QObject { class KeyReleaseEater : public QObject {
public: public:
explicit KeyReleaseEater(GameList* gamelist); explicit KeyReleaseEater(GameList* gamelist, QObject* parent = nullptr);
private: private:
GameList* gamelist = nullptr; GameList* gamelist = nullptr;