OpenCoverage

qquickparticleaffector.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/particles/qquickparticleaffector.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2QQuickParticleAffector::QQuickParticleAffector(QQuickItem *parent) :-
3 QQuickItem(parent), m_needsReset(false), m_ignoresTime(false), m_onceOff(false), m_enabled(true)-
4 , m_system(nullptr), m_updateIntSet(false), m_shape(new QQuickParticleExtruder(this))-
5{-
6}
executed 94 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
94
7-
8bool QQuickParticleAffector::isAffectedConnected()-
9{-
10 do { QObject *sender = (this); void (QQuickParticleAffector::*signal)(qreal,qreal) = &QQuickParticleAffector::affected; static QMetaMethod method = QMetaMethod::fromSignal(signal); static int signalIdx = QMetaObjectPrivate::signalIndex(method); return
executed 171823 times by 9 tests: return QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
executed 171823 times by 9 tests: return QObjectPrivate::get(sender)->isSignalConnected(signalIdx);
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
} while (0);
171823
11}
never executed: end of block
0
12-
13-
14void QQuickParticleAffector::componentComplete()-
15{-
16 if (!m_system
!m_systemDescription
TRUEevaluated 62 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
FALSEevaluated 32 times by 1 test
Evaluated by:
  • tst_examples
&& qobject_cast<QQuickParticleSystem*>(parentItem())
qobject_cast<Q...(parentItem())Description
TRUEevaluated 62 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
FALSEnever evaluated
)
0-62
17 setSystem(qobject_cast<QQuickParticleSystem*>(parentItem()));
executed 62 times by 11 tests: setSystem(qobject_cast<QQuickParticleSystem*>(parentItem()));
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
62
18 QQuickItem::componentComplete();-
19}
executed 94 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickparticlesystem
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
94
20-
21bool QQuickParticleAffector::activeGroup(int g) {-
22 if (m_updateIntSet
m_updateIntSetDescription
TRUEevaluated 34 times by 9 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
FALSEevaluated 726824 times by 9 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
){
34-726824
23 m_groupIds.clear();-
24 for (auto _container_ = QtPrivate::qMakeForeachContainer(m_groups); _container_.control
_container_.controlDescription
TRUEevaluated 38 times by 9 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
FALSEnever evaluated
&& _container_.i != _container_.e
_container_.i != _container_.eDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickfriction
  • tst_qquickgroupgoal
FALSEevaluated 34 times by 9 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
; ++_container_.i, _container_.control ^= 1) for (const QString &p = *_container_.i; _container_.control
_container_.controlDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickfriction
  • tst_qquickgroupgoal
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickfriction
  • tst_qquickgroupgoal
; _container_.control = 0)
0-38
25 m_groupIds << m_system->groupIds[p];
executed 4 times by 2 tests: m_groupIds << m_system->groupIds[p];
Executed by:
  • tst_qquickfriction
  • tst_qquickgroupgoal
4
26 m_updateIntSet = false;-
27 }
executed 34 times by 9 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
34
28 return
executed 726858 times by 9 tests: return m_groupIds.isEmpty() || m_groupIds.contains(g);
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
m_groupIds.isEmpty() || m_groupIds.contains(g);
executed 726858 times by 9 tests: return m_groupIds.isEmpty() || m_groupIds.contains(g);
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
726858
29}-
30-
31bool QQuickParticleAffector::shouldAffect(QQuickParticleData* d)-
32{-
33 if (!d
!dDescription
TRUEnever evaluated
FALSEevaluated 718940 times by 9 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
)
0-718940
34 return
never executed: return false;
false;
never executed: return false;
0
35 if (activeGroup(d->groupId)
activeGroup(d->groupId)Description
TRUEevaluated 718940 times by 9 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
FALSEnever evaluated
){
0-718940
36 if ((m_onceOff
m_onceOffDescription
TRUEevaluated 202500 times by 2 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
FALSEevaluated 516440 times by 9 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
&& m_onceOffed.contains(qMakePair(d->groupId, d->index))
m_onceOffed.co...Id, d->index))Description
TRUEevaluated 91881 times by 2 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
FALSEevaluated 110619 times by 2 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
)
91881-516440
37 || !d->stillAlive(m_system)
!d->stillAlive(m_system)Description
TRUEevaluated 336957 times by 9 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
FALSEevaluated 290102 times by 9 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
)
290102-336957
38 return
executed 428838 times by 9 tests: return false;
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
false;
executed 428838 times by 9 tests: return false;
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
428838
39-
40 if (width() == 0
width() == 0Description
TRUEevaluated 266258 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
FALSEevaluated 23844 times by 1 test
Evaluated by:
  • tst_qquickturbulence
|| height() == 0
height() == 0Description
TRUEnever evaluated
FALSEevaluated 23844 times by 1 test
Evaluated by:
  • tst_qquickturbulence
0-266258
41 || m_shape->contains(QRectF(m_offset.x(), m_offset.y(), width(), height()), QPointF(d->curX(m_system), d->curY(m_system)))
m_shape->conta...rY(m_system)))Description
TRUEevaluated 23844 times by 1 test
Evaluated by:
  • tst_qquickturbulence
