diff options
Diffstat (limited to 'tests/auto/qml/qqmlitemmodels/qtestmodel.h')
-rw-r--r-- | tests/auto/qml/qqmlitemmodels/qtestmodel.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmlitemmodels/qtestmodel.h b/tests/auto/qml/qqmlitemmodels/qtestmodel.h index 6cbec533b1..6c442b06b7 100644 --- a/tests/auto/qml/qqmlitemmodels/qtestmodel.h +++ b/tests/auto/qml/qqmlitemmodels/qtestmodel.h @@ -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 #ifndef Q_TEST_MODEL_H #define Q_TEST_MODEL_H @@ -251,6 +251,8 @@ public: mutable bool wrongIndex; struct Node { + Q_DISABLE_COPY_MOVE(Node) + Node *parent; QVector<Node *> children; @@ -261,8 +263,7 @@ public: ~Node() { - foreach (Node *n, children) - delete n; + qDeleteAll(children); } void addRows(int row, int count) |