From 53f52edb2acfbfd956361b69c5363aba1f35fca6 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Thu, 12 Apr 2018 18:42:13 +0300 Subject: GraphicsView: use range-based for instead of foreach Change-Id: I8e1b50bcbffdb492dc10662150b51b0eed1e228e Reviewed-by: Edward Welbourne Reviewed-by: Lars Knoll --- src/widgets/graphicsview/qgraphicsview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/graphicsview/qgraphicsview.cpp') diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp index 0c847b899e..705d5a0f4d 100644 --- a/src/widgets/graphicsview/qgraphicsview.cpp +++ b/src/widgets/graphicsview/qgraphicsview.cpp @@ -2703,7 +2703,7 @@ void QGraphicsView::updateScene(const QList &rects) dirtyViewportRects << xrect; } - foreach (const QRect &rect, dirtyViewportRects) { + for (const QRect &rect : qAsConst(dirtyViewportRects)) { // Add the exposed rect to the update region. In rect update // mode, we only count the bounding rect of items. if (!boundingRectUpdate) { -- cgit v1.2.3