summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2017-09-14 17:01:43 +0200
committerLéo Lam <leo@innovatetechnologi.es>2017-09-26 17:43:49 +0200
commit8f2558dc89c323f090ccd48db9408b8ae76bd4bf (patch)
tree098fb0ee0c4357c5d3b6f06b63187e40b8c642c3 /Source
parent730b7fc8337e220ea8d9c963c026a9c095bb3c7c (diff)
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.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/DolphinQt2/AboutDialog.cpp1
-rw-r--r--Source/Core/DolphinQt2/MainWindow.cpp4
2 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/DolphinQt2/AboutDialog.cpp b/Source/Core/DolphinQt2/AboutDialog.cpp
index 898237dc82..7f6f4f380a 100644
--- a/Source/Core/DolphinQt2/AboutDialog.cpp
+++ b/Source/Core/DolphinQt2/AboutDialog.cpp
@@ -14,7 +14,6 @@ AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent)
{
setWindowTitle(tr("About Dolphin"));
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
- setAttribute(Qt::WA_DeleteOnClose);
QString text = QStringLiteral("");
QString small = QStringLiteral("<p style='margin-top:0px; margin-bottom:0px; font-size:9pt;'>");
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()