6.5.3 clean

This commit is contained in:
kleuter
2023-11-01 18:02:52 +01:00
parent bbe896803b
commit 7018d9e6c8
2170 changed files with 57471 additions and 43550 deletions

View File

@ -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);
}

View File

@ -10,4 +10,5 @@ qt_internal_add_test(tst_qpauseanimation
tst_qpauseanimation.cpp
LIBRARIES
Qt::CorePrivate
Qt::TestPrivate
)

View File

@ -2,6 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QTest>
#include <QtTest/private/qpropertytesthelper_p.h>
#include <QtCore/qpauseanimation.h>
#include <QtCore/qpropertyanimation.h>
@ -456,6 +457,12 @@ void tst_QPauseAnimation::bindings()
"QPauseAnimation::setDuration: cannot set a negative duration");
animation.setDuration(-1);
QCOMPARE(durationObserver, 46);
QTestPrivate::testReadWritePropertyBasics(animation, 10, 20, "duration");
if (QTest::currentTestFailed()) {
qDebug("Failed property test for QPauseAnimation::duration");
return;
}
}
QTEST_MAIN(tst_QPauseAnimation)

View File

@ -8,4 +8,6 @@
qt_internal_add_test(tst_qsequentialanimationgroup
SOURCES
tst_qsequentialanimationgroup.cpp
LIBRARIES
Qt::TestPrivate
)

View File

@ -2,6 +2,8 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QTest>
#include <QtTest/private/qpropertytesthelper_p.h>
#include <QVariantAnimation>
#include <QProperty>
#include <QPropertyAnimation>
@ -1685,6 +1687,15 @@ void tst_QSequentialAnimationGroup::bindings()
group.bindableCurrentAnimation().setBinding([&]() { return leader.value(); });
QCOMPARE(group.currentAnimation(), anim3.get());
QTestPrivate::testReadOnlyPropertyBasics(group, anim3.get(), anim2.get(), "currentAnimation",
[&group, totalDuration]() {
group.setCurrentTime(int(totalDuration * 1.5 / 3));
});
if (QTest::currentTestFailed()) {
qDebug("Failed property test for QSequentialAnimationGroup::currentAnimation");
return;
}
}
QTEST_MAIN(tst_QSequentialAnimationGroup)