diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2019-03-04 20:49:00 +0100 |
|---|---|---|
| committer | spycrab <spycrab@users.noreply.github.com> | 2019-03-04 21:53:02 +0100 |
| commit | 70da86f1c3c933ce28d122f95f34ff6c24f89d80 (patch) | |
| tree | b32f19c11585ea4e1b205eb2e959e695636e5a19 /Source/Core/DolphinQt/Config/CheatCodeEditor.cpp | |
| parent | d1cb79f644cade8f763e7ad7c465ff69ae9a49ce (diff) | |
Qt: Use ModalMessageBox everywhere
Diffstat (limited to 'Source/Core/DolphinQt/Config/CheatCodeEditor.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Config/CheatCodeEditor.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/Source/Core/DolphinQt/Config/CheatCodeEditor.cpp b/Source/Core/DolphinQt/Config/CheatCodeEditor.cpp index a72e4781be..1292e0272d 100644 --- a/Source/Core/DolphinQt/Config/CheatCodeEditor.cpp +++ b/Source/Core/DolphinQt/Config/CheatCodeEditor.cpp @@ -9,7 +9,6 @@ #include <QGridLayout> #include <QLabel> #include <QLineEdit> -#include <QMessageBox> #include <QStringList> #include <QTextEdit> @@ -17,6 +16,8 @@ #include "Core/ActionReplay.h" #include "Core/GeckoCodeConfig.h" +#include "DolphinQt/QtUtils/ModalMessageBox.h" + CheatCodeEditor::CheatCodeEditor(QWidget* parent) : QDialog(parent) { setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); @@ -167,7 +168,7 @@ bool CheatCodeEditor::AcceptAR() if (!good) { - auto result = QMessageBox::warning( + auto result = ModalMessageBox::warning( this, tr("Parsing Error"), tr("Unable to parse line %1 of the entered AR code as a valid " "encrypted or decrypted code. Make sure you typed it correctly.\n\n" @@ -184,7 +185,7 @@ bool CheatCodeEditor::AcceptAR() { if (!entries.empty()) { - auto result = QMessageBox::warning( + auto result = ModalMessageBox::warning( this, tr("Invalid Mixed Code"), tr("This Action Replay code contains both encrypted and unencrypted lines; " "you should check that you have entered it correctly.\n\n" @@ -213,8 +214,8 @@ bool CheatCodeEditor::AcceptAR() if (entries.empty()) { - QMessageBox::critical(this, tr("Error"), - tr("The resulting decrypted AR code doesn't contain any lines.")); + ModalMessageBox::critical(this, tr("Error"), + tr("The resulting decrypted AR code doesn't contain any lines.")); return false; } @@ -253,13 +254,13 @@ bool CheatCodeEditor::AcceptGecko() if (!good) { - auto result = - QMessageBox::warning(this, tr("Parsing Error"), - tr("Unable to parse line %1 of the entered Gecko code as a valid " - "code. Make sure you typed it correctly.\n\n" - "Would you like to ignore this line and continue parsing?") - .arg(i + 1), - QMessageBox::Ok | QMessageBox::Abort); + auto result = ModalMessageBox::warning( + this, tr("Parsing Error"), + tr("Unable to parse line %1 of the entered Gecko code as a valid " + "code. Make sure you typed it correctly.\n\n" + "Would you like to ignore this line and continue parsing?") + .arg(i + 1), + QMessageBox::Ok | QMessageBox::Abort); if (result == QMessageBox::Abort) return false; @@ -277,8 +278,8 @@ bool CheatCodeEditor::AcceptGecko() if (entries.empty()) { - QMessageBox::critical(this, tr("Error"), - tr("The resulting decrypted AR code doesn't contain any lines.")); + ModalMessageBox::critical(this, tr("Error"), + tr("The resulting decrypted AR code doesn't contain any lines.")); return false; } |
