diff --git a/view/sharedcache/ui/dsctriage.cpp b/view/sharedcache/ui/dsctriage.cpp index c2e7d661b..1da3aa64f 100644 --- a/view/sharedcache/ui/dsctriage.cpp +++ b/view/sharedcache/ui/dsctriage.cpp @@ -155,7 +155,7 @@ void DSCTriageView::loadImagesWithAddr(const std::vector& addresses, b watcher->deleteLater(); } }); - QFuture future = QtConcurrent::run([this, controller, images, imageLoadTask]() { + QFuture future = QtConcurrent::run([data = m_data, controller, images, imageLoadTask]() { ImageList loadedImages = {}; for (const auto& image : images) { @@ -163,7 +163,7 @@ void DSCTriageView::loadImagesWithAddr(const std::vector& addresses, b break; std::string newLoad = fmt::format("Loading images... ({}/{})", loadedImages.size(), images.size()); imageLoadTask->SetProgressText(newLoad); - if (controller->ApplyImage(*this->m_data, image)) + if (controller->ApplyImage(*data, image)) loadedImages.emplace_back(image); } imageLoadTask->Finish(); @@ -630,8 +630,8 @@ void DSCTriageView::loadStringRegion(const CacheString& string, std::optionaldeleteLater(); }); - QFuture future = QtConcurrent::run([this, controller, region]() { - return controller->ApplyRegion(*this->m_data, *region); + QFuture future = QtConcurrent::run([data = m_data, controller, region]() { + return controller->ApplyRegion(*data, *region); }); watcher->setFuture(future); connect(this, &QObject::destroyed, this, [watcher]() {