summaryrefslogtreecommitdiffstats
path: root/tests/manual/qgraphicsitemgroup/customitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/qgraphicsitemgroup/customitem.cpp')
-rw-r--r--tests/manual/qgraphicsitemgroup/customitem.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/manual/qgraphicsitemgroup/customitem.cpp b/tests/manual/qgraphicsitemgroup/customitem.cpp
index 77b023337e..5df16291ad 100644
--- a/tests/manual/qgraphicsitemgroup/customitem.cpp
+++ b/tests/manual/qgraphicsitemgroup/customitem.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "customitem.h"
@@ -9,10 +9,10 @@
QList<CustomGroup*> CustomScene::selectedCustomGroups() const
{
- QList<QGraphicsItem*> all = selectedItems();
+ const QList<QGraphicsItem*> all = selectedItems();
QList<CustomGroup*> groups;
- foreach (QGraphicsItem *item, all) {
+ for (QGraphicsItem *item : all) {
CustomGroup* group = qgraphicsitem_cast<CustomGroup*>(item);
if (group)
groups.append(group);
@@ -23,10 +23,10 @@ QList<CustomGroup*> CustomScene::selectedCustomGroups() const
QList<CustomItem*> CustomScene::selectedCustomItems() const
{
- QList<QGraphicsItem*> all = selectedItems();
+ const QList<QGraphicsItem*> all = selectedItems();
QList<CustomItem*> items;
- foreach (QGraphicsItem *item, all) {
+ for (QGraphicsItem *item : all) {
CustomItem* citem = qgraphicsitem_cast<CustomItem*>(item);
if (citem)
items.append(citem);