OpenCoverage

qqmllist.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmllist.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5class QObject;-
6struct QMetaObject;-
7-
8-
9-
10template<typename T>-
11class QQmlListProperty {-
12public:-
13 typedef void (*AppendFunction)(QQmlListProperty<T> *, T*);-
14 typedef int (*CountFunction)(QQmlListProperty<T> *);-
15 typedef T *(*AtFunction)(QQmlListProperty<T> *, int);-
16 typedef void (*ClearFunction)(QQmlListProperty<T> *);-
17-
18 QQmlListProperty()-
19 : append(nullptr),-
20 count(nullptr),-
21 at(nullptr),-
22 clear(nullptr)-
23 {}
executed 896680 times by 141 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlfileselector
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • ...
896680
24 QQmlListProperty(QObject *o, QList<T *> &list)-
25 : object(o), data(&list), append(qlist_append), count(qlist_count), at(qlist_at),-
26 clear(qlist_clear)-
27-
28 {}
executed 14926 times by 23 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlproperty
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickcumulativedirection
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrectangle
  • tst_qquickshape
  • tst_qquicktaphandler
  • tst_qquickwindow
  • tst_scenegraph
14926
29 QQmlListProperty(QObject *o, void *d, AppendFunction a, CountFunction c, AtFunction t,-
30 ClearFunction r )-
31 : object(o),-
32 data(d),-
33 append(a),-
34 count(c),-
35 at(t),-
36 clear(r)-
37-
38 {}
executed 129197 times by 119 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlmetaobject
  • tst_qqmlmetatype
  • tst_qqmlmoduleplugin
  • tst_qqmlnativeconnector
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • ...
129197
39 QQmlListProperty(QObject *o, void *d, CountFunction c, AtFunction t)-
40 : object(o),-
41 data(d),-
42 append(nullptr),-
43 count(c), at(t),-
44 clear(nullptr)-
45 {}
executed 372 times by 13 tests: end of block
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qquickanimationcontroller
  • tst_qquickcanvasitem
  • tst_qquickdesignersupport
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickrepeater
  • tst_qquickscreen
  • tst_qquickvisualdatamodel
  • tst_qquickwindow
  • tst_quicktestmainwithsetup
  • tst_testfiltering
372
46 bool operator==(const QQmlListProperty &o) const {-
47 return
never executed: return object == o.object && data == o.data && append == o.append && count == o.count && at == o.at && clear == o.clear;
object == o.object &&
never executed: return object == o.object && data == o.data && append == o.append && count == o.count && at == o.at && clear == o.clear;
0
48 data == o.data &&
never executed: return object == o.object && data == o.data && append == o.append && count == o.count && at == o.at && clear == o.clear;
0
49 append == o.append &&
never executed: return object == o.object && data == o.data && append == o.append && count == o.count && at == o.at && clear == o.clear;
0
50 count == o.count &&
never executed: return object == o.object && data == o.data && append == o.append && count == o.count && at == o.at && clear == o.clear;
0
51 at == o.at &&
never executed: return object == o.object && data == o.data && append == o.append && count == o.count && at == o.at && clear == o.clear;
0
52 clear == o.clear;
never executed: return object == o.object && data == o.data && append == o.append && count == o.count && at == o.at && clear == o.clear;
0
53 }-
54-
55 QObject *object = nullptr;-
56 void *data = nullptr;-
57-
58 AppendFunction append;-
59-
60 CountFunction count;-
61 AtFunction at;-
62-
63 ClearFunction clear;-
64-
65 void *dummy1 = nullptr;-
66 void *dummy2 = nullptr;-
67-
68private:-
69 static void qlist_append(QQmlListProperty *p, T *v) {-
70 reinterpret_cast<QList<T *> *>(p->data)->append(v);-
71 }
executed 1394 times by 15 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlecmascript
  • tst_qqmllistreference
  • tst_qqmlproperty
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickcumulativedirection
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquickrectangle
  • tst_qquickshape
  • tst_qquicktaphandler
  • tst_qquickwindow
  • tst_scenegraph
1394
72 static int qlist_count(QQmlListProperty *p) {-
73 return
executed 136784 times by 8 tests: return reinterpret_cast<QList<T *> *>(p->data)->count();
Executed by:
  • tst_qqmlecmascript
  • tst_qqmllistreference
  • tst_qqmlproperty
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrectangle
  • tst_qquickshape
reinterpret_cast<QList<T *> *>(p->data)->count();
executed 136784 times by 8 tests: return reinterpret_cast<QList<T *> *>(p->data)->count();
Executed by:
  • tst_qqmlecmascript
  • tst_qqmllistreference
  • tst_qqmlproperty
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrectangle
  • tst_qquickshape
136784
74 }-
75 static T *qlist_at(QQmlListProperty *p, int idx) {-
76 return
executed 63884 times by 8 tests: return reinterpret_cast<QList<T *> *>(p->data)->at(idx);
Executed by:
  • tst_qqmlecmascript
  • tst_qqmllistreference
  • tst_qqmlproperty
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrectangle
  • tst_qquickshape
reinterpret_cast<QList<T *> *>(p->data)->at(idx);
executed 63884 times by 8 tests: return reinterpret_cast<QList<T *> *>(p->data)->at(idx);
Executed by:
  • tst_qqmlecmascript
  • tst_qqmllistreference
  • tst_qqmlproperty
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickrectangle
  • tst_qquickshape
63884
77 }-
78 static void qlist_clear(QQmlListProperty *p) {-
79 return
executed 30 times by 5 tests: return reinterpret_cast<QList<T *> *>(p->data)->clear();
Executed by:
  • tst_qqmllistreference
  • tst_qqmlproperty
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickitem2
reinterpret_cast<QList<T *> *>(p->data)->clear();
executed 30 times by 5 tests: return reinterpret_cast<QList<T *> *>(p->data)->clear();
Executed by:
  • tst_qqmllistreference
  • tst_qqmlproperty
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickitem2
30
80 }-
81};-
82-
83-
84class QQmlEngine;-
85class QQmlListReferencePrivate;-
86class __attribute__((visibility("default"))) QQmlListReference-
87{-
88public:-
89 QQmlListReference();-
90 QQmlListReference(QObject *, const char *property, QQmlEngine * = nullptr);-
91 QQmlListReference(const QQmlListReference &);-
92 QQmlListReference &operator=(const QQmlListReference &);-
93 ~QQmlListReference();-
94-
95 bool isValid() const;-
96-
97 QObject *object() const;-
98 const QMetaObject *listElementType() const;-
99-
100 bool canAppend() const;-
101 bool canAt() const;-
102 bool canClear() const;-
103 bool canCount() const;-
104-
105 bool isManipulable() const;-
106 bool isReadable() const;-
107-
108 bool append(QObject *) const;-
109 QObject *at(int) const;-
110 bool clear() const;-
111 int count() const;-
112-
113private:-
114 friend class QQmlListReferencePrivate;-
115 QQmlListReferencePrivate* d;-
116};-
117-
118-
119-
120 template <> struct QMetaTypeId< QQmlListReference > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { 0 }; if (const int id = metatype_id.loadAcquire()) return id; const int newId = qRegisterMetaType< QQmlListReference >("QQmlListReference", reinterpret_cast< QQmlListReference *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } };-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0