OpenCoverage

qquickstate_p_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickstate_p_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7class QQuickSimpleAction-
8{-
9public:-
10 enum State { StartState, EndState };-
11 QQuickSimpleAction(const QQuickStateAction &a, State state = StartState)-
12 {-
13 m_property = a.property;-
14 m_specifiedObject = a.specifiedObject;-
15 m_specifiedProperty = a.specifiedProperty;-
16 m_event = a.event;-
17 if (state == StartState
state == StartStateDescription
TRUEevaluated 876 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 12 times by 3 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
) {
12-876
18 m_value = a.fromValue;-
19 if (QQmlPropertyPrivate::binding(m_property)
QQmlPropertyPr...ng(m_property)Description
TRUEevaluated 34 times by 6 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickstates
FALSEevaluated 842 times by 15 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmltranslation
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
) {
34-842
20 m_binding = QQmlPropertyPrivate::binding(m_property);-
21 }
executed 34 times by 6 tests: end of block
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickstates
34
22 m_reverseEvent = true;-
23 }
executed 876 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
else {
876
24 m_value = a.toValue;-
25 m_binding = a.toBinding;-
26 m_reverseEvent = false;-
27 }
executed 12 times by 3 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
12
28 }-
29-
30 ~QQuickSimpleAction()-
31 {-
32 }-
33-
34 QQuickSimpleAction(const QQuickSimpleAction &other)-
35 : m_property(other.m_property),-
36 m_value(other.m_value),-
37 m_binding(other.binding()),-
38 m_specifiedObject(other.m_specifiedObject),-
39 m_specifiedProperty(other.m_specifiedProperty),-
40 m_event(other.m_event),-
41 m_reverseEvent(other.m_reverseEvent)-
42 {-
43 }
executed 978 times by 19 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
978
44-
45 QQuickSimpleAction &operator =(const QQuickSimpleAction &other)-
46 {-
47 m_property = other.m_property;-
48 m_value = other.m_value;-
49 m_binding = other.binding();-
50 m_specifiedObject = other.m_specifiedObject;-
51 m_specifiedProperty = other.m_specifiedProperty;-
52 m_event = other.m_event;-
53 m_reverseEvent = other.m_reverseEvent;-
54-
55 return
never executed: return *this;
*this;
never executed: return *this;
0
56 }-
57-
58 void setProperty(const QQmlProperty &property)-
59 {-
60 m_property = property;-
61 }
never executed: end of block
0
62-
63 const QQmlProperty &property() const-
64 {-
65 return
executed 754 times by 13 tests: return m_property;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
m_property;
executed 754 times by 13 tests: return m_property;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
754
66 }-
67-
68 void setValue(const QVariant &value)-
69 {-
70 m_value = value;-
71 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickdesignersupport
2
72-
73 const QVariant &value() const-
74 {-
75 return
executed 180 times by 13 tests: return m_value;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
m_value;
executed 180 times by 13 tests: return m_value;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
180
76 }-
77-
78 void setBinding(QQmlAbstractBinding *binding)-
79 {-
80 m_binding = binding;-
81 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
2
82-
83 QQmlAbstractBinding *binding() const-
84 {-
85 return
executed 1194 times by 19 tests: return m_binding.data();
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
m_binding.data();
executed 1194 times by 19 tests: return m_binding.data();
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
1194
86 }-
87-
88 QObject *specifiedObject() const-
89 {-
90 return
executed 188 times by 12 tests: return m_specifiedObject;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
m_specifiedObject;
executed 188 times by 12 tests: return m_specifiedObject;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
188
91 }-
92-
93 const QString &specifiedProperty() const-
94 {-
95 return
executed 188 times by 12 tests: return m_specifiedProperty;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
m_specifiedProperty;
executed 188 times by 12 tests: return m_specifiedProperty;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
188
96 }-
97-
98 QQuickStateActionEvent *event() const-
99 {-
100 return
executed 482 times by 12 tests: return m_event;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
m_event;
executed 482 times by 12 tests: return m_event;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
482
101 }-
102-
103 bool reverseEvent() const-
104 {-
105 return
executed 162 times by 12 tests: return m_reverseEvent;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
m_reverseEvent;
executed 162 times by 12 tests: return m_reverseEvent;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
162
106 }-
107-
108private:-
109 QQmlProperty m_property;-
110 QVariant m_value;-
111 QQmlAbstractBinding::Ptr m_binding;-
112 QObject *m_specifiedObject;-
113 QString m_specifiedProperty;-
114 QQuickStateActionEvent *m_event;-
115 bool m_reverseEvent;-
116};-
117-
118class QQuickRevertAction-
119{-
120public:-
121 QQuickRevertAction() : event(nullptr) {}
never executed: end of block
0
122 QQuickRevertAction(const QQmlProperty &prop) : property(prop), event(nullptr) {}
executed 122 times by 11 tests: end of block
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickmousearea
  • tst_qquickstates
122
123 QQuickRevertAction(QQuickStateActionEvent *e) : event(e) {}
executed 40 times by 3 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickstates
40
124 QQmlProperty property;-
125 QQuickStateActionEvent *event;-
126};-
127-
128class QQuickStateOperationPrivate : public QObjectPrivate-
129{-
130 inline QQuickStateOperation* q_func() { return static_cast<QQuickStateOperation *>(q_ptr); } inline const QQuickStateOperation* q_func() const { return static_cast<const QQuickStateOperation *>(q_ptr); } friend class QQuickStateOperation;-
131-
132public:-
133-
134 QQuickStateOperationPrivate()-
135 : m_state(nullptr) {}
executed 624 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
624
136-
137 QQuickState *m_state;-
138};-
139-
140class QQuickStatePrivate : public QObjectPrivate-
141{-
142 inline QQuickState* q_func() { return static_cast<QQuickState *>(q_ptr); } inline const QQuickState* q_func() const { return static_cast<const QQuickState *>(q_ptr); } friend class QQuickState;-
143-
144public:-
145 QQuickStatePrivate()-
146 : named(false), inState(false), group(nullptr) {}
executed 1522 times by 20 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
1522
147-
148 typedef QList<QQuickSimpleAction> SimpleActionList;-
149-
150 QString name;-
151 QQmlBinding::Ptr when;-
152 bool named;-
153-
154 struct OperationGuard : public QQmlGuard<QQuickStateOperation>-
155 {-
156 OperationGuard(QObject *obj, QList<OperationGuard> *l) : list(l) {-
157 setObject(static_cast<QQuickStateOperation *>(obj));-
158 }
executed 622 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
622
159 QList<OperationGuard> *list;-
160 void objectDestroyed(QQuickStateOperation *) override {-
161-
162 list->removeOne(*this);-
163 }
executed 496 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
496
164 };-
165 QList<OperationGuard> operations;-
166-
167 static void operations_append(QQmlListProperty<QQuickStateOperation> *prop, QQuickStateOperation *op) {-
168 QList<OperationGuard> *list = static_cast<QList<OperationGuard> *>(prop->data);-
169 op->setState(qobject_cast<QQuickState*>(prop->object));-
170 list->append(OperationGuard(op, list));-
171 }
executed 622 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
622
172 static void operations_clear(QQmlListProperty<QQuickStateOperation> *prop) {-
173 QList<OperationGuard> *list = static_cast<QList<OperationGuard> *>(prop->data);-
174 QMutableListIterator<OperationGuard> listIterator(*list);-
175 while(listIterator.hasNext()
listIterator.hasNext()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
176 listIterator.next()->setState(nullptr);
never executed: listIterator.next()->setState(nullptr);
0
177 list->clear();-
178 }
never executed: end of block
0
179 static int operations_count(QQmlListProperty<QQuickStateOperation> *prop) {-
180 QList<OperationGuard> *list = static_cast<QList<OperationGuard> *>(prop->data);-
181 return
never executed: return list->count();
list->count();
never executed: return list->count();
0
182 }-
183 static QQuickStateOperation *operations_at(QQmlListProperty<QQuickStateOperation> *prop, int index) {-
184 QList<OperationGuard> *list = static_cast<QList<OperationGuard> *>(prop->data);-
185 return
never executed: return list->at(index);
list->at(index);
never executed: return list->at(index);
0
186 }-
187-
188 QQuickTransitionManager transitionManager;-
189-
190 SimpleActionList revertList;-
191 QList<QQuickRevertAction> reverting;-
192 QString extends;-
193 mutable bool inState;-
194 QQuickStateGroup *group;-
195-
196 QQuickStateOperation::ActionList generateActionList() const;-
197 void complete();-
198};-
199-
200-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0