Qt: Use ModalMessageBox everywhere

This commit is contained in:
spycrab 2019-03-04 20:49:00 +01:00
parent d1cb79f644
commit 70da86f1c3
31 changed files with 244 additions and 298 deletions

View file

@ -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;
}