OpenCoverage

qtquick2.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/qtquick2.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3static void initResources()-
4{-
5 do { extern int qInitResources_scenegraph (); qInitResources_scenegraph (); } while (false);-
6}
executed 374 times by 132 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • ...
374
7-
8-
9-
10-
11-
12-
13-
14-
15-
16class QQmlQtQuick2DebugStatesDelegate : public QQmlDebugStatesDelegate-
17{-
18public:-
19 QQmlQtQuick2DebugStatesDelegate();-
20 ~QQmlQtQuick2DebugStatesDelegate();-
21 void buildStatesList(bool cleanList, const QList<QPointer<QObject> > &instances) override;-
22 void updateBinding(QQmlContext *context,-
23 const QQmlProperty &property,-
24 const QVariant &expression, bool isLiteralValue,-
25 const QString &fileName, int line, int column,-
26 bool *isBaseState) override;-
27 bool setBindingForInvalidProperty(QObject *object,-
28 const QString &propertyName,-
29 const QVariant &expression,-
30 bool isLiteralValue) override;-
31 void resetBindingForInvalidProperty(QObject *object,-
32 const QString &propertyName) override;-
33-
34private:-
35 void buildStatesList(QObject *obj);-
36-
37 QList<QPointer<QQuickState> > m_allStates;-
38};-
39-
40QQmlQtQuick2DebugStatesDelegate::QQmlQtQuick2DebugStatesDelegate()-
41{-
42}-
43-
44QQmlQtQuick2DebugStatesDelegate::~QQmlQtQuick2DebugStatesDelegate()-
45{-
46}-
47-
48void QQmlQtQuick2DebugStatesDelegate::buildStatesList(bool cleanList,-
49 const QList<QPointer<QObject> > &instances)-
50{-
51 if (cleanList
cleanListDescription
TRUEevaluated 102 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEnever evaluated
)
0-102
52 m_allStates.clear();
executed 102 times by 1 test: m_allStates.clear();
Executed by:
  • tst_qqmlenginedebugservice
102
53-
54-
55 for (int ii = 0; ii < instances.count()
ii < instances.count()Description
TRUEevaluated 622 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEevaluated 102 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
; ++ii) {
102-622
56 buildStatesList(instances.at(ii));-
57 }
executed 622 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
622
58}
executed 102 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
102
59-
60void QQmlQtQuick2DebugStatesDelegate::buildStatesList(QObject *obj)-
61{-
62 if (QQuickState *state = qobject_cast<QQuickState *>(obj)
QQuickState *s...kState *>(obj)Description
TRUEevaluated 102 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEevaluated 1440 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
) {
102-1440
63 m_allStates.append(state);-
64 }
executed 102 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
102
65-
66 QObjectList children = obj->children();-
67 for (int ii = 0; ii < children.count()
ii < children.count()Description
TRUEevaluated 920 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEevaluated 1542 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
; ++ii) {
920-1542
68 buildStatesList(children.at(ii));-
69 }
executed 920 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
920
70}
executed 1542 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
1542
71-
72void QQmlQtQuick2DebugStatesDelegate::updateBinding(QQmlContext *context,-
73 const QQmlProperty &property,-
74 const QVariant &expression, bool isLiteralValue,-
75 const QString &fileName, int line, int column,-
76 bool *inBaseState)-
77{-
78 (void)column;;-
79 typedef QPointer<QQuickState> QuickStatePointer;-
80 QObject *object = property.object();-
81 QString propertyName = property.name();-
82 for (const QuickStatePointer& statePointer : qAsConst(m_allStates)) {-
83 if (QQuickState *state = statePointer.data()
QQuickState *s...Pointer.data()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEnever evaluated
) {
0-12
84-
85 if (state->isStateActive()
state->isStateActive()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
&& state->containsPropertyInRevertList(object, propertyName)
state->contain... propertyName)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
) {
2-8
86 *inBaseState = false;-
87-
88 QQmlBinding *newBinding = nullptr;-
89 if (!isLiteralValue
!isLiteralValueDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEnever evaluated
) {
0-2
90 newBinding = QQmlBinding::create(&QQmlPropertyPrivate::get(property)->core,-
91 expression.toString(), object,-
92 QQmlContextData::get(context), fileName,-
93 line);-
94 newBinding->setTarget(property);-
95 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
2
96-
97 state->changeBindingInRevertList(object, propertyName, newBinding);-
98-
99 if (isLiteralValue
isLiteralValueDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
)
0-2
100 state->changeValueInRevertList(object, propertyName, expression);
never executed: state->changeValueInRevertList(object, propertyName, expression);
0
101 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
2
102 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
12
103 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
12
104}
executed 12 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
12
105-
106bool QQmlQtQuick2DebugStatesDelegate::setBindingForInvalidProperty(QObject *object,-
107 const QString &propertyName,-
108 const QVariant &expression,-
109 bool isLiteralValue)-
110{-
111 if (QQuickPropertyChanges *propertyChanges = qobject_cast<QQuickPropertyChanges *>(object)
QQuickProperty...ges *>(object)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEnever evaluated
) {
0-4
112 if (isLiteralValue
isLiteralValueDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEnever evaluated
)
0-4
113 propertyChanges->changeValue(propertyName, expression);
executed 4 times by 1 test: propertyChanges->changeValue(propertyName, expression);
Executed by:
  • tst_qqmlenginedebugservice
4
114 else-
115 propertyChanges->changeExpression(propertyName, expression.toString());
never executed: propertyChanges->changeExpression(propertyName, expression.toString());
0
116 return
executed 4 times by 1 test: return true;
Executed by:
  • tst_qqmlenginedebugservice
true;
executed 4 times by 1 test: return true;
Executed by:
  • tst_qqmlenginedebugservice
4
117 } else {-
118 return
never executed: return false;
false;
never executed: return false;
0
119 }-
120}-
121-
122void QQmlQtQuick2DebugStatesDelegate::resetBindingForInvalidProperty(QObject *object, const QString &propertyName)-
123{-
124 if (QQuickPropertyChanges *propertyChanges = qobject_cast<QQuickPropertyChanges *>(object)
QQuickProperty...ges *>(object)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
) {
2
125 propertyChanges->removeProperty(propertyName);-
126 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
2
127}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
4
128-
129-
130-
131void QQmlQtQuick2Module::defineModule()-
132{-
133 initResources();-
134-
135 QQuick_initializeProviders();-
136-
137 QQuickUtilModule::defineModule();-
138 QQmlEnginePrivate::defineQtQuick2Module();-
139 QQuickItemsModule::defineModule();-
140-
141 qmlRegisterUncreatableType<QQuickApplication>("QtQuick",2,0,"Application", QQuickApplication::tr("Application is an abstract class"));-
142-
143 QQuickValueTypes::registerValueTypes();-
144-
145-
146 QAccessible::installFactory(&qQuickAccessibleFactory);-
147-
148-
149 QQmlEngineDebugService *debugService = QQmlDebugConnector::service<QQmlEngineDebugService>();-
150 if (debugService
debugServiceDescription
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_qqmldebugjs
  • tst_qqmlenginedebugservice
FALSEevaluated 356 times by 130 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • ...
)
18-356
151 debugService->setStatesDelegate(new QQmlQtQuick2DebugStatesDelegate);
executed 18 times by 2 tests: debugService->setStatesDelegate(new QQmlQtQuick2DebugStatesDelegate);
Executed by:
  • tst_qqmldebugjs
  • tst_qqmlenginedebugservice
18
152}
executed 374 times by 132 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • ...
374
153-
154void QQmlQtQuick2Module::undefineModule()-
155{-
156 QQuick_deinitializeProviders();-
157}
executed 88 times by 3 tests: end of block
Executed by:
  • tst_qmldiskcache
  • tst_qqmlenginecleanup
  • tst_qqmltypeloader
88
158-
159-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0