mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-23 19:38:48 +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"),
|
"https://github.com/Nheko-Reborn/nheko/issues"),
|
||||||
QMessageBox::StandardButton::Close);
|
QMessageBox::StandardButton::Close);
|
||||||
|
|
||||||
QCoreApplication::exit(1);
|
QCoreApplication::exit(EXIT_FAILURE);
|
||||||
exit(1);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString
|
static QString
|
||||||
|
@ -2691,8 +2691,8 @@ try {
|
||||||
"increased the capacity automatically, however you will need to "
|
"increased the capacity automatically, however you will need to "
|
||||||
"restart to apply this change. Nheko will now close automatically."),
|
"restart to apply this change. Nheko will now close automatically."),
|
||||||
QMessageBox::StandardButton::Close);
|
QMessageBox::StandardButton::Close);
|
||||||
QCoreApplication::exit(1);
|
QCoreApplication::exit(EXIT_FAILURE);
|
||||||
exit(1);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
|
|
|
@ -460,8 +460,8 @@ ChatPage::dropToLoginPage(const QString &msg)
|
||||||
QMessageBox::StandardButton::Close | QMessageBox::StandardButton::Ok,
|
QMessageBox::StandardButton::Close | QMessageBox::StandardButton::Ok,
|
||||||
QMessageBox::StandardButton::Ok);
|
QMessageBox::StandardButton::Ok);
|
||||||
if (btn == QMessageBox::StandardButton::Close) {
|
if (btn == QMessageBox::StandardButton::Close) {
|
||||||
QCoreApplication::exit(1);
|
QCoreApplication::exit(EXIT_FAILURE);
|
||||||
exit(1);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
resetUI();
|
resetUI();
|
||||||
|
|
|
@ -352,14 +352,14 @@ main(int argc, char *argv[])
|
||||||
if (!targets.isEmpty()) {
|
if (!targets.isEmpty()) {
|
||||||
std::cerr << "Invalid log type '" << targets.first().toStdString().c_str() << "'"
|
std::cerr << "Invalid log type '" << targets.first().toStdString().c_str() << "'"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::exit(1);
|
std::exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
nhlog::init(level, path, to_stderr);
|
nhlog::init(level, path, to_stderr);
|
||||||
|
|
||||||
} catch (const spdlog::spdlog_ex &ex) {
|
} catch (const spdlog::spdlog_ex &ex) {
|
||||||
std::cerr << "Log initialization failed: " << ex.what() << std::endl;
|
std::cerr << "Log initialization failed: " << ex.what() << std::endl;
|
||||||
std::exit(1);
|
std::exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto filter = new NhekoFixupPaletteEventFilter(&app);
|
auto filter = new NhekoFixupPaletteEventFilter(&app);
|
||||||
|
|
Loading…
Reference in a new issue