OpenCoverage

qv8engine_p.h #1

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/v8/qv8engine_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7namespace QV4 {-
8 struct ArrayObject;-
9 struct ExecutionEngine;-
10 struct QObjectMethod;-
11}-
12class QQmlV4Function-
13{-
14public:-
15 int length() const { return
executed 16766 times by 29 tests: return callData->argc();
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
  • ...
callData->argc();
executed 16766 times by 29 tests: return callData->argc();
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
  • ...
}
16766
16 QV4::ReturnedValue operator[](int idx) const { return
executed 17526 times by 30 tests: return (idx < callData->argc() ? callData->args[idx].asReturnedValue() : QV4::Encode::undefined());
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • ...
(idx < callData->argc() ? callData->args[idx].asReturnedValue() : QV4::Encode::undefined());
executed 17526 times by 30 tests: return (idx < callData->argc() ? callData->args[idx].asReturnedValue() : QV4::Encode::undefined());
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • ...
}
17526
17 void setReturnValue(QV4::ReturnedValue rv) { *retVal = rv; }
executed 6340 times by 21 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdroparea
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicktextinput
  • tst_qquickvisualdatamodel
6340
18 QV4::ExecutionEngine *v4engine() const { return
executed 15396 times by 30 tests: return e;
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • ...
e;
executed 15396 times by 30 tests: return e;
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • ...
}
15396
19private:-
20 friend struct QV4::QObjectMethod;-
21 QQmlV4Function();-
22 QQmlV4Function(const QQmlV4Function &);-
23 QQmlV4Function &operator=(const QQmlV4Function &);-
24-
25 QQmlV4Function(QV4::CallData *callData, QV4::Value *retVal, QV4::ExecutionEngine *e)-
26 : callData(callData), retVal(retVal), e(e)-
27 {-
28 callData->thisObject = QV4::Encode::undefined();-
29 }
executed 12294 times by 31 tests: end of block
Executed by:
  • tst_examples
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
12294
30-
31 QV4::CallData *callData;-
32 QV4::Value *retVal;-
33 QV4::ExecutionEngine *e;-
34};-
35-
36class __attribute__((visibility("default"))) QQmlV4Handle-
37{-
38public:-
39 QQmlV4Handle() : d(QV4::Encode::undefined()) {}
executed 30154 times by 13 tests: end of block
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmltranslation
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
30154
40 explicit QQmlV4Handle(const QV4::Value &v) : d(v.asReturnedValue()) {}
executed 31365 times by 16 tests: end of block
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmltranslation
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_qquickworkerscript
  • tst_quicktestmainwithsetup
31365
41 explicit QQmlV4Handle(QV4::ReturnedValue v) : d(v) {}
executed 1542 times by 4 tests: end of block
Executed by:
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qquickcustomaffector
  • tst_qquickvisualdatamodel
1542
42-
43 operator QV4::ReturnedValue() const { return
executed 31850 times by 17 tests: return d;
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmltranslation
  • tst_qqmlvaluetypeproviders
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
d;
executed 31850 times by 17 tests: return d;
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlqt
  • tst_qqmltranslation
  • tst_qqmlvaluetypeproviders
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickcustomaffector
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
  • tst_quicktestmainwithsetup
}
31850
44-
45private:-
46 quint64 d;-
47};-
48-
49class QObject;-
50class QQmlEngine;-
51class QNetworkAccessManager;-
52class QQmlContextData;-
53-
54class __attribute__((visibility("default"))) QV8Engine-
55{-
56 friend class QJSEngine;-
57public:-
58-
59 static QV4::ExecutionEngine *getV4(QV8Engine *d) { return
executed 3488 times by 5 tests: return d->m_v4Engine;
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickworkerscript
d->m_v4Engine;
executed 3488 times by 5 tests: return d->m_v4Engine;
Executed by:
  • tst_examples
  • tst_qmlcachegen
  • tst_qqmlecmascript
  • tst_qqmllistmodelworkerscript
  • tst_qquickworkerscript
}
3488
60-
61 QV8Engine(QV4::ExecutionEngine *v4);-
62 virtual ~QV8Engine();-
63-
64-
65 enum ObjectOwnership { CppOwnership, JavaScriptOwnership };-
66-
67 struct Deletable {-
68 virtual ~Deletable() {}-
69 };-
70-
71 void initQmlGlobalObject();-
72 void setEngine(QQmlEngine *engine);-
73 QQmlEngine *engine() { return
executed 10208149 times by 131 tests: return m_engine;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • 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_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
m_engine;
executed 10208149 times by 131 tests: return m_engine;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qjsonbinding
  • 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_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • ...
}
10208149
74 QQmlDelayedCallQueue *delayedCallQueue() { return
never executed: return &m_delayedCallQueue;
&m_delayedCallQueue;
never executed: return &m_delayedCallQueue;
}
0
75-
76-
77 void *xmlHttpRequestData() const { return
never executed: return m_xmlHttpRequestData;
m_xmlHttpRequestData;
never executed: return m_xmlHttpRequestData;
}
0
78-
79-
80 void freezeObject(const QV4::Value &value);-
81-
82-
83-
84-
85-
86 virtual QNetworkAccessManager *networkAccessManager();-
87-
88-
89-
90 const QSet<QString> &illegalNames() const;-
91-
92 static QMutex *registrationMutex();-
93 static int registerExtension();-
94-
95 inline Deletable *extensionData(int) const;-
96 void setExtensionData(int, Deletable *);-
97-
98public:-
99-
100 void startTimer(const QString &timerName);-
101 qint64 stopTimer(const QString &timerName, bool *wasRunning);-
102-
103-
104 int consoleCountHelper(const QString &file, quint16 line, quint16 column);-
105-
106protected:-
107 QQmlEngine *m_engine;-
108 QQmlDelayedCallQueue m_delayedCallQueue;-
109-
110 QV4::ExecutionEngine *m_v4Engine;-
111-
112-
113 void *m_xmlHttpRequestData;-
114-
115-
116 QVector<Deletable *> m_extensionData;-
117-
118 QSet<QString> m_illegalNames;-
119-
120 QElapsedTimer m_time;-
121 QHash<QString, qint64> m_startedTimers;-
122-
123 QHash<QString, quint32> m_consoleCount;-
124-
125 void initializeGlobal();-
126-
127private:-
128 QV8Engine(const QV8Engine &) = delete; QV8Engine &operator=(const QV8Engine &) = delete;-
129};-
130-
131inline QV8Engine::Deletable *QV8Engine::extensionData(int index) const-
132{-
133 if (index < m_extensionData.count()
index < m_exte...onData.count()Description
TRUEevaluated 4382 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmllocale
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickcustomaffector
  • tst_qquickvisualdatamodel
FALSEevaluated 28 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmllocale
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickcustomaffector
  • tst_qquickvisualdatamodel
)
28-4382
134 return
executed 4382 times by 7 tests: return m_extensionData[index];
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmllocale
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickcustomaffector
  • tst_qquickvisualdatamodel
m_extensionData[index];
executed 4382 times by 7 tests: return m_extensionData[index];
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmllocale
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickcustomaffector
  • tst_qquickvisualdatamodel
4382
135 else-
136 return
executed 28 times by 9 tests: return nullptr;
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmllocale
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickcustomaffector
  • tst_qquickvisualdatamodel
nullptr;
executed 28 times by 9 tests: return nullptr;
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlincubator
  • tst_qqmllocale
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qquickcustomaffector
  • tst_qquickvisualdatamodel
28
137}-
138-
139-
140-
141-
142 template <> struct QMetaTypeId< QQmlV4Handle > { 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< QQmlV4Handle >("QQmlV4Handle", reinterpret_cast< QQmlV4Handle *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } };-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0