Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlabstractbinding_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | class QQmlObjectCreator; | - | ||||||||||||
5 | - | |||||||||||||
6 | class __attribute__((visibility("default"))) QQmlAbstractBinding | - | ||||||||||||
7 | { | - | ||||||||||||
8 | protected: | - | ||||||||||||
9 | QQmlAbstractBinding(); | - | ||||||||||||
10 | public: | - | ||||||||||||
11 | virtual ~QQmlAbstractBinding(); | - | ||||||||||||
12 | - | |||||||||||||
13 | typedef QExplicitlySharedDataPointer<QQmlAbstractBinding> Ptr; | - | ||||||||||||
14 | - | |||||||||||||
15 | virtual QString expression() const; | - | ||||||||||||
16 | - | |||||||||||||
17 | virtual bool isValueTypeProxy() const; | - | ||||||||||||
18 | - | |||||||||||||
19 | - | |||||||||||||
20 | - | |||||||||||||
21 | - | |||||||||||||
22 | QQmlPropertyIndex targetPropertyIndex() const { return executed 1690160 times by 122 tests: m_targetIndex;return m_targetIndex; Executed by:
executed 1690160 times by 122 tests: }return m_targetIndex; Executed by:
| 1690160 | ||||||||||||
23 | - | |||||||||||||
24 | - | |||||||||||||
25 | - | |||||||||||||
26 | QObject *targetObject() const { return executed 4003999 times by 122 tests: m_target.data();return m_target.data(); Executed by:
executed 4003999 times by 122 tests: }return m_target.data(); Executed by:
| 4003999 | ||||||||||||
27 | - | |||||||||||||
28 | virtual void setEnabled(bool e, QQmlPropertyData::WriteFlags f = QQmlPropertyData::DontRemoveBinding) = 0; | - | ||||||||||||
29 | - | |||||||||||||
30 | void addToObject(); | - | ||||||||||||
31 | void removeFromObject(); | - | ||||||||||||
32 | - | |||||||||||||
33 | static void printBindingLoopError(QQmlProperty &prop); | - | ||||||||||||
34 | - | |||||||||||||
35 | inline QQmlAbstractBinding *nextBinding() const; | - | ||||||||||||
36 | - | |||||||||||||
37 | inline bool canUseAccessor() const | - | ||||||||||||
38 | { return executed 891426 times by 122 tests: m_nextBinding.flag2();return m_nextBinding.flag2(); Executed by:
executed 891426 times by 122 tests: }return m_nextBinding.flag2(); Executed by:
| 891426 | ||||||||||||
39 | - | |||||||||||||
40 | struct RefCount { | - | ||||||||||||
41 | RefCount() {} | - | ||||||||||||
42 | int refCount = 0; | - | ||||||||||||
43 | void ref() { ++refCount; } executed 3462353 times by 122 tests: end of block Executed by:
| 3462353 | ||||||||||||
44 | int deref() { return executed 3036170 times by 122 tests: --refCount;return --refCount; Executed by:
executed 3036170 times by 122 tests: }return --refCount; Executed by:
| 3036170 | ||||||||||||
45 | operator int() const { return executed 514924 times by 121 tests: refCount;return refCount; Executed by:
executed 514924 times by 121 tests: }return refCount; Executed by:
| 514924 | ||||||||||||
46 | }; | - | ||||||||||||
47 | RefCount ref; | - | ||||||||||||
48 | - | |||||||||||||
49 | protected: | - | ||||||||||||
50 | friend class QQmlData; | - | ||||||||||||
51 | friend class QQmlValueTypeProxyBinding; | - | ||||||||||||
52 | friend class QQmlObjectCreator; | - | ||||||||||||
53 | - | |||||||||||||
54 | inline void setAddedToObject(bool v); | - | ||||||||||||
55 | inline bool isAddedToObject() const; | - | ||||||||||||
56 | - | |||||||||||||
57 | inline void setNextBinding(QQmlAbstractBinding *); | - | ||||||||||||
58 | - | |||||||||||||
59 | QQmlPropertyIndex m_targetIndex; | - | ||||||||||||
60 | - | |||||||||||||
61 | - | |||||||||||||
62 | - | |||||||||||||
63 | - | |||||||||||||
64 | QFlagPointer<QObject> m_target; | - | ||||||||||||
65 | - | |||||||||||||
66 | - | |||||||||||||
67 | - | |||||||||||||
68 | - | |||||||||||||
69 | QFlagPointer<QQmlAbstractBinding> m_nextBinding; | - | ||||||||||||
70 | }; | - | ||||||||||||
71 | - | |||||||||||||
72 | void QQmlAbstractBinding::setAddedToObject(bool v) | - | ||||||||||||
73 | { | - | ||||||||||||
74 | m_nextBinding.setFlagValue(v); | - | ||||||||||||
75 | } executed 566203 times by 122 tests: end of block Executed by:
| 566203 | ||||||||||||
76 | - | |||||||||||||
77 | bool QQmlAbstractBinding::isAddedToObject() const | - | ||||||||||||
78 | { | - | ||||||||||||
79 | return executed 3079131 times by 122 tests: m_nextBinding.flag();return m_nextBinding.flag(); Executed by:
executed 3079131 times by 122 tests: return m_nextBinding.flag(); Executed by:
| 3079131 | ||||||||||||
80 | } | - | ||||||||||||
81 | - | |||||||||||||
82 | QQmlAbstractBinding *QQmlAbstractBinding::nextBinding() const | - | ||||||||||||
83 | { | - | ||||||||||||
84 | return executed 569886 times by 122 tests: m_nextBinding.data();return m_nextBinding.data(); Executed by:
executed 569886 times by 122 tests: return m_nextBinding.data(); Executed by:
| 569886 | ||||||||||||
85 | } | - | ||||||||||||
86 | - | |||||||||||||
87 | void QQmlAbstractBinding::setNextBinding(QQmlAbstractBinding *b) | - | ||||||||||||
88 | { | - | ||||||||||||
89 | if (b
| 125523-439415 | ||||||||||||
90 | b->ref.ref(); executed 125523 times by 69 tests: b->ref.ref(); Executed by:
| 125523 | ||||||||||||
91 | if (m_nextBinding.data()
| 0-559317 | ||||||||||||
92 | delete m_nextBinding.data(); never executed: delete m_nextBinding.data(); | 0 | ||||||||||||
93 | m_nextBinding = b; | - | ||||||||||||
94 | } executed 564938 times by 122 tests: end of block Executed by:
| 564938 | ||||||||||||
95 | - | |||||||||||||
96 | - | |||||||||||||
Switch to Source code | Preprocessed file |