OpenCoverage

qabstractstate.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/statemachine/qabstractstate.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6QAbstractStatePrivate::QAbstractStatePrivate(StateType type)-
7 : stateType(type), isMachine(false), active(false), parentState(0)-
8{-
9}
executed 610 times by 2 tests: end of block
Executed by:
  • tst_QState
  • tst_QStateMachine
610
10-
11QStateMachine *QAbstractStatePrivate::machine() const-
12{-
13 QObject *par = parent;-
14 while (par != 0
par != 0Description
TRUEevaluated 404403 times by 2 tests
Evaluated by:
  • tst_QState
  • tst_QStateMachine
FALSEevaluated 93 times by 2 tests
Evaluated by:
  • tst_QState
  • tst_QStateMachine
) {
93-404403
15 if (QStateMachine *mach = qobject_cast<QStateMachine*>(par)
QStateMachine ...Machine*>(par)Description
TRUEevaluated 402443 times by 2 tests
Evaluated by:
  • tst_QState
  • tst_QStateMachine
FALSEevaluated 1960 times by 2 tests
Evaluated by:
  • tst_QState
  • tst_QStateMachine
)
1960-402443
16 return
executed 402443 times by 2 tests: return mach;
Executed by:
  • tst_QState
  • tst_QStateMachine
mach;
executed 402443 times by 2 tests: return mach;
Executed by:
  • tst_QState
  • tst_QStateMachine
402443
17 par = par->parent();-
18 }
executed 1960 times by 2 tests: end of block
Executed by:
  • tst_QState
  • tst_QStateMachine
1960
19 return
executed 93 times by 2 tests: return 0;
Executed by:
  • tst_QState
  • tst_QStateMachine
0;
executed 93 times by 2 tests: return 0;
Executed by:
  • tst_QState
  • tst_QStateMachine
93
20}-
21-
22void QAbstractStatePrivate::callOnEntry(QEvent *e)-
23{-
24 QAbstractState * const q = q_func();-
25 q->onEntry(e);-
26}
executed 1507 times by 2 tests: end of block
Executed by:
  • tst_QState
  • tst_QStateMachine
1507
27-
28void QAbstractStatePrivate::callOnExit(QEvent *e)-
29{-
30 QAbstractState * const q = q_func();-
31 q->onExit(e);-
32}
executed 1298 times by 2 tests: end of block
Executed by:
  • tst_QState
  • tst_QStateMachine
1298
33-
34void QAbstractStatePrivate::emitEntered()-
35{-
36 QAbstractState * const q = q_func();-
37 q->entered(QAbstractState::QPrivateSignal());-
38 if (!active
!activeDescription
TRUEevaluated 1507 times by 2 tests
Evaluated by:
  • tst_QState
  • tst_QStateMachine
FALSEnever evaluated
) {
0-1507
39 active = true;-
40 q->activeChanged(true);-
41 }
executed 1507 times by 2 tests: end of block
Executed by:
  • tst_QState
  • tst_QStateMachine
1507
42}
executed 1507 times by 2 tests: end of block
Executed by:
  • tst_QState
  • tst_QStateMachine
1507
43-
44void QAbstractStatePrivate::emitExited()-
45{-
46 QAbstractState * const q = q_func();-
47 if (active
activeDescription
TRUEevaluated 1298 times by 2 tests
Evaluated by:
  • tst_QState
  • tst_QStateMachine
FALSEnever evaluated
) {
0-1298
48 active = false;-
49 q->activeChanged(false);-
50 }
executed 1298 times by 2 tests: end of block
Executed by:
  • tst_QState
  • tst_QStateMachine
1298
51 q->exited(QAbstractState::QPrivateSignal());-
52}
executed 1298 times by 2 tests: end of block
Executed by:
  • tst_QState
  • tst_QStateMachine
1298
53-
54-
55-
56-
57QAbstractState::QAbstractState(QState *parent)-
58 : QObject(*new QAbstractStatePrivate(QAbstractStatePrivate::AbstractState), parent)-
59{-
60}
never executed: end of block
0
61-
62-
63-
64-
65QAbstractState::QAbstractState(QAbstractStatePrivate &dd, QState *parent)-
66 : QObject(dd, parent)-
67{-
68}
executed 610 times by 2 tests: end of block
Executed by:
  • tst_QState
  • tst_QStateMachine
610
69-
70-
71-
72-
73QAbstractState::~QAbstractState()-
74{-
75}-
76-
77-
78-
79-
80QState *QAbstractState::parentState() const-
81{-
82 const QAbstractStatePrivate * const d = d_func();-
83 if (d->parentState != parent()
d->parentState != parent()Description
TRUEevaluated 437 times by 2 tests
Evaluated by:
  • tst_QState
  • tst_QStateMachine
FALSEevaluated 27324 times by 2 tests
Evaluated by:
  • tst_QState
  • tst_QStateMachine
)
437-27324
84 d->parentState = qobject_cast<QState*>(parent());
executed 437 times by 2 tests: d->parentState = qobject_cast<QState*>(parent());
Executed by:
  • tst_QState
  • tst_QStateMachine
437
85 return
executed 27761 times by 2 tests: return d->parentState;
Executed by:
  • tst_QState
  • tst_QStateMachine
d->parentState;
executed 27761 times by 2 tests: return d->parentState;
Executed by:
  • tst_QState
  • tst_QStateMachine
27761
86}-
87-
88-
89-
90-
91-
92QStateMachine *QAbstractState::machine() const-
93{-
94 const QAbstractStatePrivate * const d = d_func();-
95 return
executed 402025 times by 2 tests: return d->machine();
Executed by:
  • tst_QState
  • tst_QStateMachine
d->machine();
executed 402025 times by 2 tests: return d->machine();
Executed by:
  • tst_QState
  • tst_QStateMachine
402025
96}-
97-
98-
99-
100-
101-
102-
103bool QAbstractState::active() const-
104{-
105 const QAbstractStatePrivate * const d = d_func();-
106 return
executed 644 times by 1 test: return d->active;
Executed by:
  • tst_QStateMachine
d->active;
executed 644 times by 1 test: return d->active;
Executed by:
  • tst_QStateMachine
644
107}-
108bool QAbstractState::event(QEvent *e)-
109{-
110 return
executed 1166 times by 2 tests: return QObject::event(e);
Executed by:
  • tst_QState
  • tst_QStateMachine
QObject::event(e);
executed 1166 times by 2 tests: return QObject::event(e);
Executed by:
  • tst_QState
  • tst_QStateMachine
1166
111}-
112-
113-
Switch to Source codePreprocessed file

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