Skip to content

Commit

Permalink
RMG: remove '!' from error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Jun 24, 2024
1 parent 71fb623 commit 70300d1
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
8 changes: 4 additions & 4 deletions Source/RMG/UserInterface/Dialog/Cheats/AddCheatDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ bool AddCheatDialog::getCheat(CoreCheat& cheat)

if (!CoreParseCheat(lines, cheat))
{
this->showErrorMessage("CoreParseCheat() Failed!", QString::fromStdString(CoreGetError()));
this->showErrorMessage("CoreParseCheat() Failed", QString::fromStdString(CoreGetError()));
return false;
}

Expand All @@ -287,7 +287,7 @@ bool AddCheatDialog::addCheat(void)

if (!CoreAddCheat(cheat))
{
this->showErrorMessage("CoreAddCheat() Failed!", QString::fromStdString(CoreGetError()));
this->showErrorMessage("CoreAddCheat() Failed", QString::fromStdString(CoreGetError()));
return false;
}

Expand All @@ -312,7 +312,7 @@ bool AddCheatDialog::updateCheat(void)

if (!CoreUpdateCheat(this->oldCheat,cheat))
{
this->showErrorMessage("CoreUpdateCheat() Failed!", QString::fromStdString(CoreGetError()));
this->showErrorMessage("CoreUpdateCheat() Failed", QString::fromStdString(CoreGetError()));
return false;
}

Expand All @@ -325,7 +325,7 @@ void AddCheatDialog::accept(void)

if (!this->validate())
{
this->showErrorMessage("Validating Cheat Failed!", "");
this->showErrorMessage("Validating Cheat Failed", "");
return;
}

Expand Down
6 changes: 3 additions & 3 deletions Source/RMG/UserInterface/Dialog/Cheats/CheatsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void CheatsDialog::loadCheats(void)

if (!CoreGetCurrentCheats(cheats))
{
this->showErrorMessage("CoreGetCurrentCheats() Failed!", QString::fromStdString(CoreGetError()));
this->showErrorMessage("CoreGetCurrentCheats() Failed", QString::fromStdString(CoreGetError()));
this->failedToParseCheats = true;
return;
}
Expand Down Expand Up @@ -312,7 +312,7 @@ void CheatsDialog::on_removeCheatButton_clicked(void)
// try to remove cheat
if (!CoreRemoveCheat(cheat))
{
this->showErrorMessage("CoreRemoveCheat() Failed!", QString::fromStdString(CoreGetError()));
this->showErrorMessage("CoreRemoveCheat() Failed", QString::fromStdString(CoreGetError()));
return;
}

Expand All @@ -326,7 +326,7 @@ void CheatsDialog::accept(void)

if (!CoreApplyCheats())
{
this->showErrorMessage("CoreApplyCheats() Failed!", QString::fromStdString(CoreGetError()));
this->showErrorMessage("CoreApplyCheats() Failed", QString::fromStdString(CoreGetError()));
return;
}

Expand Down
4 changes: 2 additions & 2 deletions Source/RMG/UserInterface/Dialog/SettingsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ void SettingsDialog::chooseFile(QLineEdit *lineEdit, QString filter, QString md5
QFile qFile(file);
if (!qFile.open(QFile::ReadOnly))
{
this->showErrorMessage("Failed to open file", "QFile::open() Failed!");
this->showErrorMessage("Failed to open file", "QFile::open() Failed");
return;
}

Expand All @@ -1138,7 +1138,7 @@ void SettingsDialog::chooseFile(QLineEdit *lineEdit, QString filter, QString md5
QString md5Hash = QString(hash.result().toHex());
if (md5Hash != md5)
{
this->showErrorMessage("MD5 mismatch!", "Expected file with MD5: \"" + md5 + "\"");
this->showErrorMessage("MD5 mismatch", "Expected file with MD5: \"" + md5 + "\"");
return;
}
}
Expand Down
10 changes: 5 additions & 5 deletions Source/RMG/UserInterface/Dialog/Update/DownloadUpdateDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void DownloadUpdateDialog::on_reply_finished(void)
{
if (this->reply->error())
{
this->showErrorMessage("Failed to download update file!", this->reply->errorString());
this->showErrorMessage("Failed to download update file", this->reply->errorString());
this->reply->deleteLater();
this->reject();
return;
Expand All @@ -87,7 +87,7 @@ void DownloadUpdateDialog::on_reply_finished(void)
temporaryDir.setAutoRemove(false);
if (!temporaryDir.isValid())
{
this->showErrorMessage("Failed to create temporary directory!", "");
this->showErrorMessage("Failed to create temporary directory", "");
this->reply->deleteLater();
this->reject();
return;
Expand All @@ -100,7 +100,7 @@ void DownloadUpdateDialog::on_reply_finished(void)
if (appImageEnv == nullptr ||
!QFile(appImageEnv).exists())
{
this->showErrorMessage("APPIMAGE variable is empty or invalid!", "");
this->showErrorMessage("APPIMAGE variable is empty or invalid", "");
this->reply->deleteLater();
this->reject();
return;
Expand All @@ -113,7 +113,7 @@ void DownloadUpdateDialog::on_reply_finished(void)
QFile file(filePath);
if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate))
{
this->showErrorMessage("QFile::open() Failed!", "");
this->showErrorMessage("QFile::open() Failed", "");
this->reply->deleteLater();
this->reject();
return;
Expand All @@ -129,7 +129,7 @@ void DownloadUpdateDialog::on_reply_finished(void)
int ret = std::rename(filePath.toStdString().c_str(), appImageEnv);
if (ret != 0)
{
this->showErrorMessage("std::rename() Failed!", QString(strerror(errno)));
this->showErrorMessage("std::rename() Failed", QString(strerror(errno)));
this->reply->deleteLater();
this->reject();
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void InstallUpdateDialog::install(void)
QDir dir(this->temporaryDirectory);
if (!dir.mkdir("extract"))
{
this->showErrorMessage("QDir::mkdir() Failed!", "");
this->showErrorMessage("QDir::mkdir() Failed", "");
this->reject();
return;
}
Expand All @@ -98,7 +98,7 @@ void InstallUpdateDialog::install(void)

if (!CoreUnzip(fullFilePath.toStdU32String(), extractDirectory.toStdU32String()))
{
this->showErrorMessage("CoreUnzip() Failed!", QString::fromStdString(CoreGetError()));
this->showErrorMessage("CoreUnzip() Failed", QString::fromStdString(CoreGetError()));
this->reject();
return;
}
Expand Down Expand Up @@ -139,7 +139,7 @@ void InstallUpdateDialog::writeAndRunScript(QStringList stringList)
QFile scriptFile(scriptPath);
if (!scriptFile.open(QIODevice::WriteOnly | QIODevice::Text))
{
this->showErrorMessage("QFile::open() Failed!", "");
this->showErrorMessage("QFile::open() Failed", "");
return;
}

Expand Down
20 changes: 10 additions & 10 deletions Source/RMG/UserInterface/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ void MainWindow::on_networkAccessManager_Finished(QNetworkReply* reply)
{
if (!this->ui_SilentUpdateCheck)
{
this->showErrorMessage("Failed to check for updates!", reply->errorString());
this->showErrorMessage("Failed to check for updates", reply->errorString());
}
reply->deleteLater();
return;
Expand All @@ -1359,7 +1359,7 @@ void MainWindow::on_networkAccessManager_Finished(QNetworkReply* reply)
{
if (!this->ui_SilentUpdateCheck)
{
this->showErrorMessage("You're already on the latest version!");
this->showErrorMessage("You're already on the latest version");
}
return;
}
Expand Down Expand Up @@ -1481,7 +1481,7 @@ void MainWindow::on_Action_System_Shutdown(void)

if (!CoreStopEmulation())
{
this->showErrorMessage("CoreStopEmulation() Failed!", QString::fromStdString(CoreGetError()));
this->showErrorMessage("CoreStopEmulation() Failed", QString::fromStdString(CoreGetError()));
}
}

Expand All @@ -1494,15 +1494,15 @@ void MainWindow::on_Action_System_SoftReset(void)
{
if (!CoreResetEmulation(false))
{
this->showErrorMessage("CoreResetEmulation() Failed!", QString::fromStdString(CoreGetError()));
this->showErrorMessage("CoreResetEmulation() Failed", QString::fromStdString(CoreGetError()));
}
}

void MainWindow::on_Action_System_HardReset(void)
{
if (!CoreResetEmulation(true))
{
this->showErrorMessage("CoreResetEmulation() Failed!", QString::fromStdString(CoreGetError()));
this->showErrorMessage("CoreResetEmulation() Failed", QString::fromStdString(CoreGetError()));
}
}
void MainWindow::on_Action_System_Pause(void)
Expand All @@ -1515,12 +1515,12 @@ void MainWindow::on_Action_System_Pause(void)
if (!isPaused)
{
ret = CorePauseEmulation();
error = "CorePauseEmulation() Failed!";
error = "CorePauseEmulation() Failed";
}
else
{
ret = CoreResumeEmulation();
error = "CoreResumeEmulation() Failed!";
error = "CoreResumeEmulation() Failed";
}

if (!ret)
Expand All @@ -1536,7 +1536,7 @@ void MainWindow::on_Action_System_Screenshot(void)
{
if (!CoreTakeScreenshot())
{
this->showErrorMessage("CoreTakeScreenshot() Failed!", QString::fromStdString(CoreGetError()));
this->showErrorMessage("CoreTakeScreenshot() Failed", QString::fromStdString(CoreGetError()));
}
}

Expand All @@ -1550,15 +1550,15 @@ void MainWindow::on_Action_System_LimitFPS(void)

if (!ret)
{
this->showErrorMessage("CoreSetSpeedLimiterState() Failed!", QString::fromStdString(CoreGetError()));
this->showErrorMessage("CoreSetSpeedLimiterState() Failed", QString::fromStdString(CoreGetError()));
}
}

void MainWindow::on_Action_System_SpeedFactor(int factor)
{
if (!CoreSetSpeedFactor(factor))
{
this->showErrorMessage("CoreSetSpeedFactor() Failed!", QString::fromStdString(CoreGetError()));
this->showErrorMessage("CoreSetSpeedFactor() Failed", QString::fromStdString(CoreGetError()));
}
}

Expand Down

0 comments on commit 70300d1

Please sign in to comment.