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

13
Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp Executable file → Normal file
View file

@ -9,7 +9,6 @@
#include <QHBoxLayout>
#include <QLabel>
#include <QListWidget>
#include <QMessageBox>
#include <QPushButton>
#include <QTextEdit>
#include <QVBoxLayout>
@ -22,6 +21,7 @@
#include "DolphinQt/Config/CheatCodeEditor.h"
#include "DolphinQt/Config/CheatWarningWidget.h"
#include "DolphinQt/QtUtils/ModalMessageBox.h"
#include "UICommon/GameFile.h"
@ -255,13 +255,13 @@ void GeckoCodeWidget::DownloadCodes()
if (!success)
{
QMessageBox::critical(this, tr("Error"), tr("Failed to download codes."));
ModalMessageBox::critical(this, tr("Error"), tr("Failed to download codes."));
return;
}
if (codes.empty())
{
QMessageBox::critical(this, tr("Error"), tr("File contained no codes."));
ModalMessageBox::critical(this, tr("Error"), tr("File contained no codes."));
return;
}
@ -281,7 +281,8 @@ void GeckoCodeWidget::DownloadCodes()
UpdateList();
SaveCodes();
QMessageBox::information(this, tr("Download complete"),
tr("Downloaded %1 codes. (added %2)")
.arg(QString::number(codes.size()), QString::number(added_count)));
ModalMessageBox::information(
this, tr("Download complete"),
tr("Downloaded %1 codes. (added %2)")
.arg(QString::number(codes.size()), QString::number(added_count)));
}