mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-23 11:28:49 +03:00
Use EXIT_FAILURE macro to improve code portability
This commit is contained in:
parent
27683bedc4
commit
6843cd7465
3 changed files with 8 additions and 8 deletions
|
@ -658,8 +658,8 @@ fatalSecretError()
|
|||
"https://github.com/Nheko-Reborn/nheko/issues"),
|
||||
QMessageBox::StandardButton::Close);
|
||||
|
||||
QCoreApplication::exit(1);
|
||||
exit(1);
|
||||
QCoreApplication::exit(EXIT_FAILURE);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
static QString
|
||||
|
@ -2691,8 +2691,8 @@ try {
|
|||
"increased the capacity automatically, however you will need to "
|
||||
"restart to apply this change. Nheko will now close automatically."),
|
||||
QMessageBox::StandardButton::Close);
|
||||
QCoreApplication::exit(1);
|
||||
exit(1);
|
||||
QCoreApplication::exit(EXIT_FAILURE);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
throw;
|
||||
|
|
|
@ -460,8 +460,8 @@ ChatPage::dropToLoginPage(const QString &msg)
|
|||
QMessageBox::StandardButton::Close | QMessageBox::StandardButton::Ok,
|
||||
QMessageBox::StandardButton::Ok);
|
||||
if (btn == QMessageBox::StandardButton::Close) {
|
||||
QCoreApplication::exit(1);
|
||||
exit(1);
|
||||
QCoreApplication::exit(EXIT_FAILURE);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
resetUI();
|
||||
|
|
|
@ -352,14 +352,14 @@ main(int argc, char *argv[])
|
|||
if (!targets.isEmpty()) {
|
||||
std::cerr << "Invalid log type '" << targets.first().toStdString().c_str() << "'"
|
||||
<< std::endl;
|
||||
std::exit(1);
|
||||
std::exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
nhlog::init(level, path, to_stderr);
|
||||
|
||||
} catch (const spdlog::spdlog_ex &ex) {
|
||||
std::cerr << "Log initialization failed: " << ex.what() << std::endl;
|
||||
std::exit(1);
|
||||
std::exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
auto filter = new NhekoFixupPaletteEventFilter(&app);
|
||||
|
|
Loading…
Reference in a new issue