mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 21:28:51 +00:00
DolphinQt/InputCommon: Fix a few memory leaks.
This commit is contained in:
parent
54e09886d8
commit
725d34b2f0
10 changed files with 31 additions and 12 deletions
|
@ -63,7 +63,7 @@ GameConfigEdit::GameConfigEdit(QWidget* parent, const QString& path, bool read_o
|
|||
|
||||
m_completer = new QCompleter(m_edit);
|
||||
|
||||
auto* completion_model = new QStringListModel;
|
||||
auto* completion_model = new QStringListModel(m_completer);
|
||||
completion_model->setStringList(m_completions);
|
||||
|
||||
m_completer->setModel(completion_model);
|
||||
|
@ -77,8 +77,6 @@ GameConfigEdit::GameConfigEdit(QWidget* parent, const QString& path, bool read_o
|
|||
|
||||
void GameConfigEdit::CreateWidgets()
|
||||
{
|
||||
m_menu = new QMenu;
|
||||
|
||||
m_edit = new QTextEdit;
|
||||
m_edit->setReadOnly(m_read_only);
|
||||
m_edit->setAcceptRichText(false);
|
||||
|
@ -89,6 +87,8 @@ void GameConfigEdit::CreateWidgets()
|
|||
|
||||
menu_button->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);
|
||||
menu_button->setText(tr("Presets"));
|
||||
|
||||
m_menu = new QMenu(menu_button);
|
||||
menu_button->setMenu(m_menu);
|
||||
|
||||
layout->addWidget(menu_button);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue