From 1d4f813c6ab59ffe41ccd9be27786aeab344a1f4 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Fri, 21 Jul 2023 23:25:22 -0400 Subject: [PATCH] qt/configuration: Use deleteLater --- src/yuzu/configuration/configure_audio.cpp | 2 +- src/yuzu/configuration/configure_cpu.cpp | 2 +- src/yuzu/configuration/configure_general.cpp | 2 +- src/yuzu/configuration/configure_graphics.cpp | 2 +- src/yuzu/configuration/configure_graphics_advanced.cpp | 2 +- src/yuzu/configuration/configure_system.cpp | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/yuzu/configuration/configure_audio.cpp b/src/yuzu/configuration/configure_audio.cpp index 7eb7528980..d323280870 100644 --- a/src/yuzu/configuration/configure_audio.cpp +++ b/src/yuzu/configuration/configure_audio.cpp @@ -49,7 +49,7 @@ void ConfigureAudio::Setup(const ConfigurationShared::Builder& builder) { continue; } if (!widget->Valid()) { - delete widget; + widget->deleteLater(); continue; } diff --git a/src/yuzu/configuration/configure_cpu.cpp b/src/yuzu/configuration/configure_cpu.cpp index 8ed9a65f34..08f2b4d9c9 100644 --- a/src/yuzu/configuration/configure_cpu.cpp +++ b/src/yuzu/configuration/configure_cpu.cpp @@ -54,7 +54,7 @@ void ConfigureCpu::Setup(const ConfigurationShared::Builder& builder) { continue; } if (!widget->Valid()) { - delete widget; + widget->deleteLater(); continue; } diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp index fc43a531d8..c727fadd1e 100644 --- a/src/yuzu/configuration/configure_general.cpp +++ b/src/yuzu/configuration/configure_general.cpp @@ -48,7 +48,7 @@ void ConfigureGeneral::Setup(const ConfigurationShared::Builder& builder) { continue; } if (!widget->Valid()) { - delete widget; + widget->deleteLater(); continue; } diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index a6f711597f..a94fbc89a4 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp @@ -246,7 +246,7 @@ void ConfigureGraphics::Setup(const ConfigurationShared::Builder& builder) { continue; } if (!widget->Valid()) { - delete widget; + widget->deleteLater(); continue; } diff --git a/src/yuzu/configuration/configure_graphics_advanced.cpp b/src/yuzu/configuration/configure_graphics_advanced.cpp index f60214ff9c..4db18673d4 100644 --- a/src/yuzu/configuration/configure_graphics_advanced.cpp +++ b/src/yuzu/configuration/configure_graphics_advanced.cpp @@ -42,7 +42,7 @@ void ConfigureGraphicsAdvanced::Setup(const ConfigurationShared::Builder& builde continue; } if (!widget->Valid()) { - delete widget; + widget->deleteLater(); continue; } diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp index 93a0a41028..c4833f4e70 100644 --- a/src/yuzu/configuration/configure_system.cpp +++ b/src/yuzu/configuration/configure_system.cpp @@ -112,7 +112,7 @@ void ConfigureSystem::Setup(const ConfigurationShared::Builder& builder) { continue; } if (!widget->Valid()) { - delete widget; + widget->deleteLater(); continue; } @@ -132,7 +132,7 @@ void ConfigureSystem::Setup(const ConfigurationShared::Builder& builder) { system_hold.emplace(setting->Id(), widget); break; default: - delete widget; + widget->deleteLater(); } } for (const auto& [label, widget] : core_hold) {