Add this as context to lambda connection

This commit is contained in:
Jonas Kvinge 2021-01-30 22:42:21 +01:00
parent 57a5eabd8f
commit 28c130a910
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ void MoodbarItemDelegate::StartLoadingColors(const QUrl &url, const QByteArray &
QFuture<ColorVector> future = QtConcurrent::run(MoodbarRenderer::Colors, bytes, style_, qApp->palette());
QFutureWatcher<ColorVector> *watcher = new QFutureWatcher<ColorVector>();
watcher->setFuture(future);
QObject::connect(watcher, &QFutureWatcher<ColorVector>::finished, [this, watcher, url]() {
QObject::connect(watcher, &QFutureWatcher<ColorVector>::finished, this, [this, watcher, url]() {
ColorsLoaded(url, watcher->result());
watcher->deleteLater();
});