From 9a0822c445e56580fb3034224191ec825ea0274a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 13 Oct 2017 15:05:05 +0200 Subject: options/tie: change "tie" overloads Adjust usages. There are ODR issues with MSVC and it doesn't support C++17 "static inline constexpr" _variables_. Otherwise, "signal_fun" could be a variable and not a function. The usages in accela/ewma2 dialog are more verbose now but the original API was silly. --- filter-ewma2/ftnoir_filter_ewma2_dialog.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'filter-ewma2') diff --git a/filter-ewma2/ftnoir_filter_ewma2_dialog.cpp b/filter-ewma2/ftnoir_filter_ewma2_dialog.cpp index 55e9782e..da572ce4 100644 --- a/filter-ewma2/ftnoir_filter_ewma2_dialog.cpp +++ b/filter-ewma2/ftnoir_filter_ewma2_dialog.cpp @@ -20,16 +20,13 @@ dialog_ewma::dialog_ewma() tie_setting(s.kSmoothingScaleCurve, ui.powCurve); tie_setting(s.kSmoothingScaleCurve, ui.curve_label, - [](auto& x) { return x * 100; }, - "%1%", 0, 'f', 2); + [](auto& x) { return QStringLiteral("%1%").arg(x * 100, 0, 'f', 2); }); tie_setting(s.kMinSmoothing, ui.min_label, - [](auto& x) { return x * 100; }, - "%1%", 0, 'f', 2); + [](auto& x) { return QStringLiteral("%1%").arg(x * 100, 0, 'f', 2);}); tie_setting(s.kMaxSmoothing, ui.max_label, - [](auto& x) { return x * 100; }, - "%1%", 0, 'f', 2); + [](auto& x) { return QStringLiteral("%1%").arg(x * 100, 0, 'f', 2);}); connect(ui.minSmooth, &QSlider::valueChanged, this, [&](int v) -> void { if (ui.maxSmooth->value() < v) ui.maxSmooth->setValue(v); }); -- cgit v1.2.3