OpenCoverage

qanimationgroupjob.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/animations/qanimationgroupjob.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4QAnimationGroupJob::QAnimationGroupJob()-
5 : QAbstractAnimationJob(), m_firstChild(nullptr), m_lastChild(nullptr)-
6{-
7 m_isGroup = true;-
8}
executed 33873 times by 20 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qabstractanimationjob
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
33873
9-
10QAnimationGroupJob::~QAnimationGroupJob()-
11{-
12 clear();-
13}
executed 33829 times by 20 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qabstractanimationjob
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
33829
14-
15void QAnimationGroupJob::topLevelAnimationLoopChanged()-
16{-
17 for (QAbstractAnimationJob *animation = firstChild(); animation
animationDescription
TRUEevaluated 78773 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
FALSEevaluated 33999 times by 19 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
; animation = animation->nextSibling())
33999-78773
18 animation->fireTopLevelAnimationLoopChanged();
executed 78773 times by 18 tests: animation->fireTopLevelAnimationLoopChanged();
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
78773
19}
executed 33999 times by 19 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
33999
20-
21void QAnimationGroupJob::appendAnimation(QAbstractAnimationJob *animation)-
22{-
23 if (QAnimationGroupJob *oldGroup = animation->m_group
QAnimationGrou...ation->m_groupDescription
TRUEevaluated 71 times by 4 tests
Evaluated by:
  • tst_qanimationgroupjob
  • tst_qquickbehaviors
  • tst_qquicklistview
  • tst_qquicksmoothedanimation
FALSEevaluated 78254 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qabstractanimationjob
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
)
71-78254
24 oldGroup->removeAnimation(animation);
executed 71 times by 4 tests: oldGroup->removeAnimation(animation);
Executed by:
  • tst_qanimationgroupjob
  • tst_qquickbehaviors
  • tst_qquicklistview
  • tst_qquicksmoothedanimation
71
25-
26 ((!animation->previousSibling() && !animation->nextSibling()) ? static_cast<void>(0) : qt_assert("!animation->previousSibling() && !animation->nextSibling()", __FILE__, 66));-
27-
28 if (m_lastChild
m_lastChildDescription
TRUEevaluated 44480 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicktaphandler
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
FALSEevaluated 33845 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qabstractanimationjob
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
)
33845-44480
29 m_lastChild->m_nextSibling = animation;
executed 44480 times by 16 tests: m_lastChild->m_nextSibling = animation;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicktaphandler
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
44480
30 else-
31 m_firstChild = animation;
executed 33845 times by 20 tests: m_firstChild = animation;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qabstractanimationjob
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
33845
32 animation->m_previousSibling = m_lastChild;-
33 m_lastChild = animation;-
34-
35 animation->m_group = this;-
36 animationInserted(animation);-
37}
executed 78325 times by 20 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qabstractanimationjob
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
78325
38-
39void QAnimationGroupJob::prependAnimation(QAbstractAnimationJob *animation)-
40{-
41 if (QAnimationGroupJob *oldGroup = animation->m_group
QAnimationGrou...ation->m_groupDescription
TRUEnever evaluated
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qsequentialanimationgroupjob
)
0-6
42 oldGroup->removeAnimation(animation);
never executed: oldGroup->removeAnimation(animation);
0
43-
44 ((!previousSibling() && !nextSibling()) ? static_cast<void>(0) : qt_assert("!previousSibling() && !nextSibling()", __FILE__, 84));-
45-
46 if (m_firstChild
m_firstChildDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qsequentialanimationgroupjob
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickanimations
)
2-4
47 m_firstChild->m_previousSibling = animation;
executed 4 times by 1 test: m_firstChild->m_previousSibling = animation;
Executed by:
  • tst_qsequentialanimationgroupjob
4
48 else-
49 m_lastChild = animation;
executed 2 times by 1 test: m_lastChild = animation;
Executed by:
  • tst_qquickanimations
2
50 animation->m_nextSibling = m_firstChild;-
51 m_firstChild = animation;-
52-
53 animation->m_group = this;-
54 animationInserted(animation);-
55}
executed 6 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qsequentialanimationgroupjob
6
56-
57void QAnimationGroupJob::removeAnimation(QAbstractAnimationJob *animation)-
58{-
59 ((animation) ? static_cast<void>(0) : qt_assert("animation", __FILE__, 99));-
60 ((animation->m_group == this) ? static_cast<void>(0) : qt_assert("animation->m_group == this", __FILE__, 100));-
61 QAbstractAnimationJob *prev = animation->previousSibling();-
62 QAbstractAnimationJob *next = animation->nextSibling();-
63-
64 if (prev
prevDescription
TRUEevaluated 232 times by 3 tests
Evaluated by:
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qsequentialanimationgroupjob
FALSEevaluated 213 times by 7 tests
Evaluated by:
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qquickbehaviors
  • tst_qquicklistview
  • tst_qquicksmoothedanimation
  • tst_qsequentialanimationgroupjob
)
213-232
65 prev->m_nextSibling = next;
executed 232 times by 3 tests: prev->m_nextSibling = next;
Executed by:
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qsequentialanimationgroupjob
232
66 else-
67 m_firstChild = next;
executed 213 times by 7 tests: m_firstChild = next;
Executed by:
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qquickbehaviors
  • tst_qquicklistview
  • tst_qquicksmoothedanimation
  • tst_qsequentialanimationgroupjob
213
68-
69 if (next
nextDescription
TRUEevaluated 10 times by 3 tests
Evaluated by:
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qsequentialanimationgroupjob
FALSEevaluated 435 times by 7 tests
Evaluated by:
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qquickbehaviors
  • tst_qquicklistview
  • tst_qquicksmoothedanimation
  • tst_qsequentialanimationgroupjob
)
10-435
70 next->m_previousSibling = prev;
executed 10 times by 3 tests: next->m_previousSibling = prev;
Executed by:
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qsequentialanimationgroupjob
10
71 else-
72 m_lastChild = prev;
executed 435 times by 7 tests: m_lastChild = prev;
Executed by:
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qquickbehaviors
  • tst_qquicklistview
  • tst_qquicksmoothedanimation
  • tst_qsequentialanimationgroupjob
435
73-
74 animation->m_previousSibling = nullptr;-
75 animation->m_nextSibling = nullptr;-
76-
77 animation->m_group = nullptr;-
78 animationRemoved(animation, prev, next);-
79}
executed 445 times by 7 tests: end of block
Executed by:
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qquickbehaviors
  • tst_qquicklistview
  • tst_qquicksmoothedanimation
  • tst_qsequentialanimationgroupjob
