diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2019-03-11 19:36:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-11 19:36:19 +0100 |
| commit | 909e9322e78ecbe45f6982dd5226bcbe6bc74e68 (patch) | |
| tree | 80ef7518b4892e0277969674350c7f0f82a6de15 /Source | |
| parent | 9e4ab87a341519870e4b471c093df1e92a2d2f17 (diff) | |
| parent | 63fd931245013faa9a3ffc0dfe7c1e63747218b3 (diff) | |
Merge pull request #7875 from spycrab/qt_msgbox_fixes
ModalMessageBox: Remove superfluous buttons and ensure correct parent
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/DolphinQt/QtUtils/ModalMessageBox.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/DolphinQt/QtUtils/ModalMessageBox.cpp b/Source/Core/DolphinQt/QtUtils/ModalMessageBox.cpp index 8cc23b613b..a6b06bdf09 100644 --- a/Source/Core/DolphinQt/QtUtils/ModalMessageBox.cpp +++ b/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); } |
