HighlightScrollBar: Modernize overlay painting

Change-Id: I59da9b106204e27b202b08d0502052f3697c71a0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2017-10-24 08:21:50 +02:00
parent dd60923713
commit 0981636943

View File

@@ -296,12 +296,10 @@ void HighlightScrollBarOverlay::paintEvent(QPaintEvent *paintEvent)
const auto highlightEnd = highlights.cend();
for (auto highlightIt = highlights.cbegin(); highlightIt != highlightEnd; ++highlightIt) {
const QColor &color = creatorTheme()->color(highlightIt.key());
for (int i = 0, total = highlightIt.value().size(); i < total; ++i) {
const QRect rect = highlightIt.value().at(i);
for (const QRect &rect : highlightIt.value())
painter.fillRect(rect, color);
}
}
}
Highlight::Highlight(Id category_, int position_,
Theme::Color color_, Highlight::Priority priority_)