1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-01-29 16:49:27 +01:00

Remove unneeded slots

This commit is contained in:
Jonas Kvinge 2025-01-08 04:57:17 +01:00
parent 2c64f05cea
commit 558eae1ca1
4 changed files with 11 additions and 12 deletions

View File

@ -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();
}
}

View File

@ -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:

View File

@ -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();

View File

@ -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);