OpenCoverage

qquickloader.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickloader.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7extern const QLoggingCategory &lcTransient();-
8-
9static const QQuickItemPrivate::ChangeTypes watchedChanges-
10 = QQuickItemPrivate::Geometry | QQuickItemPrivate::ImplicitWidth | QQuickItemPrivate::ImplicitHeight;-
11-
12QQuickLoaderPrivate::QQuickLoaderPrivate()-
13 : item(nullptr), object(nullptr), itemContext(nullptr), incubator(nullptr), updatingSize(false),-
14 active(true), loadingFromSource(false), asynchronous(false)-
15{-
16}
executed 320 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
320
17-
18QQuickLoaderPrivate::~QQuickLoaderPrivate()-
19{-
20 delete itemContext;-
21 itemContext = nullptr;-
22 delete incubator;-
23 disposeInitialPropertyValues();-
24}
executed 314 times by 13 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
314
25-
26void QQuickLoaderPrivate::itemGeometryChanged(QQuickItem *resizeItem, QQuickGeometryChange change,-
27 const QRectF &oldGeometry)-
28{-
29 if (resizeItem == item
resizeItem == itemDescription
TRUEevaluated 118 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qquickanimations
  • tst_qquickloader
  • tst_qquickrepeater
FALSEnever evaluated
)
0-118
30 _q_updateSize(false);
executed 118 times by 5 tests: _q_updateSize(false);
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qquickanimations
  • tst_qquickloader
  • tst_qquickrepeater
118
31 QQuickItemChangeListener::itemGeometryChanged(resizeItem, change, oldGeometry);-
32}
executed 118 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qquickanimations
  • tst_qquickloader
  • tst_qquickrepeater
118
33-
34void QQuickLoaderPrivate::itemImplicitWidthChanged(QQuickItem *)-
35{-
36 QQuickLoader * const q = q_func();-
37 q->setImplicitWidth(getImplicitWidth());-
38}
executed 10 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickloader
10
39-
40void QQuickLoaderPrivate::itemImplicitHeightChanged(QQuickItem *)-
41{-
42 QQuickLoader * const q = q_func();-
43 q->setImplicitHeight(getImplicitHeight());-
44}
executed 8 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickloader
  • tst_qquickrepeater
