diff --git a/src/moodbar/moodbarcontroller.cpp b/src/moodbar/moodbarcontroller.cpp index a66323644..e09fad077 100644 --- a/src/moodbar/moodbarcontroller.cpp +++ b/src/moodbar/moodbarcontroller.cpp @@ -62,7 +62,7 @@ void MoodbarController::CurrentSongChanged(const Song &song) { const MoodbarLoader::LoadResult load_result = moodbar_loader_->Load(song.url(), song.has_cue()); switch (load_result.status) { case MoodbarLoader::LoadStatus::CannotLoad: - Q_EMIT CurrentMoodbarDataChanged(QByteArray()); + Q_EMIT CurrentMoodbarDataChanged(); break; case MoodbarLoader::LoadStatus::Loaded: @@ -71,7 +71,7 @@ void MoodbarController::CurrentSongChanged(const Song &song) { case MoodbarLoader::LoadStatus::WillLoadAsync: // Emit an empty array for now so the GUI reverts to a normal progressbar. Our slot will be called when the data is actually loaded. - Q_EMIT CurrentMoodbarDataChanged(QByteArray()); + Q_EMIT CurrentMoodbarDataChanged(); MoodbarPipelinePtr pipeline = load_result.pipeline; Q_ASSERT(pipeline); @@ -88,7 +88,7 @@ void MoodbarController::CurrentSongChanged(const Song &song) { void MoodbarController::PlaybackStopped() { if (enabled_) { - Q_EMIT CurrentMoodbarDataChanged(QByteArray()); + Q_EMIT CurrentMoodbarDataChanged(); } } diff --git a/src/moodbar/moodbarcontroller.h b/src/moodbar/moodbarcontroller.h index 94028fa9b..009132fc3 100644 --- a/src/moodbar/moodbarcontroller.h +++ b/src/moodbar/moodbarcontroller.h @@ -43,14 +43,14 @@ class MoodbarController : public QObject { void ReloadSettings(); Q_SIGNALS: - void CurrentMoodbarDataChanged(const QByteArray &data); + void CurrentMoodbarDataChanged(const QByteArray &data = QByteArray()); void StyleChanged(); public Q_SLOTS: void CurrentSongChanged(const Song &song); void PlaybackStopped(); - private Q_SLOTS: + private: void AsyncLoadComplete(MoodbarPipelinePtr pipeline, const QUrl &url); private: diff --git a/src/moodbar/moodbaritemdelegate.h b/src/moodbar/moodbaritemdelegate.h index 94b1237c8..9116a59c5 100644 --- a/src/moodbar/moodbaritemdelegate.h +++ b/src/moodbar/moodbaritemdelegate.h @@ -55,13 +55,14 @@ class MoodbarItemDelegate : public QItemDelegate { private Q_SLOTS: void ReloadSettings(); + Q_SIGNALS: + void StyleChanged(); + + private: void DataLoaded(const QUrl &url, MoodbarPipelinePtr pipeline); void ColorsLoaded(const QUrl &url, const ColorVector &colors); void ImageLoaded(const QUrl &url, const QImage &image); - Q_SIGNALS: - void StyleChanged(); - private: struct Data { Data(); diff --git a/src/moodbar/moodbarloader.h b/src/moodbar/moodbarloader.h index b5d07d3de..899277116 100644 --- a/src/moodbar/moodbarloader.h +++ b/src/moodbar/moodbarloader.h @@ -70,13 +70,11 @@ class MoodbarLoader : public QObject { LoadResult Load(const QUrl &url, const bool has_cue); - private Q_SLOTS: - void RequestFinished(MoodbarPipelinePtr pipeline, const QUrl &url); - void MaybeTakeNextRequest(); - private: static QStringList MoodFilenames(const QString &song_filename); static QUrl CacheUrlEntry(const QString &filename); + void RequestFinished(MoodbarPipelinePtr pipeline, const QUrl &url); + void MaybeTakeNextRequest(); Q_SIGNALS: void MoodbarEnabled(const bool enabled);