diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2025-09-01 14:00:29 +0200 |
|---|---|---|
| committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2025-09-02 11:21:56 +0000 |
| commit | e75f67365f253f883966af6a6d689436c8c72e15 (patch) | |
| tree | dac3505c5c40ac87cec111160317d3386b2adbd6 | |
| parent | e3f75f603cb4b9c8a9c6aaed28c4a314d4a528e9 (diff) | |
tst_qqmlrangemodel: Avoid memory leak
Change-Id: Ia1fe08ca818acf8cd1863d385fd767e3f68abc87
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 755051510f748de17da50a81722ae5aac2983b70)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| -rw-r--r-- | tests/auto/qml/qqmlrangemodel/tst_qqmlrangemodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlrangemodel/tst_qqmlrangemodel.cpp b/tests/auto/qml/qqmlrangemodel/tst_qqmlrangemodel.cpp index 66fbd96153..106fc97a7e 100644 --- a/tests/auto/qml/qqmlrangemodel/tst_qqmlrangemodel.cpp +++ b/tests/auto/qml/qqmlrangemodel/tst_qqmlrangemodel.cpp @@ -380,7 +380,7 @@ void tst_QQmlRangeModel::objectRange() QFETCH(const QQmlDelegateModel::DelegateModelAccess, delegateModelAccess); QFETCH(const bool, writeBack); - QPointer<Entry> entry = new Entry(1, "one"); + QScopedPointer<Entry> entry(new Entry(1, "one")); std::vector<Entry *> objects{entry.get()}; RangeModel model(&objects); |
