OpenCoverage

qquickglobal.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickglobal.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Copyright (C) 2016 BasysKom GmbH.-
5** Contact: https://www.qt.io/licensing/-
6**-
7** This file is part of the QtQuick module of the Qt Toolkit.-
8**-
9** $QT_BEGIN_LICENSE:LGPL$-
10** Commercial License Usage-
11** Licensees holding valid commercial Qt licenses may use this file in-
12** accordance with the commercial license agreement provided with the-
13** Software or, alternatively, in accordance with the terms contained in-
14** a written agreement between you and The Qt Company. For licensing terms-
15** and conditions see https://www.qt.io/terms-conditions. For further-
16** information use the contact form at https://www.qt.io/contact-us.-
17**-
18** GNU Lesser General Public License Usage-
19** Alternatively, this file may be used under the terms of the GNU Lesser-
20** General Public License version 3 as published by the Free Software-
21** Foundation and appearing in the file LICENSE.LGPL3 included in the-
22** packaging of this file. Please review the following information to-
23** ensure the GNU Lesser General Public License version 3 requirements-
24** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
25**-
26** GNU General Public License Usage-
27** Alternatively, this file may be used under the terms of the GNU-
28** General Public License version 2.0 or (at your option) the GNU General-
29** Public license version 3 or any later version approved by the KDE Free-
30** Qt Foundation. The licenses are as published by the Free Software-
31** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
32** included in the packaging of this file. Please review the following-
33** information to ensure the GNU General Public License requirements will-
34** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
35** https://www.gnu.org/licenses/gpl-3.0.html.-
36**-
37** $QT_END_LICENSE$-
38**-
39****************************************************************************/-
40-
41#include <private/qquickvaluetypes_p.h>-
42#include <private/qquickapplication_p.h>-
43#include <private/qqmlglobal_p.h>-
44#include <private/qv8engine_p.h>-
45-
46#include <QtGui/QGuiApplication>-
47#include <QtGui/qdesktopservices.h>-
48#include <QtGui/qfontdatabase.h>-
49#include <QtGui/qstylehints.h>-
50-
51#include <private/qv4engine_p.h>-
52#include <private/qv4object_p.h>-
53-
54#ifdef Q_CC_MSVC-
55// MSVC2010 warns about 'unused variable t', even if it's used in t->~T()-
56# pragma warning( disable : 4189 )-
57#endif-
58-
59QT_BEGIN_NAMESPACE-
60-
61class QQuickColorProvider : public QQmlColorProvider-
62{-
63public:-
64 QVariant colorFromString(const QString &s, bool *ok) override-
65 {-
66 QColor c(s);-
67 if (c.isValid()) {
c.isValid()Description
TRUEevaluated 142 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmlqt
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qqmlqt
12-142
68 if (ok) *ok = true;
executed 142 times by 2 tests: *ok = true;
Executed by:
  • tst_examples
  • tst_qqmlqt
okDescription
TRUEevaluated 142 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmlqt
FALSEnever evaluated
0-142
69 return QVariant(c);
executed 142 times by 2 tests: return QVariant(c);
Executed by:
  • tst_examples
  • tst_qqmlqt
142
70 }-
71-
72 if (ok) *ok = false;
executed 12 times by 1 test: *ok = false;
Executed by:
  • tst_qqmlqt
okDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qqmlqt
FALSEnever evaluated
0-12
73 return QVariant();
executed 12 times by 1 test: return QVariant();
Executed by:
  • tst_qqmlqt
12
74 }-
75-
76 unsigned rgbaFromString(const QString &s, bool *ok) override-
77 {-
78 QColor c(s);-
79 if (c.isValid()) {
c.isValid()Description
TRUEevaluated 36657 times by 83 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • ...
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickanimations
2-36657
80 if (ok) *ok = true;
executed 36657 times by 83 tests: *ok = true;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • ...
okDescription
TRUEevaluated 36657 times by 83 tests
Evaluated by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • ...
FALSEnever evaluated
0-36657
81 return c.rgba();
executed 36657 times by 83 tests: return c.rgba();
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • ...
36657
82 }-
83-
84 if (ok) *ok = false;
executed 2 times by 1 test: *ok = false;
Executed by:
  • tst_qquickanimations
okDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEnever evaluated
0-2
85 return 0;
executed 2 times by 1 test: return 0;
Executed by:
  • tst_qquickanimations
2
86 }-
87-
88 QString stringFromRgba(unsigned rgba)-
89 {-
90 QColor c(QColor::fromRgba(rgba));-
91 if (c.isValid()) {
c.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
0
92 return QVariant(c).toString();
never executed: return QVariant(c).toString();
0
93 }-
94-
95 return QString();
never executed: return QString();
0
96 }-
97-
98 QVariant fromRgbF(double r, double g, double b, double a) override-
99 {-
100 return QVariant(QColor::fromRgbF(r, g, b, a));
executed 1484 times by 13 tests: return QVariant(QColor::fromRgbF(r, g, b, a));
Executed by:
  • tst_examples
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdynamicpropertyanimation
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickloader
  • tst_scenegraph
1484
101 }-
102-
103 QVariant fromHslF(double h, double s, double l, double a) override-
104 {-
105 return QVariant(QColor::fromHslF(h, s, l, a));
executed 430 times by 3 tests: return QVariant(QColor::fromHslF(h, s, l, a));
Executed by:
  • tst_examples
  • tst_qqmlqt
  • tst_qquickaccessible
430
106 }-
107-
108 QVariant fromHsvF(double h, double s, double v, double a) override-
109 {-
110 return QVariant(QColor::fromHsvF(h, s, v, a));
executed 8 times by 1 test: return QVariant(QColor::fromHsvF(h, s, v, a));
Executed by:
  • tst_qqmlqt
8
111 }-
112-
113 QVariant lighter(const QVariant &var, qreal factor) override-
114 {-
115 QColor color = var.value<QColor>();-
116 color = color.lighter(int(qRound(factor*100.)));-
117 return QVariant::fromValue(color);
executed 6 times by 1 test: return QVariant::fromValue(color);
Executed by:
  • tst_qqmlqt
6
118 }-
119-
120 QVariant darker(const QVariant &var, qreal factor) override-
121 {-
122 QColor color = var.value<QColor>();-
123 color = color.darker(int(qRound(factor*100.)));-
124 return QVariant::fromValue(color);
executed 184 times by 2 tests: return QVariant::fromValue(color);
Executed by:
  • tst_examples
  • tst_qqmlqt
184
125 }-
126-
127 QVariant tint(const QVariant &baseVar, const QVariant &tintVar) override-
128 {-
129 QColor tintColor = tintVar.value<QColor>();-
130-
131 int tintAlpha = tintColor.alpha();-
132 if (tintAlpha == 0xFF) {
tintAlpha == 0xFFDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlqt
FALSEevaluated 28 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmlqt
2-28
133 return tintVar;
executed 2 times by 1 test: return tintVar;
Executed by:
  • tst_qqmlqt
2
134 } else if (tintAlpha == 0x00) {
tintAlpha == 0x00Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlqt
FALSEevaluated 26 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qqmlqt
2-26
135 return baseVar;
executed 2 times by 1 test: return baseVar;
Executed by:
  • tst_qqmlqt
2
136 }-
137-
138 // tint the base color and return the final color-
139 QColor baseColor = baseVar.value<QColor>();-
140 qreal a = tintColor.alphaF();-
141 qreal inv_a = 1.0 - a;-
142-
143 qreal r = tintColor.redF() * a + baseColor.redF() * inv_a;-
144 qreal g = tintColor.greenF() * a + baseColor.greenF() * inv_a;-
145 qreal b = tintColor.blueF() * a + baseColor.blueF() * inv_a;-
146-
147 return QVariant::fromValue(QColor::fromRgbF(r, g, b, a + inv_a * baseColor.alphaF()));
executed 26 times by 2 tests: return QVariant::fromValue(QColor::fromRgbF(r, g, b, a + inv_a * baseColor.alphaF()));
Executed by:
  • tst_examples
  • tst_qqmlqt
26
148 }-
149};-
150-
151-
152// Note: The functions in this class provide handling only for the types-
153// that the QML engine will currently actually call them for, so many-
154// appear incompletely implemented. For some functions, the implementation-
155// would be obvious, but for others (particularly create and createFromString)-
156// the exact semantics are unknown. For this reason unused functionality-
157// has been omitted.-
158-
159class QQuickValueTypeProvider : public QQmlValueTypeProvider-
160{-
161public:-
162-
163#if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS)-
164 #define ASSERT_VALID_SIZE(size, min) Q_UNUSED(size)-
165#else-
166 #define ASSERT_VALID_SIZE(size, min) Q_ASSERT(size >= min)-
167#endif-
168-
169 static QVector2D vector2DFromString(const QString &s, bool *ok)-
170 {-
171 if (s.count(QLatin1Char(',')) == 1) {
s.count(QLatin1Char(',')) == 1Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
2-20
172 int index = s.indexOf(QLatin1Char(','));-
173-
174 bool xGood, yGood;-
175 float xCoord = s.leftRef(index).toFloat(&xGood);-
176 float yCoord = s.midRef(index + 1).toFloat(&yGood);-
177-
178 if (xGood && yGood) {
xGoodDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
yGoodDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-2
179 if (ok) *ok = true;
executed 2 times by 1 test: *ok = true;
Executed by:
  • tst_qqmlvaluetypeproviders
okDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-2
180 return QVector2D(xCoord, yCoord);
executed 2 times by 1 test: return QVector2D(xCoord, yCoord);
Executed by:
  • tst_qqmlvaluetypeproviders
2
181 }-
182 }
never executed: end of block
0
183-
184 if (ok) *ok = false;
executed 20 times by 5 tests: *ok = false;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
okDescription
TRUEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
FALSEnever evaluated
0-20
185 return QVector2D();
executed 20 times by 5 tests: return QVector2D();
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
20
186 }-
187-
188 static QVector3D vector3DFromString(const QString &s, bool *ok)-
189 {-
190 if (s.count(QLatin1Char(',')) == 2) {
s.count(QLatin1Char(',')) == 2Description
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlvaluetypeproviders
FALSEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
6-20
191 int index = s.indexOf(QLatin1Char(','));-
192 int index2 = s.indexOf(QLatin1Char(','), index+1);-
193-
194 bool xGood, yGood, zGood;-
195 float xCoord = s.leftRef(index).toFloat(&xGood);-
196 float yCoord = s.midRef(index + 1, index2 - index - 1).toFloat(&yGood);-
197 float zCoord = s.midRef(index2 + 1).toFloat(&zGood);-
198-
199 if (xGood && yGood && zGood) {
xGoodDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
yGoodDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
zGoodDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-6
200 if (ok) *ok = true;
executed 6 times by 2 tests: *ok = true;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlvaluetypeproviders
okDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-6
201 return QVector3D(xCoord, yCoord, zCoord);
executed 6 times by 2 tests: return QVector3D(xCoord, yCoord, zCoord);
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlvaluetypeproviders
6
202 }-
203 }
never executed: end of block
0
204-
205 if (ok) *ok = false;
executed 20 times by 5 tests: *ok = false;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
okDescription
TRUEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
FALSEnever evaluated
0-20
206 return QVector3D();
executed 20 times by 5 tests: return QVector3D();
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
20
207 }-
208-
209 static QVector4D vector4DFromString(const QString &s, bool *ok)-
210 {-
211 if (s.count(QLatin1Char(',')) == 3) {
s.count(QLatin1Char(',')) == 3Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
2-20
212 int index = s.indexOf(QLatin1Char(','));-
213 int index2 = s.indexOf(QLatin1Char(','), index+1);-
214 int index3 = s.indexOf(QLatin1Char(','), index2+1);-
215-
216 bool xGood, yGood, zGood, wGood;-
217 float xCoord = s.leftRef(index).toFloat(&xGood);-
218 float yCoord = s.midRef(index + 1, index2 - index - 1).toFloat(&yGood);-
219 float zCoord = s.midRef(index2 + 1, index3 - index2 - 1).toFloat(&zGood);-
220 float wCoord = s.midRef(index3 + 1).toFloat(&wGood);-
221-
222 if (xGood && yGood && zGood && wGood) {
xGoodDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
yGoodDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
zGoodDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
wGoodDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-2
223 if (ok) *ok = true;
executed 2 times by 1 test: *ok = true;
Executed by:
  • tst_qqmlvaluetypeproviders
okDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-2
224 return QVector4D(xCoord, yCoord, zCoord, wCoord);
executed 2 times by 1 test: return QVector4D(xCoord, yCoord, zCoord, wCoord);
Executed by:
  • tst_qqmlvaluetypeproviders
2
225 }-
226 }
never executed: end of block
0
227-
228 if (ok) *ok = false;
executed 20 times by 5 tests: *ok = false;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
okDescription
TRUEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
FALSEnever evaluated
0-20
229 return QVector4D();
executed 20 times by 5 tests: return QVector4D();
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
20
230 }-
231-
232 static QQuaternion quaternionFromString(const QString &s, bool *ok)-
233 {-
234 if (s.count(QLatin1Char(',')) == 3) {
s.count(QLatin1Char(',')) == 3Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
2-20
235 int index = s.indexOf(QLatin1Char(','));-
236 int index2 = s.indexOf(QLatin1Char(','), index+1);-
237 int index3 = s.indexOf(QLatin1Char(','), index2+1);-
238-
239 bool sGood, xGood, yGood, zGood;-
240 qreal sCoord = s.leftRef(index).toDouble(&sGood);-
241 qreal xCoord = s.midRef(index+1, index2-index-1).toDouble(&xGood);-
242 qreal yCoord = s.midRef(index2+1, index3-index2-1).toDouble(&yGood);-
243 qreal zCoord = s.midRef(index3+1).toDouble(&zGood);-
244-
245 if (sGood && xGood && yGood && zGood) {
sGoodDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
xGoodDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
yGoodDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
zGoodDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-2
246 if (ok) *ok = true;
executed 2 times by 1 test: *ok = true;
Executed by:
  • tst_qqmlvaluetypeproviders
okDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-2
247 return QQuaternion(sCoord, xCoord, yCoord, zCoord);
executed 2 times by 1 test: return QQuaternion(sCoord, xCoord, yCoord, zCoord);
Executed by:
  • tst_qqmlvaluetypeproviders
2
248 }-
249 }
never executed: end of block
0
250-
251 if (ok) *ok = false;
executed 20 times by 5 tests: *ok = false;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
okDescription
TRUEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
FALSEnever evaluated
0-20
252 return QQuaternion();
executed 20 times by 5 tests: return QQuaternion();
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
20
253 }-
254-
255 static QMatrix4x4 matrix4x4FromString(const QString &s, bool *ok)-
256 {-
257 if (s.count(QLatin1Char(',')) == 15) {
s.count(QLatin...ar(',')) == 15Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
2-20
258 float matValues[16];-
259 bool vOK = true;-
260 QStringRef mutableStr(&s);-
261 for (int i = 0; vOK && i < 16; ++i) {
vOKDescription
TRUEevaluated 34 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
i < 16Description
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
0-34
262 int cidx = mutableStr.indexOf(QLatin1Char(','));-
263 matValues[i] = mutableStr.left(cidx).toDouble(&vOK);-
264 mutableStr = mutableStr.mid(cidx + 1);-
265 }
executed 32 times by 1 test: end of block
Executed by:
  • tst_qqmlvaluetypeproviders
32
266-
267 if (vOK) {
vOKDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-2
268 if (ok) *ok = true;
executed 2 times by 1 test: *ok = true;
Executed by:
  • tst_qqmlvaluetypeproviders
okDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-2
269 return QMatrix4x4(matValues);
executed 2 times by 1 test: return QMatrix4x4(matValues);
Executed by:
  • tst_qqmlvaluetypeproviders
2
270 }-
271 }
never executed: end of block
0
272-
273 if (ok) *ok = false;
executed 20 times by 5 tests: *ok = false;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
okDescription
TRUEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
FALSEnever evaluated
0-20
274 return QMatrix4x4();
executed 20 times by 5 tests: return QMatrix4x4();
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
20
275 }-
276-
277 static QFont fontFromObject(QQmlV4Handle object, QV4::ExecutionEngine *v4, bool *ok)-
278 {-
279 if (ok)
okDescription
TRUEevaluated 60 times by 3 tests
Evaluated by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-60
280 *ok = false;
executed 60 times by 3 tests: *ok = false;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
281 QFont retn;-
282 QV4::Scope scope(v4);-
283 QV4::ScopedObject obj(scope, object);-
284 if (!obj) {
!objDescription
TRUEnever evaluated
FALSEevaluated 60 times by 3 tests
Evaluated by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
0-60
285 if (ok)
okDescription
TRUEnever evaluated
FALSEnever evaluated
0
286 *ok = false;
never executed: *ok = false;
0
287 return retn;
never executed: return retn;
0
288 }-
289-
290 QV4::ScopedString s(scope);-
291-
292 QV4::ScopedValue vbold(scope, obj->get((s = v4->newString(QStringLiteral("bold")))));
executed 60 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
293 QV4::ScopedValue vcap(scope, obj->get((s = v4->newString(QStringLiteral("capitalization")))));
executed 60 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
294 QV4::ScopedValue vfam(scope, obj->get((s = v4->newString(QStringLiteral("family")))));
executed 60 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
295 QV4::ScopedValue vstyle(scope, obj->get((s = v4->newString(QStringLiteral("styleName")))));
executed 60 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
296 QV4::ScopedValue vital(scope, obj->get((s = v4->newString(QStringLiteral("italic")))));
executed 60 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
297 QV4::ScopedValue vlspac(scope, obj->get((s = v4->newString(QStringLiteral("letterSpacing")))));
executed 60 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
298 QV4::ScopedValue vpixsz(scope, obj->get((s = v4->newString(QStringLiteral("pixelSize")))));
executed 60 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
299 QV4::ScopedValue vpntsz(scope, obj->get((s = v4->newString(QStringLiteral("pointSize")))));
executed 60 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
300 QV4::ScopedValue vstrk(scope, obj->get((s = v4->newString(QStringLiteral("strikeout")))));
executed 60 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
301 QV4::ScopedValue vundl(scope, obj->get((s = v4->newString(QStringLiteral("underline")))));
executed 60 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
302 QV4::ScopedValue vweight(scope, obj->get((s = v4->newString(QStringLiteral("weight")))));
executed 60 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
303 QV4::ScopedValue vwspac(scope, obj->get((s = v4->newString(QStringLiteral("wordSpacing")))));
executed 60 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
304 QV4::ScopedValue vhint(scope, obj->get((s = v4->newString(QStringLiteral("hintingPreference")))));
executed 60 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
305 QV4::ScopedValue vkerning(scope, obj->get((s = v4->newString(QStringLiteral("kerning")))));
executed 60 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
306 QV4::ScopedValue vshaping(scope, obj->get((s = v4->newString(QStringLiteral("preferShaping")))));
executed 60 times by 3 tests: return qstring_literal_temp;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
307-
308 // pull out the values, set ok to true if at least one valid field is given.-
309 if (vbold->isBoolean()) {
vbold->isBoolean()Description
TRUEnever evaluated
FALSEevaluated 60 times by 3 tests
Evaluated by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
0-60
310 retn.setBold(vbold->booleanValue());-
311 if (ok) *ok = true;
never executed: *ok = true;
okDescription
TRUEnever evaluated
FALSEnever evaluated
0
312 }
never executed: end of block
0
313 if (vcap->isInt32()) {
vcap->isInt32()Description
TRUEnever evaluated
FALSEevaluated 60 times by 3 tests
Evaluated by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
0-60
314 retn.setCapitalization(static_cast<QFont::Capitalization>(vcap->integerValue()));-
315 if (ok) *ok = true;
never executed: *ok = true;
okDescription
TRUEnever evaluated
FALSEnever evaluated
0
316 }
never executed: end of block
0
317 if (vfam->isString()) {
vfam->isString()Description
TRUEevaluated 52 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qqmlbinding
  • tst_qqmlqt
8-52
318 retn.setFamily(vfam->toQString());-
319 if (ok) *ok = true;
executed 52 times by 2 tests: *ok = true;
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
okDescription
TRUEevaluated 52 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-52
320 }
executed 52 times by 2 tests: end of block
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
52
321 if (vstyle->isString()) {
vstyle->isString()Description
TRUEnever evaluated
FALSEevaluated 60 times by 3 tests
Evaluated by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
0-60
322 retn.setStyleName(vstyle->toQString());-
323 if (ok) *ok = true;
never executed: *ok = true;
okDescription
TRUEnever evaluated
FALSEnever evaluated
0
324 }
never executed: end of block
0
325 if (vital->isBoolean()) {
vital->isBoolean()Description
TRUEevaluated 24 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
FALSEevaluated 36 times by 3 tests
Evaluated by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
24-36
326 retn.setItalic(vital->booleanValue());-
327 if (ok) *ok = true;
executed 24 times by 2 tests: *ok = true;
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
okDescription
TRUEevaluated 24 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-24
328 }
executed 24 times by 2 tests: end of block
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
24
329 if (vlspac->isNumber()) {
vlspac->isNumber()Description
TRUEnever evaluated
FALSEevaluated 60 times by 3 tests
Evaluated by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
0-60
330 retn.setLetterSpacing(QFont::AbsoluteSpacing, vlspac->asDouble());-
331 if (ok) *ok = true;
never executed: *ok = true;
okDescription
TRUEnever evaluated
FALSEnever evaluated
0
332 }
never executed: end of block
0
333 if (vpixsz->isInt32()) {
vpixsz->isInt32()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qqmlbinding
FALSEevaluated 54 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
6-54
334 retn.setPixelSize(vpixsz->integerValue());-
335 if (ok) *ok = true;
executed 6 times by 1 test: *ok = true;
Executed by:
  • tst_qqmlbinding
okDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qqmlbinding
FALSEnever evaluated
0-6
336 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qqmlbinding
6
337 if (vpntsz->isNumber()) {
vpntsz->isNumber()Description
TRUEevaluated 52 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qqmlbinding
  • tst_qqmlqt
8-52
338 retn.setPointSize(vpntsz->asDouble());-
339 if (ok) *ok = true;
executed 52 times by 2 tests: *ok = true;
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
okDescription
TRUEevaluated 52 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-52
340 }
executed 52 times by 2 tests: end of block
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
52
341 if (vstrk->isBoolean()) {
vstrk->isBoolean()Description
TRUEnever evaluated
FALSEevaluated 60 times by 3 tests
Evaluated by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
0-60
342 retn.setStrikeOut(vstrk->booleanValue());-
343 if (ok) *ok = true;
never executed: *ok = true;
okDescription
TRUEnever evaluated
FALSEnever evaluated
0
344 }
never executed: end of block
0
345 if (vundl->isBoolean()) {
vundl->isBoolean()Description
TRUEnever evaluated
FALSEevaluated 60 times by 3 tests
Evaluated by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
0-60
346 retn.setUnderline(vundl->booleanValue());-
347 if (ok) *ok = true;
never executed: *ok = true;
okDescription
TRUEnever evaluated
FALSEnever evaluated
0
348 }
never executed: end of block
0
349 if (vweight->isInt32()) {
vweight->isInt32()Description
TRUEevaluated 40 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
FALSEevaluated 20 times by 3 tests
Evaluated by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
20-40
350 retn.setWeight(static_cast<QFont::Weight>(vweight->integerValue()));-
351 if (ok) *ok = true;
executed 40 times by 2 tests: *ok = true;
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
okDescription
TRUEevaluated 40 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-40
352 }
executed 40 times by 2 tests: end of block
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
40
353 if (vwspac->isNumber()) {
vwspac->isNumber()Description
TRUEnever evaluated
FALSEevaluated 60 times by 3 tests
Evaluated by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
0-60
354 retn.setWordSpacing(vwspac->asDouble());-
355 if (ok) *ok = true;
never executed: *ok = true;
okDescription
TRUEnever evaluated
FALSEnever evaluated
0
356 }
never executed: end of block
0
357 if (vhint->isInt32()) {
vhint->isInt32()Description
TRUEnever evaluated
FALSEevaluated 60 times by 3 tests
Evaluated by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
0-60
358 retn.setHintingPreference(static_cast<QFont::HintingPreference>(vhint->integerValue()));-
359 if (ok) *ok = true;
never executed: *ok = true;
okDescription
TRUEnever evaluated
FALSEnever evaluated
0
360 }
never executed: end of block
0
361 if (vkerning->isBoolean()) {
vkerning->isBoolean()Description
TRUEnever evaluated
FALSEevaluated 60 times by 3 tests
Evaluated by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
0-60
362 retn.setKerning(vkerning->booleanValue());-
363 if (ok) *ok = true;
never executed: *ok = true;
okDescription
TRUEnever evaluated
FALSEnever evaluated
0
364 }
never executed: end of block
0
365 if (vshaping->isBoolean()) {
vshaping->isBoolean()Description
TRUEnever evaluated
FALSEevaluated 60 times by 3 tests
Evaluated by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
0-60
366 bool enable = vshaping->booleanValue();-
367 if (enable)
enableDescription
TRUEnever evaluated
FALSEnever evaluated
0
368 retn.setStyleStrategy(static_cast<QFont::StyleStrategy>(retn.styleStrategy() & ~QFont::PreferNoShaping));
never executed: retn.setStyleStrategy(static_cast<QFont::StyleStrategy>(retn.styleStrategy() & ~QFont::PreferNoShaping));
0
369 else-
370 retn.setStyleStrategy(static_cast<QFont::StyleStrategy>(retn.styleStrategy() | QFont::PreferNoShaping));
never executed: retn.setStyleStrategy(static_cast<QFont::StyleStrategy>(retn.styleStrategy() | QFont::PreferNoShaping));
0
371 }-
372-
373 return retn;
executed 60 times by 3 tests: return retn;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
374 }-
375-
376 static QMatrix4x4 matrix4x4FromObject(QQmlV4Handle object, QV4::ExecutionEngine *v4, bool *ok)-
377 {-
378 if (ok)
okDescription
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-18
379 *ok = false;
executed 18 times by 2 tests: *ok = false;
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
18
380 QV4::Scope scope(v4);-
381 QV4::ScopedArrayObject array(scope, object);-
382 if (!array)
!arrayDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlqt
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
2-16
383 return QMatrix4x4();
executed 2 times by 1 test: return QMatrix4x4();
Executed by:
  • tst_qqmlqt
2
384-
385 if (array->getLength() != 16)
array->getLength() != 16Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlqt
FALSEevaluated 14 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
2-14
386 return QMatrix4x4();
executed 2 times by 1 test: return QMatrix4x4();
Executed by:
  • tst_qqmlqt
2
387-
388 float matVals[16];-
389 QV4::ScopedValue v(scope);-
390 for (quint32 i = 0; i < 16; ++i) {
i < 16Description
TRUEevaluated 224 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
FALSEevaluated 14 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
14-224
391 v = array->get(i);-
392 if (!v->isNumber())
!v->isNumber()Description
TRUEnever evaluated
FALSEevaluated 224 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
0-224
393 return QMatrix4x4();
never executed: return QMatrix4x4();
0
394 matVals[i] = v->asDouble();-
395 }
executed 224 times by 2 tests: end of block
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
224
396-
397 if (ok) *ok = true;
executed 14 times by 2 tests: *ok = true;
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
okDescription
TRUEevaluated 14 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-14
398 return QMatrix4x4(matVals);
executed 14 times by 2 tests: return QMatrix4x4(matVals);
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
14
399 }-
400-
401 const QMetaObject *getMetaObjectForMetaType(int type) override-
402 {-
403 switch (type) {-
404 case QMetaType::QColor:
executed 3248 times by 20 tests: case QMetaType::QColor:
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdynamicpropertyanimation
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickstates
  • tst_scenegraph
3248
405 return &QQuickColorValueType::staticMetaObject;
executed 3248 times by 20 tests: return &QQuickColorValueType::staticMetaObject;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdynamicpropertyanimation
  • tst_qquickflickable
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickstates
  • tst_scenegraph
3248
406 case QMetaType::QFont:
executed 6131 times by 24 tests: case QMetaType::QFont:
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickapplication
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfocusscope
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
6131
407 return &QQuickFontValueType::staticMetaObject;
executed 6131 times by 24 tests: return &QQuickFontValueType::staticMetaObject;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickapplication
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickfocusscope
  • tst_qquickfontloader_static
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquicktaphandler
  • tst_qquicktext
  • tst_qquicktextedit
  • tst_qquicktextinput
6131
408 case QMetaType::QVector2D:
executed 228 times by 3 tests: case QMetaType::QVector2D:
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
228
409 return &QQuickVector2DValueType::staticMetaObject;
executed 228 times by 3 tests: return &QQuickVector2DValueType::staticMetaObject;
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
228
410 case QMetaType::QVector3D:
executed 2512 times by 9 tests: case QMetaType::QVector3D:
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickflipable
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquickworkerscript
2512
411 return &QQuickVector3DValueType::staticMetaObject;
executed 2512 times by 9 tests: return &QQuickVector3DValueType::staticMetaObject;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickflipable
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquickworkerscript
2512
412 case QMetaType::QVector4D:
executed 280 times by 3 tests: case QMetaType::QVector4D:
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
280
413 return &QQuickVector4DValueType::staticMetaObject;
executed 280 times by 3 tests: return &QQuickVector4DValueType::staticMetaObject;
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
280
414 case QMetaType::QQuaternion:
executed 124 times by 3 tests: case QMetaType::QQuaternion:
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
124
415 return &QQuickQuaternionValueType::staticMetaObject;
executed 124 times by 3 tests: return &QQuickQuaternionValueType::staticMetaObject;
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
124
416 case QMetaType::QMatrix4x4:
executed 338 times by 4 tests: case QMetaType::QMatrix4x4:
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickitem2
338
417 return &QQuickMatrix4x4ValueType::staticMetaObject;
executed 338 times by 4 tests: return &QQuickMatrix4x4ValueType::staticMetaObject;
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickitem2
338
418 default:
executed 334581 times by 123 tests: default:
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • ...
334581
419 break;
executed 334581 times by 123 tests: break;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • ...
334581
420 }-
421-
422 return nullptr;
executed 334581 times by 123 tests: return nullptr;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlimport
  • tst_qqmlincubator
  • tst_qqmlinfo
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllistreference
  • tst_qqmllocale
  • tst_qqmlmetaobject
  • ...
334581
423 }-
424-
425 bool init(int type, QVariant& dst) override-
426 {-
427 switch (type) {-
428 case QMetaType::QColor:
executed 198 times by 11 tests: case QMetaType::QColor:
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickdynamicpropertyanimation
  • tst_qquickloader
  • tst_qquickstates
198
429 dst.setValue<QColor>(QColor());-
430 return true;
executed 198 times by 11 tests: return true;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickdynamicpropertyanimation
  • tst_qquickloader
  • tst_qquickstates
198
431 case QMetaType::QFont:
executed 24 times by 3 tests: case QMetaType::QFont:
Executed by:
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickapplication
24
432 dst.setValue<QFont>(QFont());-
433 return true;
executed 24 times by 3 tests: return true;
Executed by:
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickapplication
24
434 case QMetaType::QVector2D:
executed 12 times by 1 test: case QMetaType::QVector2D:
Executed by:
  • tst_qqmlvaluetypeproviders
12
435 dst.setValue<QVector2D>(QVector2D());-
436 return true;
executed 12 times by 1 test: return true;
Executed by:
  • tst_qqmlvaluetypeproviders
12
437 case QMetaType::QVector3D:
executed 10 times by 1 test: case QMetaType::QVector3D:
Executed by:
  • tst_qqmlvaluetypeproviders
10
438 dst.setValue<QVector3D>(QVector3D());-
439 return true;
executed 10 times by 1 test: return true;
Executed by:
  • tst_qqmlvaluetypeproviders
10
440 case QMetaType::QVector4D:
executed 14 times by 1 test: case QMetaType::QVector4D:
Executed by:
  • tst_qqmlvaluetypeproviders
14
441 dst.setValue<QVector4D>(QVector4D());-
442 return true;
executed 14 times by 1 test: return true;
Executed by:
  • tst_qqmlvaluetypeproviders
14
443 case QMetaType::QQuaternion:
executed 8 times by 1 test: case QMetaType::QQuaternion:
Executed by:
  • tst_qqmlvaluetypeproviders
8
444 dst.setValue<QQuaternion>(QQuaternion());-
445 return true;
executed 8 times by 1 test: return true;
Executed by:
  • tst_qqmlvaluetypeproviders
8
446 case QMetaType::QMatrix4x4:
executed 16 times by 1 test: case QMetaType::QMatrix4x4:
Executed by:
  • tst_qqmlvaluetypeproviders
16
447 dst.setValue<QMatrix4x4>(QMatrix4x4());-
448 return true;
executed 16 times by 1 test: return true;
Executed by:
  • tst_qqmlvaluetypeproviders
16
449 default: break;
never executed: break;
never executed: default:
0
450 }-
451-
452 return false;
never executed: return false;
0
453 }-
454-
455 bool create(int type, int argc, const void *argv[], QVariant *v) override-
456 {-
457 switch (type) {-
458 case QMetaType::QFont: // must specify via js-object.
never executed: case QMetaType::QFont:
0
459 break;
never executed: break;
0
460 case QMetaType::QVector2D:
executed 52 times by 3 tests: case QMetaType::QVector2D:
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
52
461 if (argc == 1) {
argc == 1Description
TRUEevaluated 52 times by 3 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
FALSEnever evaluated
0-52
462 const float *xy = reinterpret_cast<const float*>(argv[0]);-
463 QVector2D v2(xy[0], xy[1]);-
464 *v = QVariant(v2);-
465 return true;
executed 52 times by 3 tests: return true;
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
52
466 }-
467 break;
never executed: break;
0
468 case QMetaType::QVector3D:
executed 84 times by 5 tests: case QMetaType::QVector3D:
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickworkerscript
84
469 if (argc == 1) {
argc == 1Description
TRUEevaluated 84 times by 5 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickworkerscript
FALSEnever evaluated
0-84
470 const float *xyz = reinterpret_cast<const float*>(argv[0]);-
471 QVector3D v3(xyz[0], xyz[1], xyz[2]);-
472 *v = QVariant(v3);-
473 return true;
executed 84 times by 5 tests: return true;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickworkerscript
84
474 }-
475 break;
never executed: break;
0
476 case QMetaType::QVector4D:
executed 78 times by 3 tests: case QMetaType::QVector4D:
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
78
477 if (argc == 1) {
argc == 1Description
TRUEevaluated 78 times by 3 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
FALSEnever evaluated
0-78
478 const float *xyzw = reinterpret_cast<const float*>(argv[0]);-
479 QVector4D v4(xyzw[0], xyzw[1], xyzw[2], xyzw[3]);-
480 *v = QVariant(v4);-
481 return true;
executed 78 times by 3 tests: return true;
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
78
482 }-
483 break;
never executed: break;
0
484 case QMetaType::QQuaternion:
executed 18 times by 2 tests: case QMetaType::QQuaternion:
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
18
485 if (argc == 1) {
argc == 1Description
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
FALSEnever evaluated
0-18
486 const qreal *sxyz = reinterpret_cast<const qreal*>(argv[0]);-
487 QQuaternion q(sxyz[0], sxyz[1], sxyz[2], sxyz[3]);-
488 *v = QVariant(q);-
489 return true;
executed 18 times by 2 tests: return true;
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
18
490 }-
491 break;
never executed: break;
0
492 case QMetaType::QMatrix4x4:
executed 56 times by 4 tests: case QMetaType::QMatrix4x4:
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickitem2
56
493 if (argc == 0) {
argc == 0Description
TRUEnever evaluated
FALSEevaluated 56 times by 4 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickitem2
0-56
494 QMatrix4x4 m;-
495 *v = QVariant(m);-
496 return true;
never executed: return true;
0
497 } else if (argc == 1) {
argc == 1Description
TRUEevaluated 56 times by 4 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickitem2
FALSEnever evaluated
0-56
498 const qreal *vals = reinterpret_cast<const qreal*>(argv[0]);-
499 QMatrix4x4 m(vals[0], vals[1], vals[2], vals[3],-
500 vals[4], vals[5], vals[6], vals[7],-
501 vals[8], vals[9], vals[10], vals[11],-
502 vals[12], vals[13], vals[14], vals[15]);-
503 *v = QVariant(m);-
504 return true;
executed 56 times by 4 tests: return true;
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickitem2
56
505 }-
506 break;
never executed: break;
0
507 default: break;
never executed: break;
never executed: default:
0
508 }-
509-
510 return false;
never executed: return false;
0
511 }-
512-
513 template<typename T>-
514 bool createFromStringTyped(void *data, size_t dataSize, T initValue)-
515 {-
516 ASSERT_VALID_SIZE(dataSize, sizeof(T));-
517 T *t = reinterpret_cast<T *>(data);-
518 new (t) T(initValue);-
519 return true;
never executed: return true;
0
520 }-
521-
522 bool createFromString(int type, const QString &s, void *data, size_t dataSize) override-
523 {-
524 bool ok = false;-
525-
526 switch (type) {-
527 case QMetaType::QColor:
never executed: case QMetaType::QColor:
0
528 return createFromStringTyped<QColor>(data, dataSize, QColor(s));
never executed: return createFromStringTyped<QColor>(data, dataSize, QColor(s));
0
529 case QMetaType::QVector2D:
never executed: case QMetaType::QVector2D:
0
530 return createFromStringTyped<QVector2D>(data, dataSize, vector2DFromString(s, &ok));
never executed: return createFromStringTyped<QVector2D>(data, dataSize, vector2DFromString(s, &ok));
0
531 case QMetaType::QVector3D:
never executed: case QMetaType::QVector3D:
0
532 return createFromStringTyped<QVector3D>(data, dataSize, vector3DFromString(s, &ok));
never executed: return createFromStringTyped<QVector3D>(data, dataSize, vector3DFromString(s, &ok));
0
533 case QMetaType::QVector4D:
never executed: case QMetaType::QVector4D:
0
534 return createFromStringTyped<QVector4D>(data, dataSize, vector4DFromString(s, &ok));
never executed: return createFromStringTyped<QVector4D>(data, dataSize, vector4DFromString(s, &ok));
0
535 case QMetaType::QQuaternion:
never executed: case QMetaType::QQuaternion:
0
536 return createFromStringTyped<QQuaternion>(data, dataSize, quaternionFromString(s, &ok));
never executed: return createFromStringTyped<QQuaternion>(data, dataSize, quaternionFromString(s, &ok));
0
537 case QMetaType::QMatrix4x4:
never executed: case QMetaType::QMatrix4x4:
0
538 return createFromStringTyped<QMatrix4x4>(data, dataSize, matrix4x4FromString(s, &ok));
never executed: return createFromStringTyped<QMatrix4x4>(data, dataSize, matrix4x4FromString(s, &ok));
0
539 default: break;
never executed: break;
never executed: default:
0
540 }-
541-
542 return false;
never executed: return false;
0
543 }-
544-
545 bool createStringFrom(int type, const void *data, QString *s) override-
546 {-
547 if (type == QMetaType::QColor) {
type == QMetaType::QColorDescription
TRUEnever evaluated
FALSEnever evaluated
0
548 const QColor *color = reinterpret_cast<const QColor *>(data);-
549 new (s) QString(QVariant(*color).toString());-
550 return true;
never executed: return true;
0
551 }-
552-
553 return false;
never executed: return false;
0
554 }-
555-
556 bool variantFromString(const QString &s, QVariant *v) override-
557 {-
558 QColor c(s);-
559 if (c.isValid()) {
c.isValid()Description
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
FALSEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
6-20
560 *v = QVariant::fromValue(c);-
561 return true;
executed 6 times by 2 tests: return true;
Executed by:
  • tst_examples
  • tst_qquickanimations
6
562 }-
563-
564 bool ok = false;-
565-
566 QVector2D v2 = vector2DFromString(s, &ok);-
567 if (ok) {
okDescription
TRUEnever evaluated
FALSEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
0-20
568 *v = QVariant::fromValue(v2);-
569 return true;
never executed: return true;
0
570 }-
571-
572 QVector3D v3 = vector3DFromString(s, &ok);-
573 if (ok) {
okDescription
TRUEnever evaluated
FALSEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
0-20
574 *v = QVariant::fromValue(v3);-
575 return true;
never executed: return true;
0
576 }-
577-
578 QVector4D v4 = vector4DFromString(s, &ok);-
579 if (ok) {
okDescription
TRUEnever evaluated
FALSEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
0-20
580 *v = QVariant::fromValue(v4);-
581 return true;
never executed: return true;
0
582 }-
583-
584 QQuaternion q = quaternionFromString(s, &ok);-
585 if (ok) {
okDescription
TRUEnever evaluated
FALSEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
0-20
586 *v = QVariant::fromValue(q);-
587 return true;
never executed: return true;
0
588 }-
589-
590 QMatrix4x4 m = matrix4x4FromString(s, &ok);-
591 if (ok) {
okDescription
TRUEnever evaluated
FALSEevaluated 20 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
0-20
592 *v = QVariant::fromValue(m);-
593 return true;
never executed: return true;
0
594 }-
595-
596 return false;
executed 20 times by 5 tests: return false;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qquickimage
  • tst_qquickitem
20
597 }-
598-
599 bool variantFromString(int type, const QString &s, QVariant *v) override-
600 {-
601 bool ok = false;-
602-
603 switch (type) {-
604 case QMetaType::QColor:
executed 80748 times by 27 tests: case QMetaType::QColor:
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlvaluetypeproviders
  • tst_qquickaccessible
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktaphandler
  • tst_qquicktextinput
  • tst_qquickvisualdatamodel
  • tst_qquickwidget
  • ...
80748
605 {-
606 QColor c(s);-
607 *v = QVariant::fromValue(c);-
608 return true;
executed 80748 times by 27 tests: return true;
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmlvaluetypeproviders
  • tst_qquickaccessible
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickfocusscope
  • tst_qquickgridview
  • tst_qquickitem
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickmultipointtoucharea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_qquicktaphandler
  • tst_qquicktextinput
  • tst_qquickvisualdatamodel
  • tst_qquickwidget
  • ...
80748
609 }-
610 case QMetaType::QVector2D:
executed 2 times by 1 test: case QMetaType::QVector2D:
Executed by:
  • tst_qqmlvaluetypeproviders
2
611 {-
612 *v = QVariant::fromValue(vector2DFromString(s, &ok));-
613 return true;
executed 2 times by 1 test: return true;
Executed by:
  • tst_qqmlvaluetypeproviders
2
614 }-
615 case QMetaType::QVector3D:
executed 6 times by 2 tests: case QMetaType::QVector3D:
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlvaluetypeproviders
6
616 {-
617 *v = QVariant::fromValue(vector3DFromString(s, &ok));-
618 return true;
executed 6 times by 2 tests: return true;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlvaluetypeproviders
6
619 }-
620 case QMetaType::QVector4D:
executed 2 times by 1 test: case QMetaType::QVector4D:
Executed by:
  • tst_qqmlvaluetypeproviders
2
621 {-
622 *v = QVariant::fromValue(vector4DFromString(s, &ok));-
623 return true;
executed 2 times by 1 test: return true;
Executed by:
  • tst_qqmlvaluetypeproviders
2
624 }-
625 case QMetaType::QQuaternion:
executed 2 times by 1 test: case QMetaType::QQuaternion:
Executed by:
  • tst_qqmlvaluetypeproviders
2
626 {-
627 *v = QVariant::fromValue(quaternionFromString(s, &ok));-
628 return true;
executed 2 times by 1 test: return true;
Executed by:
  • tst_qqmlvaluetypeproviders
2
629 }-
630 case QMetaType::QMatrix4x4:
executed 2 times by 1 test: case QMetaType::QMatrix4x4:
Executed by:
  • tst_qqmlvaluetypeproviders
2
631 {-
632 *v = QVariant::fromValue(matrix4x4FromString(s, &ok));-
633 return true;
executed 2 times by 1 test: return true;
Executed by:
  • tst_qqmlvaluetypeproviders
2
634 }-
635 default:
executed 40 times by 6 tests: default:
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlproperty
  • tst_qquickdroparea
  • tst_qquickitemlayer
  • tst_qquickshadereffect
40
636 break;
executed 40 times by 6 tests: break;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlproperty
  • tst_qquickdroparea
  • tst_qquickitemlayer
  • tst_qquickshadereffect
40
637 }-
638-
639 return false;
executed 40 times by 6 tests: return false;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlproperty
  • tst_qquickdroparea
  • tst_qquickitemlayer
  • tst_qquickshadereffect
40
640 }-
641-
642 bool variantFromJsObject(int type, QQmlV4Handle object, QV4::ExecutionEngine *v4, QVariant *v) override-
643 {-
644 QV4::Scope scope(v4);-
645#ifndef QT_NO_DEBUG-
646 QV4::ScopedObject obj(scope, object);-
647 Q_ASSERT(obj);-
648#endif-
649 bool ok = false;-
650 switch (type) {-
651 case QMetaType::QFont:
executed 60 times by 3 tests: case QMetaType::QFont:
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
652 *v = QVariant::fromValue(fontFromObject(object, v4, &ok));-
653 break;
executed 60 times by 3 tests: break;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
60
654 case QMetaType::QMatrix4x4:
executed 18 times by 2 tests: case QMetaType::QMatrix4x4:
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
18
655 *v = QVariant::fromValue(matrix4x4FromObject(object, v4, &ok));-
656 default: break;
executed 18 times by 2 tests: break;
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
code before this statement executed 18 times by 2 tests: default:
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
executed 18 times by 2 tests: default:
Executed by:
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
18
657 }-
658-
659 return ok;
executed 78 times by 3 tests: return ok;
Executed by:
  • tst_qqmlbinding
  • tst_qqmlqt
  • tst_qqmlvaluetypeproviders
78
660 }-
661-
662 template<typename T>-
663 bool typedEqual(const void *lhs, const QVariant& rhs)-
664 {-
665 return (*(reinterpret_cast<const T *>(lhs)) == rhs.value<T>());
executed 474 times by 12 tests: return (*(reinterpret_cast<const T *>(lhs)) == rhs.value<T>());
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickapplication
  • tst_qquickdynamicpropertyanimation
  • tst_qquickloader
  • tst_qquickstates
474
666 }-
667-
668 bool equal(int type, const void *lhs, const QVariant &rhs) override-
669 {-
670 switch (type) {-
671 case QMetaType::QColor:
executed 278 times by 11 tests: case QMetaType::QColor:
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickdynamicpropertyanimation
  • tst_qquickloader
  • tst_qquickstates
278
672 return typedEqual<QColor>(lhs, rhs);
executed 278 times by 11 tests: return typedEqual<QColor>(lhs, rhs);
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickdynamicpropertyanimation
  • tst_qquickloader
  • tst_qquickstates
278
673 case QMetaType::QFont:
executed 52 times by 3 tests: case QMetaType::QFont:
Executed by:
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickapplication
52
674 return typedEqual<QFont>(lhs, rhs);
executed 52 times by 3 tests: return typedEqual<QFont>(lhs, rhs);
Executed by:
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickapplication
52
675 case QMetaType::QVector2D:
executed 30 times by 1 test: case QMetaType::QVector2D:
Executed by:
  • tst_qqmlvaluetypeproviders
30
676 return typedEqual<QVector2D>(lhs, rhs);
executed 30 times by 1 test: return typedEqual<QVector2D>(lhs, rhs);
Executed by:
  • tst_qqmlvaluetypeproviders
30
677 case QMetaType::QVector3D:
executed 26 times by 1 test: case QMetaType::QVector3D:
Executed by:
  • tst_qqmlvaluetypeproviders
26
678 return typedEqual<QVector3D>(lhs, rhs);
executed 26 times by 1 test: return typedEqual<QVector3D>(lhs, rhs);
Executed by:
  • tst_qqmlvaluetypeproviders
26
679 case QMetaType::QVector4D:
executed 32 times by 1 test: case QMetaType::QVector4D:
Executed by:
  • tst_qqmlvaluetypeproviders
32
680 return typedEqual<QVector4D>(lhs, rhs);
executed 32 times by 1 test: return typedEqual<QVector4D>(lhs, rhs);
Executed by:
  • tst_qqmlvaluetypeproviders
32
681 case QMetaType::QQuaternion:
executed 18 times by 1 test: case QMetaType::QQuaternion:
Executed by:
  • tst_qqmlvaluetypeproviders
18
682 return typedEqual<QQuaternion>(lhs, rhs);
executed 18 times by 1 test: return typedEqual<QQuaternion>(lhs, rhs);
Executed by:
  • tst_qqmlvaluetypeproviders
18
683 case QMetaType::QMatrix4x4:
executed 38 times by 1 test: case QMetaType::QMatrix4x4:
Executed by:
  • tst_qqmlvaluetypeproviders
38
684 return typedEqual<QMatrix4x4>(lhs, rhs);
executed 38 times by 1 test: return typedEqual<QMatrix4x4>(lhs, rhs);
Executed by:
  • tst_qqmlvaluetypeproviders
38
685 default: break;
never executed: break;
never executed: default:
0
686 }-
687-
688 return false;
never executed: return false;
0
689 }-
690-
691 template<typename T>-
692 bool typedStore(const void *src, void *dst, size_t dstSize)-
693 {-
694 ASSERT_VALID_SIZE(dstSize, sizeof(T));-
695 const T *srcT = reinterpret_cast<const T *>(src);-
696 T *dstT = reinterpret_cast<T *>(dst);-
697 new (dstT) T(*srcT);-
698 return true;
never executed: return true;
0
699 }-
700-
701 bool store(int type, const void *src, void *dst, size_t dstSize) override-
702 {-
703 Q_UNUSED(dstSize);-
704 switch (type) {-
705 case QMetaType::QColor:
executed 27769 times by 82 tests: case QMetaType::QColor:
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • ...
27769
706 {-
707 Q_ASSERT(dstSize >= sizeof(QColor));-
708 const QRgb *rgb = reinterpret_cast<const QRgb *>(src);-
709 QColor *color = reinterpret_cast<QColor *>(dst);-
710 new (color) QColor(QColor::fromRgba(*rgb));-
711 return true;
executed 27769 times by 82 tests: return true;
Executed by:
  • tst_drawingmodes
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlincubator
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmltypeloader
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickaccessible
  • tst_qquickage
  • tst_qquickanchors
  • tst_qquickangleddirection
  • tst_qquickanimatedsprite
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickcumulativedirection
  • tst_qquickcustomaffector
  • ...
27769
712 }-
713 default: break;
never executed: break;
never executed: default:
0
714 }-
715-
716 return false;
never executed: return false;
0
717 }-
718-
719 template<typename T>-
720 bool typedRead(const QVariant& src, int dstType, void *dst)-
721 {-
722 T *dstT = reinterpret_cast<T *>(dst);-
723 if (src.type() == static_cast<uint>(dstType)) {
src.type() == ...uint>(dstType)Description
TRUEevaluated 948 times by 12 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickapplication
  • tst_qquickdynamicpropertyanimation
  • tst_qquickloader
  • tst_qquickstates
FALSEevaluated 168 times by 3 tests
Evaluated by:
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
168-948
724 *dstT = src.value<T>();-
725 } else {
executed 948 times by 12 tests: end of block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickapplication
  • tst_qquickdynamicpropertyanimation
  • tst_qquickloader
  • tst_qquickstates
948
726 *dstT = T();-
727 }
executed 168 times by 3 tests: end of block
Executed by:
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
168
728 return true;
executed 1116 times by 12 tests: return true;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickapplication
  • tst_qquickdynamicpropertyanimation
  • tst_qquickloader
  • tst_qquickstates
1116
729 }-
730-
731 bool read(const QVariant &src, void *dst, int dstType) override-
732 {-
733 switch (dstType) {-
734 case QMetaType::QColor:
executed 556 times by 11 tests: case QMetaType::QColor:
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickdynamicpropertyanimation
  • tst_qquickloader
  • tst_qquickstates
556
735 return typedRead<QColor>(src, dstType, dst);
executed 556 times by 11 tests: return typedRead<QColor>(src, dstType, dst);
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickdynamicpropertyanimation
  • tst_qquickloader
  • tst_qquickstates
556
736 case QMetaType::QFont:
executed 256 times by 3 tests: case QMetaType::QFont:
Executed by:
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickapplication
256
737 return typedRead<QFont>(src, dstType, dst);
executed 256 times by 3 tests: return typedRead<QFont>(src, dstType, dst);
Executed by:
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickapplication
256
738 case QMetaType::QVector2D:
executed 56 times by 1 test: case QMetaType::QVector2D:
Executed by:
  • tst_qqmlvaluetypeproviders
56
739 return typedRead<QVector2D>(src, dstType, dst);
executed 56 times by 1 test: return typedRead<QVector2D>(src, dstType, dst);
Executed by:
  • tst_qqmlvaluetypeproviders
56
740 case QMetaType::QVector3D:
executed 44 times by 1 test: case QMetaType::QVector3D:
Executed by:
  • tst_qqmlvaluetypeproviders
44
741 return typedRead<QVector3D>(src, dstType, dst);
executed 44 times by 1 test: return typedRead<QVector3D>(src, dstType, dst);
Executed by:
  • tst_qqmlvaluetypeproviders
44
742 case QMetaType::QVector4D:
executed 80 times by 1 test: case QMetaType::QVector4D:
Executed by:
  • tst_qqmlvaluetypeproviders
80
743 return typedRead<QVector4D>(src, dstType, dst);
executed 80 times by 1 test: return typedRead<QVector4D>(src, dstType, dst);
Executed by:
  • tst_qqmlvaluetypeproviders
80
744 case QMetaType::QQuaternion:
executed 42 times by 1 test: case QMetaType::QQuaternion:
Executed by:
  • tst_qqmlvaluetypeproviders
42
745 return typedRead<QQuaternion>(src, dstType, dst);
executed 42 times by 1 test: return typedRead<QQuaternion>(src, dstType, dst);
Executed by:
  • tst_qqmlvaluetypeproviders
42
746 case QMetaType::QMatrix4x4:
executed 82 times by 1 test: case QMetaType::QMatrix4x4:
Executed by:
  • tst_qqmlvaluetypeproviders
82
747 return typedRead<QMatrix4x4>(src, dstType, dst);
executed 82 times by 1 test: return typedRead<QMatrix4x4>(src, dstType, dst);
Executed by:
  • tst_qqmlvaluetypeproviders
82
748 default: break;
never executed: break;
never executed: default:
0
749 }-
750-
751 return false;
never executed: return false;
0
752 }-
753-
754 template<typename T>-
755 bool typedWrite(const void *src, QVariant& dst)-
756 {-
757 const T *srcT = reinterpret_cast<const T *>(src);-
758 if (dst.value<T>() != *srcT) {
dst.value<T>() != *srcTDescription
TRUEevaluated 458 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickdynamicpropertyanimation
  • tst_qquickloader
  • tst_qquickstates
FALSEevaluated 16 times by 4 tests
Evaluated by:
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickapplication
  • tst_qquickdynamicpropertyanimation
16-458
759 dst = *srcT;-
760 return true;
executed 458 times by 11 tests: return true;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickdynamicpropertyanimation
  • tst_qquickloader
  • tst_qquickstates
458
761 }-
762 return false;
executed 16 times by 4 tests: return false;
Executed by:
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickapplication
  • tst_qquickdynamicpropertyanimation
16
763 }-
764-
765 bool write(int type, const void *src, QVariant& dst) override-
766 {-
767 switch (type) {-
768 case QMetaType::QColor:
executed 278 times by 11 tests: case QMetaType::QColor:
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickdynamicpropertyanimation
  • tst_qquickloader
  • tst_qquickstates
278
769 return typedWrite<QColor>(src, dst);
executed 278 times by 11 tests: return typedWrite<QColor>(src, dst);
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlmetaobject
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qqmlvaluetypes
  • tst_qquickdynamicpropertyanimation
  • tst_qquickloader
  • tst_qquickstates
278
770 case QMetaType::QFont:
executed 52 times by 3 tests: case QMetaType::QFont:
Executed by:
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickapplication
52
771 return typedWrite<QFont>(src, dst);
executed 52 times by 3 tests: return typedWrite<QFont>(src, dst);
Executed by:
  • tst_qqmlsettings
  • tst_qqmlvaluetypeproviders
  • tst_qquickapplication
52
772 case QMetaType::QVector2D:
executed 30 times by 1 test: case QMetaType::QVector2D:
Executed by:
  • tst_qqmlvaluetypeproviders
30
773 return typedWrite<QVector2D>(src, dst);
executed 30 times by 1 test: return typedWrite<QVector2D>(src, dst);
Executed by:
  • tst_qqmlvaluetypeproviders
30
774 case QMetaType::QVector3D:
executed 26 times by 1 test: case QMetaType::QVector3D:
Executed by:
  • tst_qqmlvaluetypeproviders
26
775 return typedWrite<QVector3D>(src, dst);
executed 26 times by 1 test: return typedWrite<QVector3D>(src, dst);
Executed by:
  • tst_qqmlvaluetypeproviders
26
776 case QMetaType::QVector4D:
executed 32 times by 1 test: case QMetaType::QVector4D:
Executed by:
  • tst_qqmlvaluetypeproviders
32
777 return typedWrite<QVector4D>(src, dst);
executed 32 times by 1 test: return typedWrite<QVector4D>(src, dst);
Executed by:
  • tst_qqmlvaluetypeproviders
32
778 case QMetaType::QQuaternion:
executed 18 times by 1 test: case QMetaType::QQuaternion:
Executed by:
  • tst_qqmlvaluetypeproviders
18
779 return typedWrite<QQuaternion>(src, dst);
executed 18 times by 1 test: return typedWrite<QQuaternion>(src, dst);
Executed by:
  • tst_qqmlvaluetypeproviders
18
780 case QMetaType::QMatrix4x4:
executed 38 times by 1 test: case QMetaType::QMatrix4x4:
Executed by:
  • tst_qqmlvaluetypeproviders
38
781 return typedWrite<QMatrix4x4>(src, dst);
executed 38 times by 1 test: return typedWrite<QMatrix4x4>(src, dst);
Executed by:
  • tst_qqmlvaluetypeproviders
38
782 default: break;
never executed: break;
never executed: default:
0
783 }-
784-
785 return false;
never executed: return false;
0
786 }-
787#undef ASSERT_VALID_SIZE-
788};-
789-
790-
791class QQuickGuiProvider : public QQmlGuiProvider-
792{-
793public:-
794 QQuickApplication *application(QObject *parent) override-
795 {-
796 return new QQuickApplication(parent);
executed 12 times by 4 tests: return new QQuickApplication(parent);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
12
797 }-
798-
799#if QT_CONFIG(im)-
800 QInputMethod *inputMethod() override-
801 {-
802 QInputMethod *im = qGuiApp->inputMethod();-
803 QQmlEngine::setObjectOwnership(im, QQmlEngine::CppOwnership);-
804 return im;
executed 40 times by 2 tests: return im;
Executed by:
  • tst_qqmlvaluetypes
  • tst_qquickapplication
40
805 }-
806#endif-
807-
808 QStyleHints *styleHints() override-
809 {-
810 QStyleHints *sh = qGuiApp->styleHints();-
811 QQmlEngine::setObjectOwnership(sh, QQmlEngine::CppOwnership);-
812 return sh;
executed 2 times by 1 test: return sh;
Executed by:
  • tst_qquickapplication
2
813 }-
814-
815 QStringList fontFamilies() override-
816 {-
817 QFontDatabase database;-
818 return database.families();
executed 4 times by 2 tests: return database.families();
Executed by:
  • tst_examples
  • tst_qqmlqt
4
819 }-
820-
821 bool openUrlExternally(QUrl &url) override-
822 {-
823#ifndef QT_NO_DESKTOPSERVICES-
824 return QDesktopServices::openUrl(url);
executed 8 times by 1 test: return QDesktopServices::openUrl(url);
Executed by:
  • tst_qqmlqt
8
825#else-
826 Q_UNUSED(url);-
827 return false;-
828#endif-
829 }-
830-
831 QString pluginName() const override-
832 {-
833 return QGuiApplication::platformName();
executed 2 times by 1 test: return QGuiApplication::platformName();
Executed by:
  • tst_qquickapplication
2
834 }-
835};-
836-
837-
838static QQuickValueTypeProvider *getValueTypeProvider()-
839{-
840 static QQuickValueTypeProvider valueTypeProvider;-
841 return &valueTypeProvider;
executed 462 times by 132 tests: return &valueTypeProvider;
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
  • ...
462
842}-
843-
844static QQuickColorProvider *getColorProvider()-
845{-
846 static QQuickColorProvider colorProvider;-
847 return &colorProvider;
executed 374 times by 132 tests: return &colorProvider;
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
848}-
849-
850static QQuickGuiProvider *getGuiProvider()-
851{-
852 static QQuickGuiProvider guiProvider;-
853 return &guiProvider;
executed 374 times by 132 tests: return &guiProvider;
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
854}-
855-
856void QQuick_initializeProviders()-
857{-
858 QQml_addValueTypeProvider(getValueTypeProvider());-
859 QQml_setColorProvider(getColorProvider());-
860 QQml_setGuiProvider(getGuiProvider());-
861}
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
862-
863void QQuick_deinitializeProviders()-
864{-
865 QQml_removeValueTypeProvider(getValueTypeProvider());-
866 QQml_setColorProvider(nullptr); // technically, another plugin may have overridden our providers-
867 QQml_setGuiProvider(nullptr); // but we cannot handle that case in a sane way.-
868}
executed 88 times by 3 tests: end of block
Executed by:
  • tst_qmldiskcache
  • tst_qqmlenginecleanup
  • tst_qqmltypeloader
88
869-
870QT_END_NAMESPACE-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0