summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp')
-rw-r--r--tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
index 3c5d9ed3a9..c47ce53364 100644
--- a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
+++ b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.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 <QTest>
#include <QVariantAnimation>
@@ -7,6 +7,7 @@
#include <QSignalSpy>
#include <QtCore/qparallelanimationgroup.h>
+#include <QtCore/qscopeguard.h>
Q_DECLARE_METATYPE(QAbstractAnimation::State)
@@ -928,6 +929,7 @@ void tst_QParallelAnimationGroup::autoAdd()
test = static_cast<TestAnimation2*>(group.animationAt(0));
test->setParent(0); // remove the last one (with duration = 250)
+ const auto deleteParentlessObject = qScopeGuard([test] { delete test; });
QCOMPARE(test->group(), static_cast<QAnimationGroup*>(0));
QCOMPARE(group.duration(), 0);
}