DolphinQt: non-Windows builds leak in InterfacePane

The m_checkbox_lock_mouse QCheckBox was only conditionally being added
to the layout, leaving it unmanaged and leaking

Setting the parent will allow it to be managed.
This commit is contained in:
Michael Cook (mackal) 2023-04-04 16:07:06 -04:00
parent e511718fbc
commit 7dde0c3c31
1 changed files with 2 additions and 1 deletions

View File

@ -189,7 +189,8 @@ void InterfacePane::CreateInGame()
m_vboxlayout_hide_mouse->addWidget(m_radio_cursor_visible_never);
m_vboxlayout_hide_mouse->addWidget(m_radio_cursor_visible_always);
m_checkbox_lock_mouse = new QCheckBox(tr("Lock Mouse Cursor"));
// this ends up not being managed unless _WIN32, so lets not leak
m_checkbox_lock_mouse = new QCheckBox(tr("Lock Mouse Cursor"), this);
m_checkbox_lock_mouse->setToolTip(tr("Will lock the Mouse Cursor to the Render Widget as long as "
"it has focus. You can set a hotkey to unlock it."));