More const detach fixes

This commit is contained in:
Jonas Kvinge
2024-08-23 20:30:59 +02:00
parent be09011bb7
commit 7ebcc73a49
54 changed files with 195 additions and 180 deletions

View File

@@ -177,10 +177,11 @@ QByteArray MoodbarBuilder::Finish(int width) {
const int end = std::max(static_cast<int>((i + 1) * frames_.count() / width), start + 1);
for (int j = start; j < end; j++) {
const Rgb &frame = frames_[j];
const Rgb frame = frames_.value(j);
rgb.r += frame.r * 255;
rgb.g += frame.g * 255;
rgb.b += frame.b * 255;
frames_[j] = rgb;
}
const int n = end - start;

View File

@@ -107,7 +107,7 @@ MoodbarLoader::Result MoodbarLoader::Load(const QUrl &url, const bool has_cue, Q
// Are we in the middle of loading this moodbar already?
if (requests_.contains(url)) {
*async_pipeline = requests_[url];
*async_pipeline = requests_.value(url);
return Result::WillLoadAsync;
}
@@ -173,7 +173,7 @@ void MoodbarLoader::MaybeTakeNextRequest() {
active_requests_ << url;
qLog(Info) << "Creating moodbar data for" << url.toLocalFile();
QMetaObject::invokeMethod(requests_[url], &MoodbarPipeline::Start, Qt::QueuedConnection);
QMetaObject::invokeMethod(requests_.value(url), &MoodbarPipeline::Start, Qt::QueuedConnection);
}