OpenCoverage

qjsvalue.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsapi/qjsvalue.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4class QJSValue;-
5class QJSEngine;-
6class QVariant;-
7class QObject;-
8struct QMetaObject;-
9class QDateTime;-
10-
11typedef QList<QJSValue> QJSValueList;-
12namespace QV4 {-
13 struct ExecutionEngine;-
14 struct Value;-
15}-
16-
17class __attribute__((visibility("default"))) QJSValue-
18{-
19public:-
20 enum SpecialValue {-
21 NullValue,-
22 UndefinedValue-
23 };-
24-
25public:-
26 QJSValue(SpecialValue value = UndefinedValue);-
27 ~QJSValue();-
28 QJSValue(const QJSValue &other);-
29-
30-
31 inline QJSValue(QJSValue && other) : d(other.d) { other.d = 0; }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquicktext
8
32 inline QJSValue &operator=(QJSValue &&other)-
33 { qSwap(d, other.d); return
executed 1976 times by 7 tests: return *this;
Executed by:
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquicktext
*this;
executed 1976 times by 7 tests: return *this;
Executed by:
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlvaluetypes
  • tst_qquicktext
}
1976
34-
35-
36 QJSValue(bool value);-
37 QJSValue(int value);-
38 QJSValue(uint value);-
39 QJSValue(double value);-
40 QJSValue(const QString &value);-
41 QJSValue(const QLatin1String &value);-
42-
43 QJSValue(const char *str);-
44-
45-
46 QJSValue &operator=(const QJSValue &other);-
47-
48 bool isBool() const;-
49 bool isNumber() const;-
50 bool isNull() const;-
51 bool isString() const;-
52 bool isUndefined() const;-
53 bool isVariant() const;-
54 bool isQObject() const;-
55 bool isQMetaObject() const;-
56 bool isObject() const;-
57 bool isDate() const;-
58 bool isRegExp() const;-
59 bool isArray() const;-
60 bool isError() const;-
61-
62 QString toString() const;-
63 double toNumber() const;-
64 qint32 toInt() const;-
65 quint32 toUInt() const;-
66 bool toBool() const;-
67 QVariant toVariant() const;-
68 QObject *toQObject() const;-
69 const QMetaObject *toQMetaObject() const;-
70 QDateTime toDateTime() const;-
71-
72 bool equals(const QJSValue &other) const;-
73 bool strictlyEquals(const QJSValue &other) const;-
74-
75 QJSValue prototype() const;-
76 void setPrototype(const QJSValue &prototype);-
77-
78 QJSValue property(const QString &name) const;-
79 void setProperty(const QString &name, const QJSValue &value);-
80-
81 bool hasProperty(const QString &name) const;-
82 bool hasOwnProperty(const QString &name) const;-
83-
84 QJSValue property(quint32 arrayIndex) const;-
85 void setProperty(quint32 arrayIndex, const QJSValue &value);-
86-
87 bool deleteProperty(const QString &name);-
88-
89 bool isCallable() const;-
90 QJSValue call(const QJSValueList &args = QJSValueList());-
91 QJSValue callWithInstance(const QJSValue &instance, const QJSValueList &args = QJSValueList());-
92 QJSValue callAsConstructor(const QJSValueList &args = QJSValueList());-
93-
94-
95 __attribute__ ((__deprecated__)) QJSEngine *engine() const;-
96-
97-
98 QJSValue(QV4::ExecutionEngine *e, quint64 val);-
99private:-
100 friend class QJSValuePrivate;-
101-
102 QJSValue(void *) = delete;-
103-
104 mutable quintptr d;-
105};-
106-
107-
108-
109 template <> struct QMetaTypeId< QJSValue > { 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< QJSValue >("QJSValue", reinterpret_cast< QJSValue *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } };-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0