Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlbinding_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count |
---|---|---|
1 | - | |
2 | - | |
3 | - | |
4 | - | |
5 | - | |
6 | - | |
7 | - | |
8 | - | |
9 | class QQmlContext; | - |
10 | class __attribute__((visibility("default"))) QQmlBinding : public QQmlJavaScriptExpression, | - |
11 | public QQmlAbstractBinding | - |
12 | { | - |
13 | friend class QQmlAbstractBinding; | - |
14 | public: | - |
15 | typedef QExplicitlySharedDataPointer<QQmlBinding> Ptr; | - |
16 | - | |
17 | static QQmlBinding *create(const QQmlPropertyData *, const QQmlScriptString &, QObject *, QQmlContext *); | - |
18 | static QQmlBinding *create(const QQmlPropertyData *, const QString &, QObject *, QQmlContextData *, | - |
19 | const QString &url = QString(), quint16 lineNumber = 0); | - |
20 | static QQmlBinding *create(const QQmlPropertyData *property, QV4::Function *function, | - |
21 | QObject *obj, QQmlContextData *ctxt, QV4::ExecutionContext *scope); | - |
22 | static QQmlBinding *createTranslationBinding(const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &unit, const QV4::CompiledData::Binding *binding, | - |
23 | QObject *obj, QQmlContextData *ctxt); | - |
24 | ~QQmlBinding() override; | - |
25 | - | |
26 | void setTarget(const QQmlProperty &); | - |
27 | bool setTarget(QObject *, const QQmlPropertyData &, const QQmlPropertyData *valueType); | - |
28 | - | |
29 | void setNotifyOnValueChanged(bool); | - |
30 | - | |
31 | void refresh() override; | - |
32 | - | |
33 | void setEnabled(bool, QQmlPropertyData::WriteFlags flags = QQmlPropertyData::DontRemoveBinding) override; | - |
34 | QString expression() const override; | - |
35 | void update(QQmlPropertyData::WriteFlags flags = QQmlPropertyData::DontRemoveBinding); | - |
36 | - | |
37 | typedef int Identifier; | - |
38 | enum { | - |
39 | Invalid = -1 | - |
40 | }; | - |
41 | - | |
42 | QVariant evaluate(); | - |
43 | - | |
44 | QString expressionIdentifier() const override; | - |
45 | void expressionChanged() override; | - |
46 | - | |
47 | QQmlSourceLocation sourceLocation() const override; | - |
48 | void setSourceLocation(const QQmlSourceLocation &location); | - |
49 | void setBoundFunction(QV4::BoundFunction *boundFunction) { | - |
50 | m_boundFunction.set(boundFunction->engine(), *boundFunction); | - |
51 | } executed 4 times by 1 test: end of block Executed by:
| 4 |
52 | QVector<QQmlProperty> dependencies() const; | - |
53 | virtual bool hasDependencies() const; | - |
54 | - | |
55 | protected: | - |
56 | virtual void doUpdate(const DeleteWatcher &watcher, | - |
57 | QQmlPropertyData::WriteFlags flags, QV4::Scope &scope) = 0; | - |
58 | - | |
59 | void getPropertyData(QQmlPropertyData **propertyData, QQmlPropertyData *valueTypeData) const; | - |
60 | int getPropertyType() const; | - |
61 | - | |
62 | bool slowWrite(const QQmlPropertyData &core, const QQmlPropertyData &valueTypeData, | - |
63 | const QV4::Value &result, bool isUndefined, QQmlPropertyData::WriteFlags flags); | - |
64 | - | |
65 | QV4::ReturnedValue evaluate(bool *isUndefined); | - |
66 | - | |
67 | private: | - |
68 | inline bool updatingFlag() const; | - |
69 | inline void setUpdatingFlag(bool); | - |
70 | inline bool enabledFlag() const; | - |
71 | inline void setEnabledFlag(bool); | - |
72 | - | |
73 | static QQmlBinding *newBinding(QQmlEnginePrivate *engine, const QQmlPropertyData *property); | - |
74 | - | |
75 | QQmlSourceLocation *m_sourceLocation = nullptr; | - |
76 | QV4::PersistentValue m_boundFunction; | - |
77 | }; | - |
78 | - | |
79 | bool QQmlBinding::updatingFlag() const | - |
80 | { | - |
81 | return executed 891388 times by 121 tests: m_target.flag();return m_target.flag(); Executed by:
executed 891388 times by 121 tests: return m_target.flag(); Executed by:
| 891388 |
82 | } | - |
83 | - | |
84 | void QQmlBinding::setUpdatingFlag(bool v) | - |
85 | { | - |
86 | m_target.setFlagValue(v); | - |
87 | } executed 1782728 times by 121 tests: end of block Executed by:
| 1782728 |
88 | - | |
89 | bool QQmlBinding::enabledFlag() const | - |
90 | { | - |
91 | return executed 1481331 times by 121 tests: m_target.flag2();return m_target.flag2(); Executed by:
executed 1481331 times by 121 tests: return m_target.flag2(); Executed by:
| 1481331 |
92 | } | - |
93 | - | |
94 | void QQmlBinding::setEnabledFlag(bool v) | - |
95 | { | - |
96 | m_target.setFlag2Value(v); | - |
97 | } executed 560567 times by 121 tests: end of block Executed by:
| 560567 |
98 | - | |
99 | - | |
100 | - | |
101 | template <> struct QMetaTypeId< QQmlBinding* > { 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< QQmlBinding* >("QQmlBinding*", reinterpret_cast< QQmlBinding* *>(quintptr(-1))); metatype_id.storeRelease(newId); return newId; } }; | - |
Switch to Source code | Preprocessed file |