summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_mouse
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-01-05 21:45:31 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-01-05 21:45:31 +0100
commit3272306484ee358ee00c1926d88439814e7276bc (patch)
treee6c0e053a3c255859576d2ebd116174d60c23b7e /ftnoir_protocol_mouse
parent7b81b27f70cb5169bbd61de7cc6628dac5620cc8 (diff)
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.
Diffstat (limited to 'ftnoir_protocol_mouse')
-rw-r--r--ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp5
-rw-r--r--ftnoir_protocol_mouse/ftnoir_protocol_mouse.h10
-rw-r--r--ftnoir_protocol_mouse/ftnoir_protocol_mouse_dialog.cpp4
3 files changed, 3 insertions, 16 deletions
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();
}