mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Merge pull request #7906 from jordan-woyak/leak-fix
DolphinQt/InputCommon: Fix a few memory leaks.
This commit is contained in:
@ -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);
|
||||
|
@ -104,7 +104,7 @@ QGroupBox* InfoWidget::CreateBannerDetails()
|
||||
|
||||
m_name = CreateValueDisplay();
|
||||
m_maker = CreateValueDisplay();
|
||||
m_description = new QTextEdit();
|
||||
m_description = new QTextEdit(group);
|
||||
m_description->setReadOnly(true);
|
||||
CreateLanguageSelector();
|
||||
|
||||
@ -153,7 +153,7 @@ void InfoWidget::SaveBanner()
|
||||
|
||||
QLineEdit* InfoWidget::CreateValueDisplay(const QString& value)
|
||||
{
|
||||
QLineEdit* value_display = new QLineEdit(value);
|
||||
QLineEdit* value_display = new QLineEdit(value, this);
|
||||
value_display->setReadOnly(true);
|
||||
value_display->setCursorPosition(0);
|
||||
return value_display;
|
||||
|
Reference in New Issue
Block a user