diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-06-22 16:54:07 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-06-26 23:01:53 +0200 |
commit | 545bed0348ca40730f19128171d787c80b9058f9 (patch) | |
tree | 3d901490ee017755d242b82444b2d5f176f38154 | |
parent | ceee2f51c7c97bd8e6c2702b7b1fe811ef912711 (diff) |
options/slider: fix link error
-rw-r--r-- | options/slider.cpp | 8 | ||||
-rw-r--r-- | options/slider.hpp | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/options/slider.cpp b/options/slider.cpp index 5c73d867..9ad06e24 100644 --- a/options/slider.cpp +++ b/options/slider.cpp @@ -86,6 +86,10 @@ int slider_value::to_slider_pos(int q_min, int q_max) const return int(std::round(((cur() - min()) * q_diff / div) + q_min)); } +} // end ns options + +using slider_value = options::slider_value; + QDataStream& operator << (QDataStream& out, const options::slider_value& v) { out << v.cur() @@ -103,8 +107,6 @@ QDataStream& operator >> (QDataStream& in, options::slider_value& v) { double cur = 0, min = 0, max = 0; in >> cur >> min >> max; - v = options::slider_value(cur, min, max); + v = slider_value(cur, min, max); return in; } - -} // end ns options diff --git a/options/slider.hpp b/options/slider.hpp index 958214ce..ab635d56 100644 --- a/options/slider.hpp +++ b/options/slider.hpp @@ -49,8 +49,8 @@ namespace options slider_value update_from_slider(int pos, int q_min, int q_max) const; int to_slider_pos(int q_min, int q_max) const; }; - - QDebug operator << (QDebug dbg, const options::slider_value& val); - QDataStream& operator << (QDataStream& out, const options::slider_value& v); - QDataStream& operator >> (QDataStream& in, options::slider_value& v); } + +OTR_OPTIONS_EXPORT QDebug operator << (QDebug dbg, const options::slider_value& val); +OTR_OPTIONS_EXPORT QDataStream& operator << (QDataStream& out, const options::slider_value& v); +OTR_OPTIONS_EXPORT QDataStream& operator >> (QDataStream& in, options::slider_value& v); |