diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-12-04 17:27:16 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-01-28 19:37:39 +0000 |
commit | 64b2eb7490f502feececec314eb215bbb7832858 (patch) | |
tree | 74cde25d3c12dbdc61647e2de986ba5ab8a36707 /examples/widgets/widgets/tooltips | |
parent | f9e6f8efda350689211286db9154677924df8aab (diff) |
Cleanup Widgets examples - replace foreach
Cleanup the Widget examples - replace foreach with a standard for loop
Change-Id: I59cb2bf4494201f9f0228b07a8bb936ce40da46f
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'examples/widgets/widgets/tooltips')
-rw-r--r-- | examples/widgets/widgets/tooltips/sortingbox.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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] |