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:
David Sansome 2014-05-11 19:18:43 +10:00
parent 41425b3c5c
commit 18f72f3ada
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ bool OrganiseDialog::SetFilenames(const QStringList& filenames) {
QtConcurrent::run(this, &OrganiseDialog::LoadSongsBlocking, filenames);
QFutureWatcher<SongList>* watcher = new QFutureWatcher<SongList>(this);
watcher->setFuture(songs_future_);
NewClosure(watcher, SIGNAL(finished()), [&]() {
NewClosure(watcher, SIGNAL(finished()), [=]() {
SetSongs(songs_future_.result());
watcher->deleteLater();
});