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