summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Config/ControllersWindow.cpp
diff options
context:
space:
mode:
authorMat M <mathew1800@gmail.com>2019-03-04 17:40:27 -0500
committerGitHub <noreply@github.com>2019-03-04 17:40:27 -0500
commit147f7ca3213aef22dfe45bfab86e2d221aa248bf (patch)
treeb32f19c11585ea4e1b205eb2e959e695636e5a19 /Source/Core/DolphinQt/Config/ControllersWindow.cpp
parenta59010fa29ab10ca031bea87fc5df165e70e2dff (diff)
parent70da86f1c3c933ce28d122f95f34ff6c24f89d80 (diff)
Merge pull request #7849 from spycrab/qt_modal_again
Qt: Make every messagebox modal
Diffstat (limited to 'Source/Core/DolphinQt/Config/ControllersWindow.cpp')
-rw-r--r--Source/Core/DolphinQt/Config/ControllersWindow.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/Source/Core/DolphinQt/Config/ControllersWindow.cpp b/Source/Core/DolphinQt/Config/ControllersWindow.cpp
index fbedd80b03..75d99495a8 100644
--- a/Source/Core/DolphinQt/Config/ControllersWindow.cpp
+++ b/Source/Core/DolphinQt/Config/ControllersWindow.cpp
@@ -14,7 +14,6 @@
#include <QGroupBox>
#include <QLabel>
#include <QLineEdit>
-#include <QMessageBox>
#include <QPushButton>
#include <QRadioButton>
#include <QScreen>
@@ -34,6 +33,7 @@
#include "DolphinQt/Config/Mapping/GCPadWiiUConfigDialog.h"
#include "DolphinQt/Config/Mapping/MappingWindow.h"
+#include "DolphinQt/QtUtils/ModalMessageBox.h"
#include "DolphinQt/QtUtils/WrapInScrollArea.h"
#include "DolphinQt/Settings.h"
@@ -328,12 +328,9 @@ void ControllersWindow::OnBluetoothPassthroughResetPressed()
if (!ios)
{
- QMessageBox error(this);
- error.setIcon(QMessageBox::Warning);
- error.setWindowModality(Qt::WindowModal);
- error.setWindowTitle(tr("Warning"));
- error.setText(tr("Saved Wii Remote pairings can only be reset when a Wii game is running."));
- error.exec();
+ ModalMessageBox::warning(
+ this, tr("Warning"),
+ tr("Saved Wii Remote pairings can only be reset when a Wii game is running."));
return;
}
@@ -350,12 +347,8 @@ void ControllersWindow::OnBluetoothPassthroughSyncPressed()
if (!ios)
{
- QMessageBox error(this);
- error.setIcon(QMessageBox::Warning);
- error.setWindowModality(Qt::WindowModal);
- error.setWindowTitle(tr("Warning"));
- error.setText(tr("A sync can only be triggered when a Wii game is running."));
- error.exec();
+ ModalMessageBox::warning(this, tr("Warning"),
+ tr("A sync can only be triggered when a Wii game is running."));
return;
}