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

@@ -239,7 +239,7 @@ void StretchHeaderView::NormaliseWidths(const QList<int> &sections) {
selected_sum = 0.0;
for (int i = 0; i < count(); ++i) {
if (sections.contains(i)) {
selected_sum += column_widths_[i];
selected_sum += column_widths_.value(i);
}
}
}
@@ -263,7 +263,7 @@ void StretchHeaderView::ResizeSections(const QList<int> &sections) {
if (isSectionHidden(i) || (!sections.isEmpty() && !sections.contains(i))) {
continue;
}
const int pixels = static_cast<int>(column_widths_[i] * width());
const int pixels = static_cast<int>(column_widths_.value(i) * width());
if (pixels != 0) {
resizeSection(i, pixels);
}