diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-10-05 15:54:01 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-10-05 14:35:29 +0000 |
commit | f0216a3c53d43918295f1bd81975b391f4e5ed3b (patch) | |
tree | b6311d48559bbdb4b657beed1bd8164d9157b03f /spline | |
parent | 39ea3871c1b3f594df846bc0b9a627c9880ecea4 (diff) |
options: don't use typeindex w/ lambdas
Rename traits' functions to be more explicit.
Most of the changes are pretty old and I can't read
them at this time, sorry.
Adjust usages.
Issue: #825
Reported-by: @DanielKinsman
Diffstat (limited to 'spline')
-rw-r--r-- | spline/spline.cpp | 11 | ||||
-rw-r--r-- | spline/spline.hpp | 2 |
2 files changed, 4 insertions, 9 deletions
diff --git a/spline/spline.cpp b/spline/spline.cpp index 2fb811d6..ae32b896 100644 --- a/spline/spline.cpp +++ b/spline/spline.cpp @@ -41,11 +41,9 @@ spline::~spline() QObject::disconnect(conn_changed); QObject::disconnect(conn_maxx); QObject::disconnect(conn_maxy); - QObject::disconnect(conn_reload); - conn_changed = QMetaObject::Connection(); - conn_maxx = QMetaObject::Connection(); - conn_maxy = QMetaObject::Connection(); - conn_reload = QMetaObject::Connection(); + conn_changed = {}; + conn_maxx = {}; + conn_maxy = {}; } } @@ -351,9 +349,6 @@ void spline::set_bundle(bundle b, const QString& axis_name, Axis axis) conn_changed = QObject::connect(b.get(), &bundle_::changed, s.get(), [&] { invalidate_settings(); }); - conn_reload = QObject::connect(b.get(), &bundle_::reloading, - s.get(), [&] { invalidate_settings(); }); - // this isn't strictly necessary for the spline but helps the widget conn_maxx = QObject::connect(&s->opts.clamp_x_, value_::value_changed<int>(), ctx.get(), [&](double) { invalidate_settings(); }); diff --git a/spline/spline.hpp b/spline/spline.hpp index fe2852f2..faecbb2c 100644 --- a/spline/spline.hpp +++ b/spline/spline.hpp @@ -105,7 +105,7 @@ class OTR_SPLINE_EXPORT spline : public base_spline static int element_count(const QList<QPointF>& points, double max_input); std::shared_ptr<spline_detail::settings> s; - QMetaObject::Connection conn_changed, conn_maxx, conn_maxy, conn_reload; + QMetaObject::Connection conn_changed, conn_maxx, conn_maxy; static constexpr inline std::size_t value_count = 4096; |