Use std::bind in QtConcurrent::run() to fix compile with Qt 6

This commit is contained in:
Jonas Kvinge
2020-07-19 22:43:58 +02:00
parent ff73dd2183
commit eb270df835
6 changed files with 10 additions and 7 deletions

View File

@@ -22,6 +22,7 @@
#include "config.h"
#include <memory>
#include <functional>
#include <algorithm>
#include <QtGlobal>
@@ -344,7 +345,7 @@ bool OrganiseDialog::SetUrls(const QList<QUrl> &urls) {
bool OrganiseDialog::SetFilenames(const QStringList &filenames) {
songs_future_ = QtConcurrent::run(this, &OrganiseDialog::LoadSongsBlocking, filenames);
songs_future_ = QtConcurrent::run(std::bind(&OrganiseDialog::LoadSongsBlocking, this, filenames));
NewClosure(songs_future_, [=]() { SetSongs(songs_future_.result()); });
SetLoadingSongs(true);