summaryrefslogtreecommitdiffhomepage
path: root/variant
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-02-03 10:25:25 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-02-03 10:25:25 +0100
commitb9d34a26d35d05f793161e54001329edb5122a81 (patch)
tree0ea88c5352010265a89ab44afc29656a792c9e98 /variant
parentf7481e685dc45c9eff0245249a8a83da79d6808c (diff)
opentrack: use in-header initializer
Diffstat (limited to 'variant')
-rw-r--r--variant/default/main-window.cpp6
-rw-r--r--variant/default/main-window.hpp10
2 files changed, 6 insertions, 10 deletions
diff --git a/variant/default/main-window.cpp b/variant/default/main-window.cpp
index 44f6c892..9442ec14 100644
--- a/variant/default/main-window.cpp
+++ b/variant/default/main-window.cpp
@@ -31,11 +31,7 @@ extern "C" const char* const opentrack_version;
using namespace options::globals;
using namespace options;
-main_window::main_window() : State(OPENTRACK_BASE_PATH + OPENTRACK_LIBRARY_PATH),
- start_tracker{this, &main_window::start_tracker_, Qt::QueuedConnection},
- stop_tracker{this, &main_window::stop_tracker_, Qt::QueuedConnection},
- toggle_tracker{this, &main_window::toggle_tracker_, Qt::QueuedConnection},
- restart_tracker{this, &main_window::restart_tracker_, Qt::QueuedConnection}
+main_window::main_window() : State(OPENTRACK_BASE_PATH + OPENTRACK_LIBRARY_PATH)
{
ui.setupUi(this);
diff --git a/variant/default/main-window.hpp b/variant/default/main-window.hpp
index e9fdbf57..9c687db9 100644
--- a/variant/default/main-window.hpp
+++ b/variant/default/main-window.hpp
@@ -47,7 +47,7 @@ class main_window final : public QMainWindow, private State
Shortcuts global_shortcuts;
module_settings m;
std::unique_ptr<QSystemTrayIcon> tray;
- QMenu tray_menu;
+ QMenu tray_menu { this };
QTimer pose_update_timer { this };
QTimer det_timer;
QTimer config_list_timer;
@@ -139,10 +139,10 @@ class main_window final : public QMainWindow, private State
static void set_working_directory();
- qt_sig::nullary start_tracker;
- qt_sig::nullary stop_tracker;
- qt_sig::nullary toggle_tracker;
- qt_sig::nullary restart_tracker;
+ qt_sig::nullary start_tracker { this, &main_window::start_tracker_, Qt::QueuedConnection };
+ qt_sig::nullary stop_tracker { this, &main_window::stop_tracker_, Qt::QueuedConnection };
+ qt_sig::nullary toggle_tracker { this, &main_window::toggle_tracker_, Qt::QueuedConnection };
+ qt_sig::nullary restart_tracker { this, &main_window::restart_tracker_, Qt::QueuedConnection };
public:
main_window();