mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix even more potential cases of the GBAKeyEditor dangling
This commit is contained in:
parent
6bc609b1e0
commit
f6590de2ce
|
@ -133,6 +133,10 @@ GBAKeyEditor::GBAKeyEditor(InputController* controller, int type, const QString&
|
||||||
setAll->setFocus();
|
setAll->setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GBAKeyEditor::~GBAKeyEditor() {
|
||||||
|
m_controller->releaseFocus(this);
|
||||||
|
}
|
||||||
|
|
||||||
void GBAKeyEditor::setAll() {
|
void GBAKeyEditor::setAll() {
|
||||||
m_currentKey = m_keyOrder.begin();
|
m_currentKey = m_keyOrder.begin();
|
||||||
(*m_currentKey)->setFocus();
|
(*m_currentKey)->setFocus();
|
||||||
|
|
|
@ -28,6 +28,7 @@ Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GBAKeyEditor(InputController* controller, int type, const QString& profile = QString(), QWidget* parent = nullptr);
|
GBAKeyEditor(InputController* controller, int type, const QString& profile = QString(), QWidget* parent = nullptr);
|
||||||
|
virtual ~GBAKeyEditor();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setAll();
|
void setAll();
|
||||||
|
|
Loading…
Reference in New Issue