Remove use of std::bind where possible

This commit is contained in:
Jonas Kvinge
2020-11-14 02:13:22 +01:00
parent a155e503f4
commit deddaed04a
8 changed files with 45 additions and 10 deletions

View File

@@ -387,8 +387,11 @@ bool OrganizeDialog::SetUrls(const QList<QUrl> &urls) {
}
bool OrganizeDialog::SetFilenames(const QStringList &filenames) {
songs_future_ = QtConcurrent::run(std::bind(&OrganizeDialog::LoadSongsBlocking, this, filenames));
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
songs_future_ = QtConcurrent::run(&OrganizeDialog::LoadSongsBlocking, this, filenames);
#else
songs_future_ = QtConcurrent::run(this, &OrganizeDialog::LoadSongsBlocking, filenames);
#endif
NewClosure(songs_future_, [=]() { SetSongs(songs_future_.result()); });
SetLoadingSongs(true);