From 9f01114c286cc2a19683ff69efc0381fc9b4be90 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 28 Sep 2015 15:14:58 +0200 Subject: Use function operator() for notification instead opf notify(...). --- plugingui/checkbox.cc | 2 +- plugingui/knob.cc | 2 +- plugingui/notifier.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugingui/checkbox.cc b/plugingui/checkbox.cc index ec0456f..6f95287 100644 --- a/plugingui/checkbox.cc +++ b/plugingui/checkbox.cc @@ -108,7 +108,7 @@ void CheckBox::internalSetChecked(bool checked) } state = checked; - stateChangedNotifier.notify(state); + stateChangedNotifier(state); repaintEvent(NULL); } diff --git a/plugingui/knob.cc b/plugingui/knob.cc index b843106..f907004 100644 --- a/plugingui/knob.cc +++ b/plugingui/knob.cc @@ -181,7 +181,7 @@ void Knob::internalSetValue(float value) } currentValue = value; - valueChangedNotifier.notify(currentValue); + valueChangedNotifier(currentValue); repaintEvent(NULL); } diff --git a/plugingui/notifier.h b/plugingui/notifier.h index 7e6b0d8..a9f8831 100644 --- a/plugingui/notifier.h +++ b/plugingui/notifier.h @@ -88,7 +88,7 @@ public: slots.erase(object); } - void notify(Args...args) + void operator()(Args... args) { for(auto slot = slots.begin(); slot != slots.end(); ++slot) { (*slot).second(args...); -- cgit v1.2.3