qsequentialanimationgroup.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/animation/qsequentialanimationgroup.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8typedef QList<QAbstractAnimation *>::ConstIterator AnimationListConstIt;-
9-
10bool QSequentialAnimationGroupPrivate::atEnd() const-
11{-
12-
13-
14-
15-
16-
17-
18 const int animTotalCurrentTime = QAbstractAnimationPrivate::get(currentAnimation)->totalCurrentTime;-
19 return
executed 621 times by 5 tests: return (currentLoop == loopCount - 1 && direction == QAbstractAnimation::Forward && currentAnimation == animations.last() && animTotalCurrentTime == animationActualTotalDuration(currentAnimationIndex));
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
(currentLoop == loopCount - 1
executed 621 times by 5 tests: return (currentLoop == loopCount - 1 && direction == QAbstractAnimation::Forward && currentAnimation == animations.last() && animTotalCurrentTime == animationActualTotalDuration(currentAnimationIndex));
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
621
20 && direction == QAbstractAnimation::Forward
executed 621 times by 5 tests: return (currentLoop == loopCount - 1 && direction == QAbstractAnimation::Forward && currentAnimation == animations.last() && animTotalCurrentTime == animationActualTotalDuration(currentAnimationIndex));
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
621
21 && currentAnimation == animations.last()
executed 621 times by 5 tests: return (currentLoop == loopCount - 1 && direction == QAbstractAnimation::Forward && currentAnimation == animations.last() && animTotalCurrentTime == animationActualTotalDuration(currentAnimationIndex));
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
621
22 && animTotalCurrentTime == animationActualTotalDuration(currentAnimationIndex));
executed 621 times by 5 tests: return (currentLoop == loopCount - 1 && direction == QAbstractAnimation::Forward && currentAnimation == animations.last() && animTotalCurrentTime == animationActualTotalDuration(currentAnimationIndex));
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
621
23}-
24-
25int QSequentialAnimationGroupPrivate::animationActualTotalDuration(int index) const-
26{-
27 QAbstractAnimation *anim = animations.at(index);-
28 int ret = anim->totalDuration();-
29 if (ret == -1
ret == -1Description
TRUEevaluated 78 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEevaluated 1232 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
&& actualDuration.size() > index
actualDuration.size() > indexDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEevaluated 56 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
)
22-1232
30 ret = actualDuration.at(index);
executed 22 times by 1 test: ret = actualDuration.at(index);
Executed by:
  • tst_QSequentialAnimationGroup
22
31 return
executed 1310 times by 5 tests: return ret;
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
ret;
executed 1310 times by 5 tests: return ret;
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
1310
32}-
33-
34QSequentialAnimationGroupPrivate::AnimationIndex QSequentialAnimationGroupPrivate::indexForCurrentTime() const-
35{-
36 ((!(!animations.isEmpty())) ? qt_assert("!animations.isEmpty()",__FILE__,118) : qt_noop());-
37-
38 AnimationIndex ret;-
39 int duration = 0;-
40-
41 for (int i = 0; i < animations.size()
i < animations.size()Description
TRUEevaluated 952 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 35 times by 4 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
; ++i) {
35-952
42 duration = animationActualTotalDuration(i);-
43-
44-
45-
46-
47-
48-
49 if (duration == -1
duration == -1Description
TRUEevaluated 38 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEevaluated 914 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
|| currentTime < (ret.timeOffset + duration)
currentTime < ...et + duration)Description
TRUEevaluated 546 times by 4 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 368 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
38-914
50 || (currentTime == (ret.timeOffset + duration)
currentTime ==...et + duration)Description
TRUEevaluated 57 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 311 times by 4 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
&& direction == QAbstractAnimation::Backward
direction == Q...tion::BackwardDescription
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 54 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
)) {
3-311
51 ret.index = i;-
52 return
executed 587 times by 5 tests: return ret;
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
ret;
executed 587 times by 5 tests: return ret;
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
587
53 }-
54-
55-
56 ret.timeOffset += duration;-
57 }
executed 365 times by 5 tests: end of block
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
365
58-
59-
60-
61-
62 ret.timeOffset -= duration;-
63 ret.index = animations.size() - 1;-
64 return
executed 35 times by 4 tests: return ret;
Executed by:
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
ret;
executed 35 times by 4 tests: return ret;
Executed by:
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
35
65}-
66-
67void QSequentialAnimationGroupPrivate::restart()-
68{-
69-
70 if (direction == QAbstractAnimation::Forward
direction == Q...ation::ForwardDescription
TRUEevaluated 45 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QPropertyAnimation
) {
1-45
71 lastLoop = 0;-
72 if (currentAnimationIndex == 0
currentAnimationIndex == 0Description
TRUEevaluated 34 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
)
11-34
73 activateCurrentAnimation();
executed 34 times by 5 tests: activateCurrentAnimation();
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
34
74 else-
75 setCurrentAnimation(0);
executed 11 times by 2 tests: setCurrentAnimation(0);
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
11
76 } else {-
77 lastLoop = loopCount - 1;-
78 int index = animations.size() - 1;-
79 if (currentAnimationIndex == index
currentAnimationIndex == indexDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QPropertyAnimation
FALSEnever evaluated
)
0-1
80 activateCurrentAnimation();
executed 1 time by 1 test: activateCurrentAnimation();
Executed by:
  • tst_QPropertyAnimation
1
81 else-
82 setCurrentAnimation(index);
never executed: setCurrentAnimation(index);
0
83 }-
84}-
85-
86-
87-
88-
89-
90-
91-
92void QSequentialAnimationGroupPrivate::advanceForwards(const AnimationIndex &newAnimationIndex)-
93{-
94 if (lastLoop < currentLoop
lastLoop < currentLoopDescription
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QSequentialAnimationGroup
FALSEevaluated 50 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
) {
7-50
95-
96 for (int i = currentAnimationIndex; i < animations.size()
i < animations.size()Description
TRUEevaluated 13 times by 2 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QSequentialAnimationGroup
FALSEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QSequentialAnimationGroup
; ++i) {
7-13
97 QAbstractAnimation *anim = animations.at(i);-
98 setCurrentAnimation(i, true);-
99 anim->setCurrentTime(animationActualTotalDuration(i));-
100 }
executed 13 times by 2 tests: end of block
Executed by:
  • tst_QAnimationGroup
  • tst_QSequentialAnimationGroup
13
101-
102 if (animations.size() == 1
animations.size() == 1Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QSequentialAnimationGroup
)
2-5
103-
104 activateCurrentAnimation();
executed 2 times by 1 test: activateCurrentAnimation();
Executed by:
  • tst_QSequentialAnimationGroup
2
105 else-
106 setCurrentAnimation(0, true);
executed 5 times by 2 tests: setCurrentAnimation(0, true);
Executed by:
  • tst_QAnimationGroup
  • tst_QSequentialAnimationGroup
5
107 }-
108-
109-
110 for (int i = currentAnimationIndex; i < newAnimationIndex.index
i < newAnimationIndex.indexDescription
TRUEevaluated 65 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 57 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
; ++i) {
57-65
111 QAbstractAnimation *anim = animations.at(i);-
112 setCurrentAnimation(i, true);-
113 anim->setCurrentTime(animationActualTotalDuration(i));-
114 }
executed 65 times by 5 tests: end of block
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
65
115-
116}
executed 57 times by 5 tests: end of block
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
57
117-
118-
119-
120-
121-
122-
123-
124void QSequentialAnimationGroupPrivate::rewindForwards(const AnimationIndex &newAnimationIndex)-
125{-
126 if (lastLoop > currentLoop
lastLoop > currentLoopDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QPropertyAnimation
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
) {
1-3
127-
128 for (int i = currentAnimationIndex; i >= 0
i >= 0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QPropertyAnimation
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QPropertyAnimation
; --i) {
1-4
129 QAbstractAnimation *anim = animations.at(i);-
130 setCurrentAnimation(i, true);-
131 anim->setCurrentTime(0);-
132 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QPropertyAnimation
4
133-
134 if (animations.size() == 1
animations.size() == 1Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QPropertyAnimation
)
0-1
135-
136 activateCurrentAnimation();
never executed: activateCurrentAnimation();
0
137 else-
138 setCurrentAnimation(animations.count() - 1, true);
executed 1 time by 1 test: setCurrentAnimation(animations.count() - 1, true);
Executed by:
  • tst_QPropertyAnimation
1
139 }-
140-
141-
142 for (int i = currentAnimationIndex; i > newAnimationIndex.index
i > newAnimationIndex.indexDescription
TRUEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
; --i) {
4-9
143 QAbstractAnimation *anim = animations.at(i);-
144 setCurrentAnimation(i, true);-
145 anim->setCurrentTime(0);-
146 }
executed 9 times by 2 tests: end of block
Executed by:
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
9
147-
148}
executed 4 times by 2 tests: end of block
Executed by:
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
4
149QSequentialAnimationGroup::QSequentialAnimationGroup(QObject *parent)-
150 : QAnimationGroup(*new QSequentialAnimationGroupPrivate, parent)-
151{-
152}
executed 64 times by 5 tests: end of block
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
64
153-
154-
155-
156-
157QSequentialAnimationGroup::QSequentialAnimationGroup(QSequentialAnimationGroupPrivate &dd,-
158 QObject *parent)-
159 : QAnimationGroup(dd, parent)-
160{-
161}
never executed: end of block
0
162-
163-
164-
165-
166QSequentialAnimationGroup::~QSequentialAnimationGroup()-
167{-
168}-
169QPauseAnimation *QSequentialAnimationGroup::addPause(int msecs)-
170{-
171 QPauseAnimation *pause = new QPauseAnimation(msecs);-
172 addAnimation(pause);-
173 return
executed 22 times by 1 test: return pause;
Executed by:
  • tst_QSequentialAnimationGroup
pause;
executed 22 times by 1 test: return pause;
Executed by:
  • tst_QSequentialAnimationGroup
22
174}-
175-
176-
177-
178-
179-
180-
181-
182QPauseAnimation *QSequentialAnimationGroup::insertPause(int index, int msecs)-
183{-
184 const QSequentialAnimationGroupPrivate * const d = d_func();-
185-
186 if (index < 0
index < 0Description
TRUEnever evaluated
FALSEnever evaluated
|| index > d->animations.size()
index > d->animations.size()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
187 QMessageLogger(__FILE__, 293, __PRETTY_FUNCTION__).warning("QSequentialAnimationGroup::insertPause: index is out of bounds");-
188 return
never executed: return 0;
0;
never executed: return 0;
0
189 }-
190-
191 QPauseAnimation *pause = new QPauseAnimation(msecs);-
192 insertAnimation(index, pause);-
193 return
never executed: return pause;
pause;
never executed: return pause;
0
194}-
195-
196-
197-
198-
199-
200-
201QAbstractAnimation *QSequentialAnimationGroup::currentAnimation() const-
202{-
203 const QSequentialAnimationGroupPrivate * const d = d_func();-
204 return
executed 28 times by 3 tests: return d->currentAnimation;
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
d->currentAnimation;
executed 28 times by 3 tests: return d->currentAnimation;
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
28
205}-
206-
207-
208-
209-
210int QSequentialAnimationGroup::duration() const-
211{-
212 const QSequentialAnimationGroupPrivate * const d = d_func();-
213 int ret = 0;-
214-
215 for (AnimationListConstIt it = d->animations.constBegin(), cend = d->animations.constEnd(); it != cend
it != cendDescription
TRUEevaluated 4322 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 1924 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
; ++it) {
1924-4322
216 const int currentDuration = (*it)->totalDuration();-
217 if (currentDuration == -1
currentDuration == -1Description
TRUEevaluated 66 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEevaluated 4256 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
)
66-4256
218 return
executed 66 times by 1 test: return -1;
Executed by:
  • tst_QSequentialAnimationGroup
-1;
executed 66 times by 1 test: return -1;
Executed by:
  • tst_QSequentialAnimationGroup
66
219-
220 ret += currentDuration;-
221 }
executed 4256 times by 5 tests: end of block
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
4256
222-
223 return
executed 1924 times by 5 tests: return ret;
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
ret;
executed 1924 times by 5 tests: return ret;
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
1924
224}-
225-
226-
227-
228-
229void QSequentialAnimationGroup::updateCurrentTime(int currentTime)-
230{-
231 QSequentialAnimationGroupPrivate * const d = d_func();-
232 if (!d->currentAnimation
!d->currentAnimationDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QAnimationGroup
FALSEevaluated 622 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
)
2-622
233 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_QAnimationGroup
2
234-
235 const QSequentialAnimationGroupPrivate::AnimationIndex newAnimationIndex = d->indexForCurrentTime();-
236-
237-
238 while (newAnimationIndex.index < d->actualDuration.size()
newAnimationIn...uration.size()Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEevaluated 622 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
)
1-622
239 d->actualDuration.removeLast();
executed 1 time by 1 test: d->actualDuration.removeLast();
Executed by:
  • tst_QSequentialAnimationGroup
1
240-
241-
242 if (d->lastLoop < d->currentLoop
d->lastLoop < d->currentLoopDescription
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QSequentialAnimationGroup
FALSEevaluated 615 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
7-615
243 || (d->lastLoop == d->currentLoop
d->lastLoop == d->currentLoopDescription
TRUEevaluated 614 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QPropertyAnimation
&& d->currentAnimationIndex < newAnimationIndex.index
d->currentAnim...ionIndex.indexDescription
TRUEevaluated 50 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 564 times by 4 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
)) {
1-614
244-
245 d->advanceForwards(newAnimationIndex);-
246 }
executed 57 times by 5 tests: end of block
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
else if (d->lastLoop > d->currentLoop
d->lastLoop > d->currentLoopDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QPropertyAnimation
FALSEevaluated 564 times by 4 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
1-564
247 || (d->lastLoop == d->currentLoop
d->lastLoop == d->currentLoopDescription
TRUEevaluated 564 times by 4 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEnever evaluated
&& d->currentAnimationIndex > newAnimationIndex.index
d->currentAnim...ionIndex.indexDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEevaluated 561 times by 4 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
)) {
0-564
248-
249 d->rewindForwards(newAnimationIndex);-
250 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
4
251-
252 d->setCurrentAnimation(newAnimationIndex.index);-
253-
254 const int newCurrentTime = currentTime - newAnimationIndex.timeOffset;-
255-
256 if (d->currentAnimation
d->currentAnimationDescription
TRUEevaluated 621 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
) {
1-621
257 d->currentAnimation->setCurrentTime(newCurrentTime);-
258 if (d->atEnd()
d->atEnd()Description
TRUEevaluated 35 times by 4 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 586 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
) {
35-586
259-
260 d->currentTime += QAbstractAnimationPrivate::get(d->currentAnimation)->totalCurrentTime - newCurrentTime;-
261 stop();-
262 }
executed 35 times by 4 tests: end of block
Executed by:
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
35
263 }
executed 621 times by 5 tests: end of block
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
else {
621
264-
265-
266 ((!(d->animations.isEmpty())) ? qt_assert("d->animations.isEmpty()",__FILE__,372) : qt_noop());-
267 d->currentTime = 0;-
268 stop();-
269 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QSequentialAnimationGroup
1
270-
271 d->lastLoop = d->currentLoop;-
272}
executed 622 times by 5 tests: end of block
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
622
273-
274-
275-
276-
277void QSequentialAnimationGroup::updateState(QAbstractAnimation::State newState,-
278 QAbstractAnimation::State oldState)-
279{-
280 QSequentialAnimationGroupPrivate * const d = d_func();-
281 QAnimationGroup::updateState(newState, oldState);-
282-
283 if (!d->currentAnimation
!d->currentAnimationDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QAnimationGroup
FALSEevaluated 101 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
)
4-101
284 return;
executed 4 times by 1 test: return;
Executed by:
  • tst_QAnimationGroup
4
285-
286 switch (newState) {-
287 case
executed 40 times by 5 tests: case Stopped:
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
Stopped:
executed 40 times by 5 tests: case Stopped:
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
40
288 d->currentAnimation->stop();-
289 break;
executed 40 times by 5 tests: break;
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
40
290 case
executed 13 times by 1 test: case Paused:
Executed by:
  • tst_QSequentialAnimationGroup
Paused:
executed 13 times by 1 test: case Paused:
Executed by:
  • tst_QSequentialAnimationGroup
13
291 if (oldState == d->currentAnimation->state()
oldState == d-...ation->state()Description
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEnever evaluated
0-13
292 && oldState == QSequentialAnimationGroup::Running
oldState == QS...Group::RunningDescription
TRUEevaluated 13 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEnever evaluated
) {
0-13
293 d->currentAnimation->pause();-
294 }
executed 13 times by 1 test: end of block
Executed by:
  • tst_QSequentialAnimationGroup
13
295 else-
296 d->restart();
never executed: d->restart();
0
297 break;
executed 13 times by 1 test: break;
Executed by:
  • tst_QSequentialAnimationGroup
13
298 case
executed 48 times by 5 tests: case Running:
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
Running:
executed 48 times by 5 tests: case Running:
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
48
299 if (oldState == d->currentAnimation->state()
oldState == d-...ation->state()Description
TRUEevaluated 47 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
1-47
300 && oldState == QSequentialAnimationGroup::Paused
oldState == QS...nGroup::PausedDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEevaluated 45 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
)
2-45
301 d->currentAnimation->start();
executed 2 times by 1 test: d->currentAnimation->start();
Executed by:
  • tst_QSequentialAnimationGroup
2
302 else-
303 d->restart();
executed 46 times by 5 tests: d->restart();
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
46
304 break;
executed 48 times by 5 tests: break;
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
48
305 }-
306}
executed 101 times by 5 tests: end of block
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
101
307-
308-
309-
310-
311void QSequentialAnimationGroup::updateDirection(QAbstractAnimation::Direction direction)-
312{-
313 QSequentialAnimationGroupPrivate * const d = d_func();-
314-
315 if (state() != Stopped
state() != StoppedDescription
TRUEnever evaluated
FALSEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
&& d->currentAnimation
d->currentAnimationDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-2
316 d->currentAnimation->setDirection(direction);
never executed: d->currentAnimation->setDirection(direction);
0
317}
executed 2 times by 2 tests: end of block
Executed by:
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
2
318-
319-
320-
321-
322bool QSequentialAnimationGroup::event(QEvent *event)-
323{-
324 return
executed 266 times by 5 tests: return QAnimationGroup::event(event);
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
QAnimationGroup::event(event);
executed 266 times by 5 tests: return QAnimationGroup::event(event);
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
266
325}-
326-
327void QSequentialAnimationGroupPrivate::setCurrentAnimation(int index, bool intermediate)-
328{-
329 QSequentialAnimationGroup * const q = q_func();-
330-
331 index = qMin(index, animations.count() - 1);-
332-
333 if (index == -1
index == -1Description
TRUEevaluated 23 times by 4 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 899 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
) {
23-899
334 ((!(animations.isEmpty())) ? qt_assert("animations.isEmpty()",__FILE__,440) : qt_noop());-
335 currentAnimationIndex = -1;-
336 currentAnimation = 0;-
337 return;
executed 23 times by 4 tests: return;
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
23
338 }-
339-
340-
341-
342 if (index == currentAnimationIndex
index == currentAnimationIndexDescription
TRUEevaluated 721 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 178 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
&& animations.at(index) == currentAnimation
animations.at(...rrentAnimationDescription
TRUEevaluated 694 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 27 times by 3 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
)
27-721
343 return;
executed 694 times by 5 tests: return;
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
694
344-
345-
346 if (currentAnimation
currentAnimationDescription
TRUEevaluated 140 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 65 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
)
65-140
347 currentAnimation->stop();
executed 140 times by 5 tests: currentAnimation->stop();
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
140
348-
349 currentAnimation = animations.at(index);-
350 currentAnimationIndex = index;-
351-
352 q->currentAnimationChanged(currentAnimation);-
353-
354 activateCurrentAnimation(intermediate);-
355}
executed 205 times by 5 tests: end of block
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
205
356-
357void QSequentialAnimationGroupPrivate::activateCurrentAnimation(bool intermediate)-
358{-
359 if (!currentAnimation
!currentAnimationDescription
TRUEnever evaluated
FALSEevaluated 242 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
|| state == QSequentialAnimationGroup::Stopped
state == QSequ...Group::StoppedDescription
TRUEevaluated 126 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 116 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
)
0-242
360 return;
executed 126 times by 5 tests: return;
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
126
361-
362 currentAnimation->stop();-
363-
364-
365 currentAnimation->setDirection(direction);-
366-
367-
368 if (currentAnimation->totalDuration() == -1
currentAnimati...ration() == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEevaluated 110 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
)
6-110
369 connectUncontrolledAnimation(currentAnimation);
executed 6 times by 1 test: connectUncontrolledAnimation(currentAnimation);
Executed by:
  • tst_QSequentialAnimationGroup
6
370-
371 currentAnimation->start();-
372 if (!intermediate
!intermediateDescription
TRUEevaluated 91 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 25 times by 3 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
&& state == QSequentialAnimationGroup::Paused
state == QSequ...nGroup::PausedDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEevaluated 82 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
)
9-91
373 currentAnimation->pause();
executed 9 times by 1 test: currentAnimation->pause();
Executed by:
  • tst_QSequentialAnimationGroup
9
374}
executed 116 times by 5 tests: end of block
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
116
375-
376void QSequentialAnimationGroupPrivate::_q_uncontrolledAnimationFinished()-
377{-
378 QSequentialAnimationGroup * const q = q_func();-
379 ((!(qobject_cast<QAbstractAnimation *>(q->sender()) == currentAnimation)) ? qt_assert("qobject_cast<QAbstractAnimation *>(q->sender()) == currentAnimation",__FILE__,485) : qt_noop());-
380-
381-
382 while (actualDuration.size() < (currentAnimationIndex + 1)
actualDuration...tionIndex + 1)Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
)
6-7
383 actualDuration.append(-1);
executed 7 times by 1 test: actualDuration.append(-1);
Executed by:
  • tst_QSequentialAnimationGroup
7
384 actualDuration[currentAnimationIndex] = currentAnimation->currentTime();-
385-
386 disconnectUncontrolledAnimation(currentAnimation);-
387-
388 if ((direction == QAbstractAnimation::Forward
direction == Q...ation::ForwardDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEnever evaluated
&& currentAnimation == animations.last()
currentAnimati...mations.last()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
)
0-6
389 || (direction == QAbstractAnimation::Backward
direction == Q...tion::BackwardDescription
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
&& currentAnimationIndex == 0
currentAnimationIndex == 0Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0-3
390-
391 q->stop();-
392 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_QSequentialAnimationGroup
else if (direction == QAbstractAnimation::Forward
direction == Q...ation::ForwardDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEnever evaluated
) {
0-3
393-
394 setCurrentAnimation(currentAnimationIndex + 1);-
395 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_QSequentialAnimationGroup
else {
3
396-
397 setCurrentAnimation(currentAnimationIndex - 1);-
398 }
never executed: end of block
0
399}-
400-
401-
402-
403-
404-
405-
406-
407void QSequentialAnimationGroupPrivate::animationInsertedAt(int index)-
408{-
409 if (currentAnimation == 0
currentAnimation == 0Description
TRUEevaluated 65 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 79 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
)
65-79
410 setCurrentAnimation(0);
executed 65 times by 5 tests: setCurrentAnimation(0);
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
65
411-
412 if (currentAnimationIndex == index
currentAnimationIndex == indexDescription
TRUEevaluated 66 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEevaluated 78 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
66-78
413 && currentAnimation->currentTime() == 0
currentAnimati...entTime() == 0Description
TRUEevaluated 66 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEnever evaluated
&& currentAnimation->currentLoop() == 0
currentAnimati...entLoop() == 0Description
TRUEevaluated 66 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
FALSEnever evaluated
) {
0-66
414-
415 setCurrentAnimation(index);-
416 }
executed 66 times by 5 tests: end of block
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
66
417-
418-
419 currentAnimationIndex = animations.indexOf(currentAnimation);-
420-
421 if (index < currentAnimationIndex
index < currentAnimationIndexDescription
TRUEnever evaluated
FALSEevaluated 144 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
|| currentLoop != 0
currentLoop != 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEevaluated 143 times by 5 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
) {
0-144
422 QMessageLogger(__FILE__, 528, __PRETTY_FUNCTION__).warning("QSequentialGroup::insertAnimation only supports to add animations after the current one.");-
423 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_QSequentialAnimationGroup
1
424 }-
425}
executed 143 times by 5 tests: end of block
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
  • tst_QStateMachine
143
426-
427-
428-
429-
430-
431-
432-
433void QSequentialAnimationGroupPrivate::animationRemoved(int index, QAbstractAnimation *anim)-
434{-
435 QSequentialAnimationGroup * const q = q_func();-
436 QAnimationGroupPrivate::animationRemoved(index, anim);-
437-
438 ((!(currentAnimation)) ? qt_assert("currentAnimation",__FILE__,544) : qt_noop());-
439-
440 if (actualDuration.size() > index
actualDuration.size() > indexDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEevaluated 62 times by 4 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
)
3-62
441 actualDuration.removeAt(index);
executed 3 times by 1 test: actualDuration.removeAt(index);
Executed by:
  • tst_QSequentialAnimationGroup
3
442-
443 const int currentIndex = animations.indexOf(currentAnimation);-
444 if (currentIndex == -1
currentIndex == -1Description
TRUEevaluated 58 times by 4 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QSequentialAnimationGroup
) {
7-58
445-
446-
447 disconnectUncontrolledAnimation(currentAnimation);-
448-
449 if (index < animations.count()
index < animations.count()Description
TRUEevaluated 25 times by 3 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 33 times by 4 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
)
25-33
450 setCurrentAnimation(index);
executed 25 times by 3 tests: setCurrentAnimation(index);
Executed by:
  • tst_QAnimationGroup
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
25
451 else if (index > 0
index > 0Description
TRUEevaluated 11 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 22 times by 4 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
)
11-22
452 setCurrentAnimation(index - 1);
executed 11 times by 2 tests: setCurrentAnimation(index - 1);
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
11
453 else-
454 setCurrentAnimation(-1);
executed 22 times by 4 tests: setCurrentAnimation(-1);
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
22
455 } else if (currentAnimationIndex > index
currentAnimationIndex > indexDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QSequentialAnimationGroup
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QSequentialAnimationGroup
) {
1-6
456 currentAnimationIndex--;-
457 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QSequentialAnimationGroup
1
458-
459-
460 currentTime = 0;-
461 for (int i = 0; i < currentAnimationIndex
i < currentAnimationIndexDescription
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
FALSEevaluated 65 times by 4 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
; ++i) {
7-65
462 const int current = animationActualTotalDuration(i);-
463 currentTime += current;-
464 }
executed 7 times by 2 tests: end of block
Executed by:
  • tst_QPauseAnimation
  • tst_QSequentialAnimationGroup
7
465-
466 if (currentIndex != -1
currentIndex != -1Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QSequentialAnimationGroup
FALSEevaluated 58 times by 4 tests
Evaluated by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
) {
7-58
467-
468-
469 currentTime += QAbstractAnimationPrivate::get(currentAnimation)->totalCurrentTime;-
470 }
executed 7 times by 2 tests: end of block
Executed by:
  • tst_QAnimationGroup
  • tst_QSequentialAnimationGroup
7
471-
472-
473 totalCurrentTime = currentTime + loopCount * q->duration();-
474}
executed 65 times by 4 tests: end of block
Executed by:
  • tst_QAnimationGroup
  • tst_QPauseAnimation
  • tst_QPropertyAnimation
  • tst_QSequentialAnimationGroup
65
475-
476-
477-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9