From 545bed0348ca40730f19128171d787c80b9058f9 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 22 Jun 2018 16:54:07 +0200 Subject: options/slider: fix link error --- options/slider.cpp | 8 +++++--- options/slider.hpp | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'options') 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); -- cgit v1.2.3