OpenCoverage

qqmllistmodelworkeragent_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/types/qqmllistmodelworkeragent_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4static_assert(bool(1 == 1), "Required feature " "qml_list_model" " for file " __FILE__ " not available.");-
5-
6-
7-
8-
9class QQmlListModel;-
10-
11class QQmlListModelWorkerAgent : public QObject-
12{-
13 public:-
14#pragma GCC diagnostic push-
15 -
16#pragma GCC diagnostic ignored "-Wsuggest-override"-
17 static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); virtual int qt_metacall(QMetaObject::Call, int, void **); static inline QString tr(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } __attribute__ ((__deprecated__)) static inline QString trUtf8(const char *s, const char *c = nullptr, int n = -1) { return staticMetaObject.tr(s, c, n); } private:-
18#pragma GCC diagnostic ignored "-Wattributes"-
19 __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);-
20#pragma GCC diagnostic pop-
21 struct QPrivateSignal {};-
22 -
23-
24public:-
25 QQmlListModelWorkerAgent(QQmlListModel *);-
26 ~QQmlListModelWorkerAgent();-
27 void setEngine(QV4::ExecutionEngine *eng);-
28-
29 void addref();-
30 void release();-
31-
32 int count() const;-
33-
34 void clear();-
35 void remove(QQmlV4Function *args);-
36 void append(QQmlV4Function *args);-
37 void insert(QQmlV4Function *args);-
38 QQmlV4Handle get(int index) const;-
39 void set(int index, const QQmlV4Handle &);-
40 void setProperty(int index, const QString& property, const QVariant& value);-
41 void move(int from, int to, int count);-
42 void sync();-
43-
44 struct VariantRef-
45 {-
46 VariantRef() : a(nullptr) {}
never executed: end of block
0
47 VariantRef(const VariantRef &r) : a(r.a) { if (a
aDescription
TRUEevaluated 928 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodelworkerscript
FALSEnever evaluated
) a->addref();
executed 928 times by 2 tests: a->addref();
Executed by:
  • tst_examples
  • tst_qqmllistmodelworkerscript
}
executed 928 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodelworkerscript
0-928
48 VariantRef(QQmlListModelWorkerAgent *_a) : a(_a) { if (a
aDescription
TRUEevaluated 928 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodelworkerscript
FALSEnever evaluated
) a->addref();
executed 928 times by 2 tests: a->addref();
Executed by:
  • tst_examples
  • tst_qqmllistmodelworkerscript
}
executed 928 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodelworkerscript
0-928
49 ~VariantRef() { if (a
aDescription
TRUEevaluated 1856 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmllistmodelworkerscript
FALSEnever evaluated
) a->release();
executed 1856 times by 2 tests: a->release();
Executed by:
  • tst_examples
  • tst_qqmllistmodelworkerscript
}
executed 1856 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodelworkerscript
0-1856
50-
51 VariantRef &operator=(const VariantRef &o) {-
52 if (o.a
o.aDescription
TRUEnever evaluated
FALSEnever evaluated
) o.a->addref();
never executed: o.a->addref();
0
53 if (a
aDescription
TRUEnever evaluated
FALSEnever evaluated
) a->release();
never executed: a->release();
0
54 a = o.a;-
55 return
never executed: return *this;
*this;
never executed: return *this;
0
56 }-
57-
58 QQmlListModelWorkerAgent *a;-
59 };-
60-
61 void modelDestroyed();-
62protected:-
63 bool event(QEvent *) override;-
64-
65private:-
66 friend class QQuickWorkerScriptEnginePrivate;-
67 friend class QQmlListModel;-
68-
69 struct Sync : public QEvent {-
70 Sync(QQmlListModel *l)-
71 : QEvent(QEvent::User)-
72 , list(l)-
73 {}
executed 908 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmllistmodelworkerscript
908
74 ~Sync();-
75 QQmlListModel *list;-
76 };-
77-
78 QAtomicInt m_ref;-
79 QQmlListModel *m_orig;-
80 QQmlListModel *m_copy;-
81 QMutex mutex;-
82 QWaitCondition syncDone;-
83};-
84-
85-
86-
87 template <> struct QMetaTypeId< QQmlListModelWorkerAgent::VariantRef > { 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< QQmlListModelWorkerAgent::VariantRef >("QQmlListModelWorkerAgent::VariantRef", reinterpret_cast< QQmlListModelWorkerAgent::VariantRef *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } };-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0