summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-09 15:18:07 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-08-10 10:41:52 +0200
commit03d46c654e74dd63ecbbd16de5dce035dd2535e5 (patch)
tree145c72fcade56d5c4446d7dd09e3f8ee4acf58c7
parent9b5fbf7071be239f79b80450f4aac98c50177518 (diff)
compat/options: use safe conntype for value -> widget QObject::connect
-rw-r--r--opentrack-compat/options.cpp2
-rw-r--r--opentrack-compat/options.hpp18
2 files changed, 9 insertions, 11 deletions
diff --git a/opentrack-compat/options.cpp b/opentrack-compat/options.cpp
index d0ef00a2..8c6e6c65 100644
--- a/opentrack-compat/options.cpp
+++ b/opentrack-compat/options.cpp
@@ -1,7 +1,5 @@
#include "options.hpp"
-#include <cmath>
-
namespace options
{
diff --git a/opentrack-compat/options.hpp b/opentrack-compat/options.hpp
index fd4a82a5..077083b2 100644
--- a/opentrack-compat/options.hpp
+++ b/opentrack-compat/options.hpp
@@ -372,7 +372,7 @@ namespace options {
cb->setCurrentIndex(v);
v = cb->currentIndex();
base_value::connect(cb, SIGNAL(currentIndexChanged(int)), &v, SLOT(setValue(int)), v.DIRECT_CONNTYPE);
- base_value::connect(&v, SIGNAL(valueChanged(int)), cb, SLOT(setCurrentIndex(int)), v.DIRECT_CONNTYPE);
+ base_value::connect(&v, SIGNAL(valueChanged(int)), cb, SLOT(setCurrentIndex(int)), v.SAFE_CONNTYPE);
}
template<>
@@ -381,7 +381,7 @@ namespace options {
cb->setCurrentText(v);
v = cb->currentText();
base_value::connect(cb, SIGNAL(currentTextChanged(QString)), &v, SLOT(setValue(QString)), v.DIRECT_CONNTYPE);
- base_value::connect(&v, SIGNAL(valueChanged(QString)), cb, SLOT(setCurrentText(QString)), v.DIRECT_CONNTYPE);
+ base_value::connect(&v, SIGNAL(valueChanged(QString)), cb, SLOT(setCurrentText(QString)), v.SAFE_CONNTYPE);
}
template<>
@@ -389,7 +389,7 @@ namespace options {
{
cb->setChecked(v);
base_value::connect(cb, SIGNAL(toggled(bool)), &v, SLOT(setValue(bool)), v.DIRECT_CONNTYPE);
- base_value::connect(&v, SIGNAL(valueChanged(bool)), cb, SLOT(setChecked(bool)), v.DIRECT_CONNTYPE);
+ base_value::connect(&v, SIGNAL(valueChanged(bool)), cb, SLOT(setChecked(bool)), v.SAFE_CONNTYPE);
}
template<>
@@ -397,7 +397,7 @@ namespace options {
{
dsb->setValue(v);
base_value::connect(dsb, SIGNAL(valueChanged(double)), &v, SLOT(setValue(double)), v.DIRECT_CONNTYPE);
- base_value::connect(&v, SIGNAL(valueChanged(double)), dsb, SLOT(setValue(double)), v.DIRECT_CONNTYPE);
+ base_value::connect(&v, SIGNAL(valueChanged(double)), dsb, SLOT(setValue(double)), v.SAFE_CONNTYPE);
}
template<>
@@ -405,7 +405,7 @@ namespace options {
{
sb->setValue(v);
base_value::connect(sb, SIGNAL(valueChanged(int)), &v, SLOT(setValue(int)), v.DIRECT_CONNTYPE);
- base_value::connect(&v, SIGNAL(valueChanged(int)), sb, SLOT(setValue(int)), v.DIRECT_CONNTYPE);
+ base_value::connect(&v, SIGNAL(valueChanged(int)), sb, SLOT(setValue(int)), v.SAFE_CONNTYPE);
}
template<>
@@ -414,7 +414,7 @@ namespace options {
sl->setValue(v);
v = sl->value();
base_value::connect(sl, SIGNAL(valueChanged(int)), &v, SLOT(setValue(int)), v.DIRECT_CONNTYPE);
- base_value::connect(&v, SIGNAL(valueChanged(int)), sl, SLOT(setValue(int)), v.DIRECT_CONNTYPE);
+ base_value::connect(&v, SIGNAL(valueChanged(int)), sl, SLOT(setValue(int)), v.SAFE_CONNTYPE);
}
template<>
@@ -422,7 +422,7 @@ namespace options {
{
le->setText(v);
base_value::connect(le, SIGNAL(textChanged(QString)), &v, SLOT(setValue(QString)), v.DIRECT_CONNTYPE);
- base_value::connect(&v, SIGNAL(valueChanged(QString)),le, SLOT(setText(QString)), v.DIRECT_CONNTYPE);
+ base_value::connect(&v, SIGNAL(valueChanged(QString)),le, SLOT(setText(QString)), v.SAFE_CONNTYPE);
}
template<>
@@ -437,7 +437,7 @@ namespace options {
{
t->setCurrentIndex(v);
base_value::connect(t, SIGNAL(currentChanged(int)), &v, SLOT(setValue(int)), v.DIRECT_CONNTYPE);
- base_value::connect(&v, SIGNAL(valueChanged(int)), t, SLOT(setCurrentIndex(int)), v.DIRECT_CONNTYPE);
+ base_value::connect(&v, SIGNAL(valueChanged(int)), t, SLOT(setCurrentIndex(int)), v.SAFE_CONNTYPE);
}
template<>
@@ -475,7 +475,7 @@ namespace options {
{
w->setValue(int(value * q_diff) + q_min);
},
- v.DIRECT_CONNTYPE);
+ v.SAFE_CONNTYPE);
}
}