diff --git a/src/Cache.cpp b/src/Cache.cpp index 5e8ba13f..16c8105c 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp @@ -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; diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp index 3c663b94..de03c43b 100644 --- a/src/ChatPage.cpp +++ b/src/ChatPage.cpp @@ -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(); diff --git a/src/main.cpp b/src/main.cpp index 8ce6fe5e..8099892a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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);