diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-02-02 11:45:19 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-02-02 14:17:14 +0100 |
commit | 065c3f5732fa98a83202b526fbec9839b765eb48 (patch) | |
tree | 7d74eab9ca55334916120b37ac8a8d265a641287 | |
parent | 15f2d3f0d5b0acad5d5438f510069a620177c98c (diff) |
Make the internals of QQuickAnimatorController private
No one should mess with those. All the pointers have complicated
ownership semantics. We can just befriend the test instead of making it
all public.
Task-number: QTBUG-90401
Change-Id: I6c4adbab7046b40db7f4628780ef928445ea3eb2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r-- | src/quick/util/qquickanimatorcontroller_p.h | 3 | ||||
-rw-r--r-- | tests/auto/quick/qquickanimators/tst_qquickanimators.cpp | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/quick/util/qquickanimatorcontroller_p.h b/src/quick/util/qquickanimatorcontroller_p.h index 9c345b8152..c567c8ad43 100644 --- a/src/quick/util/qquickanimatorcontroller_p.h +++ b/src/quick/util/qquickanimatorcontroller_p.h @@ -93,10 +93,11 @@ public: QQuickWindow *window() const { return m_window; } private: + friend class tst_Animators; + void start_helper(QAbstractAnimationJob *job); void cancel_helper(QAbstractAnimationJob *job); -public: QSet<QQuickAnimatorJob * > m_runningAnimators; QHash<QAbstractAnimationJob *, QSharedPointer<QAbstractAnimationJob> > m_animationRoots; QSet<QSharedPointer<QAbstractAnimationJob> > m_rootsPendingStop; diff --git a/tests/auto/quick/qquickanimators/tst_qquickanimators.cpp b/tests/auto/quick/qquickanimators/tst_qquickanimators.cpp index 34aace57a0..30a1d5a560 100644 --- a/tests/auto/quick/qquickanimators/tst_qquickanimators.cpp +++ b/tests/auto/quick/qquickanimators/tst_qquickanimators.cpp @@ -42,6 +42,8 @@ using namespace QQuickViewTestUtil; +QT_BEGIN_NAMESPACE + class tst_Animators: public QQmlDataTest { Q_OBJECT @@ -180,6 +182,8 @@ void tst_Animators::testTransitionsWithImplicitFrom() QVERIFY(controller->m_runningAnimators.isEmpty()); } +QT_END_NAMESPACE + QTEST_MAIN(tst_Animators) #include "tst_qquickanimators.moc" |