animation/qsequentialanimationgroup.cpp

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

Generated by Squish Coco Non-Commercial