From 3272306484ee358ee00c1926d88439814e7276bc Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 5 Jan 2015 21:45:31 +0100 Subject: remove needless settings reload in dialogs Options handling was fixed to pass the same bundle to all consumers. There's no need to reload it explicitly anymore. --- ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp | 5 ----- ftnoir_protocol_mouse/ftnoir_protocol_mouse.h | 10 ++-------- ftnoir_protocol_mouse/ftnoir_protocol_mouse_dialog.cpp | 4 +--- 3 files changed, 3 insertions(+), 16 deletions(-) (limited to 'ftnoir_protocol_mouse') diff --git a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp index ac543812..5e30fca2 100644 --- a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp +++ b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp @@ -53,11 +53,6 @@ void FTNoIR_Protocol::pose(const double *headpose ) { } } -void FTNoIR_Protocol::reload() -{ - s.b->reload(); -} - bool FTNoIR_Protocol::correct() { return true; diff --git a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h index 3d04fa15..fcc7426a 100644 --- a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h +++ b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h @@ -65,7 +65,6 @@ public: QString game_name() { return "Mouse tracker"; } - void reload(); private: struct settings s; }; @@ -75,16 +74,11 @@ class MOUSEControls: public IProtocolDialog Q_OBJECT public: MOUSEControls(); - void register_protocol(IProtocol *protocol) { - _proto = (FTNoIR_Protocol *) protocol; - } - void unregister_protocol() { - _proto = NULL; - } + void register_protocol(IProtocol *) {} + void unregister_protocol() {} private: Ui::UICMOUSEControls ui; settings s; - FTNoIR_Protocol* _proto; private slots: void doOK(); void doCancel(); diff --git a/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dialog.cpp b/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dialog.cpp index 3303e54c..f4ecaa48 100644 --- a/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dialog.cpp +++ b/ftnoir_protocol_mouse/ftnoir_protocol_mouse_dialog.cpp @@ -25,7 +25,7 @@ #include "ftnoir_protocol_mouse.h" #include "opentrack/plugin-api.hpp" -MOUSEControls::MOUSEControls() : _proto(nullptr) +MOUSEControls::MOUSEControls() { ui.setupUi( this ); ui.cbxSelectMouse_X->addItem("None"); @@ -53,8 +53,6 @@ MOUSEControls::MOUSEControls() : _proto(nullptr) void MOUSEControls::doOK() { s.b->save(); - if (_proto) - _proto->reload(); this->close(); } -- cgit v1.2.3