OpenCoverage

qqmlguard_p.h #2

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/qml/qqmlguard_p.h
Source codeSwitch to Preprocessed file
LineSourceCount
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 QtCore 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 QQMLGUARD_P_H-
41#define QQMLGUARD_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 for the convenience-
48// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header-
49// file may change from version to version without notice, or even be removed.-
50//-
51// We mean it.-
52//-
53-
54#include <QtCore/qglobal.h>-
55#include <QtCore/qvariant.h>-
56#include <private/qqmldata_p.h>-
57-
58QT_BEGIN_NAMESPACE-
59-
60class QQmlGuardImpl-
61{-
62public:-
63 inline QQmlGuardImpl();-
64 inline QQmlGuardImpl(QObject *);-
65 inline QQmlGuardImpl(const QQmlGuardImpl &);-
66 inline ~QQmlGuardImpl();-
67-
68 QObject *o = nullptr;-
69 QQmlGuardImpl *next = nullptr;-
70 QQmlGuardImpl **prev = nullptr;-
71-
72 inline void addGuard();-
73 inline void remGuard();-
74};-
75-
76class QObject;-
77template<class T>-
78class QQmlGuard : private QQmlGuardImpl-
79{-
80 friend class QQmlData;-
81public:-
82 inline QQmlGuard();-
83 inline QQmlGuard(T *);-
84 inline QQmlGuard(const QQmlGuard<T> &);-
85 inline virtual ~QQmlGuard();-
86-
87 inline QQmlGuard<T> &operator=(const QQmlGuard<T> &o);-
88 inline QQmlGuard<T> &operator=(T *);-
89-
90 inline T *object() const;-
91 inline void setObject(T *g);-
92-
93 inline bool isNull() const-
94 { return !o; }
executed 548 times by 2 tests: return !o;
Executed by:
  • tst_examples
  • tst_qqmlqt
548
95-
96 inline T* operator->() const-
97 { return static_cast<T*>(const_cast<QObject*>(o)); }
executed 104267 times by 32 tests: return static_cast<T*>(const_cast<QObject*>(o));
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickdrag
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • ...
104267
98 inline T& operator*() const-
99 { return *static_cast<T*>(const_cast<QObject*>(o)); }
never executed: return *static_cast<T*>(const_cast<QObject*>(o));
0
100 inline operator T*() const-
101 { return static_cast<T*>(const_cast<QObject*>(o)); }
executed 1563468 times by 50 tests: return static_cast<T*>(const_cast<QObject*>(o));
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlstatemachine
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickdrag
  • tst_qquickdraghandler
  • tst_qquickdroparea
  • ...
1563468
102 inline T* data() const-
103 { return static_cast<T*>(const_cast<QObject*>(o)); }
executed 481965 times by 85 tests: return static_cast<T*>(const_cast<QObject*>(o));
Executed by:
  • tst_bindingdependencyapi
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlmetaobject
  • tst_qqmlmoduleplugin
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlstatemachine
  • ...
481965
104-
105protected:-
106 virtual void objectDestroyed(T *) {}-
107};-
108-
109template <typename T>-
110class QQmlStrongJSQObjectReference : public QQmlGuard<T>-
111{-
112public:-
113 void setObject(T *o, QObject *parent) {-
114 T *old = this->object();-
115 if (o == old)
o == oldDescription
TRUEevaluated 3240 times by 24 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • tst_scenegraph
FALSEevaluated 13920 times by 31 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
3240-13920
116 return;
executed 3240 times by 24 tests: return;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
  • tst_qtqmlmodules
  • tst_scenegraph
3240
117-
118 if (m_jsOwnership && old && old->parent() == parent)
m_jsOwnershipDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickrepeater
FALSEevaluated 13916 times by 31 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
oldDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickrepeater
FALSEnever evaluated
old->parent() == parentDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickrepeater
FALSEnever evaluated
0-13916
119 QQml_setParent_noEvent(old, nullptr);
executed 4 times by 1 test: QQml_setParent_noEvent(old, nullptr);
Executed by:
  • tst_qquickrepeater
4
120-
121 this->QQmlGuard<T>::operator=(o);-
122-
123 if (o && !o->parent() && !QQmlData::keepAliveDuringGarbageCollection(o)) {
oDescription
TRUEevaluated 10120 times by 31 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
FALSEevaluated 3800 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
!o->parent()Description
TRUEevaluated 3376 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmlinstantiator
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
FALSEevaluated 6744 times by 31 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
!QQmlData::kee...eCollection(o)Description
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qquickloader
  • tst_qquickrepeater
FALSEevaluated 3370 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmlinstantiator
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickvisualdatamodel
6-10120
124 m_jsOwnership = true;-
125 QQml_setParent_noEvent(o, parent);-
126 } else {
executed 6 times by 2 tests: end of block
Executed by:
  • tst_qquickloader
  • tst_qquickrepeater
6
127 m_jsOwnership = false;-
128 }
executed 13914 times by 31 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
13914
129 }-
130-
131private:-
132 using QQmlGuard<T>::setObject;-
133 using QQmlGuard<T>::operator=;-
134 bool m_jsOwnership = false;-
135};-
136-
137QT_END_NAMESPACE-
138-
139Q_DECLARE_METATYPE(QQmlGuard<QObject>)
never executed: return id;
never executed: return newId;
const int id =....loadAcquire()Description
TRUEnever evaluated
FALSEnever evaluated
0
140-
141QT_BEGIN_NAMESPACE-
142-
143QQmlGuardImpl::QQmlGuardImpl()-
144{-
145}-
146-
147QQmlGuardImpl::QQmlGuardImpl(QObject *g)-
148: o(g)-
149{-
150 if (o) addGuard();
executed 10948 times by 10 tests: addGuard();
Executed by:
  • tst_examples
  • tst_qqmlqt
  • tst_qquickanimations
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickspringanimation
oDescription
TRUEevaluated 10948 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlqt
  • tst_qquickanimations
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickflipable
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpositioners
  • tst_qquickspringanimation
FALSEevaluated 13064 times by 55 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmlmetaobject
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltimer
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • ...
10948-13064
151}
executed 24012 times by 57 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmlmetaobject
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltimer
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • ...
24012
152-
153QQmlGuardImpl::QQmlGuardImpl(const QQmlGuardImpl &g)-
154: o(g.o)-
155{-
156 if (o) addGuard();
executed 7310 times by 23 tests: addGuard();
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickstates
  • tst_qquickvisualdatamodel
oDescription
TRUEevaluated 7310 times by 23 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickstates
  • tst_qquickvisualdatamodel
FALSEevaluated 114 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmlqt
114-7310
157}
executed 7424 times by 23 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickstates
  • tst_qquickvisualdatamodel
