Always call QFutureWatcher::setFuture after connects

This commit is contained in:
Jonas Kvinge
2021-06-16 00:30:21 +02:00
parent d2d3f58a14
commit 8699790e78
15 changed files with 27 additions and 27 deletions

View File

@@ -117,8 +117,8 @@ void SmartPlaylistSearchPreview::RunSearch(const SmartPlaylistSearch &search) {
ui_->count_label->hide();
QFuture<PlaylistItemList> future = QtConcurrent::run(DoRunSearch, generator_);
QFutureWatcher<PlaylistItemList> *watcher = new QFutureWatcher<PlaylistItemList>();
watcher->setFuture(future);
QObject::connect(watcher, &QFutureWatcher<PlaylistItemList>::finished, this, &SmartPlaylistSearchPreview::SearchFinished);
watcher->setFuture(future);
}