From c068cbb736d970967253be05799350093df44fc9 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Fri, 3 Apr 2015 21:02:23 -0400 Subject: [PATCH] callbacks: Remove on_pq_track_changed() It's been replaced with a function int he QNotifier class. Signed-off-by: Anna Schumaker --- core/callback.cpp | 3 --- core/queue.cpp | 6 ++---- include/core/callback.h | 9 --------- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/core/callback.cpp b/core/callback.cpp index 9327ac1a..95048c8d 100644 --- a/core/callback.cpp +++ b/core/callback.cpp @@ -5,14 +5,11 @@ #include -static void no_op(Queue *, unsigned int) {} static void no_op(Queue *) {} static struct Callbacks callbacks = { .on_pq_removed = no_op, - - .on_queue_track_changed = no_op, }; diff --git a/core/queue.cpp b/core/queue.cpp index f6d0ce73..a6958a31 100644 --- a/core/queue.cpp +++ b/core/queue.cpp @@ -180,10 +180,8 @@ void Queue :: del(Track *track) void Queue :: updated(Track *track) { for (unsigned int i = 0; i < _tracks.size(); i++) { - if (_tracks[i] == track) { + if (_tracks[i] == track) _notify->on_track_updated(i); - get_callbacks()->on_queue_track_changed(this, i); - } } } @@ -253,7 +251,7 @@ void Queue :: sort(sort_t field, bool reset) std::stable_sort(_tracks.begin(), _tracks.end(), SortTracks(_sort_order)); for (unsigned int i = 0; i < _tracks.size(); i++) - get_callbacks()->on_queue_track_changed(this, i); + _notify->on_track_updated(i); } Track *Queue :: operator[](unsigned int index) diff --git a/include/core/callback.h b/include/core/callback.h index e54b3230..a2fe5c05 100644 --- a/include/core/callback.h +++ b/include/core/callback.h @@ -22,15 +22,6 @@ struct Callbacks { */ void (*on_pq_removed)(Queue *); - /* Queue callbacks */ - - /** - * Called when a track's metadata changes. - * - * @param queue The queue containing the track. - * @param row The current index of the track. - */ - void (*on_queue_track_changed)(Queue *, unsigned int); };