mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
DolphinQt: Properly Delete (Some) Widgets
This is not every memory leak, just the ones that were obvious.
This commit is contained in:
parent
e69486d2cb
commit
0397339ab1
12 changed files with 25 additions and 9 deletions
|
@ -309,6 +309,7 @@ void BreakpointWidget::OnClear()
|
|||
void BreakpointWidget::OnNewBreakpoint()
|
||||
{
|
||||
BreakpointDialog* dialog = new BreakpointDialog(this);
|
||||
dialog->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
SetQWidgetWindowDecorations(dialog);
|
||||
dialog->exec();
|
||||
}
|
||||
|
@ -319,6 +320,7 @@ void BreakpointWidget::OnEditBreakpoint(u32 address, bool is_instruction_bp)
|
|||
{
|
||||
auto* dialog =
|
||||
new BreakpointDialog(this, m_system.GetPowerPC().GetBreakPoints().GetBreakpoint(address));
|
||||
dialog->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
SetQWidgetWindowDecorations(dialog);
|
||||
dialog->exec();
|
||||
}
|
||||
|
@ -326,6 +328,7 @@ void BreakpointWidget::OnEditBreakpoint(u32 address, bool is_instruction_bp)
|
|||
{
|
||||
auto* dialog =
|
||||
new BreakpointDialog(this, m_system.GetPowerPC().GetMemChecks().GetMemCheck(address));
|
||||
dialog->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
SetQWidgetWindowDecorations(dialog);
|
||||
dialog->exec();
|
||||
}
|
||||
|
@ -387,6 +390,7 @@ void BreakpointWidget::OnContextMenu()
|
|||
const auto is_memory_breakpoint = selected_item->data(IS_MEMCHECK_ROLE).toBool();
|
||||
|
||||
auto* menu = new QMenu(this);
|
||||
menu->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
if (!is_memory_breakpoint)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue