Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/ftw/qrecursionwatcher_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | class QRecursionNode; | - | ||||||||||||
5 | class QRecursionNode { | - | ||||||||||||
6 | public: | - | ||||||||||||
7 | inline QRecursionNode(); | - | ||||||||||||
8 | bool *_r; | - | ||||||||||||
9 | }; | - | ||||||||||||
10 | - | |||||||||||||
11 | template<class T, QRecursionNode T::*Node> | - | ||||||||||||
12 | class QRecursionWatcher { | - | ||||||||||||
13 | public: | - | ||||||||||||
14 | inline QRecursionWatcher(T *); | - | ||||||||||||
15 | inline ~QRecursionWatcher(); | - | ||||||||||||
16 | inline bool hasRecursed() const; | - | ||||||||||||
17 | private: | - | ||||||||||||
18 | T *_t; | - | ||||||||||||
19 | bool _r; | - | ||||||||||||
20 | }; | - | ||||||||||||
21 | - | |||||||||||||
22 | QRecursionNode::QRecursionNode() | - | ||||||||||||
23 | : _r(nullptr) | - | ||||||||||||
24 | { | - | ||||||||||||
25 | } executed 241773 times by 140 tests: end of block Executed by:
| 241773 | ||||||||||||
26 | - | |||||||||||||
27 | template<class T, QRecursionNode T::*Node> | - | ||||||||||||
28 | QRecursionWatcher<T, Node>::QRecursionWatcher(T *t) | - | ||||||||||||
29 | : _t(t), _r(false) | - | ||||||||||||
30 | { | - | ||||||||||||
31 | if ((
executed 174642 times by 32 tests: _t->*Node)._r = true;*(_t->*Node)._r = true; Executed by:
executed 174642 times by 32 tests: *(_t->*Node)._r = true; Executed by:
| 174642-486262 | ||||||||||||
32 | (_t->*Node)._r = &_r; | - | ||||||||||||
33 | } executed 660904 times by 140 tests: end of block Executed by:
| 660904 | ||||||||||||
34 | - | |||||||||||||
35 | template<class T, QRecursionNode T::*Node> | - | ||||||||||||
36 | QRecursionWatcher<T, Node>::~QRecursionWatcher() | - | ||||||||||||
37 | { | - | ||||||||||||
38 | if ((
executed 486262 times by 140 tests: _t->*Node)._r = nullptr;(_t->*Node)._r = nullptr; Executed by:
executed 486262 times by 140 tests: (_t->*Node)._r = nullptr; Executed by:
| 174642-486262 | ||||||||||||
39 | } executed 660904 times by 140 tests: end of block Executed by:
| 660904 | ||||||||||||
40 | - | |||||||||||||
41 | template<class T, QRecursionNode T::*Node> | - | ||||||||||||
42 | bool QRecursionWatcher<T, Node>::hasRecursed() const | - | ||||||||||||
43 | { | - | ||||||||||||
44 | return executed 1484999 times by 136 tests: _r;return _r; Executed by:
executed 1484999 times by 136 tests: return _r; Executed by:
| 1484999 | ||||||||||||
45 | } | - | ||||||||||||
46 | - | |||||||||||||
47 | - | |||||||||||||
Switch to Source code | Preprocessed file |