8
45-
46void QQuickLoaderPrivate::clear()-
47{-
48 QQuickLoader * const q = q_func();-
49 disposeInitialPropertyValues();-
50-
51 if (incubator
incubatorDescription
TRUEevaluated 318 times by 13 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 348 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
)
318-348
52 incubator->clear();
executed 318 times by 13 tests: incubator->clear();
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
318
53-
54 delete itemContext;-
55 itemContext = nullptr;-
56-
57-
58-
59 QQmlContext *context = qmlContext(object);-
60 if (context
contextDescription
TRUEevaluated 182 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
FALSEevaluated 484 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
)
182-484
61 QQmlContextData::get(context)->clearContextRecursively();
executed 182 times by 11 tests: QQmlContextData::get(context)->clearContextRecursively();
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
182
62-
63 if (loadingFromSource
loadingFromSourceDescription
TRUEevaluated 170 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
FALSEevaluated 496 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
&& component) {
170-496
64-
65 QObject::disconnect(component, qFlagLocation("2""statusChanged(QQmlComponent::Status)" "\0" __FILE__ ":" "109"),-
66 q, qFlagLocation("1""_q_sourceLoaded()" "\0" __FILE__ ":" "110"));-
67 QObject::disconnect(component, qFlagLocation("2""progressChanged(qreal)" "\0" __FILE__ ":" "111"),-
68 q, qFlagLocation("2""progressChanged()" "\0" __FILE__ ":" "112"));-
69 component->deleteLater();-
70 component.setObject(nullptr, q);-
71 }
executed 158 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
158
72 source = QUrl();-
73-
74 if (item
itemDescription
TRUEevaluated 268 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 398 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
) {
268-398
75 QQuickItemPrivate *p = QQuickItemPrivate::get(item);-
76 p->removeItemChangeListener(this, watchedChanges);-
77-
78-
79-
80 item->setParentItem(nullptr);-
81 item->setVisible(false);-
82 item = nullptr;-
83 }
executed 268 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
268
84 if (object
objectDescription
TRUEevaluated 272 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 394 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
) {
272-394
85 object->deleteLater();-
86 object = nullptr;-
87 }
executed 272 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
272
88}
executed 666 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
666
89-
90void QQuickLoaderPrivate::initResize()-
91{-
92 if (!item
!itemDescription
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qqmltypeloader
  • tst_qquickloader
FALSEevaluated 286 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
)
8-286
93 return;
executed 8 times by 2 tests: return;
Executed by:
  • tst_qqmltypeloader
  • tst_qquickloader
8
94 QQuickItemPrivate *p = QQuickItemPrivate::get(item);-
95 p->addItemChangeListener(this, watchedChanges);-
96 _q_updateSize();-
97}
executed 286 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
286
98-
99qreal QQuickLoaderPrivate::getImplicitWidth() const-
100{-
101 const QQuickLoader * const q = q_func();-
102-
103-
104-
105 if (item
itemDescription
TRUEevaluated 556 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickloader
)
6-556
106 return
executed 556 times by 14 tests: return q->widthValid() ? item->implicitWidth() : item->width();
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
q->widthValid() ? item->implicitWidth() : item->width();
executed 556 times by 14 tests: return q->widthValid() ? item->implicitWidth() : item->width();
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
556
107 return
executed 6 times by 1 test: return QQuickImplicitSizeItemPrivate::getImplicitWidth();
Executed by:
  • tst_qquickloader
QQuickImplicitSizeItemPrivate::getImplicitWidth();
executed 6 times by 1 test: return QQuickImplicitSizeItemPrivate::getImplicitWidth();
Executed by:
  • tst_qquickloader
6
108}-
109-
110qreal QQuickLoaderPrivate::getImplicitHeight() const-
111{-
112 const QQuickLoader * const q = q_func();-
113-
114-
115-
116 if (item
itemDescription
TRUEevaluated 554 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickloader
)
6-554
117 return
executed 554 times by 14 tests: return q->heightValid() ? item->implicitHeight() : item->height();
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
q->heightValid() ? item->implicitHeight() : item->height();
executed 554 times by 14 tests: return q->heightValid() ? item->implicitHeight() : item->height();
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
554
118 return
executed 6 times by 1 test: return QQuickImplicitSizeItemPrivate::getImplicitHeight();
Executed by:
  • tst_qquickloader
QQuickImplicitSizeItemPrivate::getImplicitHeight();
executed 6 times by 1 test: return QQuickImplicitSizeItemPrivate::getImplicitHeight();
Executed by:
  • tst_qquickloader
6
119}-
120QQuickLoader::QQuickLoader(QQuickItem *parent)-
121 : QQuickImplicitSizeItem(*(new QQuickLoaderPrivate), parent)-
122{-
123 setFlag(ItemIsFocusScope);-
124}
executed 320 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
320
125-
126QQuickLoader::~QQuickLoader()-
127{-
128 QQuickLoaderPrivate * const d = d_func();-
129 d->clear();-
130}
executed 314 times by 13 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
314
131bool QQuickLoader::active() const-
132{-
133 const QQuickLoaderPrivate * const d = d_func();-
134 return
executed 348 times by 14 tests: return d->active;
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
d->active;
executed 348 times by 14 tests: return d->active;
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
348
135}-
136-
137void QQuickLoader::setActive(bool newVal)-
138{-
139 QQuickLoaderPrivate * const d = d_func();-
140 if (d->active == newVal
d->active == newValDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEevaluated 66 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickloader
)
8-66
141 return;
executed 8 times by 1 test: return;
Executed by:
  • tst_qquickloader
8
142-
143 d->active = newVal;-
144 if (newVal == true
newVal == trueDescription
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEevaluated 44 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickloader
) {
22-44
145 if (d->loadingFromSource
d->loadingFromSourceDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickloader
) {
10-12
146 loadFromSource();-
147 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickloader
else {
12
148 loadFromSourceComponent();-
149 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_qquickloader
10
150 } else {-
151-
152 if (d->incubator
d->incubatorDescription
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickloader
FALSEevaluated 26 times by 1 test
Evaluated by:
  • tst_qquickloader
) {
18-26
153 d->incubator->clear();-
154 delete d->itemContext;-
155 d->itemContext = nullptr;-
156 }
executed 18 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickloader
18
157-
158-
159-
160 QQmlContext *context = qmlContext(d->object);-
161 if (context
contextDescription
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickloader
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquickloader
)
16-28
162 QQmlContextData::get(context)->clearContextRecursively();
executed 16 times by 2 tests: QQmlContextData::get(context)->clearContextRecursively();
Executed by:
  • tst_qquickanimations
  • tst_qquickloader
16
163-
164 if (d->item
d->itemDescription
TRUEevaluated 14 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickloader
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquickloader
) {
14-30
165 QQuickItemPrivate *p = QQuickItemPrivate::get(d->item);-
166 p->removeItemChangeListener(d, watchedChanges);-
167-
168-
169-
170 d->item->setParentItem(nullptr);-
171 d->item->setVisible(false);-
172 d->item = nullptr;-
173 }
executed 14 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickloader
14
174 if (d->object
d->objectDescription
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickloader
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquickloader
) {
16-28
175 d->object->deleteLater();-
176 d->object = nullptr;-
177 itemChanged();-
178 }
executed 16 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickloader
16
179 statusChanged();-
180 }
executed 44 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickloader
44
181 activeChanged();-
182}
executed 66 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickloader
66
183QUrl QQuickLoader::source() const-
184{-
185 const QQuickLoaderPrivate * const d = d_func();-
186 return
executed 20 times by 1 test: return d->source;
Executed by:
  • tst_qquickloader
d->source;
executed 20 times by 1 test: return d->source;
Executed by:
  • tst_qquickloader
20
187}-
188-
189void QQuickLoader::setSource(const QUrl &url)-
190{-
191 setSource(url, true);-
192}
executed 144 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
144
193-
194void QQuickLoader::setSource(const QUrl &url, bool needsClear)-
195{-
196 QQuickLoaderPrivate * const d = d_func();-
197 if (d->source == url
d->source == urlDescription
TRUEnever evaluated
FALSEevaluated 170 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
)
0-170
198 return;
never executed: return;
0
199-
200 if (needsClear
needsClearDescription
TRUEevaluated 144 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
FALSEevaluated 26 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickloader
)
26-144
201 d->clear();
executed 144 times by 5 tests: d->clear();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
144
202-
203 d->source = url;-
204 d->loadingFromSource = true;-
205-
206 if (d->active
d->activeDescription
TRUEevaluated 158 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickloader
)
12-158
207 loadFromSource();
executed 158 times by 5 tests: loadFromSource();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
158
208 else-
209 sourceChanged();
executed 12 times by 1 test: sourceChanged();
Executed by:
  • tst_qquickloader
12
210}-
211-
212void QQuickLoader::loadFromSource()-
213{-
214 QQuickLoaderPrivate * const d = d_func();-
215 if (d->source.isEmpty()
d->source.isEmpty()Description
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmltypeloader
  • tst_qquickloader
FALSEevaluated 166 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
) {
6-166
216 sourceChanged();-
217 statusChanged();-
218 progressChanged();-
219 itemChanged();-
220 return;
executed 6 times by 2 tests: return;
Executed by:
  • tst_qqmltypeloader
  • tst_qquickloader
6
221 }-
222-
223 if (isComponentComplete()
isComponentComplete()Description
TRUEevaluated 66 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
FALSEevaluated 100 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickloader
) {
66-100
224 QQmlComponent::CompilationMode mode = d->asynchronous
d->asynchronousDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEevaluated 42 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
? QQmlComponent::Asynchronous : QQmlComponent::PreferSynchronous;
24-42
225 d->component.setObject(new QQmlComponent(qmlEngine(this), d->source, mode, this), this);-
226 d->load();-
227 }
executed 66 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
66
228}
executed 166 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
166
229QQmlComponent *QQuickLoader::sourceComponent() const-
230{-
231 const QQuickLoaderPrivate * const d = d_func();-
232 return
executed 44 times by 3 tests: return d->component;
Executed by:
  • tst_qqmlecmascript
  • tst_qquickitem2
  • tst_qquickloader
d->component;
executed 44 times by 3 tests: return d->component;
Executed by:
  • tst_qqmlecmascript
  • tst_qquickitem2
  • tst_qquickloader
44
233}-
234-
235void QQuickLoader::setSourceComponent(QQmlComponent *comp)-
236{-
237 QQuickLoaderPrivate * const d = d_func();-
238 if (comp == d->component
comp == d->componentDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qqmlecmascript
FALSEevaluated 180 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
)
4-180
239 return;
executed 4 times by 1 test: return;
Executed by:
  • tst_qqmlecmascript
4
240-
241 d->clear();-
242-
243 d->component.setObject(comp, this);-
244 d->loadingFromSource = false;-
245-
246 if (d->active
d->activeDescription
TRUEevaluated 176 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickloader
)
4-176
247 loadFromSourceComponent();
executed 176 times by 12 tests: loadFromSourceComponent();
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
176
248 else-
249 sourceComponentChanged();
executed 4 times by 1 test: sourceComponentChanged();
Executed by:
  • tst_qquickloader
4
250}-
251-
252void QQuickLoader::resetSourceComponent()-
253{-
254 setSourceComponent(nullptr);-
255}
executed 10 times by 2 tests: end of block
Executed by:
  • tst_qqmlecmascript
  • tst_qquickloader
10
256-
257void QQuickLoader::loadFromSourceComponent()-
258{-
259 QQuickLoaderPrivate * const d = d_func();-
260 if (!d->component
!d->componentDescription
TRUEevaluated 20 times by 2 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qquickloader
FALSEevaluated 166 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
) {
20-166
261 sourceComponentChanged();-
262 statusChanged();-
263 progressChanged();-
264 itemChanged();-
265 return;
executed 20 times by 2 tests: return;
Executed by:
  • tst_qqmlecmascript
  • tst_qquickloader
20
266 }-
267-
268 if (isComponentComplete()
isComponentComplete()Description
TRUEevaluated 18 times by 4 tests
Evaluated by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickitem2
  • tst_qquickloader
FALSEevaluated 148 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
)
18-148
269 d->load();
executed 18 times by 4 tests: d->load();
Executed by:
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickitem2
  • tst_qquickloader
18
270}
executed 166 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
166
271void QQuickLoader::setSource(QQmlV4Function *args)-
272{-
273 ((args) ? static_cast<void>(0) : qt_assert("args", __FILE__, 578));-
274 QQuickLoaderPrivate * const d = d_func();-
275-
276 bool ipvError = false;-
277 args->setReturnValue(QV4::Encode::undefined());-
278 QV4::Scope scope(args->v4engine());-
279 QV4::ScopedValue ipv(scope, d->extractInitialPropertyValues(args, this, &ipvError));-
280 if (ipvError
ipvErrorDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEevaluated 26 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickloader
)
4-26
281 return;
executed 4 times by 1 test: return;
Executed by:
  • tst_qquickloader
4
282-
283 d->clear();-
284 QUrl sourceUrl = d->resolveSourceUrl(args);-
285 if (!ipv->isUndefined()
!ipv->isUndefined()Description
TRUEevaluated 24 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickloader
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickloader
) {
2-24
286 d->disposeInitialPropertyValues();-
287 d->initialPropertyValues.set(args->v4engine(), ipv);-
288 }
executed 24 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickloader
24
289 d->qmlCallingContext.set(scope.engine, scope.engine->qmlContext());-
290-
291 setSource(sourceUrl, false);-
292}
executed 26 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickloader
26
293-
294void QQuickLoaderPrivate::disposeInitialPropertyValues()-
295{-
296}-
297-
298void QQuickLoaderPrivate::load()-
299{-
300 QQuickLoader * const q = q_func();-
301-
302 if (!q->isComponentComplete()
!q->isComponentComplete()Description
TRUEnever evaluated
FALSEevaluated 386 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
|| !component
!componentDescription
TRUEevaluated 62 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickitem2
  • tst_qquickloader
FALSEevaluated 324 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
)
0-386
303 return;
executed 62 times by 5 tests: return;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickitem2
  • tst_qquickloader
62
304-
305 if (!component->isLoading()
!component->isLoading()Description
TRUEevaluated 284 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 40 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickloader
) {
40-284
306 _q_sourceLoaded();-
307 }
executed 284 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
else {
284
308 QObject::connect(component, qFlagLocation("2""statusChanged(QQmlComponent::Status)" "\0" __FILE__ ":" "613"),-
309 q, qFlagLocation("1""_q_sourceLoaded()" "\0" __FILE__ ":" "614"));-
310 QObject::connect(component, qFlagLocation("2""progressChanged(qreal)" "\0" __FILE__ ":" "615"),-
311 q, qFlagLocation("2""progressChanged()" "\0" __FILE__ ":" "616"));-
312 q->statusChanged();-
313 q->progressChanged();-
314 if (loadingFromSource
loadingFromSourceDescription
TRUEevaluated 40 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickloader
FALSEnever evaluated
)
0-40
315 q->sourceChanged();
executed 40 times by 3 tests: q->sourceChanged();
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickloader
40
316 else-
317 q->sourceComponentChanged();
never executed: q->sourceComponentChanged();
0
318 q->itemChanged();-
319 }
executed 40 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickloader
40
320}-
321-
322void QQuickLoaderIncubator::setInitialState(QObject *o)-
323{-
324 loader->setInitialState(o);-
325}
executed 296 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
296
326-
327void QQuickLoaderPrivate::setInitialState(QObject *obj)-
328{-
329 QQuickLoader * const q = q_func();-
330-
331 QQuickItem *item = qmlobject_cast<QQuickItem*>(obj);-
332 if (item
itemDescription
TRUEevaluated 288 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qqmltypeloader
  • tst_qquickloader
) {
8-288
333-
334-
335-
336-
337 if (widthValid
widthValidDescription
TRUEevaluated 76 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
FALSEevaluated 212 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquickitem2
  • tst_qquickloader
  • tst_qquickrepeater
&& !QQuickItemPrivate::get(item)->widthValid
!QQuickItemPri...m)->widthValidDescription
TRUEevaluated 60 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
FALSEevaluated 16 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
)
16-212
338 item->setWidth(q->width());
executed 60 times by 7 tests: item->setWidth(q->width());
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
60
339 if (heightValid
heightValidDescription
TRUEevaluated 80 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
FALSEevaluated 208 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquickitem2
  • tst_qquickloader
  • tst_qquickrepeater
&& !QQuickItemPrivate::get(item)->heightValid
!QQuickItemPri...)->heightValidDescription
TRUEevaluated 60 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
FALSEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
)
20-208
340 item->setHeight(q->height());
executed 60 times by 7 tests: item->setHeight(q->height());
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
60
341 item->setParentItem(q);-
342 }
executed 288 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
288
343 if (obj
objDescription
TRUEevaluated 296 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEnever evaluated
) {
0-296
344 QQml_setParent_noEvent(itemContext, obj);-
345 QQml_setParent_noEvent(obj, q);-
346 itemContext = nullptr;-
347 }
executed 296 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
296
348-
349 if (initialPropertyValues.isUndefined()
initialPropert....isUndefined()Description
TRUEevaluated 278 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 18 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickloader
)
18-278
350 return;
executed 278 times by 14 tests: return;
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
278
351-
352 QQmlComponentPrivate *d = QQmlComponentPrivate::get(component);-
353 ((d && d->engine) ? static_cast<void>(0) : qt_assert("d && d->engine", __FILE__, 658));-
354 QV4::ExecutionEngine *v4 = d->engine->handle();-
355 ((v4) ? static_cast<void>(0) : qt_assert("v4", __FILE__, 660));-
356 QV4::Scope scope(v4);-
357 QV4::ScopedValue ipv(scope, initialPropertyValues.value());-
358 QV4::Scoped<QV4::QmlContext> qmlContext(scope, qmlCallingContext.value());-
359 d->initializeObjectWithInitialProperties(qmlContext, ipv, obj);-
360}
executed 18 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickloader
18
361-
362void QQuickLoaderIncubator::statusChanged(Status status)-
363{-
364 loader->incubatorStateChanged(status);-
365}
executed 902 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
902
366-
367void QQuickLoaderPrivate::incubatorStateChanged(QQmlIncubator::Status status)-
368{-
369 QQuickLoader * const q = q_func();-
370 if (status == QQmlIncubator::Loading
status == QQml...bator::LoadingDescription
TRUEevaluated 304 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 598 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
|| status == QQmlIncubator::Null
status == QQmlIncubator::NullDescription
TRUEevaluated 302 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 296 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
)
296-598
371 return;
executed 606 times by 14 tests: return;
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
606
372-
373 if (status == QQmlIncubator::Ready
status == QQmlIncubator::ReadyDescription
TRUEevaluated 294 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickloader
) {
2-294
374 object = incubator->object();-
375 item = qmlobject_cast<QQuickItem*>(object);-
376 if (!item
!itemDescription
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qqmltypeloader
  • tst_qquickloader
FALSEevaluated 286 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
) {
8-286
377 QQuickWindow *window = qmlobject_cast<QQuickWindow*>(object);-
378 if (window
windowDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmltypeloader
  • tst_qquickloader
) {
2-6
379 for (bool qt_category_enabled = lcTransient().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickloader
; qt_category_enabled = false) QMessageLogger(__FILE__, 684, __PRETTY_FUNCTION__, lcTransient().categoryName()).debug() << window << "is transient for" << q->window();
never executed: QMessageLogger(__FILE__, 684, __PRETTY_FUNCTION__, lcTransient().categoryName()).debug() << window << "is transient for" << q->window();
0-2
380 window->setTransientParent(q->window());-
381 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickloader
2
382 }
executed 8 times by 2 tests: end of block
Executed by:
  • tst_qqmltypeloader
  • tst_qquickloader
8
383 q->itemChanged();-
384 initResize();-
385 incubator->clear();-
386 }
executed 294 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
else if (status == QQmlIncubator::Error
status == QQmlIncubator::ErrorDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEnever evaluated
) {
0-294
387 if (!incubator->errors().isEmpty()
!incubator->errors().isEmpty()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEnever evaluated
)
0-2
388 QQmlEnginePrivate::warning(qmlEngine(q), incubator->errors());
executed 2 times by 1 test: QQmlEnginePrivate::warning(qmlEngine(q), incubator->errors());
Executed by:
  • tst_qquickloader
2
389 delete itemContext;-
390 itemContext = nullptr;-
391 delete incubator->object();-
392 source = QUrl();-
393 q->itemChanged();-
394 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickloader
2
395 if (loadingFromSource
loadingFromSourceDescription
TRUEevaluated 134 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
FALSEevaluated 162 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
)
134-162
396 q->sourceChanged();
executed 134 times by 5 tests: q->sourceChanged();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
134
397 else-
398 q->sourceComponentChanged();
executed 162 times by 12 tests: q->sourceComponentChanged();
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
162
399 q->statusChanged();-
400 q->progressChanged();-
401 if (status == QQmlIncubator::Ready
status == QQmlIncubator::ReadyDescription
TRUEevaluated 294 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickloader
)
2-294
402 q->loaded();
executed 294 times by 14 tests: q->loaded();
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
294
403 disposeInitialPropertyValues();-
404}
executed 296 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
296
405-
406void QQuickLoaderPrivate::_q_sourceLoaded()-
407{-
408 QQuickLoader * const q = q_func();-
409 if (!component
!componentDescription
TRUEnever evaluated
FALSEevaluated 316 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
|| !component->errors().isEmpty()
!component->errors().isEmpty()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEevaluated 304 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
) {
0-316
410 if (component
componentDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEnever evaluated
)
0-12
411 QQmlEnginePrivate::warning(qmlEngine(q), component->errors());
executed 12 times by 1 test: QQmlEnginePrivate::warning(qmlEngine(q), component->errors());
Executed by:
  • tst_qquickloader
12
412 if (loadingFromSource
loadingFromSourceDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEnever evaluated
)
0-12
413 q->sourceChanged();
executed 12 times by 1 test: q->sourceChanged();
Executed by:
  • tst_qquickloader
12
414 else-
415 q->sourceComponentChanged();
never executed: q->sourceComponentChanged();
0
416 q->statusChanged();-
417 q->progressChanged();-
418 q->itemChanged();-
419 disposeInitialPropertyValues();-
420 return;
executed 12 times by 1 test: return;
Executed by:
  • tst_qquickloader
12
421 }-
422-
423 QQmlContext *creationContext = component->creationContext();-
424 if (!creationContext
!creationContextDescription
TRUEevaluated 142 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
FALSEevaluated 162 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
) creationContext = qmlContext(q);
executed 142 times by 5 tests: creationContext = qmlContext(q);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickloader
142-162
425 itemContext = new QQmlContext(creationContext);-
426 itemContext->setContextObject(q);-
427-
428 delete incubator;-
429 incubator = new QQuickLoaderIncubator(this, asynchronous ? QQmlIncubator::Asynchronous : QQmlIncubator::AsynchronousIfNested);-
430-
431 component->create(*incubator, itemContext);-
432-
433 if (incubator
incubatorDescription
TRUEevaluated 304 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEnever evaluated
&& incubator->status() == QQmlIncubator::Loading
incubator->sta...bator::LoadingDescription
TRUEevaluated 32 times by 6 tests
Evaluated by:
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 272 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquickloader
)
0-304
434 q->statusChanged();
executed 32 times by 6 tests: q->statusChanged();
Executed by:
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
32
435}
executed 304 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
304
436QQuickLoader::Status QQuickLoader::status() const-
437{-
438 const QQuickLoaderPrivate * const d = d_func();-
439-
440 if (!d->active
!d->activeDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEevaluated 150 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickrepeater
)
2-150
441 return
executed 2 times by 1 test: return Null;
Executed by:
  • tst_qquickloader
Null;
executed 2 times by 1 test: return Null;
Executed by:
  • tst_qquickloader
2
442-
443 if (d->component
d->componentDescription
TRUEevaluated 132 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickrepeater
FALSEevaluated 18 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickloader
) {
18-132
444 switch (d->component->status()) {-
445 case
executed 24 times by 2 tests: case QQmlComponent::Loading:
Executed by:
  • tst_examples
  • tst_qquickloader
QQmlComponent::Loading:
executed 24 times by 2 tests: case QQmlComponent::Loading:
Executed by:
  • tst_examples
  • tst_qquickloader
24
446 return
executed 24 times by 2 tests: return Loading;
Executed by:
  • tst_examples
  • tst_qquickloader
Loading;
executed 24 times by 2 tests: return Loading;
Executed by:
  • tst_examples
  • tst_qquickloader
24
447 case
executed 24 times by 1 test: case QQmlComponent::Error:
Executed by:
  • tst_qquickloader
QQmlComponent::Error:
executed 24 times by 1 test: case QQmlComponent::Error:
Executed by:
  • tst_qquickloader
24
448 return
executed 24 times by 1 test: return Error;
Executed by:
  • tst_qquickloader
Error;
executed 24 times by 1 test: return Error;
Executed by:
  • tst_qquickloader
24
449 case
never executed: case QQmlComponent::Null:
QQmlComponent::Null:
never executed: case QQmlComponent::Null:
0
450 return
never executed: return Null;
Null;
never executed: return Null;
0
451 default
executed 84 times by 5 tests: default:
Executed by:
  • tst_examples
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickrepeater
:
executed 84 times by 5 tests: default:
Executed by:
  • tst_examples
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickrepeater
84
452 break;
executed 84 times by 5 tests: break;
Executed by:
  • tst_examples
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickrepeater
84
453 }-
454 }-
455-
456 if (d->incubator
d->incubatorDescription
TRUEevaluated 90 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickrepeater
FALSEevaluated 12 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickrepeater
) {
12-90
457 switch (d->incubator->status()) {-
458 case
executed 6 times by 3 tests: case QQmlIncubator::Loading:
Executed by:
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickrepeater
QQmlIncubator::Loading:
executed 6 times by 3 tests: case QQmlIncubator::Loading:
Executed by:
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickrepeater
6
459 return
executed 6 times by 3 tests: return Loading;
Executed by:
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickrepeater
Loading;
executed 6 times by 3 tests: return Loading;
Executed by:
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickrepeater
6
460 case
never executed: case QQmlIncubator::Error:
QQmlIncubator::Error:
never executed: case QQmlIncubator::Error:
0
461 return
never executed: return Error;
Error;
never executed: return Error;
0
462 default
executed 84 times by 5 tests: default:
Executed by:
  • tst_examples
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickrepeater
:
executed 84 times by 5 tests: default:
Executed by:
  • tst_examples
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickrepeater
84
463 break;
executed 84 times by 5 tests: break;
Executed by:
  • tst_examples
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickrepeater
84
464 }-
465 }-
466-
467 if (d->object
d->objectDescription
TRUEevaluated 76 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickrepeater
FALSEevaluated 20 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickloader
  • tst_qquickrepeater
)
20-76
468 return
executed 76 times by 5 tests: return Ready;
Executed by:
  • tst_examples
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickrepeater
Ready;
executed 76 times by 5 tests: return Ready;
Executed by:
  • tst_examples
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickrepeater
76
469-
470 return
executed 20 times by 3 tests: return d->source.isEmpty() ? Null : Error;
Executed by:
  • tst_examples
  • tst_qquickloader
  • tst_qquickrepeater
d->source.isEmpty() ? Null : Error;
executed 20 times by 3 tests: return d->source.isEmpty() ? Null : Error;
Executed by:
  • tst_examples
  • tst_qquickloader
  • tst_qquickrepeater
20
471}-
472-
473void QQuickLoader::componentComplete()-
474{-
475 QQuickLoaderPrivate * const d = d_func();-
476 QQuickItem::componentComplete();-
477 if (active()
active()Description
TRUEevaluated 302 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquickloader
) {
18-302
478 if (d->loadingFromSource
d->loadingFromSourceDescription
TRUEevaluated 96 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickloader
FALSEevaluated 206 times by 13 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
) {
96-206
479 QQmlComponent::CompilationMode mode = d->asynchronous
d->asynchronousDescription
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
FALSEevaluated 80 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickloader
? QQmlComponent::Asynchronous : QQmlComponent::PreferSynchronous;
16-80
480 d->component.setObject(new QQmlComponent(qmlEngine(this), d->source, mode, this), this);-
481 }
executed 96 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickloader
96
482 d->load();-
483 }
executed 302 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
302
484}
executed 320 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
320
485-
486void QQuickLoader::itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &value)-
487{-
488 if (change == ItemSceneChange
change == ItemSceneChangeDescription
TRUEevaluated 314 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 1098 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
) {
314-1098
489 QQuickWindow *loadedWindow = qmlobject_cast<QQuickWindow *>(item());-
490 if (loadedWindow
loadedWindowDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEevaluated 310 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
) {
4-310
491 for (bool qt_category_enabled = lcTransient().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickloader
; qt_category_enabled = false) QMessageLogger(__FILE__, 837, __PRETTY_FUNCTION__, lcTransient().categoryName()).debug() << loadedWindow << "is transient for" << value.window;
never executed: QMessageLogger(__FILE__, 837, __PRETTY_FUNCTION__, lcTransient().categoryName()).debug() << loadedWindow << "is transient for" << value.window;
0-4
492 loadedWindow->setTransientParent(value.window);-
493 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickloader
4
494 }
executed 314 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
314
495 QQuickItem::itemChange(change, value);-
496}
executed 1412 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
1412
497qreal QQuickLoader::progress() const-
498{-
499 const QQuickLoaderPrivate * const d = d_func();-
500-
501 if (d->object
d->objectDescription
TRUEevaluated 44 times by 2 tests
Evaluated by:
  • tst_qquickloader
  • tst_qquickrepeater
FALSEevaluated 38 times by 1 test
Evaluated by:
  • tst_qquickloader
)
38-44
502 return
executed 44 times by 2 tests: return 1.0;
Executed by:
  • tst_qquickloader
  • tst_qquickrepeater
1.0;
executed 44 times by 2 tests: return 1.0;
Executed by:
  • tst_qquickloader
  • tst_qquickrepeater
44
503-
504 if (d->component
d->componentDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickloader
)
14-24
505 return
executed 24 times by 1 test: return d->component->progress();
Executed by:
  • tst_qquickloader
d->component->progress();
executed 24 times by 1 test: return d->component->progress();
Executed by:
  • tst_qquickloader
24
506-
507 return
executed 14 times by 1 test: return 0.0;
Executed by:
  • tst_qquickloader
0.0;
executed 14 times by 1 test: return 0.0;
Executed by:
  • tst_qquickloader
14
508}-
509bool QQuickLoader::asynchronous() const-
510{-
511 const QQuickLoaderPrivate * const d = d_func();-
512 return
never executed: return d->asynchronous;
d->asynchronous;
never executed: return d->asynchronous;
0
513}-
514-
515void QQuickLoader::setAsynchronous(bool a)-
516{-
517 QQuickLoaderPrivate * const d = d_func();-
518 if (d->asynchronous == a
d->asynchronous == aDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEevaluated 50 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
)
2-50
519 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickloader
2
520-
521 d->asynchronous = a;-
522-
523 if (!d->asynchronous
!d->asynchronousDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEevaluated 46 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
&& isComponentComplete()
isComponentComplete()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEnever evaluated
&& d->active
d->activeDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEnever evaluated
) {
0-46
524 if (d->loadingFromSource
d->loadingFromSourceDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEnever evaluated
&& d->component && d->component->isLoading()
d->component->isLoading()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickloader
) {
0-4
525-
526 QUrl currentSource = d->source;-
527 d->clear();-
528 d->source = currentSource;-
529 loadFromSource();-
530 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickloader
else if (d->incubator
d->incubatorDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEnever evaluated
&& d->incubator->isLoading()
d->incubator->isLoading()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEnever evaluated
) {
0-2
531 d->incubator->forceCompletion();-
532 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickloader
2
533 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickloader
4
534-
535 asynchronousChanged();-
536}
executed 50 times by 7 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
50
537-
538void QQuickLoaderPrivate::_q_updateSize(bool loaderGeometryChanged)-
539{-
540 QQuickLoader * const q = q_func();-
541 if (!item
!itemDescription
TRUEevaluated 114 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
FALSEevaluated 714 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
)
114-714
542 return;
executed 114 times by 9 tests: return;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
114
543-
544 const bool needToUpdateWidth = loaderGeometryChanged
loaderGeometryChangedDescription
TRUEevaluated 596 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 118 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qquickanimations
  • tst_qquickloader
  • tst_qquickrepeater
&& q->widthValid()
q->widthValid()Description
TRUEevaluated 160 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
FALSEevaluated 436 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquickitem2
  • tst_qquickloader
  • tst_qquickrepeater
;
118-596
545 const bool needToUpdateHeight = loaderGeometryChanged
loaderGeometryChangedDescription
TRUEevaluated 596 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEevaluated 118 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qquickanimations
  • tst_qquickloader
  • tst_qquickrepeater
&& q->heightValid()
q->heightValid()Description
TRUEevaluated 170 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
FALSEevaluated 426 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquickitem2
  • tst_qquickloader
  • tst_qquickrepeater
;
118-596
546-
547 if (needToUpdateWidth
needToUpdateWidthDescription
TRUEevaluated 160 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
FALSEevaluated 554 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquickitem2
  • tst_qquickloader
  • tst_qquickrepeater
&& needToUpdateHeight
needToUpdateHeightDescription
TRUEevaluated 158 times by 9 tests
Evaluated by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickloader
)
2-554
548 item->setSize(QSizeF(q->width(), q->height()));
executed 158 times by 9 tests: item->setSize(QSizeF(q->width(), q->height()));
Executed by:
  • tst_examples
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
158
549 else if (needToUpdateWidth
needToUpdateWidthDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEevaluated 554 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquickitem2
  • tst_qquickloader
  • tst_qquickrepeater
)
2-554
550 item->setWidth(q->width());
executed 2 times by 1 test: item->setWidth(q->width());
Executed by:
  • tst_qquickloader
2
551 else if (needToUpdateHeight
needToUpdateHeightDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEevaluated 542 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquickitem2
  • tst_qquickloader
  • tst_qquickrepeater
)
12-542
552 item->setHeight(q->height());
executed 12 times by 1 test: item->setHeight(q->height());
Executed by:
  • tst_qquickloader
12
553-
554 if (updatingSize
updatingSizeDescription
TRUEevaluated 184 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimations
  • tst_qquickloader
  • tst_qquickrepeater
FALSEevaluated 530 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
)
184-530
555 return;
executed 184 times by 6 tests: return;
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qquickanimations
  • tst_qquickloader
  • tst_qquickrepeater
184
556-
557 updatingSize = true;-
558-
559 q->setImplicitSize(getImplicitWidth(), getImplicitHeight());-
560-
561 updatingSize = false;-
562}
executed 530 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qqmlxmlhttprequest
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
530
563-
564-
565-
566-
567-
568-
569-
570QObject *QQuickLoader::item() const-
571{-
572 const QQuickLoaderPrivate * const d = d_func();-
573 return
executed 684 times by 13 tests: return d->object;
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
d->object;
executed 684 times by 13 tests: return d->object;
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
684
574}-
575-
576void QQuickLoader::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)-
577{-
578 QQuickLoaderPrivate * const d = d_func();-
579 if (newGeometry != oldGeometry
newGeometry != oldGeometryDescription
TRUEevaluated 424 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
FALSEnever evaluated
) {
0-424
580 d->_q_updateSize();-
581 }
executed 424 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
424
582 QQuickItem::geometryChanged(newGeometry, oldGeometry);-
583}
executed 424 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmltypeloader
  • tst_qquickanimations
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickpathview
  • tst_qquickrepeater
424
584-
585QUrl QQuickLoaderPrivate::resolveSourceUrl(QQmlV4Function *args)-
586{-
587 QV4::Scope scope(args->v4engine());-
588 QV4::ScopedValue v(scope, (*args)[0]);-
589 QString arg = v->toQString();-
590 if (arg.isEmpty()
arg.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 26 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickloader
)
0-26
591 return
never executed: return QUrl();
QUrl();
never executed: return QUrl();
0
592-
593 QQmlContextData *context = scope.engine->callingQmlContext();-
594 ((context) ? static_cast<void>(0) : qt_assert("context", __FILE__, 994));-
595 return
executed 26 times by 3 tests: return context->resolvedUrl(QUrl(arg));
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickloader
context->resolvedUrl(QUrl(arg));
executed 26 times by 3 tests: return context->resolvedUrl(QUrl(arg));
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickloader
26
596}-
597-
598QV4::ReturnedValue QQuickLoaderPrivate::extractInitialPropertyValues(QQmlV4Function *args, QObject *loader, bool *error)-
599{-
600 QV4::Scope scope(args->v4engine());-
601 QV4::ScopedValue valuemap(scope, QV4::Primitive::undefinedValue());-
602 if (args->length() >= 2
args->length() >= 2Description
TRUEevaluated 28 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickloader
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickloader
) {
2-28
603 QV4::ScopedValue v(scope, (*args)[1]);-
604 if (!v->isObject()
!v->isObject()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickloader
FALSEevaluated 24 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickloader
|| v->as<QV4::ArrayObject>()
v->as<QV4::ArrayObject>()Description
TRUEnever evaluated
FALSEevaluated 24 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickloader
) {
0-24
605 *error = true;-
606 qmlWarning(loader) << QQuickLoader::tr("setSource: value is not an object");-
607 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickloader
else {
4
608 *error = false;-
609 valuemap = v;-
610 }
executed 24 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickloader
24
611 }-
612-
613 return
executed 30 times by 3 tests: return valuemap->asReturnedValue();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickloader
valuemap->asReturnedValue();
executed 30 times by 3 tests: return valuemap->asReturnedValue();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickloader
30
614}-
615-
616-
617-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0