Replace NewClosure with lamdas

This commit is contained in:
Jonas Kvinge
2021-01-29 18:47:50 +01:00
parent fd9c6d460a
commit cb5a7f8c9d
6 changed files with 10 additions and 9 deletions

View File

@@ -24,7 +24,6 @@
#include "core/application.h"
#include "core/player.h"
#include "core/song.h"
#include "core/closure.h"
#include "engine/engine_fwd.h"
#include "settings/moodbarsettingspage.h"
#include "playlist/playlistmanager.h"
@@ -76,7 +75,7 @@ void MoodbarController::CurrentSongChanged(const Song &song) {
// bar. Our slot will be called when the data is actually loaded.
emit CurrentMoodbarDataChanged(QByteArray());
NewClosure(pipeline, SIGNAL(Finished(bool)), this, SLOT(AsyncLoadComplete(MoodbarPipeline*, QUrl)), pipeline, song.url());
QObject::connect(pipeline, &MoodbarPipeline::Finished, this, [this, pipeline, song]() { AsyncLoadComplete(pipeline, song.url()); });
break;
}