445
80-
81void QAnimationGroupJob::clear()-
82{-
83 QAbstractAnimationJob *child = firstChild();-
84 QAbstractAnimationJob *nextSibling = nullptr;-
85 while (child != nullptr
child != nullptrDescription
TRUEevaluated 77830 times by 19 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qabstractanimationjob
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
FALSEevaluated 33835 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qabstractanimationjob
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
) {
33835-77830
86 child->m_group = nullptr;-
87 nextSibling = child->nextSibling();-
88 delete child;-
89 child = nextSibling;-
90 }
executed 77830 times by 19 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qabstractanimationjob
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
77830
91 m_firstChild = nullptr;-
92 m_lastChild = nullptr;-
93}
executed 33835 times by 20 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qabstractanimationjob
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qquicktaphandler
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
33835
94-
95void QAnimationGroupJob::resetUncontrolledAnimationsFinishTime()-
96{-
97 for (QAbstractAnimationJob *animation = firstChild(); animation
animationDescription
TRUEnever evaluated
FALSEnever evaluated
; animation = animation->nextSibling()) {
0
98 if (animation->duration() == -1
animation->duration() == -1Description
TRUEnever evaluated
FALSEnever evaluated
|| animation->loopCount() < 0
animation->loopCount() < 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
99 resetUncontrolledAnimationFinishTime(animation);-
100 }
never executed: end of block
0
101 }
never executed: end of block
0
102}
never executed: end of block
0
103-
104void QAnimationGroupJob::resetUncontrolledAnimationFinishTime(QAbstractAnimationJob *anim)-
105{-
106 setUncontrolledAnimationFinishTime(anim, -1);-
107}
executed 32118 times by 15 tests: end of block
Executed by:
  • tst_examples
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
32118
108-
109void QAnimationGroupJob::setUncontrolledAnimationFinishTime(QAbstractAnimationJob *anim, int time)-
110{-
111 anim->m_uncontrolledFinishTime = time;-
112}
executed 32282 times by 15 tests: end of block
Executed by:
  • tst_examples
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • tst_qsequentialanimationgroupjob
  • tst_scenegraph
32282
113-
114void QAnimationGroupJob::uncontrolledAnimationFinished(QAbstractAnimationJob *animation)-
115{-
116 (void)animation;;-
117}
never executed: end of block
0
118-
119void QAnimationGroupJob::animationRemoved(QAbstractAnimationJob* anim, QAbstractAnimationJob* , QAbstractAnimationJob* )-
120{-
121 resetUncontrolledAnimationFinishTime(anim);-
122 if (!firstChild()
!firstChild()Description
TRUEevaluated 207 times by 7 tests
Evaluated by:
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qquickbehaviors
  • tst_qquicklistview
  • tst_qquicksmoothedanimation
  • tst_qsequentialanimationgroupjob
FALSEevaluated 238 times by 4 tests
Evaluated by:
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qsequentialanimationgroupjob
) {
207-238
123 m_currentTime = 0;-
124 stop();-
125 }
executed 207 times by 7 tests: end of block
Executed by:
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qquickbehaviors
  • tst_qquicklistview
  • tst_qquicksmoothedanimation
  • tst_qsequentialanimationgroupjob
207
126}
executed 445 times by 7 tests: end of block
Executed by:
  • tst_qanimationgroupjob
  • tst_qparallelanimationgroupjob
  • tst_qpauseanimationjob
  • tst_qquickbehaviors
  • tst_qquicklistview
  • tst_qquicksmoothedanimation
  • tst_qsequentialanimationgroupjob
445
127-
128void QAnimationGroupJob::debugChildren(QDebug d) const-
129{-
130 int indentLevel = 1;-
131 const QAnimationGroupJob *group = this;-
132 while ((
(group = group->m_group)Description
TRUEnever evaluated
FALSEnever evaluated
group = group->m_group)
(group = group->m_group)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
133 ++
never executed: ++indentLevel;
indentLevel;
never executed: ++indentLevel;
0
134-
135 QByteArray ind(indentLevel, ' ');-
136 for (QAbstractAnimationJob *child = firstChild(); child
childDescription
TRUEnever evaluated
FALSEnever evaluated
; child = child->nextSibling())
0
137 d << "\n" << ind.constData() << child;
never executed: d << "\n" << ind.constData() << child;
0
138}
never executed: end of block
0
139-
140-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0