| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/animations/qcontinuinganimationgroupjob.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | QContinuingAnimationGroupJob::QContinuingAnimationGroupJob() | - | ||||||||||||
| 5 | { | - | ||||||||||||
| 6 | } | - | ||||||||||||
| 7 | - | |||||||||||||
| 8 | QContinuingAnimationGroupJob::~QContinuingAnimationGroupJob() | - | ||||||||||||
| 9 | { | - | ||||||||||||
| 10 | } | - | ||||||||||||
| 11 | - | |||||||||||||
| 12 | void QContinuingAnimationGroupJob::updateCurrentTime(int ) | - | ||||||||||||
| 13 | { | - | ||||||||||||
| 14 | ((firstChild()) ? static_cast<void>(0) : qt_assert("firstChild()", __FILE__, 55)); | - | ||||||||||||
| 15 | - | |||||||||||||
| 16 | for (QAbstractAnimationJob *animation = firstChild(); animation
| 1093-1106 | ||||||||||||
| 17 | if (animation->state() == state()
| 0-1106 | ||||||||||||
| 18 | { bool *prevWasDeleted = m_wasDeleted; bool wasDeleted = false; m_wasDeleted = &wasDeleted; animation->setCurrentTime(m_currentTime); if (wasDeleted
executed 13 times by 2 tests: prevWasDeleted = true;*prevWasDeleted = true;Executed by:
executed 13 times by 2 tests: return;*prevWasDeleted = true;Executed by:
executed 13 times by 2 tests: } m_wasDeleted = prevWasDeleted; };return;Executed by:
| 0-1093 | ||||||||||||
| 19 | } executed 1093 times by 6 tests: end of blockExecuted by:
| 1093 | ||||||||||||
| 20 | } executed 1093 times by 6 tests: end of blockExecuted by:
| 1093 | ||||||||||||
| 21 | } executed 1093 times by 6 tests: end of blockExecuted by:
| 1093 | ||||||||||||
| 22 | - | |||||||||||||
| 23 | void QContinuingAnimationGroupJob::updateState(QAbstractAnimationJob::State newState, | - | ||||||||||||
| 24 | QAbstractAnimationJob::State oldState) | - | ||||||||||||
| 25 | { | - | ||||||||||||
| 26 | QAnimationGroupJob::updateState(newState, oldState); | - | ||||||||||||
| 27 | - | |||||||||||||
| 28 | switch (newState) { | - | ||||||||||||
| 29 | case executed 99 times by 5 tests: Stopped:case Stopped:Executed by:
executed 99 times by 5 tests: case Stopped:Executed by:
| 99 | ||||||||||||
| 30 | for (QAbstractAnimationJob *animation = firstChild(); animation
| 45-99 | ||||||||||||
| 31 | animation->stop(); executed 45 times by 5 tests: animation->stop();Executed by:
| 45 | ||||||||||||
| 32 | break; executed 99 times by 5 tests: break;Executed by:
| 99 | ||||||||||||
| 33 | case executed 2 times by 1 test: Paused:case Paused:Executed by:
executed 2 times by 1 test: case Paused:Executed by:
| 2 | ||||||||||||
| 34 | for (QAbstractAnimationJob *animation = firstChild(); animation
| 2 | ||||||||||||
| 35 | if (animation->isRunning()
| 0-2 | ||||||||||||
| 36 | animation->pause(); executed 2 times by 1 test: animation->pause();Executed by:
| 2 | ||||||||||||
| 37 | break; executed 2 times by 1 test: break;Executed by:
| 2 | ||||||||||||
| 38 | case executed 121 times by 6 tests: Running:case Running:Executed by:
executed 121 times by 6 tests: case Running:Executed by:
| 121 | ||||||||||||
| 39 | if (!firstChild()
| 2-119 | ||||||||||||
| 40 | stop(); | - | ||||||||||||
| 41 | return; executed 2 times by 1 test: return;Executed by:
| 2 | ||||||||||||
| 42 | } | - | ||||||||||||
| 43 | for (QAbstractAnimationJob *animation = firstChild(); animation
| 119 | ||||||||||||
| 44 | resetUncontrolledAnimationFinishTime(animation); | - | ||||||||||||
| 45 | animation->setDirection(m_direction); | - | ||||||||||||
| 46 | animation->start(); | - | ||||||||||||
| 47 | } executed 119 times by 6 tests: end of blockExecuted by:
| 119 | ||||||||||||
| 48 | break; executed 119 times by 6 tests: break;Executed by:
| 119 | ||||||||||||
| 49 | } | - | ||||||||||||
| 50 | } executed 220 times by 6 tests: end of blockExecuted by:
| 220 | ||||||||||||
| 51 | - | |||||||||||||
| 52 | void QContinuingAnimationGroupJob::updateDirection(QAbstractAnimationJob::Direction direction) | - | ||||||||||||
| 53 | { | - | ||||||||||||
| 54 | if (!isStopped()
| 0 | ||||||||||||
| 55 | for (QAbstractAnimationJob *animation = firstChild(); animation
| 0 | ||||||||||||
| 56 | animation->setDirection(direction); | - | ||||||||||||
| 57 | } never executed: end of block | 0 | ||||||||||||
| 58 | } never executed: end of block | 0 | ||||||||||||
| 59 | } never executed: end of block | 0 | ||||||||||||
| 60 | - | |||||||||||||
| 61 | void QContinuingAnimationGroupJob::uncontrolledAnimationFinished(QAbstractAnimationJob *animation) | - | ||||||||||||
| 62 | { | - | ||||||||||||
| 63 | ((animation && (animation->duration() == -1)) ? static_cast<void>(0) : qt_assert("animation && (animation->duration() == -1)", __FILE__, 104)); | - | ||||||||||||
| 64 | int uncontrolledRunningCount = 0; | - | ||||||||||||
| 65 | - | |||||||||||||
| 66 | for (QAbstractAnimationJob *child = firstChild(); child
| 45 | ||||||||||||
| 67 | if (child == animation
| 0-45 | ||||||||||||
| 68 | setUncontrolledAnimationFinishTime(animation, animation->currentTime()); executed 45 times by 5 tests: setUncontrolledAnimationFinishTime(animation, animation->currentTime());Executed by:
| 45 | ||||||||||||
| 69 | else if (uncontrolledAnimationFinishTime(child) == -1
| 0 | ||||||||||||
| 70 | ++ never executed: uncontrolledRunningCount;++uncontrolledRunningCount;never executed: ++uncontrolledRunningCount; | 0 | ||||||||||||
| 71 | } executed 45 times by 5 tests: end of blockExecuted by:
| 45 | ||||||||||||
| 72 | - | |||||||||||||
| 73 | if (uncontrolledRunningCount > 0
| 0-45 | ||||||||||||
| 74 | return; never executed: return; | 0 | ||||||||||||
| 75 | - | |||||||||||||
| 76 | setUncontrolledAnimationFinishTime(this, currentTime()); | - | ||||||||||||
| 77 | stop(); | - | ||||||||||||
| 78 | } executed 45 times by 5 tests: end of blockExecuted by:
| 45 | ||||||||||||
| 79 | - | |||||||||||||
| 80 | void QContinuingAnimationGroupJob::debugAnimation(QDebug d) const | - | ||||||||||||
| 81 | { | - | ||||||||||||
| 82 | d << "ContinuingAnimationGroupJob(" << hex << (const void *) this << dec << ")"; | - | ||||||||||||
| 83 | - | |||||||||||||
| 84 | debugChildren(d); | - | ||||||||||||
| 85 | } never executed: end of block | 0 | ||||||||||||
| 86 | - | |||||||||||||
| 87 | - | |||||||||||||
| Switch to Source code | Preprocessed file |