From 8f2558dc89c323f090ccd48db9408b8ae76bd4bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Thu, 14 Sep 2017 17:01:43 +0200 Subject: Qt: Simplify AboutDialog creation Just create the AboutDialog on the stack -- the actual object lives on the heap anyway, since Qt uses the pimpl idiom. Removes the need for an explicit new and a special delete on close attribute. --- Source/Core/DolphinQt2/MainWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/DolphinQt2/MainWindow.cpp') diff --git a/Source/Core/DolphinQt2/MainWindow.cpp b/Source/Core/DolphinQt2/MainWindow.cpp index ce710b6ce0..e93c6c2f29 100644 --- a/Source/Core/DolphinQt2/MainWindow.cpp +++ b/Source/Core/DolphinQt2/MainWindow.cpp @@ -553,8 +553,8 @@ void MainWindow::ShowAudioWindow() void MainWindow::ShowAboutDialog() { - AboutDialog* about = new AboutDialog(this); - about->show(); + AboutDialog about{this}; + about.exec(); } void MainWindow::ShowHotkeyDialog() -- cgit v1.2.3