From f0216a3c53d43918295f1bd81975b391f4e5ed3b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 5 Oct 2018 15:54:01 +0200 Subject: 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 --- spline/spline.cpp | 11 +++-------- spline/spline.hpp | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'spline') 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(), 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& points, double max_input); std::shared_ptr 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; -- cgit v1.2.3