7424
158-
159QQmlGuardImpl::~QQmlGuardImpl()-
160{-
161 if (prev) remGuard();
executed 23573 times by 55 tests: remGuard();
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmlmetaobject
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • ...
prevDescription
TRUEevaluated 23573 times by 55 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmlmetaobject
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • ...
FALSEevaluated 243132 times by 114 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlmetatype
  • tst_qqmlmoduleplugin
  • tst_qqmlnotifier
  • ...
23573-243132
162 o = nullptr;-
163}
executed 266705 times by 115 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlmetaobject
  • tst_qqmlmetatype
  • tst_qqmlmoduleplugin
  • ...
266705
164-
165void QQmlGuardImpl::addGuard()-
166{-
167 Q_ASSERT(!prev);-
168-
169 if (QObjectPrivate::get(o)->wasDeleted)
QObjectPrivate...o)->wasDeletedDescription
TRUEnever evaluated
FALSEevaluated 258223 times by 121 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlmetaobject
  • ...
0-258223
170 return;
never executed: return;
0
171-
172 QQmlData *data = QQmlData::get(o, true);-
173 next = data->guards;-
174 if (next) next->prev = &next;
executed 31356 times by 54 tests: next->prev = &next;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltimer
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • ...
nextDescription
TRUEevaluated 31356 times by 54 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinfo
  • tst_qqmllistmodel
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltimer
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickborderimage
  • tst_qquickcustomparticle
  • tst_qquickdesignersupport
  • ...
FALSEevaluated 226867 times by 121 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlmetaobject
  • ...
31356-226867
175 data->guards = this;-
176 prev = &data->guards;-
177}
executed 258223 times by 121 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlmetaobject
  • ...
