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

@@ -431,7 +431,8 @@ void PlaylistManager::UpdateSummaryText() {
int selected = 0;
// Get the length of the selected tracks
for (const QItemSelectionRange &range : std::as_const(playlists_[current_id()].selection)) {
const QItemSelection ranges = playlists_.value(current_id()).selection;
for (const QItemSelectionRange &range : ranges) {
if (!range.isValid()) continue;
selected += range.bottom() - range.top() + 1;