diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-16 04:12:01 +0100 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-16 06:45:50 +0100 | 
| commit | 8c21096c50bad5e8d91c717af6a2b909e740291a (patch) | |
| tree | 276a18e10395ac088e0a853e5051e15f7d673b38 | |
| parent | 93df5cc6910e59988f80dc70e9a7cf2cd7b2db89 (diff) | |
gui/main-window: sysexists(3) isn't appropriate
| -rw-r--r-- | gui/main-window.cpp | 12 | 
1 files changed, 3 insertions, 9 deletions
| diff --git a/gui/main-window.cpp b/gui/main-window.cpp index 48212b68..9d27afdc 100644 --- a/gui/main-window.cpp +++ b/gui/main-window.cpp @@ -30,8 +30,6 @@ extern "C" const char* const opentrack_version;  #   define EXIT_FAILURE 1  #endif -// -  /* FreeBSD sysexits(3)   *   * The input data was incorrect	in some	way.  This @@ -39,10 +37,6 @@ extern "C" const char* const opentrack_version;   * files.   */ -#if !defined EX_DATAERR -#   define EX_DATAERR 65 -#endif -  #if !defined _WIN32 && !defined __APPLE__  #   include <unistd.h>  void MainWindow::annoy_if_root() @@ -90,7 +84,7 @@ main_window::main_window() :      if (!refresh_config_list())      { -        exit(EX_DATAERR); +        exit(64);          return;      } @@ -138,7 +132,7 @@ main_window::main_window() :          bool ok = is_config_listed(cur) ? set_profile(cur) : set_profile(OPENTRACK_DEFAULT_CONFIG);          if (!ok)          { -            exit(EX_DATAERR); +            exit(64);              return;          }      } @@ -308,7 +302,7 @@ void main_window::die_on_config_not_writable()                            tr("Check permissions for your .ini directory:\n\n\"%1\"%2\n\nExiting now.").arg(group::ini_directory()).arg(pad),                            QMessageBox::Close, QMessageBox::NoButton); -    exit(EX_DATAERR); +    exit(64);  }  bool main_window::maybe_die_on_config_not_writable(const QString& current, QStringList* ini_list_) | 
