all repos — mgba @ f6590de2cea808bc62a494203c7a8f04ced8aed0

mGBA Game Boy Advance Emulator

Qt: Fix even more potential cases of the GBAKeyEditor dangling
Jeffrey Pfau jeffrey@endrift.com
Sun, 17 Jan 2016 22:38:39 -0800
commit

f6590de2cea808bc62a494203c7a8f04ced8aed0

parent

6bc609b1e02610abb0a100d73c223fecb74a8611

2 files changed, 5 insertions(+), 0 deletions(-)

jump to
M src/platform/qt/GBAKeyEditor.cppsrc/platform/qt/GBAKeyEditor.cpp

@@ -133,6 +133,10 @@

setAll->setFocus(); } +GBAKeyEditor::~GBAKeyEditor() { + m_controller->releaseFocus(this); +} + void GBAKeyEditor::setAll() { m_currentKey = m_keyOrder.begin(); (*m_currentKey)->setFocus();
M src/platform/qt/GBAKeyEditor.hsrc/platform/qt/GBAKeyEditor.h

@@ -28,6 +28,7 @@ Q_OBJECT

public: GBAKeyEditor(InputController* controller, int type, const QString& profile = QString(), QWidget* parent = nullptr); + virtual ~GBAKeyEditor(); public slots: void setAll();