diff options
author | Marc Mutz <marc.mutz@qt.io> | 2021-12-30 10:44:12 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-01-05 08:22:00 +0100 |
commit | 682831a00c93480e5f04f8d8d706f9791fa50dfd (patch) | |
tree | 2049c5a4a4e0049550e1b34f3d3840a2ad19a804 /tests/auto | |
parent | 9f713e8d25c330cc9ab598755b81b9881df830e8 (diff) |
tst_qanimationgroup: fix memleaks
Silences asan.
Pick-to: 6.3 6.2 5.15
Change-Id: I4995d9a6f0d4bb617fbb82b68289f7ad1ec0e96b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp b/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp index a5cb2c021e..8892a0b1ab 100644 --- a/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp +++ b/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp @@ -290,7 +290,8 @@ void tst_QAnimationGroup::setParentAutoAdd() void tst_QAnimationGroup::beginNestedGroup() { - QAnimationGroup *parent = new QParallelAnimationGroup(); + QParallelAnimationGroup group; + QAnimationGroup *parent = &group; for (int i = 0; i < 10; ++i) { if (i & 1) { @@ -347,7 +348,8 @@ void tst_QAnimationGroup::addChildTwice() void tst_QAnimationGroup::loopWithoutStartValue() { - QAnimationGroup *parent = new QSequentialAnimationGroup(); + QSequentialAnimationGroup group; + QAnimationGroup *parent = &group; QObject o; o.setProperty("ole", 0); QCOMPARE(o.property("ole").toInt(), 0); |