FALSEnever evaluated
){
0-23844
42 if (m_whenCollidingWith.isEmpty()
m_whenCollidingWith.isEmpty()Description
TRUEevaluated 290102 times by 9 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
FALSEnever evaluated
|| isColliding(d)
isColliding(d)Description
TRUEnever evaluated
FALSEnever evaluated
){
0-290102
43 return
executed 290102 times by 9 tests: return true;
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
true;
executed 290102 times by 9 tests: return true;
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
290102
44 }-
45 }
never executed: end of block
0
46 }
never executed: end of block
0
47 return
never executed: return false;
false;
never executed: return false;
0
48-
49}-
50-
51void QQuickParticleAffector::postAffect(QQuickParticleData* d)-
52{-
53 m_system->needsReset << d;-
54 if (m_onceOff
m_onceOffDescription
TRUEevaluated 3760 times by 2 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
FALSEevaluated 167902 times by 9 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
)
3760-167902
55 m_onceOffed << qMakePair(d->groupId, d->index);
executed 3760 times by 2 tests: m_onceOffed << qMakePair(d->groupId, d->index);
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
3760
56 if (isAffectedConnected()
isAffectedConnected()Description
TRUEnever evaluated
FALSEevaluated 171662 times by 9 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
)
0-171662
57 affected(d->curX(m_system), d->curY(m_system));
never executed: affected(d->curX(m_system), d->curY(m_system));
0
58}
executed 171662 times by 9 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
171662
59-
60const qreal QQuickParticleAffector::simulationDelta = 0.020;-
61const qreal QQuickParticleAffector::simulationCutoff = 1.000;-
62-
63void QQuickParticleAffector::affectSystem(qreal dt)-
64{-
65 if (!m_enabled
!m_enabledDescription
TRUEnever evaluated
FALSEevaluated 1116 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
)
0-1116
66 return;
never executed: return;
0
67-
68-
69 updateOffsets();-
70 if (m_onceOff
m_onceOffDescription
TRUEevaluated 244 times by 2 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
FALSEevaluated 872 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
)
244-872
71 dt = 1.0;
executed 244 times by 2 tests: dt = 1.0;
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
244
72 for (auto _container_ = QtPrivate::qMakeForeachContainer(m_system->groupData); _container_.control
_container_.controlDescription
TRUEevaluated 2473 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
FALSEnever evaluated
&& _container_.i != _container_.e
_container_.i != _container_.eDescription
TRUEevaluated 1357 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
FALSEevaluated 1116 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
; ++_container_.i, _container_.control ^= 1) for (QQuickParticleGroupData* gd = *_container_.i; _container_.control
_container_.controlDescription
TRUEevaluated 1357 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
FALSEevaluated 1357 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
; _container_.control = 0) {
0-2473
73 if (activeGroup(gd->index)
activeGroup(gd->index)Description
TRUEevaluated 1194 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
FALSEevaluated 163 times by 2 tests
Evaluated by:
  • tst_qquickfriction
  • tst_qquickgroupgoal
) {
163-1194
74 for (auto _container_ = QtPrivate::qMakeForeachContainer(gd->data); _container_.control
_container_.controlDescription
TRUEevaluated 599634 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
FALSEnever evaluated
&& _container_.i != _container_.e
_container_.i != _container_.eDescription
TRUEevaluated 598440 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
FALSEevaluated 1194 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
; ++_container_.i, _container_.control ^= 1) for (QQuickParticleData* d = *_container_.i; _container_.control
_container_.controlDescription
TRUEevaluated 598440 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
FALSEevaluated 598440 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
; _container_.control = 0) {
0-599634
75 if (shouldAffect(d)
shouldAffect(d)Description
TRUEevaluated 263746 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
FALSEevaluated 334694 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
) {
263746-334694
76 bool affected = false;-
77 qreal myDt = dt;-
78 if (!m_ignoresTime
!m_ignoresTimeDescription
TRUEevaluated 240070 times by 6 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickpointattractor
  • tst_qquickwander
FALSEevaluated 23676 times by 2 tests
Evaluated by:
  • tst_qquickgroupgoal
  • tst_qquickspritegoal
&& myDt < simulationCutoff
myDt < simulationCutoffDescription
TRUEevaluated 212702 times by 6 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickpointattractor
  • tst_qquickwander
FALSEevaluated 27368 times by 2 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
) {
23676-240070
79 int realTime = m_system->timeInt;-
80 m_system->timeInt -= myDt * 1000.0;-
81 while (myDt > simulationDelta
myDt > simulationDeltaDescription
TRUEnever evaluated
FALSEevaluated 212702 times by 6 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickpointattractor
  • tst_qquickwander
) {
0-212702
82 m_system->timeInt += simulationDelta * 1000.0;-
83 if (d->alive(m_system)
d->alive(m_system)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
84 affected = affectParticle(d, simulationDelta)
affectParticle...mulationDelta)Description
TRUEnever evaluated
FALSEnever evaluated
|| affected
affectedDescription
TRUEnever evaluated
FALSEnever evaluated
;
never executed: affected = affectParticle(d, simulationDelta) || affected;
0
85 myDt -= simulationDelta;-
86 }
never executed: end of block
0
87 m_system->timeInt = realTime;-
88 }
executed 212702 times by 6 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickpointattractor
  • tst_qquickwander
212702
89 if (myDt > 0.0
myDt > 0.0Description
TRUEevaluated 263746 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
FALSEnever evaluated
)
0-263746
90 affected = affectParticle(d, myDt)
affectParticle(d, myDt)Description
TRUEevaluated 149722 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
FALSEevaluated 114024 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickspritegoal
|| affected
affectedDescription
TRUEnever evaluated
FALSEevaluated 114024 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickspritegoal
;
executed 263746 times by 8 tests: affected = affectParticle(d, myDt) || affected;
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
0-263746
91 if (affected
affectedDescription
TRUEevaluated 149722 times by 8 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
FALSEevaluated 114024 times by 3 tests
Evaluated by:
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickspritegoal
)
114024-149722
92 postAffect(d);
executed 149722 times by 8 tests: postAffect(d);
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
149722
93 }
executed 263746 times by 8 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
263746
94 }
executed 598440 times by 8 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
598440
95 }
executed 1194 times by 8 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
1194
96 }
executed 1357 times by 8 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
1357
97}
executed 1116 times by 8 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickwander
1116
98-
99bool QQuickParticleAffector::affectParticle(QQuickParticleData *, qreal )-
100{-
101 return
never executed: return true;
true;
never executed: return true;
0
102}-
103-
104void QQuickParticleAffector::reset(QQuickParticleData* pd)-
105{-
106 if (m_onceOff
m_onceOffDescription
TRUEevaluated 6320 times by 2 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
FALSEevaluated 1200 times by 1 test
Evaluated by:
  • tst_qquickwander
)
1200-6320
107 if (activeGroup(pd->groupId)
activeGroup(pd->groupId)Description
TRUEevaluated 6320 times by 2 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
FALSEnever evaluated
)
0-6320
108 m_onceOffed.remove(qMakePair(pd->groupId, pd->index));
executed 6320 times by 2 tests: m_onceOffed.remove(qMakePair(pd->groupId, pd->index));
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
6320
109}
executed 7520 times by 3 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickwander
7520
110-
111void QQuickParticleAffector::updateOffsets()-
112{-
113 if (m_system
m_systemDescription
TRUEevaluated 1357 times by 9 tests
Evaluated by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
FALSEnever evaluated
)
0-1357
114 m_offset = m_system->mapFromItem(this, QPointF(0, 0));
executed 1357 times by 9 tests: m_offset = m_system->mapFromItem(this, QPointF(0, 0));
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
1357
115}
executed 1357 times by 9 tests: end of block
Executed by:
  • tst_qquickage
  • tst_qquickcustomaffector
  • tst_qquickfriction
  • tst_qquickgravity
  • tst_qquickgroupgoal
  • tst_qquickpointattractor
  • tst_qquickspritegoal
  • tst_qquickturbulence
  • tst_qquickwander
