OpenCoverage

qquickage.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/particles/qquickage.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2QQuickAgeAffector::QQuickAgeAffector(QQuickItem *parent) :-
3 QQuickParticleAffector(parent), m_lifeLeft(0), m_advancePosition(true)-
4{-
5}
executed 14 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
14
6-
7-
8bool QQuickAgeAffector::affectParticle(QQuickParticleData *d, qreal dt)-
9{-
10 (void)dt;;-
11 if (d->stillAlive(m_system)
d->stillAlive(m_system)Description
TRUEevaluated 29968 times by 1 test
Evaluated by:
  • tst_qquickage
FALSEnever evaluated
){
0-29968
12 float curT = m_system->timeInt / 1000.0f;-
13 float ttl = m_lifeLeft / 1000.0f;-
14 if (!m_advancePosition
!m_advancePositionDescription
TRUEevaluated 1248 times by 1 test
Evaluated by:
  • tst_qquickage
FALSEevaluated 28720 times by 1 test
Evaluated by:
  • tst_qquickage
&& ttl > 0
ttl > 0Description
TRUEevaluated 1248 times by 1 test
Evaluated by:
  • tst_qquickage
FALSEnever evaluated
){
0-28720
15 float x = d->curX(m_system);-
16 float vx = d->curVX(m_system);-
17 float ax = d->curAX();-
18 float y = d->curY(m_system);-
19 float vy = d->curVY(m_system);-
20 float ay = d->curAY();-
21 d->t = curT - (d->lifeSpan - ttl);-
22 d->setInstantaneousX(x, m_system);-
23 d->setInstantaneousVX(vx, m_system);-
24 d->setInstantaneousAX(ax, m_system);-
25 d->setInstantaneousY(y, m_system);-
26 d->setInstantaneousVY(vy, m_system);-
27 d->setInstantaneousAY(ay, m_system);-
28 }
executed 1248 times by 1 test: end of block
Executed by:
  • tst_qquickage
else {
1248
29 d->t = curT - (d->lifeSpan - ttl);-
30 }
executed 28720 times by 1 test: end of block
Executed by:
  • tst_qquickage
28720
31 return
executed 29968 times by 1 test: return true;
Executed by:
  • tst_qquickage
true;
executed 29968 times by 1 test: return true;
Executed by:
  • tst_qquickage
29968
32 }-
33 return
never executed: return false;
false;
never executed: return false;
0
34}-
35-
36-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0