Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmllist.h |
Switch to Source code | Preprocessed file |
Line | Source | Count |
---|---|---|
1 | - | |
2 | - | |
3 | - | |
4 | - | |
5 | class QObject; | - |
6 | struct QMetaObject; | - |
7 | - | |
8 | - | |
9 | - | |
10 | template<typename T> | - |
11 | class QQmlListProperty { | - |
12 | public: | - |
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:
| 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:
| 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:
| 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:
| 372 |
46 | bool operator==(const QQmlListProperty &o) const { | - |
47 | return never executed: object == o.object &&return object == o.object && data == o.data && append == o.append && count == o.count && at == o.at && 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 |
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 | - | |
68 | private: | - |
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:
| 1394 |
72 | static int qlist_count(QQmlListProperty *p) { | - |
73 | return executed 136784 times by 8 tests: reinterpret_cast<QList<T *> *>(p->data)->count();return reinterpret_cast<QList<T *> *>(p->data)->count(); Executed by:
executed 136784 times by 8 tests: return reinterpret_cast<QList<T *> *>(p->data)->count(); Executed by:
| 136784 |
74 | } | - |
75 | static T *qlist_at(QQmlListProperty *p, int idx) { | - |
76 | return executed 63884 times by 8 tests: reinterpret_cast<QList<T *> *>(p->data)->at(idx);return reinterpret_cast<QList<T *> *>(p->data)->at(idx); Executed by:
executed 63884 times by 8 tests: return reinterpret_cast<QList<T *> *>(p->data)->at(idx); Executed by:
| 63884 |
77 | } | - |
78 | static void qlist_clear(QQmlListProperty *p) { | - |
79 | return executed 30 times by 5 tests: reinterpret_cast<QList<T *> *>(p->data)->clear();return reinterpret_cast<QList<T *> *>(p->data)->clear(); Executed by:
executed 30 times by 5 tests: return reinterpret_cast<QList<T *> *>(p->data)->clear(); Executed by:
| 30 |
80 | } | - |
81 | }; | - |
82 | - | |
83 | - | |
84 | class QQmlEngine; | - |
85 | class QQmlListReferencePrivate; | - |
86 | class __attribute__((visibility("default"))) QQmlListReference | - |
87 | { | - |
88 | public: | - |
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 | - | |
113 | private: | - |
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 code | Preprocessed file |