Skip to content
Permalink
Browse files

ModalMessageBox: Remove superfluous buttons and ensure correct parent

  • Loading branch information...
spycrab committed Mar 11, 2019
1 parent 8293724 commit 63fd931245013faa9a3ffc0dfe7c1e63747218b3
Showing with 4 additions and 3 deletions.
  1. +4 −3 Source/Core/DolphinQt/QtUtils/ModalMessageBox.cpp
@@ -6,13 +6,14 @@

#include <QApplication>

ModalMessageBox::ModalMessageBox(QWidget* parent) : QMessageBox(parent)
ModalMessageBox::ModalMessageBox(QWidget* parent)
: QMessageBox(parent != nullptr ? parent->window() : nullptr)
{
setWindowModality(Qt::WindowModal);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowFlags(Qt::Sheet | Qt::WindowTitleHint | Qt::CustomizeWindowHint);

// No parent is still preferable to showing a hidden parent here.
if (parent != nullptr && !parent->isVisible())
if (parent != nullptr && !parent->window()->isVisible())
setParent(nullptr);
}

0 comments on commit 63fd931

Please sign in to comment.
You can’t perform that action at this time.