258223
178-
179void QQmlGuardImpl::remGuard()-
180{-
181 Q_ASSERT(prev);-
182-
183 if (next) next->prev = prev;
executed 13646 times by 22 tests: next->prev = prev;
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qqmlqt
  • tst_qquickanimations
  • tst_qquickcustomparticle
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitemlayer
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshadereffect
  • tst_qquickspringanimation
  • tst_qquickstates
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
nextDescription
TRUEevaluated 13646 times by 22 tests
Evaluated by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qqmlqt
  • tst_qquickanimations
  • tst_qquickcustomparticle
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickitemlayer
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshadereffect
  • tst_qquickspringanimation
  • tst_qquickstates
  • tst_qquicktableview
  • tst_qquickvisualdatamodel
FALSEevaluated 13941 times by 53 tests
Evaluated by:
  • tst_examples
  • tst_flickableinterop
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmlmetaobject
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • ...
13646-13941
184 *prev = next;-
185 next = nullptr;-
186 prev = nullptr;-
187}
executed 27587 times by 58 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmlmetaobject
  • tst_qqmlmetatype
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltranslation
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • ...
27587
188-
189template<class T>-
190QQmlGuard<T>::QQmlGuard()-
191{-
192}-
193-
194template<class T>-
195QQmlGuard<T>::QQmlGuard(T *g)-
196: QQmlGuardImpl(g)-
197{-
198}
executed 24012 times by 57 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmlmetaobject
  • tst_qqmlprofilerservice
  • tst_qqmlproperty
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltimer
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • ...
24012
199-
200template<class T>-
201QQmlGuard<T>::QQmlGuard(const QQmlGuard<T> &g)-
202: QQmlGuardImpl(g)-
203{-
204}
executed 7424 times by 23 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickstates
  • tst_qquickvisualdatamodel
7424
205-
206template<class T>-
207QQmlGuard<T>::~QQmlGuard()-
208{-
209}-
210-
211template<class T>-
212QQmlGuard<T> &QQmlGuard<T>::operator=(const QQmlGuard<T> &g)-
213{-
214 setObject(g.object());-
215 return *this;
executed 102 times by 2 tests: return *this;
Executed by:
  • tst_examples
  • tst_qqmlqt
102
216}-
217-
218template<class T>-
219QQmlGuard<T> &QQmlGuard<T>::operator=(T *g)-
220{-
221 setObject(g);-
222 return *this;
executed 241661 times by 116 tests: return *this;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlmetaobject
  • tst_qqmlmetatype
  • tst_qqmlmoduleplugin
  • tst_qqmlnativeconnector
  • ...
241661
223}-
224-
225template<class T>-
226T *QQmlGuard<T>::object() const-
227{-
228 return static_cast<T *>(o);
executed 539182 times by 32 tests: return static_cast<T *>(o);
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • ...
539182
229}-
230-
231template<class T>-
232void QQmlGuard<T>::setObject(T *g)-
233{-
234 if (g != o) {
g != oDescription
TRUEevaluated 243827 times by 121 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlmetaobject
  • ...
FALSEevaluated 313 times by 3 tests
Evaluated by:
  • tst_qqmlitemmodels
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
313-243827
235 if (prev) remGuard();
executed 4014 times by 23 tests: remGuard();
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmlmetaobject
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem
  • tst_qquickitemlayer
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickstates
  • tst_qquickvisualdatamodel
prevDescription
TRUEevaluated 4014 times by 23 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlinfo
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmlmetaobject
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem
  • tst_qquickitemlayer
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickstates
  • tst_qquickvisualdatamodel
FALSEevaluated 239813 times by 121 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlmetaobject
  • ...
4014-239813
236 o = g;-
237 if (o) addGuard();
executed 239965 times by 121 tests: addGuard();
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlmetaobject
  • ...
oDescription
TRUEevaluated 239965 times by 121 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlmetaobject
  • ...
FALSEevaluated 3862 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickdrag
  • tst_qquickdroparea
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
3862-239965
238 }
executed 243827 times by 121 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlmetaobject
  • ...
243827
239}
executed 244140 times by 121 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmlmetaobject
  • ...
244140
240-
241QT_END_NAMESPACE-
242-
243#endif // QQMLGUARD_P_H-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0