Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlcontext_p.h |
Source code | Switch to Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | /**************************************************************************** | - | ||||||||||||
2 | ** | - | ||||||||||||
3 | ** Copyright (C) 2016 The Qt Company Ltd. | - | ||||||||||||
4 | ** Contact: https://www.qt.io/licensing/ | - | ||||||||||||
5 | ** | - | ||||||||||||
6 | ** This file is part of the QtQml module of the Qt Toolkit. | - | ||||||||||||
7 | ** | - | ||||||||||||
8 | ** $QT_BEGIN_LICENSE:LGPL$ | - | ||||||||||||
9 | ** Commercial License Usage | - | ||||||||||||
10 | ** Licensees holding valid commercial Qt licenses may use this file in | - | ||||||||||||
11 | ** accordance with the commercial license agreement provided with the | - | ||||||||||||
12 | ** Software or, alternatively, in accordance with the terms contained in | - | ||||||||||||
13 | ** a written agreement between you and The Qt Company. For licensing terms | - | ||||||||||||
14 | ** and conditions see https://www.qt.io/terms-conditions. For further | - | ||||||||||||
15 | ** information use the contact form at https://www.qt.io/contact-us. | - | ||||||||||||
16 | ** | - | ||||||||||||
17 | ** GNU Lesser General Public License Usage | - | ||||||||||||
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - | ||||||||||||
19 | ** General Public License version 3 as published by the Free Software | - | ||||||||||||
20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the | - | ||||||||||||
21 | ** packaging of this file. Please review the following information to | - | ||||||||||||
22 | ** ensure the GNU Lesser General Public License version 3 requirements | - | ||||||||||||
23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. | - | ||||||||||||
24 | ** | - | ||||||||||||
25 | ** GNU General Public License Usage | - | ||||||||||||
26 | ** Alternatively, this file may be used under the terms of the GNU | - | ||||||||||||
27 | ** General Public License version 2.0 or (at your option) the GNU General | - | ||||||||||||
28 | ** Public license version 3 or any later version approved by the KDE Free | - | ||||||||||||
29 | ** Qt Foundation. The licenses are as published by the Free Software | - | ||||||||||||
30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 | - | ||||||||||||
31 | ** included in the packaging of this file. Please review the following | - | ||||||||||||
32 | ** information to ensure the GNU General Public License requirements will | - | ||||||||||||
33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and | - | ||||||||||||
34 | ** https://www.gnu.org/licenses/gpl-3.0.html. | - | ||||||||||||
35 | ** | - | ||||||||||||
36 | ** $QT_END_LICENSE$ | - | ||||||||||||
37 | ** | - | ||||||||||||
38 | ****************************************************************************/ | - | ||||||||||||
39 | - | |||||||||||||
40 | #ifndef QQMLCONTEXT_P_H | - | ||||||||||||
41 | #define QQMLCONTEXT_P_H | - | ||||||||||||
42 | - | |||||||||||||
43 | // | - | ||||||||||||
44 | // W A R N I N G | - | ||||||||||||
45 | // ------------- | - | ||||||||||||
46 | // | - | ||||||||||||
47 | // This file is not part of the Qt API. It exists purely as an | - | ||||||||||||
48 | // implementation detail. This header file may change from version to | - | ||||||||||||
49 | // version without notice, or even be removed. | - | ||||||||||||
50 | // | - | ||||||||||||
51 | // We mean it. | - | ||||||||||||
52 | // | - | ||||||||||||
53 | - | |||||||||||||
54 | #include "qqmlcontext.h" | - | ||||||||||||
55 | - | |||||||||||||
56 | #include "qqmldata_p.h" | - | ||||||||||||
57 | #include "qqmltypenamecache_p.h" | - | ||||||||||||
58 | #include "qqmlnotifier_p.h" | - | ||||||||||||
59 | #include "qqmllist.h" | - | ||||||||||||
60 | - | |||||||||||||
61 | #include <QtCore/qhash.h> | - | ||||||||||||
62 | #include <QtQml/qjsvalue.h> | - | ||||||||||||
63 | #include <QtCore/qset.h> | - | ||||||||||||
64 | - | |||||||||||||
65 | #include <private/qobject_p.h> | - | ||||||||||||
66 | #include <private/qflagpointer_p.h> | - | ||||||||||||
67 | #include <private/qqmlguard_p.h> | - | ||||||||||||
68 | - | |||||||||||||
69 | #include <private/qv4compileddata_p.h> | - | ||||||||||||
70 | #include <private/qv4identifier_p.h> | - | ||||||||||||
71 | - | |||||||||||||
72 | QT_BEGIN_NAMESPACE | - | ||||||||||||
73 | - | |||||||||||||
74 | class QQmlContext; | - | ||||||||||||
75 | class QQmlExpression; | - | ||||||||||||
76 | class QQmlEngine; | - | ||||||||||||
77 | class QQmlExpression; | - | ||||||||||||
78 | class QQmlExpressionPrivate; | - | ||||||||||||
79 | class QQmlJavaScriptExpression; | - | ||||||||||||
80 | class QQmlContextData; | - | ||||||||||||
81 | class QQmlGuardedContextData; | - | ||||||||||||
82 | class QQmlIncubatorPrivate; | - | ||||||||||||
83 | - | |||||||||||||
84 | class QQmlContextPrivate : public QObjectPrivate | - | ||||||||||||
85 | { | - | ||||||||||||
86 | Q_DECLARE_PUBLIC(QQmlContext) | - | ||||||||||||
87 | public: | - | ||||||||||||
88 | QQmlContextPrivate(); | - | ||||||||||||
89 | - | |||||||||||||
90 | QQmlContextData *data; | - | ||||||||||||
91 | - | |||||||||||||
92 | QList<QVariant> propertyValues; | - | ||||||||||||
93 | int notifyIndex; | - | ||||||||||||
94 | - | |||||||||||||
95 | static QQmlContextPrivate *get(QQmlContext *context) { | - | ||||||||||||
96 | return static_cast<QQmlContextPrivate *>(QObjectPrivate::get(context)); executed 1813765 times by 140 tests: return static_cast<QQmlContextPrivate *>(QObjectPrivate::get(context)); Executed by:
| 1813765 | ||||||||||||
97 | } | - | ||||||||||||
98 | static QQmlContext *get(QQmlContextPrivate *context) { | - | ||||||||||||
99 | return static_cast<QQmlContext *>(context->q_func()); never executed: return static_cast<QQmlContext *>(context->q_func()); | 0 | ||||||||||||
100 | } | - | ||||||||||||
101 | - | |||||||||||||
102 | // Only used for debugging | - | ||||||||||||
103 | QList<QPointer<QObject> > instances; | - | ||||||||||||
104 | - | |||||||||||||
105 | static int context_count(QQmlListProperty<QObject> *); | - | ||||||||||||
106 | static QObject *context_at(QQmlListProperty<QObject> *, int); | - | ||||||||||||
107 | }; | - | ||||||||||||
108 | - | |||||||||||||
109 | class QQmlComponentAttached; | - | ||||||||||||
110 | - | |||||||||||||
111 | class Q_QML_PRIVATE_EXPORT QQmlContextData | - | ||||||||||||
112 | { | - | ||||||||||||
113 | public: | - | ||||||||||||
114 | QQmlContextData(); | - | ||||||||||||
115 | QQmlContextData(QQmlContext *); | - | ||||||||||||
116 | void emitDestruction(); | - | ||||||||||||
117 | void clearContext(); | - | ||||||||||||
118 | void clearContextRecursively(); | - | ||||||||||||
119 | void invalidate(); | - | ||||||||||||
120 | - | |||||||||||||
121 | inline bool isValid() const { | - | ||||||||||||
122 | return engine && (!isInternal || !contextObject || !QObjectPrivate::get(contextObject)->wasDeleted); executed 2423316 times by 140 tests: return engine && (!isInternal || !contextObject || !QObjectPrivate::get(contextObject)->wasDeleted); Executed by:
| 2423316 | ||||||||||||
123 | } | - | ||||||||||||
124 | - | |||||||||||||
125 | // My parent context and engine | - | ||||||||||||
126 | QQmlContextData *parent = nullptr; | - | ||||||||||||
127 | QQmlEngine *engine; | - | ||||||||||||
128 | - | |||||||||||||
129 | void setParent(QQmlContextData *, bool stronglyReferencedByParent = false); | - | ||||||||||||
130 | void refreshExpressions(); | - | ||||||||||||
131 | - | |||||||||||||
132 | void addObject(QObject *); | - | ||||||||||||
133 | - | |||||||||||||
134 | QUrl resolvedUrl(const QUrl &); | - | ||||||||||||
135 | - | |||||||||||||
136 | // My containing QQmlContext. If isInternal is true this owns publicContext. | - | ||||||||||||
137 | // If internal is false publicContext owns this. | - | ||||||||||||
138 | QQmlContext *asQQmlContext(); | - | ||||||||||||
139 | QQmlContextPrivate *asQQmlContextPrivate(); | - | ||||||||||||
140 | quint32 refCount = 0; | - | ||||||||||||
141 | quint32 isInternal:1; | - | ||||||||||||
142 | quint32 isJSContext:1; | - | ||||||||||||
143 | quint32 isPragmaLibraryContext:1; | - | ||||||||||||
144 | quint32 unresolvedNames:1; // True if expressions in this context failed to resolve a toplevel name | - | ||||||||||||
145 | quint32 hasEmittedDestruction:1; | - | ||||||||||||
146 | quint32 isRootObjectInCreation:1; | - | ||||||||||||
147 | quint32 stronglyReferencedByParent:1; | - | ||||||||||||
148 | quint32 dummy:25; | - | ||||||||||||
149 | QQmlContext *publicContext; | - | ||||||||||||
150 | - | |||||||||||||
151 | // The incubator that is constructing this context if any | - | ||||||||||||
152 | QQmlIncubatorPrivate *incubator; | - | ||||||||||||
153 | - | |||||||||||||
154 | // Compilation unit for contexts that belong to a compiled type. | - | ||||||||||||
155 | QQmlRefPointer<QV4::CompiledData::CompilationUnit> typeCompilationUnit; | - | ||||||||||||
156 | - | |||||||||||||
157 | // object index in CompiledData::Unit to component that created this context | - | ||||||||||||
158 | int componentObjectIndex; | - | ||||||||||||
159 | - | |||||||||||||
160 | void initFromTypeCompilationUnit(const QQmlRefPointer<QV4::CompiledData::CompilationUnit> &unit, int subComponentIndex); | - | ||||||||||||
161 | - | |||||||||||||
162 | // flag indicates whether the context owns the cache (after mutation) or not. | - | ||||||||||||
163 | mutable QV4::IdentifierHash propertyNameCache; | - | ||||||||||||
164 | const QV4::IdentifierHash &propertyNames() const; | - | ||||||||||||
165 | QV4::IdentifierHash &detachedPropertyNames(); | - | ||||||||||||
166 | - | |||||||||||||
167 | // Context object | - | ||||||||||||
168 | QObject *contextObject; | - | ||||||||||||
169 | - | |||||||||||||
170 | // Any script blocks that exist on this context | - | ||||||||||||
171 | QV4::PersistentValue importedScripts; // This is a JS Array | - | ||||||||||||
172 | - | |||||||||||||
173 | QUrl baseUrl; | - | ||||||||||||
174 | QString baseUrlString; | - | ||||||||||||
175 | - | |||||||||||||
176 | QUrl url() const; | - | ||||||||||||
177 | QString urlString() const; | - | ||||||||||||
178 | - | |||||||||||||
179 | // List of imports that apply to this context | - | ||||||||||||
180 | QQmlRefPointer<QQmlTypeNameCache> imports; | - | ||||||||||||
181 | - | |||||||||||||
182 | // My children | - | ||||||||||||
183 | QQmlContextData *childContexts = nullptr; | - | ||||||||||||
184 | - | |||||||||||||
185 | // My peers in parent's childContexts list | - | ||||||||||||
186 | QQmlContextData *nextChild; | - | ||||||||||||
187 | QQmlContextData **prevChild; | - | ||||||||||||
188 | - | |||||||||||||
189 | // Expressions that use this context | - | ||||||||||||
190 | QQmlJavaScriptExpression *expressions; | - | ||||||||||||
191 | - | |||||||||||||
192 | // Doubly-linked list of objects that are owned by this context | - | ||||||||||||
193 | QQmlData *contextObjects; | - | ||||||||||||
194 | - | |||||||||||||
195 | // Doubly-linked list of context guards (XXX merge with contextObjects) | - | ||||||||||||
196 | QQmlGuardedContextData *contextGuards = nullptr; | - | ||||||||||||
197 | - | |||||||||||||
198 | // id guards | - | ||||||||||||
199 | struct ContextGuard : public QQmlGuard<QObject> | - | ||||||||||||
200 | { | - | ||||||||||||
201 | inline ContextGuard(); | - | ||||||||||||
202 | inline ContextGuard &operator=(QObject *obj); | - | ||||||||||||
203 | inline void objectDestroyed(QObject *) override; | - | ||||||||||||
204 | - | |||||||||||||
205 | inline bool wasSet() const; | - | ||||||||||||
206 | - | |||||||||||||
207 | QFlagPointer<QQmlContextData> context; | - | ||||||||||||
208 | QQmlNotifier bindings; | - | ||||||||||||
209 | }; | - | ||||||||||||
210 | ContextGuard *idValues; | - | ||||||||||||
211 | int idValueCount; | - | ||||||||||||
212 | void setIdProperty(int, QObject *); | - | ||||||||||||
213 | - | |||||||||||||
214 | // Linked contexts. this owns linkedContext. | - | ||||||||||||
215 | QQmlContextDataRef linkedContext; | - | ||||||||||||
216 | - | |||||||||||||
217 | // Linked list of uses of the Component attached property in this | - | ||||||||||||
218 | // context | - | ||||||||||||
219 | QQmlComponentAttached *componentAttached; | - | ||||||||||||
220 | - | |||||||||||||
221 | // Return the outermost id for obj, if any. | - | ||||||||||||
222 | QString findObjectId(const QObject *obj) const; | - | ||||||||||||
223 | - | |||||||||||||
224 | static QQmlContextData *get(QQmlContext *context) { | - | ||||||||||||
225 | return QQmlContextPrivate::get(context)->data; executed 1471948 times by 140 tests: return QQmlContextPrivate::get(context)->data; Executed by:
| 1471948 | ||||||||||||
226 | } | - | ||||||||||||
227 | - | |||||||||||||
228 | private: | - | ||||||||||||
229 | friend class QQmlContextDataRef; | - | ||||||||||||
230 | friend class QQmlContext; // needs to do manual refcounting :/ | - | ||||||||||||
231 | void refreshExpressionsRecursive(bool isGlobal); | - | ||||||||||||
232 | void refreshExpressionsRecursive(QQmlJavaScriptExpression *); | - | ||||||||||||
233 | ~QQmlContextData(); | - | ||||||||||||
234 | void destroy(); | - | ||||||||||||
235 | }; | - | ||||||||||||
236 | - | |||||||||||||
237 | - | |||||||||||||
238 | class QQmlGuardedContextData | - | ||||||||||||
239 | { | - | ||||||||||||
240 | public: | - | ||||||||||||
241 | inline QQmlGuardedContextData() = default; | - | ||||||||||||
242 | inline QQmlGuardedContextData(QQmlContextData *data) | - | ||||||||||||
243 | { setContextData(data); } executed 136658 times by 142 tests: end of block Executed by:
| 136658 | ||||||||||||
244 | inline ~QQmlGuardedContextData() | - | ||||||||||||
245 | { clear(); } executed 383755 times by 142 tests: end of block Executed by:
| 383755 | ||||||||||||
246 | - | |||||||||||||
247 | inline QQmlContextData *contextData() const | - | ||||||||||||
248 | { return m_contextData; } executed 4577 times by 11 tests: return m_contextData; Executed by:
| 4577 | ||||||||||||
249 | inline void setContextData(QQmlContextData *); | - | ||||||||||||
250 | - | |||||||||||||
251 | inline bool isNull() const { return !m_contextData; } executed 270732 times by 36 tests: return !m_contextData; Executed by:
| 270732 | ||||||||||||
252 | - | |||||||||||||
253 | inline operator QQmlContextData*() const { return m_contextData; } executed 574550 times by 140 tests: return m_contextData; Executed by:
| 574550 | ||||||||||||
254 | inline QQmlContextData* operator->() const { return m_contextData; } executed 632600 times by 140 tests: return m_contextData; Executed by:
| 632600 | ||||||||||||
255 | inline QQmlGuardedContextData &operator=(QQmlContextData *d) { | - | ||||||||||||
256 | setContextData(d); return *this; executed 347195 times by 140 tests: return *this; Executed by:
| 347195 | ||||||||||||
257 | } | - | ||||||||||||
258 | - | |||||||||||||
259 | private: | - | ||||||||||||
260 | QQmlGuardedContextData &operator=(const QQmlGuardedContextData &) = delete; | - | ||||||||||||
261 | QQmlGuardedContextData(const QQmlGuardedContextData &) = delete; | - | ||||||||||||
262 | friend class QQmlContextData; | - | ||||||||||||
263 | - | |||||||||||||
264 | inline void clear(); | - | ||||||||||||
265 | - | |||||||||||||
266 | QQmlContextData *m_contextData = nullptr; | - | ||||||||||||
267 | QQmlGuardedContextData *m_next = nullptr; | - | ||||||||||||
268 | QQmlGuardedContextData **m_prev = nullptr; | - | ||||||||||||
269 | }; | - | ||||||||||||
270 | - | |||||||||||||
271 | - | |||||||||||||
272 | void QQmlGuardedContextData::setContextData(QQmlContextData *contextData) | - | ||||||||||||
273 | { | - | ||||||||||||
274 | if (m_contextData == contextData)
| 68779-415076 | ||||||||||||
275 | return; executed 68779 times by 142 tests: return; Executed by:
| 68779 | ||||||||||||
276 | clear(); | - | ||||||||||||
277 | - | |||||||||||||
278 | if (contextData) {
| 88699-326377 | ||||||||||||
279 | m_contextData = contextData; | - | ||||||||||||
280 | m_next = contextData->contextGuards; | - | ||||||||||||
281 | if (m_next) m_next->m_prev = &m_next; executed 117128 times by 68 tests: m_next->m_prev = &m_next; Executed by:
| 117128-209249 | ||||||||||||
282 | m_prev = &contextData->contextGuards; | - | ||||||||||||
283 | contextData->contextGuards = this; | - | ||||||||||||
284 | } executed 326377 times by 140 tests: end of block Executed by:
| 326377 | ||||||||||||
285 | } executed 415076 times by 140 tests: end of block Executed by:
| 415076 | ||||||||||||
286 | - | |||||||||||||
287 | void QQmlGuardedContextData::clear() | - | ||||||||||||
288 | { | - | ||||||||||||
289 | if (m_prev) {
| 319472-479359 | ||||||||||||
290 | *m_prev = m_next; | - | ||||||||||||
291 | if (m_next) m_next->m_prev = m_prev; executed 75847 times by 64 tests: m_next->m_prev = m_prev; Executed by:
| 75847-243625 | ||||||||||||
292 | m_contextData = nullptr; | - | ||||||||||||
293 | m_next = nullptr; | - | ||||||||||||
294 | m_prev = nullptr; | - | ||||||||||||
295 | } executed 319472 times by 113 tests: end of block Executed by:
| 319472 | ||||||||||||
296 | } executed 798831 times by 142 tests: end of block Executed by:
| 798831 | ||||||||||||
297 | - | |||||||||||||
298 | QQmlContextDataRef::QQmlContextDataRef() | - | ||||||||||||
299 | : m_contextData(nullptr) | - | ||||||||||||
300 | { | - | ||||||||||||
301 | } executed 253575 times by 149 tests: end of block Executed by:
| 253575 | ||||||||||||
302 | - | |||||||||||||
303 | QQmlContextDataRef::QQmlContextDataRef(const QQmlContextDataRef &other) | - | ||||||||||||
304 | : m_contextData(other.m_contextData) | - | ||||||||||||
305 | { | - | ||||||||||||
306 | if (m_contextData)
| 0 | ||||||||||||
307 | ++m_contextData->refCount; never executed: ++m_contextData->refCount; | 0 | ||||||||||||
308 | } never executed: end of block | 0 | ||||||||||||
309 | - | |||||||||||||
310 | QQmlContextDataRef::QQmlContextDataRef(QQmlContextData *data) | - | ||||||||||||
311 | : m_contextData(data) | - | ||||||||||||
312 | { | - | ||||||||||||
313 | if (m_contextData)
| 88443-1559849 | ||||||||||||
314 | ++m_contextData->refCount; executed 1559849 times by 130 tests: ++m_contextData->refCount; Executed by:
| 1559849 | ||||||||||||
315 | } executed 1648292 times by 130 tests: end of block Executed by:
| 1648292 | ||||||||||||
316 | - | |||||||||||||
317 | QQmlContextDataRef::~QQmlContextDataRef() | - | ||||||||||||
318 | { | - | ||||||||||||
319 | clear(); | - | ||||||||||||
320 | } executed 1857691 times by 149 tests: end of block Executed by:
| 1857691 | ||||||||||||
321 | - | |||||||||||||
322 | void QQmlContextDataRef::setContextData(QQmlContextData *contextData) | - | ||||||||||||
323 | { | - | ||||||||||||
324 | if (m_contextData == contextData)
| 209608-352891 | ||||||||||||
325 | return; executed 209608 times by 149 tests: return; Executed by:
| 209608 | ||||||||||||
326 | clear(); | - | ||||||||||||
327 | - | |||||||||||||
328 | if (contextData) {
| 111332-241559 | ||||||||||||
329 | m_contextData = contextData; | - | ||||||||||||
330 | ++m_contextData->refCount; | - | ||||||||||||
331 | } executed 241559 times by 140 tests: end of block Executed by:
| 241559 | ||||||||||||
332 | } executed 352891 times by 140 tests: end of block Executed by:
| 352891 | ||||||||||||
333 | - | |||||||||||||
334 | QQmlContextData *QQmlContextDataRef::contextData() const | - | ||||||||||||
335 | { | - | ||||||||||||
336 | return m_contextData; executed 4793617 times by 129 tests: return m_contextData; Executed by:
| 4793617 | ||||||||||||
337 | } | - | ||||||||||||
338 | - | |||||||||||||
339 | void QQmlContextDataRef::clear() | - | ||||||||||||
340 | { | - | ||||||||||||
341 | if (m_contextData && !--m_contextData->refCount)
| 192255-1671177 | ||||||||||||
342 | m_contextData->destroy(); executed 192255 times by 128 tests: m_contextData->destroy(); Executed by:
| 192255 | ||||||||||||
343 | m_contextData = nullptr; | - | ||||||||||||
344 | } executed 2210582 times by 149 tests: end of block Executed by:
| 2210582 | ||||||||||||
345 | - | |||||||||||||
346 | QQmlContextDataRef & | - | ||||||||||||
347 | QQmlContextDataRef::operator=(QQmlContextData *d) | - | ||||||||||||
348 | { | - | ||||||||||||
349 | setContextData(d); | - | ||||||||||||
350 | return *this; executed 562499 times by 149 tests: return *this; Executed by:
| 562499 | ||||||||||||
351 | } | - | ||||||||||||
352 | - | |||||||||||||
353 | QQmlContextDataRef & | - | ||||||||||||
354 | QQmlContextDataRef::operator=(const QQmlContextDataRef &other) | - | ||||||||||||
355 | { | - | ||||||||||||
356 | setContextData(other.m_contextData); | - | ||||||||||||
357 | return *this; never executed: return *this; | 0 | ||||||||||||
358 | } | - | ||||||||||||
359 | - | |||||||||||||
360 | QQmlContextData::ContextGuard::ContextGuard() | - | ||||||||||||
361 | : context(nullptr) | - | ||||||||||||
362 | { | - | ||||||||||||
363 | } executed 218339 times by 115 tests: end of block Executed by:
| 218339 | ||||||||||||
364 | - | |||||||||||||
365 | QQmlContextData::ContextGuard &QQmlContextData::ContextGuard::operator=(QObject *obj) | - | ||||||||||||
366 | { | - | ||||||||||||
367 | QQmlGuard<QObject>::operator=(obj); | - | ||||||||||||
368 | context.setFlag(); | - | ||||||||||||
369 | bindings.notify(); // For alias connections | - | ||||||||||||
370 | return *this; executed 218337 times by 115 tests: return *this; Executed by:
| 218337 | ||||||||||||
371 | } | - | ||||||||||||
372 | - | |||||||||||||
373 | void QQmlContextData::ContextGuard::objectDestroyed(QObject *) | - | ||||||||||||
374 | { | - | ||||||||||||
375 | if (context->contextObject && !QObjectPrivate::get(context->contextObject)->wasDeleted)
| 28-210096 | ||||||||||||
376 | bindings.notify(); executed 28 times by 5 tests: bindings.notify(); Executed by:
| 28 | ||||||||||||
377 | } executed 210390 times by 108 tests: end of block Executed by:
| 210390 | ||||||||||||
378 | - | |||||||||||||
379 | bool QQmlContextData::ContextGuard::wasSet() const | - | ||||||||||||
380 | { | - | ||||||||||||
381 | return context.flag(); never executed: return context.flag(); | 0 | ||||||||||||
382 | } | - | ||||||||||||
383 | - | |||||||||||||
384 | QT_END_NAMESPACE | - | ||||||||||||
385 | - | |||||||||||||
386 | #endif // QQMLCONTEXT_P_H | - | ||||||||||||
Source code | Switch to Preprocessed file |