From 64b2eb7490f502feececec314eb215bbb7832858 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Tue, 4 Dec 2018 17:27:16 +0100 Subject: Cleanup Widgets examples - replace foreach Cleanup the Widget examples - replace foreach with a standard for loop Change-Id: I59cb2bf4494201f9f0228b07a8bb936ce40da46f Reviewed-by: Samuel Gaist Reviewed-by: Konstantin Shegunov Reviewed-by: Edward Welbourne Reviewed-by: Paul Wicking --- examples/widgets/widgets/tooltips/sortingbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/widgets/widgets/tooltips') diff --git a/examples/widgets/widgets/tooltips/sortingbox.cpp b/examples/widgets/widgets/tooltips/sortingbox.cpp index 5f8d96f110..838083c399 100644 --- a/examples/widgets/widgets/tooltips/sortingbox.cpp +++ b/examples/widgets/widgets/tooltips/sortingbox.cpp @@ -140,7 +140,7 @@ void SortingBox::paintEvent(QPaintEvent * /* event */) { QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing); - foreach (ShapeItem shapeItem, shapeItems) { + for (const ShapeItem &shapeItem : qAsConst(shapeItems)) { //! [8] //! [9] painter.translate(shapeItem.position()); //! [9] //! [10] -- cgit v1.2.3