summaryrefslogtreecommitdiffhomepage
path: root/variant/default
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-04-28 17:26:05 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-04-28 21:27:35 +0200
commit0c27d726a900b901e8bffafe993a3d3e36bf27f3 (patch)
tree960bcda73075a62826300d7805f6db1b303ac540 /variant/default
parentc80dd2e156e20f028cf4631fd7874a89c3568bab (diff)
random cleanups
Diffstat (limited to 'variant/default')
-rw-r--r--variant/default/main-window.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/variant/default/main-window.cpp b/variant/default/main-window.cpp
index c52a806e..1125b8a1 100644
--- a/variant/default/main-window.cpp
+++ b/variant/default/main-window.cpp
@@ -33,6 +33,10 @@ extern "C" const char* const opentrack_version;
# define EXIT_FAILURE 1
#endif
+#if !defined EX_OSFILE
+# define EX_OSFILE 72
+#endif
+
/* FreeBSD sysexits(3)
*
* The input data was incorrect in some way. This
@@ -132,7 +136,7 @@ main_window::main_window() :
bool ok = is_config_listed(cur) ? set_profile(cur) : set_profile(OPENTRACK_DEFAULT_CONFIG);
if (!ok)
{
- exit(64);
+ exit(EX_OSFILE);
return;
}
}
@@ -339,7 +343,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(64);
+ exit(EX_OSFILE);
}
bool main_window::maybe_die_on_config_not_writable(const QString& current, QStringList* ini_list_)
@@ -475,7 +479,7 @@ bool main_window::refresh_config_list()
QString current = group::ini_filename();
if (!ini_list.contains(current))
- current = OPENTRACK_DEFAULT_CONFIG_Q;
+ current = OPENTRACK_DEFAULT_CONFIG;
if (maybe_die_on_config_not_writable(current, &ini_list))
return false;
@@ -780,7 +784,7 @@ bool main_window::set_profile(const QString& new_name_)
QString new_name = new_name_;
if (!is_config_listed(new_name))
- new_name = OPENTRACK_DEFAULT_CONFIG_Q;
+ new_name = OPENTRACK_DEFAULT_CONFIG;
if (maybe_die_on_config_not_writable(new_name, nullptr))
return false;
@@ -979,9 +983,9 @@ bool main_window::event(QEvent* event)
case t::WindowStateChange:
case t::FocusIn:
set_is_visible(*this, true);
- /*FALLTHROUGH*/
+ break;
default:
- break;
+ break;
}
}
return QMainWindow::event(event);