1357
116-
117bool QQuickParticleAffector::isColliding(QQuickParticleData *d) const-
118{-
119 qreal myCurX = d->curX(m_system);-
120 qreal myCurY = d->curY(m_system);-
121 qreal myCurSize = d->curSize(m_system) / 2;-
122 for (auto _container_ = QtPrivate::qMakeForeachContainer(m_whenCollidingWith); _container_.control
_container_.controlDescription
TRUEnever evaluated
FALSEnever evaluated
&& _container_.i != _container_.e
_container_.i != _container_.eDescription
TRUEnever evaluated
FALSEnever evaluated
; ++_container_.i, _container_.control ^= 1) for (const QString &group = *_container_.i; _container_.control
_container_.controlDescription
TRUEnever evaluated
FALSEnever evaluated
; _container_.control = 0){
0
123 for (auto _container_ = QtPrivate::qMakeForeachContainer(m_system->groupData[m_system->groupIds[group]]->data); _container_.control
_container_.controlDescription
TRUEnever evaluated
FALSEnever evaluated
&& _container_.i != _container_.e
_container_.i != _container_.eDescription
TRUEnever evaluated
FALSEnever evaluated
; ++_container_.i, _container_.control ^= 1) for (QQuickParticleData* other = *_container_.i; _container_.control
_container_.controlDescription
TRUEnever evaluated
FALSEnever evaluated
; _container_.control = 0){
0
124 if (!other->stillAlive(m_system)
!other->stillAlive(m_system)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
125 continue;
never executed: continue;
0
126 qreal otherCurX = other->curX(m_system);-
127 qreal otherCurY = other->curY(m_system);-
128 qreal otherCurSize = other->curSize(m_system) / 2;-
129 if ((myCurX + myCurSize > otherCurX - otherCurSize
myCurX + myCur...- otherCurSizeDescription
TRUEnever evaluated
FALSEnever evaluated
0
130 && myCurX - myCurSize < otherCurX + otherCurSize
myCurX - myCur...+ otherCurSizeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
131 && (myCurY + myCurSize > otherCurY - otherCurSize
myCurY + myCur...- otherCurSizeDescription
TRUEnever evaluated
FALSEnever evaluated
0
132 && myCurY - myCurSize < otherCurY + otherCurSize
myCurY - myCur...+ otherCurSizeDescription
TRUEnever evaluated
FALSEnever evaluated
))
0
133 return
never executed: return true;
true;
never executed: return true;
0
134 }
never executed: end of block
0
135 }
never executed: end of block
0
136 return
never executed: return false;
false;
never executed: return false;
0
137}-
138-
139-
140-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0