summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2024-05-02 17:30:49 +0200
committerGitHub <noreply@github.com>2024-05-02 17:30:49 +0200
commit5817be7bd3ac1b3f68a24410dc416d69ae2ff20f (patch)
tree4f9586afbdd910689cb883422fbbdf3289989ca2 /Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp
parent967280f140f39283e9e6997ffa6426329d94f611 (diff)
parent0397339ab1fbdf6309ab14dbf48946853c608522 (diff)
Merge pull request #12747 from mitaclaw/qt-memory-leaks
DolphinQt: Properly Delete (Some) Widgets
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp b/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp
index e4897a24a8..8fba6d4066 100644
--- a/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/BreakpointWidget.cpp
@@ -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)
{