Capture this lambda argument by value, since it's a local variable and won't be valid when the outer function exits.
This commit is contained in:
parent
41425b3c5c
commit
18f72f3ada
|
@ -155,7 +155,7 @@ bool OrganiseDialog::SetFilenames(const QStringList& filenames) {
|
||||||
QtConcurrent::run(this, &OrganiseDialog::LoadSongsBlocking, filenames);
|
QtConcurrent::run(this, &OrganiseDialog::LoadSongsBlocking, filenames);
|
||||||
QFutureWatcher<SongList>* watcher = new QFutureWatcher<SongList>(this);
|
QFutureWatcher<SongList>* watcher = new QFutureWatcher<SongList>(this);
|
||||||
watcher->setFuture(songs_future_);
|
watcher->setFuture(songs_future_);
|
||||||
NewClosure(watcher, SIGNAL(finished()), [&]() {
|
NewClosure(watcher, SIGNAL(finished()), [=]() {
|
||||||
SetSongs(songs_future_.result());
|
SetSongs(songs_future_.result());
|
||||||
watcher->deleteLater();
|
watcher->deleteLater();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue