Skip to content
Permalink
Browse files

Merge pull request #7875 from spycrab/qt_msgbox_fixes

ModalMessageBox: Remove superfluous buttons and ensure correct parent
  • Loading branch information...
spycrab committed Mar 11, 2019
2 parents 9e4ab87 + 63fd931 commit 909e9322e78ecbe45f6982dd5226bcbe6bc74e68
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 909e932

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