OpenCoverage

qquickpath.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickpath.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5QQuickPath::QQuickPath(QObject *parent)-
6 : QObject(*(new QQuickPathPrivate), parent)-
7{-
8}
executed 330 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
330
9-
10QQuickPath::QQuickPath(QQuickPathPrivate &dd, QObject *parent)-
11 : QObject(dd, parent)-
12{-
13}
executed 1072 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickshape
1072
14-
15QQuickPath::~QQuickPath()-
16{-
17}-
18-
19-
20-
21-
22-
23-
24qreal QQuickPath::startX() const-
25{-
26 const QQuickPathPrivate * const d = d_func();-
27 return
executed 20 times by 3 tests: return d->startX.isNull ? 0 : d->startX.value;
Executed by:
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
d->startX.isNull ? 0 : d->startX.value;
executed 20 times by 3 tests: return d->startX.isNull ? 0 : d->startX.value;
Executed by:
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
20
28}-
29-
30void QQuickPath::setStartX(qreal x)-
31{-
32 QQuickPathPrivate * const d = d_func();-
33 if (d->startX.isValid()
d->startX.isValid()Description
TRUEevaluated 20 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
FALSEevaluated 408 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
&& qFuzzyCompare(x, d->startX)
qFuzzyCompare(x, d->startX)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEevaluated 18 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
)
2-408
34 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickpathview
2
35 d->startX = x;-
36 startXChanged();-
37 processPath();-
38}
executed 426 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
426
39-
40bool QQuickPath::hasStartX() const-
41{-
42 const QQuickPathPrivate * const d = d_func();-
43 return
executed 24 times by 2 tests: return d->startX.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
d->startX.isValid();
executed 24 times by 2 tests: return d->startX.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
24
44}-
45-
46qreal QQuickPath::startY() const-
47{-
48 const QQuickPathPrivate * const d = d_func();-
49 return
executed 18 times by 2 tests: return d->startY.isNull ? 0 : d->startY.value;
Executed by:
  • tst_qquickpath
  • tst_qquickpathview
d->startY.isNull ? 0 : d->startY.value;
executed 18 times by 2 tests: return d->startY.isNull ? 0 : d->startY.value;
Executed by:
  • tst_qquickpath
  • tst_qquickpathview
18
50}-
51-
52void QQuickPath::setStartY(qreal y)-
53{-
54 QQuickPathPrivate * const d = d_func();-
55 if (d->startY.isValid()
d->startY.isValid()Description
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEevaluated 408 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
&& qFuzzyCompare(y, d->startY)
qFuzzyCompare(y, d->startY)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEevaluated 14 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
)
2-408
56 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickpathview
2
57 d->startY = y;-
58 startYChanged();-
59 processPath();-
60}
executed 422 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
422
61-
62bool QQuickPath::hasStartY() const-
63{-
64 const QQuickPathPrivate * const d = d_func();-
65 return
executed 14 times by 2 tests: return d->startY.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
d->startY.isValid();
executed 14 times by 2 tests: return d->startY.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
14
66}-
67-
68-
69-
70-
71-
72bool QQuickPath::isClosed() const-
73{-
74 const QQuickPathPrivate * const d = d_func();-
75 return
executed 6 times by 2 tests: return d->closed;
Executed by:
  • tst_qquickpath
  • tst_qquickpathview
d->closed;
executed 6 times by 2 tests: return d->closed;
Executed by:
  • tst_qquickpath
  • tst_qquickpathview
6
76}-
77QQmlListProperty<QQuickPathElement> QQuickPath::pathElements()-
78{-
79 return
executed 1448 times by 6 tests: return QQmlListProperty<QQuickPathElement>(this, nullptr, pathElements_append, pathElements_count, pathElements_at, pathElements_clear);
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
QQmlListProperty<QQuickPathElement>(this,
executed 1448 times by 6 tests: return QQmlListProperty<QQuickPathElement>(this, nullptr, pathElements_append, pathElements_count, pathElements_at, pathElements_clear);
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
1448
80 nullptr,
executed 1448 times by 6 tests: return QQmlListProperty<QQuickPathElement>(this, nullptr, pathElements_append, pathElements_count, pathElements_at, pathElements_clear);
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
1448
81 pathElements_append,
executed 1448 times by 6 tests: return QQmlListProperty<QQuickPathElement>(this, nullptr, pathElements_append, pathElements_count, pathElements_at, pathElements_clear);
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
1448
82 pathElements_count,
executed 1448 times by 6 tests: return QQmlListProperty<QQuickPathElement>(this, nullptr, pathElements_append, pathElements_count, pathElements_at, pathElements_clear);
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
1448
83 pathElements_at,
executed 1448 times by 6 tests: return QQmlListProperty<QQuickPathElement>(this, nullptr, pathElements_append, pathElements_count, pathElements_at, pathElements_clear);
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
1448
84 pathElements_clear);
executed 1448 times by 6 tests: return QQmlListProperty<QQuickPathElement>(this, nullptr, pathElements_append, pathElements_count, pathElements_at, pathElements_clear);
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
1448
85}-
86-
87static QQuickPathPrivate *privatePath(QObject *object)-
88{-
89 QQuickPath *path = static_cast<QQuickPath*>(object);-
90-
91 return
executed 10752 times by 6 tests: return QQuickPathPrivate::get(path);
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
QQuickPathPrivate::get(path);
executed 10752 times by 6 tests: return QQuickPathPrivate::get(path);
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
10752
92}-
93-
94QQuickPathElement *QQuickPath::pathElements_at(QQmlListProperty<QQuickPathElement> *property, int index)-
95{-
96 QQuickPathPrivate *d = privatePath(property->object);-
97-
98 return
executed 44 times by 3 tests: return d->_pathElements.at(index);
Executed by:
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
d->_pathElements.at(index);
executed 44 times by 3 tests: return d->_pathElements.at(index);
Executed by:
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
44
99}-
100-
101void QQuickPath::pathElements_append(QQmlListProperty<QQuickPathElement> *property, QQuickPathElement *pathElement)-
102{-
103 QQuickPathPrivate *d = privatePath(property->object);-
104 QQuickPath *path = static_cast<QQuickPath*>(property->object);-
105-
106 d->_pathElements.append(pathElement);-
107-
108 if (d->componentComplete
d->componentCompleteDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEevaluated 10642 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
) {
16-10642
109 QQuickCurve *curve = qobject_cast<QQuickCurve *>(pathElement);-
110 if (curve
curveDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickpathview
)
4-12
111 d->_pathCurves.append(curve);
executed 4 times by 1 test: d->_pathCurves.append(curve);
Executed by:
  • tst_qquickpathview
4
112 else {-
113 QQuickPathAttribute *attribute = qobject_cast<QQuickPathAttribute *>(pathElement);-
114 if (attribute
attributeDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEnever evaluated
&& !d->_attributes.contains(attribute->name())
!d->_attribute...ibute->name())Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickpathview
)
0-12
115 d->_attributes.append(attribute->name());
executed 2 times by 1 test: d->_attributes.append(attribute->name());
Executed by:
  • tst_qquickpathview
2
116 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickpathview
12
117-
118 path->processPath();-
119-
120 connect(pathElement, qFlagLocation("2""changed()" "\0" __FILE__ ":" "299"), path, qFlagLocation("1""processPath()" "\0" __FILE__ ":" "299"));-
121 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquickpathview
16
122}
executed 10658 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
10658
123-
124int QQuickPath::pathElements_count(QQmlListProperty<QQuickPathElement> *property)-
125{-
126 QQuickPathPrivate *d = privatePath(property->object);-
127-
128 return
executed 48 times by 3 tests: return d->_pathElements.count();
Executed by:
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
d->_pathElements.count();
executed 48 times by 3 tests: return d->_pathElements.count();
Executed by:
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
48
129}-
130-
131void QQuickPath::pathElements_clear(QQmlListProperty<QQuickPathElement> *property)-
132{-
133 QQuickPathPrivate *d = privatePath(property->object);-
134 QQuickPath *path = static_cast<QQuickPath*>(property->object);-
135-
136 path->disconnectPathElements();-
137 d->_pathElements.clear();-
138 d->_pathCurves.clear();-
139 d->_pointCache.clear();-
140}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickpathview
2
141-
142void QQuickPath::interpolate(int idx, const QString &name, qreal value)-
143{-
144 QQuickPathPrivate * const d = d_func();-
145 interpolate(d->_attributePoints, idx, name, value);-
146}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickpathview
4
147-
148void QQuickPath::interpolate(QList<AttributePoint> &attributePoints, int idx, const QString &name, qreal value)-
149{-
150 if (!idx
!idxDescription
TRUEevaluated 216 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEevaluated 392 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
)
216-392
151 return;
executed 216 times by 2 tests: return;
Executed by:
  • tst_examples
  • tst_qquickpathview
216
152-
153 qreal lastValue = 0;-
154 qreal lastPercent = 0;-
155 int search = idx - 1;-
156 while(search >= 0
search >= 0Description
TRUEevaluated 394 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickpathview
) {
4-394
157 const AttributePoint &point = attributePoints.at(search);-
158 if (point.values.contains(name)
point.values.contains(name)Description
TRUEevaluated 388 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickpathview
) {
6-388
159 lastValue = point.values.value(name);-
160 lastPercent = point.origpercent;-
161 break;
executed 388 times by 2 tests: break;
Executed by:
  • tst_examples
  • tst_qquickpathview
388
162 }-
163 --search;-
164 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquickpathview
6
165-
166 ++search;-
167-
168 const AttributePoint &curPoint = attributePoints.at(idx);-
169-
170 for (int ii = search; ii < idx
ii < idxDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEevaluated 392 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
; ++ii) {
6-392
171 AttributePoint &point = attributePoints[ii];-
172-
173 qreal val = lastValue + (value - lastValue) * (point.origpercent - lastPercent) / (curPoint.origpercent - lastPercent);-
174 point.values.insert(name, val);-
175 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquickpathview
6
176}
executed 392 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
392
177-
178void QQuickPath::endpoint(const QString &name)-
179{-
180 QQuickPathPrivate * const d = d_func();-
181 const AttributePoint &first = d->_attributePoints.first();-
182 qreal val = first.values.value(name);-
183 for (int ii = d->_attributePoints.count() - 1; ii >= 0
ii >= 0Description
TRUEnever evaluated
FALSEnever evaluated
; ii--) {
0
184 const AttributePoint &point = d->_attributePoints.at(ii);-
185 if (point.values.contains(name)
point.values.contains(name)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
186 for (int jj = ii + 1; jj < d->_attributePoints.count()
jj < d->_attri...Points.count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++jj) {
0
187 AttributePoint &setPoint = d->_attributePoints[jj];-
188 setPoint.values.insert(name, val);-
189 }
never executed: end of block
0
190 return;
never executed: return;
0
191 }-
192 }
never executed: end of block
0
193}
never executed: end of block
0
194-
195void QQuickPath::endpoint(QList<AttributePoint> &attributePoints, const QString &name)-
196{-
197 const AttributePoint &first = attributePoints.first();-
198 qreal val = first.values.value(name);-
199 for (int ii = attributePoints.count() - 1; ii >= 0
ii >= 0Description
TRUEevaluated 80 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEnever evaluated
; ii--) {
0-80
200 const AttributePoint &point = attributePoints.at(ii);-
201 if (point.values.contains(name)
point.values.contains(name)Description
TRUEevaluated 38 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEevaluated 42 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
) {
38-42
202 for (int jj = ii + 1; jj < attributePoints.count()
jj < attributePoints.count()Description
TRUEevaluated 42 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEevaluated 38 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
; ++jj) {
38-42
203 AttributePoint &setPoint = attributePoints[jj];-
204 setPoint.values.insert(name, val);-
205 }
executed 42 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
42
206 return;
executed 38 times by 2 tests: return;
Executed by:
  • tst_examples
  • tst_qquickpathview
38
207 }-
208 }
executed 42 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
42
209}
never executed: end of block
0
210-
211void QQuickPath::processPath()-
212{-
213 QQuickPathPrivate * const d = d_func();-
214-
215 if (!d->componentComplete
!d->componentCompleteDescription
TRUEevaluated 816 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
FALSEevaluated 1528 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
)
816-1528
216 return;
executed 816 times by 6 tests: return;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
816
217-
218 d->_pointCache.clear();-
219 d->prevBez.isValid = false;-
220-
221 if (d->isShapePath
d->isShapePathDescription
TRUEevaluated 1158 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickshape
FALSEevaluated 370 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
) {
370-1158
222-
223 d->_path = createShapePath(QPointF(), QPointF(), d->pathLength, &d->closed);-
224 }
executed 1158 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickshape
else {
1158
225 d->_path = createPath(QPointF(), QPointF(), d->_attributes, d->pathLength, d->_attributePoints, &d->closed);-
226 }
executed 370 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
370
227-
228 changed();-
229}
executed 1528 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
1528
230-
231QPainterPath QQuickPath::createPath(const QPointF &startPoint, const QPointF &endPoint, const QStringList &attributes, qreal &pathLength, QList<AttributePoint> &attributePoints, bool *closed)-
232{-
233 QQuickPathPrivate * const d = d_func();-
234-
235 pathLength = 0;-
236 attributePoints.clear();-
237-
238 if (!d->componentComplete
!d->componentCompleteDescription
TRUEnever evaluated
FALSEevaluated 380 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
)
0-380
239 return
never executed: return QPainterPath();
QPainterPath();
never executed: return QPainterPath();
0
240-
241 QPainterPath path;-
242-
243 AttributePoint first;-
244 for (int ii = 0; ii < attributes.count()
ii < attributes.count()Description
TRUEevaluated 216 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEevaluated 380 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
; ++ii)
216-380
245 first.values[attributes.at(ii)] = 0;
executed 216 times by 2 tests: first.values[attributes.at(ii)] = 0;
Executed by:
  • tst_examples
  • tst_qquickpathview
216
246 attributePoints << first;-
247-
248 qreal startX = d->startX.isValid()
d->startX.isValid()Description
TRUEevaluated 356 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 24 times by 3 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
? d->startX.value : startPoint.x();
24-356
249 qreal startY = d->startY.isValid()
d->startY.isValid()Description
TRUEevaluated 356 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 24 times by 3 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
? d->startY.value : startPoint.y();
24-356
250 path.moveTo(startX, startY);-
251-
252 const QString percentString = ([]() noexcept -> QString { enum { Size = sizeof(u"" "_qfx_percent")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "_qfx_percent" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
253-
254 bool usesPercent = false;-
255 int index = 0;-
256 for (QQuickPathElement *pathElement : qAsConst(d->_pathElements)) {-
257 if (QQuickCurve *curve = qobject_cast<QQuickCurve *>(pathElement)
QQuickCurve *c...>(pathElement)Description
TRUEevaluated 784 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 604 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
) {
604-784
258 QQuickPathData data;-
259 data.index = index;-
260 data.endPoint = endPoint;-
261 data.curves = d->_pathCurves;-
262 curve->addToPath(path, data);-
263 AttributePoint p;-
264 p.origpercent = path.length();-
265 attributePoints << p;-
266 ++index;-
267 }
executed 784 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
else if (QQuickPathAttribute *attribute = qobject_cast<QQuickPathAttribute *>(pathElement)
QQuickPathAttr...>(pathElement)Description
TRUEevaluated 600 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickpathview
) {
4-784
268 AttributePoint &point = attributePoints.last();-
269 point.values[attribute->name()] = attribute->value();-
270 interpolate(attributePoints, attributePoints.count() - 1, attribute->name(), attribute->value());-
271 }
executed 600 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
else if (QQuickPathPercent *percent = qobject_cast<QQuickPathPercent *>(pathElement)
QQuickPathPerc...>(pathElement)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEnever evaluated
) {
0-600
272 AttributePoint &point = attributePoints.last();-
273 point.values[percentString] = percent->value();-
274 interpolate(attributePoints, attributePoints.count() - 1, percentString, percent->value());-
275 usesPercent = true;-
276 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickpathview
4
277 }
executed 1388 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
1388
278-
279-
280 const AttributePoint &last = attributePoints.constLast();-
281 for (int ii = 0; ii < attributes.count()
ii < attributes.count()Description
TRUEevaluated 216 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEevaluated 380 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
; ++ii) {
216-380
282 if (!last.values.contains(attributes.at(ii))
!last.values.c...ibutes.at(ii))Description
TRUEevaluated 38 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEevaluated 178 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
)
38-178
283 endpoint(attributePoints, attributes.at(ii));
executed 38 times by 2 tests: endpoint(attributePoints, attributes.at(ii));
Executed by:
  • tst_examples
  • tst_qquickpathview
38
284 }
executed 216 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
216
285 if (usesPercent
usesPercentDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEevaluated 376 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
&& !last.values.contains(percentString)
!last.values.c...percentString)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEnever evaluated
) {
0-376
286 d->_attributePoints.last().values[percentString] = 1;-
287 interpolate(d->_attributePoints.count() - 1, percentString, 1);-
288 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickpathview
4
289-
290-
291-
292 qreal length = path.length();-
293 qreal prevpercent = 0;-
294 qreal prevorigpercent = 0;-
295 for (int ii = 0; ii < attributePoints.count()
ii < attributePoints.count()Description
TRUEevaluated 1164 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 380 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
; ++ii) {
380-1164
296 const AttributePoint &point = attributePoints.at(ii);-
297 if (point.values.contains(percentString)
point.values.c...percentString)Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEevaluated 1150 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
) {
14-1150
298 if ( ii > 0
ii > 0Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickpathview
) {
4-10
299 qreal scale = (attributePoints[ii].origpercent/length - prevorigpercent) /-
300 (point.values.value(percentString)-prevpercent);-
301 attributePoints[ii].scale = scale;-
302 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_qquickpathview
10
303 attributePoints[ii].origpercent /= length;-
304 attributePoints[ii].percent = point.values.value(percentString);-
305 prevorigpercent = attributePoints.at(ii).origpercent;-
306 prevpercent = attributePoints.at(ii).percent;-
307 }
executed 14 times by 1 test: end of block
Executed by:
  • tst_qquickpathview
else {
14
308 attributePoints[ii].origpercent /= length;-
309 attributePoints[ii].percent = attributePoints.at(ii).origpercent;-
310 }
executed 1150 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
1150
311 }-
312-
313 if (closed
closedDescription
TRUEevaluated 370 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickanimations
) {
10-370
314 QPointF end = path.currentPosition();-
315 *closed = length > 0
length > 0Description
TRUEevaluated 352 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 18 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpathview
&& startX == end.x()
startX == end.x()Description
TRUEevaluated 178 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 174 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
&& startY == end.y()
startY == end.y()Description
TRUEevaluated 142 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
FALSEevaluated 36 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
;
18-352
316 }
executed 370 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
370
317 pathLength = length;-
318-
319 return
executed 380 times by 5 tests: return path;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
path;
executed 380 times by 5 tests: return path;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
380
320}-
321-
322QPainterPath QQuickPath::createShapePath(const QPointF &startPoint, const QPointF &endPoint, qreal &pathLength, bool *closed)-
323{-
324 QQuickPathPrivate * const d = d_func();-
325-
326 if (!d->componentComplete
!d->componentCompleteDescription
TRUEnever evaluated
FALSEevaluated 1158 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickshape
)
0-1158
327 return
never executed: return QPainterPath();
QPainterPath();
never executed: return QPainterPath();
0
328-
329 QPainterPath path;-
330-
331 qreal startX = d->startX.isValid()
d->startX.isValid()Description
TRUEevaluated 176 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickshape
FALSEevaluated 982 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickshape
? d->startX.value : startPoint.x();
176-982
332 qreal startY = d->startY.isValid()
d->startY.isValid()Description
TRUEevaluated 176 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickshape
FALSEevaluated 982 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickshape
? d->startY.value : startPoint.y();
176-982
333 path.moveTo(startX, startY);-
334-
335 int index = 0;-
336 for (QQuickCurve *curve : qAsConst(d->_pathCurves)) {-
337 QQuickPathData data;-
338 data.index = index;-
339 data.endPoint = endPoint;-
340 data.curves = d->_pathCurves;-
341 curve->addToPath(path, data);-
342 ++index;-
343 }
executed 9580 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickshape
9580
344-
345 if (closed
closedDescription
TRUEevaluated 1158 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickshape
FALSEnever evaluated
) {
0-1158
346 QPointF end = path.currentPosition();-
347 *closed = startX == end.x()
startX == end.x()Description
TRUEevaluated 66 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickshape
FALSEevaluated 1092 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickshape
&& startY == end.y()
startY == end.y()Description
TRUEevaluated 58 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickshape
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_examples
;
8-1092
348 }
executed 1158 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickshape
1158
349-
350-
351-
352-
353 pathLength = 0;-
354-
355 return
executed 1158 times by 2 tests: return path;
Executed by:
  • tst_examples
  • tst_qquickshape
path;
executed 1158 times by 2 tests: return path;
Executed by:
  • tst_examples
  • tst_qquickshape
1158
356}-
357-
358void QQuickPath::classBegin()-
359{-
360 QQuickPathPrivate * const d = d_func();-
361 d->componentComplete = false;-
362}
executed 1402 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
1402
363-
364void QQuickPath::disconnectPathElements()-
365{-
366 const QQuickPathPrivate * const d = d_func();-
367-
368 for (QQuickPathElement *pathElement : d->_pathElements)-
369 disconnect(pathElement, qFlagLocation("2""changed()" "\0" __FILE__ ":" "548"), this, qFlagLocation("1""processPath()" "\0" __FILE__ ":" "548"));
executed 10 times by 1 test: disconnect(pathElement, qFlagLocation("2""changed()" "\0" __FILE__ ":" "548"), this, qFlagLocation("1""processPath()" "\0" __FILE__ ":" "548"));
Executed by:
  • tst_qquickpathview
10
370}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickpathview
2
371-
372void QQuickPath::connectPathElements()-
373{-
374 const QQuickPathPrivate * const d = d_func();-
375-
376 for (QQuickPathElement *pathElement : d->_pathElements)-
377 connect(pathElement, qFlagLocation("2""changed()" "\0" __FILE__ ":" "556"), this, qFlagLocation("1""processPath()" "\0" __FILE__ ":" "556"));
executed 10642 times by 6 tests: connect(pathElement, qFlagLocation("2""changed()" "\0" __FILE__ ":" "556"), this, qFlagLocation("1""processPath()" "\0" __FILE__ ":" "556"));
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
10642
378}
executed 1402 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
1402
379-
380void QQuickPath::gatherAttributes()-
381{-
382 QQuickPathPrivate * const d = d_func();-
383-
384 QSet<QString> attributes;-
385-
386-
387 for (QQuickPathElement *pathElement : qAsConst(d->_pathElements)) {-
388 if (QQuickCurve *curve = qobject_cast<QQuickCurve *>(pathElement)
QQuickCurve *c...>(pathElement)Description
TRUEevaluated 10100 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
FALSEevaluated 542 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
)
542-10100
389 d->_pathCurves.append(curve);
executed 10100 times by 6 tests: d->_pathCurves.append(curve);
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
10100
390 else if (QQuickPathAttribute *attribute = qobject_cast<QQuickPathAttribute *>(pathElement)
QQuickPathAttr...>(pathElement)Description
TRUEevaluated 538 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickpathview
)
4-538
391 attributes.insert(attribute->name());
executed 538 times by 2 tests: attributes.insert(attribute->name());
Executed by:
  • tst_examples
  • tst_qquickpathview
538
392 }
executed 10642 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
10642
393-
394 d->_attributes = attributes.toList();-
395}
executed 1402 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
1402
396-
397void QQuickPath::componentComplete()-
398{-
399 QQuickPathPrivate * const d = d_func();-
400 d->componentComplete = true;-
401-
402 gatherAttributes();-
403-
404 processPath();-
405-
406 connectPathElements();-
407}
executed 1402 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
1402
408-
409QPainterPath QQuickPath::path() const-
410{-
411 const QQuickPathPrivate * const d = d_func();-
412 return
executed 1239 times by 4 tests: return d->_path;
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
d->_path;
executed 1239 times by 4 tests: return d->_path;
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
1239
413}-
414-
415QStringList QQuickPath::attributes() const-
416{-
417 const QQuickPathPrivate * const d = d_func();-
418 if (!d->componentComplete
!d->componentCompleteDescription
TRUEnever evaluated
FALSEevaluated 44259 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
) {
0-44259
419 QSet<QString> attrs;-
420-
421-
422 for (QQuickPathElement *pathElement : d->_pathElements) {-
423 if (QQuickPathAttribute *attribute =
QQuickPathAttr...>(pathElement)Description
TRUEnever evaluated
FALSEnever evaluated
0
424 qobject_cast<QQuickPathAttribute *>(pathElement)
QQuickPathAttr...>(pathElement)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
425 attrs.insert(attribute->name());
never executed: attrs.insert(attribute->name());
0
426 }
never executed: end of block
0
427 return
never executed: return attrs.toList();
attrs.toList();
never executed: return attrs.toList();
0
428 }-
429 return
executed 44259 times by 3 tests: return d->_attributes;
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
d->_attributes;
executed 44259 times by 3 tests: return d->_attributes;
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
44259
430}-
431-
432static inline QBezier nextBezier(const QPainterPath &path, int *current, qreal *bezLength, bool reverse = false)-
433{-
434 const int lastElement = reverse
reverseDescription
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 708 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
? 0 : path.elementCount() - 1;
18-708
435 const int start = reverse
reverseDescription
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 708 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
? *current - 1 : *current + 1;
18-708
436 for (int i=start; reverse
reverseDescription
TRUEnever evaluated
FALSEnever evaluated
? i >= lastElement : i <= lastElement
reverse ? i >=...<= lastElementDescription
TRUEevaluated 1554 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEnever evaluated
; reverse ? --i : ++i) {
0-1554
437 const QPainterPath::Element &e = path.elementAt(i);-
438-
439 switch (e.type) {-
440 case
executed 332 times by 5 tests: case QPainterPath::MoveToElement:
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
QPainterPath::MoveToElement:
executed 332 times by 5 tests: case QPainterPath::MoveToElement:
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
332
441 break;
executed 332 times by 5 tests: break;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
332
442 case
executed 234 times by 5 tests: case QPainterPath::LineToElement:
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
QPainterPath::LineToElement:
executed 234 times by 5 tests: case QPainterPath::LineToElement:
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
234
443 {-
444 QLineF line(path.elementAt(i-1), e);-
445 *bezLength = line.length();-
446 QPointF a = path.elementAt(i-1);-
447 QPointF delta = e - a;-
448 *current = i;-
449 return
executed 234 times by 5 tests: return QBezier::fromPoints(a, a + delta / 3, a + 2 * delta / 3, e);
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
QBezier::fromPoints(a, a + delta / 3, a + 2 * delta / 3, e);
executed 234 times by 5 tests: return QBezier::fromPoints(a, a + delta / 3, a + 2 * delta / 3, e);
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
234
450 }-
451 case
executed 492 times by 4 tests: case QPainterPath::CurveToElement:
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
QPainterPath::CurveToElement:
executed 492 times by 4 tests: case QPainterPath::CurveToElement:
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
492
452 {-
453 QBezier b = QBezier::fromPoints(path.elementAt(i-1),-
454 e,-
455 path.elementAt(i+1),-
456 path.elementAt(i+2));-
457 *bezLength = b.length();-
458 *current = i;-
459 return
executed 492 times by 4 tests: return b;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
b;
executed 492 times by 4 tests: return b;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
492
460 }-
461 default
executed 496 times by 4 tests: default:
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
:
executed 496 times by 4 tests: default:
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
496
462 break;
executed 496 times by 4 tests: break;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
496
463 }-
464 }-
465 *current = lastElement;-
466 *bezLength = 0;-
467 return
never executed: return QBezier();
QBezier();
never executed: return QBezier();
0
468}-
469-
470static inline int segmentCount(const QPainterPath &path, qreal pathLength)-
471{-
472-
473-
474 if (path.elementCount() == 2
path.elementCount() == 2Description
TRUEevaluated 68 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 236 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
68-236
475 && path.elementAt(0).type == QPainterPath::MoveToElement
path.elementAt...:MoveToElementDescription
TRUEevaluated 68 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEnever evaluated
0-68
476 && path.elementAt(1).type == QPainterPath::LineToElement
path.elementAt...:LineToElementDescription
TRUEevaluated 68 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEnever evaluated
) {
0-68
477 return
executed 68 times by 4 tests: return 1;
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
1;
executed 68 times by 4 tests: return 1;
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
68
478 }-
479-
480-
481 return
executed 236 times by 3 tests: return qCeil(pathLength*5);
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
qCeil(pathLength*5);
executed 236 times by 3 tests: return qCeil(pathLength*5);
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
236
482}-
483-
484-
485static inline qreal slopeAt(qreal t, qreal a, qreal b, qreal c, qreal d)-
486{-
487 return
executed 76 times by 2 tests: return 3*t*t*(d - 3*c + 3*b - a) + 6*t*(c - 2*b + a) + 3*(b - a);
Executed by:
  • tst_examples
  • tst_qquickanimations
3*t*t*(d - 3*c + 3*b - a) + 6*t*(c - 2*b + a) + 3*(b - a);
executed 76 times by 2 tests: return 3*t*t*(d - 3*c + 3*b - a) + 6*t*(c - 2*b + a) + 3*(b - a);
Executed by:
  • tst_examples
  • tst_qquickanimations
76
488}-
489-
490void QQuickPath::createPointCache() const-
491{-
492 const QQuickPathPrivate * const d = d_func();-
493 qreal pathLength = d->pathLength;-
494 if (pathLength <= 0
pathLength <= 0Description
TRUEevaluated 40 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEevaluated 304 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
|| qt_is_nan(pathLength)
qt_is_nan(pathLength)Description
TRUEnever evaluated
FALSEevaluated 304 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
)
0-304
495 return;
executed 40 times by 1 test: return;
Executed by:
  • tst_qquickpathview
40
496-
497 const int segments = segmentCount(d->_path, pathLength);-
498 const int lastElement = d->_path.elementCount() - 1;-
499 d->_pointCache.resize(segments+1);-
500-
501 int currElement = -1;-
502 qreal bezLength = 0;-
503 QBezier currBez = nextBezier(d->_path, &currElement, &bezLength);-
504 qreal currLength = bezLength;-
505 qreal epc = currLength / pathLength;-
506-
507 for (int i = 0; i < d->_pointCache.size()
i < d->_pointCache.size()Description
TRUEevaluated 824862 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 304 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
; i++) {
304-824862
508-
509 qreal prevPercent = 0;-
510 qreal prevOrigPercent = 0;-
511 for (int ii = 0; ii < d->_attributePoints.count()
ii < d->_attri...Points.count()Description
TRUEevaluated 2264210 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEnever evaluated
; ++ii) {
0-2264210
512 qreal percent = qreal(i)/segments;-
513 const AttributePoint &point = d->_attributePoints.at(ii);-
514 if (percent < point.percent
percent < point.percentDescription
TRUEevaluated 824558 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 1439652 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
|| ii == d->_attributePoints.count() - 1
ii == d->_attr...ts.count() - 1Description
TRUEevaluated 304 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 1439348 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
) {
304-1439652
515 qreal elementPercent = (percent - prevPercent);-
516-
517 qreal spc = prevOrigPercent + elementPercent * point.scale;-
518-
519 while (spc > epc
spc > epcDescription
TRUEevaluated 358 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
FALSEevaluated 824862 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
) {
358-824862
520 if (currElement > lastElement
currElement > lastElementDescription
TRUEnever evaluated
FALSEevaluated 358 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
)
0-358
521 break;
never executed: break;
0
522 currBez = nextBezier(d->_path, &currElement, &bezLength);-
523 if (bezLength == 0.0
bezLength == 0.0Description
TRUEnever evaluated
FALSEevaluated 358 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
) {
0-358
524 currLength = pathLength;-
525 epc = 1.0;-
526 break;
never executed: break;
0
527 }-
528 currLength += bezLength;-
529 epc = currLength / pathLength;-
530 }
executed 358 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
358
531 qreal realT = (pathLength * spc - (currLength - bezLength)) / bezLength;-
532 d->_pointCache[i] = currBez.pointAt(qBound(qreal(0), realT, qreal(1)));-
533 break;
executed 824862 times by 4 tests: break;
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
824862
534 }-
535 prevOrigPercent = point.origpercent;-
536 prevPercent = point.percent;-
537 }
executed 1439348 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
1439348
538 }
executed 824862 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
824862
539}
executed 304 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
304
540-
541void QQuickPath::invalidateSequentialHistory() const-
542{-
543 const QQuickPathPrivate * const d = d_func();-
544 d->prevBez.isValid = false;-
545}
executed 24 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
24
546-
547QPointF QQuickPath::sequentialPointAt(qreal p, qreal *angle) const-
548{-
549 const QQuickPathPrivate * const d = d_func();-
550 return
executed 186 times by 2 tests: return sequentialPointAt(d->_path, d->pathLength, d->_attributePoints, d->prevBez, p, angle);
Executed by:
  • tst_examples
  • tst_qquickanimations
sequentialPointAt(d->_path, d->pathLength, d->_attributePoints, d->prevBez, p, angle);
executed 186 times by 2 tests: return sequentialPointAt(d->_path, d->pathLength, d->_attributePoints, d->prevBez, p, angle);
Executed by:
  • tst_examples
  • tst_qquickanimations
186
551}-
552-
553QPointF QQuickPath::sequentialPointAt(const QPainterPath &path, const qreal &pathLength, const QList<AttributePoint> &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle)-
554{-
555 ((p >= 0.0 && p <= 1.0) ? static_cast<void>(0) : qt_assert("p >= 0.0 && p <= 1.0", __FILE__, 734));-
556-
557 if (!prevBez.isValid
!prevBez.isValidDescription
TRUEevaluated 32 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
FALSEevaluated 281 times by 1 test
Evaluated by:
  • tst_qquickanimations
)
32-281
558 return
executed 32 times by 2 tests: return p > .5 ? backwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle) : forwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle);
Executed by:
  • tst_examples
  • tst_qquickanimations
p > .5 ? backwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle) :
executed 32 times by 2 tests: return p > .5 ? backwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle) : forwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle);
Executed by:
  • tst_examples
  • tst_qquickanimations
32
559 forwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle);
executed 32 times by 2 tests: return p > .5 ? backwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle) : forwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle);
Executed by:
  • tst_examples
  • tst_qquickanimations
32
560-
561 return
executed 281 times by 1 test: return p < prevBez.p ? backwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle) : forwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle);
Executed by:
  • tst_qquickanimations
p < prevBez.p ? backwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle) :
executed 281 times by 1 test: return p < prevBez.p ? backwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle) : forwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle);
Executed by:
  • tst_qquickanimations
281
562 forwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle);
executed 281 times by 1 test: return p < prevBez.p ? backwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle) : forwardsPointAt(path, pathLength, attributePoints, prevBez, p, angle);
Executed by:
  • tst_qquickanimations
281
563}-
564-
565QPointF QQuickPath::forwardsPointAt(const QPainterPath &path, const qreal &pathLength, const QList<AttributePoint> &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle)-
566{-
567 if (pathLength <= 0
pathLength <= 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 265 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
|| qt_is_nan(pathLength)
qt_is_nan(pathLength)Description
TRUEnever evaluated
FALSEevaluated 265 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
)
0-265
568 return
executed 2 times by 1 test: return path.pointAtPercent(0);
Executed by:
  • tst_qquickanimations
path.pointAtPercent(0);
executed 2 times by 1 test: return path.pointAtPercent(0);
Executed by:
  • tst_qquickanimations
2
569-
570 const int lastElement = path.elementCount() - 1;-
571 bool haveCachedBez = prevBez.isValid;-
572 int currElement = haveCachedBez
haveCachedBezDescription
TRUEevaluated 237 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 28 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
? prevBez.element : -1;
28-237
573 qreal bezLength = haveCachedBez
haveCachedBezDescription
TRUEevaluated 237 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 28 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
? prevBez.bezLength : 0;
28-237
574 QBezier currBez = haveCachedBez
haveCachedBezDescription
TRUEevaluated 237 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 28 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
? prevBez.bezier : nextBezier(path, &currElement, &bezLength);
28-237
575 qreal currLength = haveCachedBez
haveCachedBezDescription
TRUEevaluated 237 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 28 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
? prevBez.currLength : bezLength;
28-237
576 qreal epc = currLength / pathLength;-
577-
578-
579 qreal prevPercent = 0;-
580 qreal prevOrigPercent = 0;-
581 for (int ii = 0; ii < attributePoints.count()
ii < attributePoints.count()Description
TRUEevaluated 696 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
FALSEnever evaluated
; ++ii) {
0-696
582 qreal percent = p;-
583 const AttributePoint &point = attributePoints.at(ii);-
584 if (percent < point.percent
percent < point.percentDescription
TRUEevaluated 235 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
FALSEevaluated 461 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
|| ii == attributePoints.count() - 1
ii == attribut...ts.count() - 1Description
TRUEevaluated 30 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 431 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
) {
30-461
585 qreal elementPercent = (percent - prevPercent);-
586-
587 qreal spc = prevOrigPercent + elementPercent * point.scale;-
588-
589 while (spc > epc
spc > epcDescription
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 265 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
) {
18-265
590 ((!(currElement > lastElement)) ? static_cast<void>(0) : qt_assert("!(currElement > lastElement)", __FILE__, 769));-
591 (void)lastElement;;-
592 currBez = nextBezier(path, &currElement, &bezLength);-
593 currLength += bezLength;-
594 epc = currLength / pathLength;-
595 }
executed 18 times by 1 test: end of block
Executed by:
  • tst_qquickanimations
18
596 prevBez.element = currElement;-
597 prevBez.bezLength = bezLength;-
598 prevBez.currLength = currLength;-
599 prevBez.bezier = currBez;-
600 prevBez.p = p;-
601 prevBez.isValid = true;-
602-
603 qreal realT = (pathLength * spc - (currLength - bezLength)) / bezLength;-
604-
605 if (angle
angleDescription
TRUEevaluated 32 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
FALSEevaluated 233 times by 1 test
Evaluated by:
  • tst_qquickanimations
) {
32-233
606 qreal m1 = slopeAt(realT, currBez.x1, currBez.x2, currBez.x3, currBez.x4);-
607 qreal m2 = slopeAt(realT, currBez.y1, currBez.y2, currBez.y3, currBez.y4);-
608 *angle = QLineF(0, 0, m1, m2).angle();-
609 }
executed 32 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
32
610-
611 return
executed 265 times by 2 tests: return currBez.pointAt(qBound(qreal(0), realT, qreal(1)));
Executed by:
  • tst_examples
  • tst_qquickanimations
currBez.pointAt(qBound(qreal(0), realT, qreal(1)));
executed 265 times by 2 tests: return currBez.pointAt(qBound(qreal(0), realT, qreal(1)));
Executed by:
  • tst_examples
  • tst_qquickanimations
265
612 }-
613 prevOrigPercent = point.origpercent;-
614 prevPercent = point.percent;-
615 }
executed 431 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
431
616-
617 return
never executed: return QPointF(0,0);
QPointF(0,0);
never executed: return QPointF(0,0);
0
618}-
619-
620-
621QPointF QQuickPath::backwardsPointAt(const QPainterPath &path, const qreal &pathLength, const QList<AttributePoint> &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle)-
622{-
623 if (pathLength <= 0
pathLength <= 0Description
TRUEnever evaluated
FALSEevaluated 46 times by 1 test
Evaluated by:
  • tst_qquickanimations
|| qt_is_nan(pathLength)
qt_is_nan(pathLength)Description
TRUEnever evaluated
FALSEevaluated 46 times by 1 test
Evaluated by:
  • tst_qquickanimations
)
0-46
624 return
never executed: return path.pointAtPercent(0);
path.pointAtPercent(0);
never executed: return path.pointAtPercent(0);
0
625-
626 const int firstElement = 1;-
627 bool haveCachedBez = prevBez.isValid;-
628 int currElement = haveCachedBez
haveCachedBezDescription
TRUEevaluated 44 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickanimations
? prevBez.element : path.elementCount();
2-44
629 qreal bezLength = haveCachedBez
haveCachedBezDescription
TRUEevaluated 44 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickanimations
? prevBez.bezLength : 0;
2-44
630 QBezier currBez = haveCachedBez
haveCachedBezDescription
TRUEevaluated 44 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickanimations
? prevBez.bezier : nextBezier(path, &currElement, &bezLength, true );
2-44
631 qreal currLength = haveCachedBez
haveCachedBezDescription
TRUEevaluated 44 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickanimations
? prevBez.currLength : pathLength;
2-44
632 qreal prevLength = currLength - bezLength;-
633 qreal epc = prevLength / pathLength;-
634-
635 for (int ii = attributePoints.count() - 1; ii > 0
ii > 0Description
TRUEevaluated 112 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEnever evaluated
; --ii) {
0-112
636 qreal percent = p;-
637 const AttributePoint &point = attributePoints.at(ii);-
638 const AttributePoint &prevPoint = attributePoints.at(ii-1);-
639 if (percent > prevPoint.percent
percent > prevPoint.percentDescription
TRUEevaluated 38 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 74 times by 1 test
Evaluated by:
  • tst_qquickanimations
|| ii == 1
ii == 1Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 66 times by 1 test
Evaluated by:
  • tst_qquickanimations
) {
8-74
640 qreal elementPercent = (percent - prevPoint.percent);-
641-
642 qreal spc = prevPoint.origpercent + elementPercent * point.scale;-
643-
644 while (spc < epc
spc < epcDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 46 times by 1 test
Evaluated by:
  • tst_qquickanimations
) {
16-46
645 ((!(currElement < firstElement)) ? static_cast<void>(0) : qt_assert("!(currElement < firstElement)", __FILE__, 824));-
646 (void)firstElement;;-
647 currBez = nextBezier(path, &currElement, &bezLength, true );-
648-
649-
650 currLength = (
(currElement == firstElement)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickanimations
currElement == firstElement)
(currElement == firstElement)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickanimations
? bezLength : prevLength;
6-10
651 prevLength = currLength - bezLength;-
652 epc = prevLength / pathLength;-
653 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquickanimations
16
654 prevBez.element = currElement;-
655 prevBez.bezLength = bezLength;-
656 prevBez.currLength = currLength;-
657 prevBez.bezier = currBez;-
658 prevBez.p = p;-
659 prevBez.isValid = true;-
660-
661 qreal realT = (pathLength * spc - (currLength - bezLength)) / bezLength;-
662-
663 if (angle
angleDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 40 times by 1 test
Evaluated by:
  • tst_qquickanimations
) {
6-40
664 qreal m1 = slopeAt(realT, currBez.x1, currBez.x2, currBez.x3, currBez.x4);-
665 qreal m2 = slopeAt(realT, currBez.y1, currBez.y2, currBez.y3, currBez.y4);-
666 *angle = QLineF(0, 0, m1, m2).angle();-
667 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquickanimations
6
668-
669 return
executed 46 times by 1 test: return currBez.pointAt(qBound(qreal(0), realT, qreal(1)));
Executed by:
  • tst_qquickanimations
currBez.pointAt(qBound(qreal(0), realT, qreal(1)));
executed 46 times by 1 test: return currBez.pointAt(qBound(qreal(0), realT, qreal(1)));
Executed by:
  • tst_qquickanimations
46
670 }-
671 }
executed 66 times by 1 test: end of block
Executed by:
  • tst_qquickanimations
66
672-
673 return
never executed: return QPointF(0,0);
QPointF(0,0);
never executed: return QPointF(0,0);
0
674}-
675-
676QPointF QQuickPath::pointAt(qreal p) const-
677{-
678 const QQuickPathPrivate * const d = d_func();-
679 if (d->_pointCache.isEmpty()
d->_pointCache.isEmpty()Description
TRUEevaluated 344 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 71609 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
) {
344-71609
680 createPointCache();-
681 if (d->_pointCache.isEmpty()
d->_pointCache.isEmpty()Description
TRUEevaluated 40 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEevaluated 304 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
)
40-304
682 return
executed 40 times by 1 test: return QPointF();
Executed by:
  • tst_qquickpathview
QPointF();
executed 40 times by 1 test: return QPointF();
Executed by:
  • tst_qquickpathview
40
683 }
executed 304 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
304
684-
685 const int segmentCount = d->_pointCache.size() - 1;-
686 qreal idxf = p*segmentCount;-
687 int idx1 = qFloor(idxf);-
688 qreal delta = idxf - idx1;-
689 if (idx1 > segmentCount
idx1 > segmentCountDescription
TRUEnever evaluated
FALSEevaluated 71913 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
)
0-71913
690 idx1 = segmentCount;
never executed: idx1 = segmentCount;
0
691 else if (idx1 < 0
idx1 < 0Description
TRUEnever evaluated
FALSEevaluated 71913 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
)
0-71913
692 idx1 = 0;
never executed: idx1 = 0;
0
693-
694 if (delta == 0.0
delta == 0.0Description
TRUEevaluated 5011 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
FALSEevaluated 66902 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
)
5011-66902
695 return
executed 5011 times by 4 tests: return d->_pointCache.at(idx1);
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
d->_pointCache.at(idx1);
executed 5011 times by 4 tests: return d->_pointCache.at(idx1);
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
5011
696-
697-
698 int idx2 = qCeil(idxf);-
699 if (idx2 > segmentCount
idx2 > segmentCountDescription
TRUEnever evaluated
FALSEevaluated 66902 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
)
0-66902
700 idx2 = segmentCount;
never executed: idx2 = segmentCount;
0
701 else if (idx2 < 0
idx2 < 0Description
TRUEnever evaluated
FALSEevaluated 66902 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
)
0-66902
702 idx2 = 0;
never executed: idx2 = 0;
0
703-
704 QPointF p1 = d->_pointCache.at(idx1);-
705 QPointF p2 = d->_pointCache.at(idx2);-
706 QPointF pos = p1 * (1.0-delta) + p2 * delta;-
707-
708 return
executed 66902 times by 4 tests: return pos;
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
pos;
executed 66902 times by 4 tests: return pos;
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickvisualdatamodel
66902
709}-
710-
711qreal QQuickPath::attributeAt(const QString &name, qreal percent) const-
712{-
713 const QQuickPathPrivate * const d = d_func();-
714 if (percent < 0
percent < 0Description
TRUEnever evaluated
FALSEevaluated 5156 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
|| percent > 1
percent > 1Description
TRUEevaluated 244 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEevaluated 4912 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
)
0-5156
715 return
executed 244 times by 1 test: return 0;
Executed by:
  • tst_qquickpathview
0;
executed 244 times by 1 test: return 0;
Executed by:
  • tst_qquickpathview
244
716-
717 for (int ii = 0; ii < d->_attributePoints.count()
ii < d->_attri...Points.count()Description
TRUEevaluated 11116 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickpathview
; ++ii) {
24-11116
718 const AttributePoint &point = d->_attributePoints.at(ii);-
719-
720 if (point.percent == percent
point.percent == percentDescription
TRUEevaluated 1452 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEevaluated 9664 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
) {
1452-9664
721 return
executed 1452 times by 2 tests: return point.values.value(name);
Executed by:
  • tst_examples
  • tst_qquickpathview
point.values.value(name);
executed 1452 times by 2 tests: return point.values.value(name);
Executed by:
  • tst_examples
  • tst_qquickpathview
1452
722 } else if (point.percent > percent
point.percent > percentDescription
TRUEevaluated 3436 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEevaluated 6228 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
) {
3436-6228
723 qreal lastValue =-
724 ii
iiDescription
TRUEevaluated 3436 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEnever evaluated
?(d->_attributePoints.at(ii - 1).values.value(name)):0;
0-3436
725 qreal lastPercent =-
726 ii
iiDescription
TRUEevaluated 3436 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEnever evaluated
?(d->_attributePoints.at(ii - 1).percent):0;
0-3436
727 qreal curValue = point.values.value(name);-
728 qreal curPercent = point.percent;-
729-
730 return
executed 3436 times by 2 tests: return lastValue + (curValue - lastValue) * (percent - lastPercent) / (curPercent - lastPercent);
Executed by:
  • tst_examples
  • tst_qquickpathview
lastValue + (curValue - lastValue) * (percent - lastPercent) / (curPercent - lastPercent);
executed 3436 times by 2 tests: return lastValue + (curValue - lastValue) * (percent - lastPercent) / (curPercent - lastPercent);
Executed by:
  • tst_examples
  • tst_qquickpathview
3436
731 }-
732 }
executed 6228 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
6228
733-
734 return
executed 24 times by 1 test: return 0;
Executed by:
  • tst_qquickpathview
0;
executed 24 times by 1 test: return 0;
Executed by:
  • tst_qquickpathview
24
735}-
736-
737-
738-
739qreal QQuickCurve::x() const-
740{-
741 return
executed 10344 times by 6 tests: return _x.isNull ? 0 : _x.value;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
_x.isNull ? 0 : _x.value;
executed 10344 times by 6 tests: return _x.isNull ? 0 : _x.value;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
10344
742}-
743-
744void QQuickCurve::setX(qreal x)-
745{-
746 if (_x.isNull
_x.isNullDescription
TRUEevaluated 10028 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
FALSEevaluated 24 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
|| _x != x
_x != xDescription
TRUEevaluated 24 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEnever evaluated
) {
0-10028
747 _x = x;-
748 xChanged();-
749 changed();-
750 }
executed 10052 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
10052
751}
executed 10052 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
10052
752-
753bool QQuickCurve::hasX()-
754{-
755 return
executed 1504 times by 6 tests: return _x.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
_x.isValid();
executed 1504 times by 6 tests: return _x.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
1504
756}-
757-
758qreal QQuickCurve::y() const-
759{-
760 return
executed 10390 times by 6 tests: return _y.isNull ? 0 : _y.value;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
_y.isNull ? 0 : _y.value;
executed 10390 times by 6 tests: return _y.isNull ? 0 : _y.value;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
10390
761}-
762-
763void QQuickCurve::setY(qreal y)-
764{-
765 if (_y.isNull
_y.isNullDescription
TRUEevaluated 10056 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
FALSEevaluated 48 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
|| _y != y
_y != yDescription
TRUEevaluated 48 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
FALSEnever evaluated
) {
0-10056
766 _y = y;-
767 yChanged();-
768 changed();-
769 }
executed 10104 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
10104
770}
executed 10104 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
10104
771-
772bool QQuickCurve::hasY()-
773{-
774 return
executed 1524 times by 6 tests: return _y.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
_y.isValid();
executed 1524 times by 6 tests: return _y.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
1524
775}-
776-
777qreal QQuickCurve::relativeX() const-
778{-
779 return
executed 74 times by 3 tests: return _relativeX;
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
_relativeX;
executed 74 times by 3 tests: return _relativeX;
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
74
780}-
781-
782void QQuickCurve::setRelativeX(qreal x)-
783{-
784 if (_relativeX.isNull
_relativeX.isNullDescription
TRUEevaluated 54 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
FALSEnever evaluated
|| _relativeX != x
_relativeX != xDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0-54
785 _relativeX = x;-
786 relativeXChanged();-
787 changed();-
788 }
executed 54 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
54
789}
executed 54 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
54
790-
791bool QQuickCurve::hasRelativeX()-
792{-
793 return
executed 10420 times by 6 tests: return _relativeX.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
_relativeX.isValid();
executed 10420 times by 6 tests: return _relativeX.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
10420
794}-
795-
796qreal QQuickCurve::relativeY() const-
797{-
798 return
executed 28 times by 2 tests: return _relativeY;
Executed by:
  • tst_examples
  • tst_qquickpathview
_relativeY;
executed 28 times by 2 tests: return _relativeY;
Executed by:
  • tst_examples
  • tst_qquickpathview
28
799}-
800-
801void QQuickCurve::setRelativeY(qreal y)-
802{-
803 if (_relativeY.isNull
_relativeY.isNullDescription
TRUEevaluated 26 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEnever evaluated
|| _relativeY != y
_relativeY != yDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0-26
804 _relativeY = y;-
805 relativeYChanged();-
806 changed();-
807 }
executed 26 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
26
808}
executed 26 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
26
809-
810bool QQuickCurve::hasRelativeY()-
811{-
812 return
executed 10420 times by 6 tests: return _relativeY.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
_relativeY.isValid();
executed 10420 times by 6 tests: return _relativeY.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
10420
813}-
814QString QQuickPathAttribute::name() const-
815{-
816 return
executed 1764 times by 2 tests: return _name;
Executed by:
  • tst_examples
  • tst_qquickpathview
_name;
executed 1764 times by 2 tests: return _name;
Executed by:
  • tst_examples
  • tst_qquickpathview
1764
817}-
818-
819void QQuickPathAttribute::setName(const QString &name)-
820{-
821 if (_name == name
_name == nameDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEevaluated 546 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
)
2-546
822 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickpathview
2
823 _name = name;-
824 nameChanged();-
825}
executed 546 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
546
826qreal QQuickPathAttribute::value() const-
827{-
828 return
executed 1202 times by 2 tests: return _value;
Executed by:
  • tst_examples
  • tst_qquickpathview
_value;
executed 1202 times by 2 tests: return _value;
Executed by:
  • tst_examples
  • tst_qquickpathview
1202
829}-
830-
831void QQuickPathAttribute::setValue(qreal value)-
832{-
833 if (_value != value
_value != valueDescription
TRUEevaluated 440 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
FALSEevaluated 98 times by 1 test
Evaluated by:
  • tst_qquickpathview
) {
98-440
834 _value = value;-
835 valueChanged();-
836 changed();-
837 }
executed 440 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
440
838}
executed 538 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
538
839inline QPointF positionForCurve(const QQuickPathData &data, const QPointF &prevPoint)-
840{-
841 QQuickCurve *curve = data.curves.at(data.index);-
842 bool isEnd = data.index == data.curves.size() - 1;-
843 return
executed 10420 times by 6 tests: return QPointF(curve->hasRelativeX() ? prevPoint.x() + curve->relativeX() : !isEnd || curve->hasX() ? curve->x() : data.endPoint.x(), curve->hasRelativeY() ? prevPoint.y() + curve->relativeY() : !isEnd || curve->hasY() ? curve->y() : data.endPoint.y());
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
QPointF(curve->hasRelativeX() ? prevPoint.x() + curve->relativeX() : !isEnd || curve->hasX() ? curve->x() : data.endPoint.x(),
executed 10420 times by 6 tests: return QPointF(curve->hasRelativeX() ? prevPoint.x() + curve->relativeX() : !isEnd || curve->hasX() ? curve->x() : data.endPoint.x(), curve->hasRelativeY() ? prevPoint.y() + curve->relativeY() : !isEnd || curve->hasY() ? curve->y() : data.endPoint.y());
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
10420
844 curve->hasRelativeY() ? prevPoint.y() + curve->relativeY() : !isEnd || curve->hasY() ? curve->y() : data.endPoint.y());
executed 10420 times by 6 tests: return QPointF(curve->hasRelativeX() ? prevPoint.x() + curve->relativeX() : !isEnd || curve->hasX() ? curve->x() : data.endPoint.x(), curve->hasRelativeY() ? prevPoint.y() + curve->relativeY() : !isEnd || curve->hasY() ? curve->y() : data.endPoint.y());
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
10420
845}-
846-
847void QQuickPathLine::addToPath(QPainterPath &path, const QQuickPathData &data)-
848{-
849 path.lineTo(positionForCurve(data, path.currentPosition()));-
850}
executed 1062 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
  • tst_qquickpathview
  • tst_qquickshape
  • tst_qquickvisualdatamodel
1062
851void QQuickPathMove::addToPath(QPainterPath &path, const QQuickPathData &data)-
852{-
853 path.moveTo(positionForCurve(data, path.currentPosition()));-
854}
executed 972 times by 1 test: end of block
Executed by:
  • tst_examples
972
855qreal QQuickPathQuad::controlX() const-
856{-
857 return
executed 188 times by 3 tests: return _controlX;
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
_controlX;
executed 188 times by 3 tests: return _controlX;
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
188
858}-
859-
860void QQuickPathQuad::setControlX(qreal x)-
861{-
862 if (_controlX != x
_controlX != xDescription
TRUEevaluated 162 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickshape
) {
16-162
863 _controlX = x;-
864 controlXChanged();-
865 changed();-
866 }
executed 162 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
162
867}
executed 178 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
178
868-
869-
870-
871-
872-
873qreal QQuickPathQuad::controlY() const-
874{-
875 return
executed 188 times by 3 tests: return _controlY;
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
_controlY;
executed 188 times by 3 tests: return _controlY;
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
188
876}-
877-
878void QQuickPathQuad::setControlY(qreal y)-
879{-
880 if (_controlY != y
_controlY != yDescription
TRUEevaluated 174 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_examples
) {
4-174
881 _controlY = y;-
882 controlYChanged();-
883 changed();-
884 }
executed 174 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
174
885}
executed 178 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
178
886qreal QQuickPathQuad::relativeControlX() const-
887{-
888 return
never executed: return _relativeControlX;
_relativeControlX;
never executed: return _relativeControlX;
0
889}-
890-
891void QQuickPathQuad::setRelativeControlX(qreal x)-
892{-
893 if (_relativeControlX.isNull
_relativeControlX.isNullDescription
TRUEnever evaluated
FALSEnever evaluated
|| _relativeControlX != x
_relativeControlX != xDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
894 _relativeControlX = x;-
895 relativeControlXChanged();-
896 changed();-
897 }
never executed: end of block
0
898}
never executed: end of block
0
899-
900bool QQuickPathQuad::hasRelativeControlX()-
901{-
902 return
executed 186 times by 3 tests: return _relativeControlX.isValid();
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
_relativeControlX.isValid();
executed 186 times by 3 tests: return _relativeControlX.isValid();
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
186
903}-
904-
905qreal QQuickPathQuad::relativeControlY() const-
906{-
907 return
never executed: return _relativeControlY;
_relativeControlY;
never executed: return _relativeControlY;
0
908}-
909-
910void QQuickPathQuad::setRelativeControlY(qreal y)-
911{-
912 if (_relativeControlY.isNull
_relativeControlY.isNullDescription
TRUEnever evaluated
FALSEnever evaluated
|| _relativeControlY != y
_relativeControlY != yDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
913 _relativeControlY = y;-
914 relativeControlYChanged();-
915 changed();-
916 }
never executed: end of block
0
917}
never executed: end of block
0
918-
919bool QQuickPathQuad::hasRelativeControlY()-
920{-
921 return
executed 186 times by 3 tests: return _relativeControlY.isValid();
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
_relativeControlY.isValid();
executed 186 times by 3 tests: return _relativeControlY.isValid();
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
186
922}-
923-
924void QQuickPathQuad::addToPath(QPainterPath &path, const QQuickPathData &data)-
925{-
926 const QPointF &prevPoint = path.currentPosition();-
927 QPointF controlPoint(hasRelativeControlX() ? prevPoint.x() + relativeControlX() : controlX(),-
928 hasRelativeControlY() ? prevPoint.y() + relativeControlY() : controlY());-
929 path.quadTo(controlPoint, positionForCurve(data, path.currentPosition()));-
930}
executed 186 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickshape
186
931qreal QQuickPathCubic::control1X() const-
932{-
933 return
executed 7910 times by 4 tests: return _control1X;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
_control1X;
executed 7910 times by 4 tests: return _control1X;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
7910
934}-
935-
936void QQuickPathCubic::setControl1X(qreal x)-
937{-
938 if (_control1X != x
_control1X != xDescription
TRUEevaluated 7894 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickshape
) {
6-7894
939 _control1X = x;-
940 control1XChanged();-
941 changed();-
942 }
executed 7894 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
7894
943}
executed 7900 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
7900
944-
945qreal QQuickPathCubic::control1Y() const-
946{-
947 return
executed 7910 times by 4 tests: return _control1Y;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
_control1Y;
executed 7910 times by 4 tests: return _control1Y;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
7910
948}-
949-
950void QQuickPathCubic::setControl1Y(qreal y)-
951{-
952 if (_control1Y != y
_control1Y != yDescription
TRUEevaluated 7774 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
FALSEevaluated 126 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
) {
126-7774
953 _control1Y = y;-
954 control1YChanged();-
955 changed();-
956 }
executed 7774 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
7774
957}
executed 7900 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
7900
958-
959-
960-
961-
962-
963-
964-
965qreal QQuickPathCubic::control2X() const-
966{-
967 return
executed 7910 times by 4 tests: return _control2X;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
_control2X;
executed 7910 times by 4 tests: return _control2X;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
7910
968}-
969-
970void QQuickPathCubic::setControl2X(qreal x)-
971{-
972 if (_control2X != x
_control2X != xDescription
TRUEevaluated 7898 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_examples
) {
6-7898
973 _control2X = x;-
974 control2XChanged();-
975 changed();-
976 }
executed 7898 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
7898
977}
executed 7904 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
7904
978-
979qreal QQuickPathCubic::control2Y() const-
980{-
981 return
executed 7910 times by 4 tests: return _control2Y;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
_control2Y;
executed 7910 times by 4 tests: return _control2Y;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
7910
982}-
983-
984void QQuickPathCubic::setControl2Y(qreal y)-
985{-
986 if (_control2Y != y
_control2Y != yDescription
TRUEevaluated 7776 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
FALSEevaluated 124 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
) {
124-7776
987 _control2Y = y;-
988 control2YChanged();-
989 changed();-
990 }
executed 7776 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
7776
991}
executed 7900 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
7900
992qreal QQuickPathCubic::relativeControl1X() const-
993{-
994 return
never executed: return _relativeControl1X;
_relativeControl1X;
never executed: return _relativeControl1X;
0
995}-
996-
997void QQuickPathCubic::setRelativeControl1X(qreal x)-
998{-
999 if (_relativeControl1X.isNull
_relativeControl1X.isNullDescription
TRUEnever evaluated
FALSEnever evaluated
|| _relativeControl1X != x
_relativeControl1X != xDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1000 _relativeControl1X = x;-
1001 relativeControl1XChanged();-
1002 changed();-
1003 }
never executed: end of block
0
1004}
never executed: end of block
0
1005-
1006bool QQuickPathCubic::hasRelativeControl1X()-
1007{-
1008 return
executed 7908 times by 4 tests: return _relativeControl1X.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
_relativeControl1X.isValid();
executed 7908 times by 4 tests: return _relativeControl1X.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
7908
1009}-
1010-
1011qreal QQuickPathCubic::relativeControl1Y() const-
1012{-
1013 return
never executed: return _relativeControl1Y;
_relativeControl1Y;
never executed: return _relativeControl1Y;
0
1014}-
1015-
1016void QQuickPathCubic::setRelativeControl1Y(qreal y)-
1017{-
1018 if (_relativeControl1Y.isNull
_relativeControl1Y.isNullDescription
TRUEnever evaluated
FALSEnever evaluated
|| _relativeControl1Y != y
_relativeControl1Y != yDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1019 _relativeControl1Y = y;-
1020 relativeControl1YChanged();-
1021 changed();-
1022 }
never executed: end of block
0
1023}
never executed: end of block
0
1024-
1025bool QQuickPathCubic::hasRelativeControl1Y()-
1026{-
1027 return
executed 7908 times by 4 tests: return _relativeControl1Y.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
_relativeControl1Y.isValid();
executed 7908 times by 4 tests: return _relativeControl1Y.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
7908
1028}-
1029-
1030qreal QQuickPathCubic::relativeControl2X() const-
1031{-
1032 return
never executed: return _relativeControl2X;
_relativeControl2X;
never executed: return _relativeControl2X;
0
1033}-
1034-
1035void QQuickPathCubic::setRelativeControl2X(qreal x)-
1036{-
1037 if (_relativeControl2X.isNull
_relativeControl2X.isNullDescription
TRUEnever evaluated
FALSEnever evaluated
|| _relativeControl2X != x
_relativeControl2X != xDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1038 _relativeControl2X = x;-
1039 relativeControl2XChanged();-
1040 changed();-
1041 }
never executed: end of block
0
1042}
never executed: end of block
0
1043-
1044bool QQuickPathCubic::hasRelativeControl2X()-
1045{-
1046 return
executed 7908 times by 4 tests: return _relativeControl2X.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
_relativeControl2X.isValid();
executed 7908 times by 4 tests: return _relativeControl2X.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
7908
1047}-
1048-
1049qreal QQuickPathCubic::relativeControl2Y() const-
1050{-
1051 return
never executed: return _relativeControl2Y;
_relativeControl2Y;
never executed: return _relativeControl2Y;
0
1052}-
1053-
1054void QQuickPathCubic::setRelativeControl2Y(qreal y)-
1055{-
1056 if (_relativeControl2Y.isNull
_relativeControl2Y.isNullDescription
TRUEnever evaluated
FALSEnever evaluated
|| _relativeControl2Y != y
_relativeControl2Y != yDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1057 _relativeControl2Y = y;-
1058 relativeControl2YChanged();-
1059 changed();-
1060 }
never executed: end of block
0
1061}
never executed: end of block
0
1062-
1063bool QQuickPathCubic::hasRelativeControl2Y()-
1064{-
1065 return
executed 7908 times by 4 tests: return _relativeControl2Y.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
_relativeControl2Y.isValid();
executed 7908 times by 4 tests: return _relativeControl2Y.isValid();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
7908
1066}-
1067-
1068void QQuickPathCubic::addToPath(QPainterPath &path, const QQuickPathData &data)-
1069{-
1070 const QPointF &prevPoint = path.currentPosition();-
1071 QPointF controlPoint1(hasRelativeControl1X() ? prevPoint.x() + relativeControl1X() : control1X(),-
1072 hasRelativeControl1Y() ? prevPoint.y() + relativeControl1Y() : control1Y());-
1073 QPointF controlPoint2(hasRelativeControl2X() ? prevPoint.x() + relativeControl2X() : control2X(),-
1074 hasRelativeControl2Y() ? prevPoint.y() + relativeControl2Y() : control2Y());-
1075 path.cubicTo(controlPoint1, controlPoint2, positionForCurve(data, path.currentPosition()));-
1076}
executed 7908 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickshape
7908
1077inline QPointF previousPathPosition(const QPainterPath &path)-
1078{-
1079 int count = path.elementCount();-
1080 if (count < 1
count < 1Description
TRUEnever evaluated
FALSEevaluated 30 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
)
0-30
1081 return
never executed: return QPointF();
QPointF();
never executed: return QPointF();
0
1082-
1083 int index = path.elementAt(count-1).type == QPainterPath::CurveToDataElement
path.elementAt...eToDataElementDescription
TRUEevaluated 30 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
FALSEnever evaluated
? count - 4 : count - 2;
0-30
1084 return
executed 30 times by 2 tests: return index > -1 ? QPointF(path.elementAt(index)) : path.pointAtPercent(0);
Executed by:
  • tst_qquickanimations
  • tst_qquickpath
index > -1 ? QPointF(path.elementAt(index)) : path.pointAtPercent(0);
executed 30 times by 2 tests: return index > -1 ? QPointF(path.elementAt(index)) : path.pointAtPercent(0);
Executed by:
  • tst_qquickanimations
  • tst_qquickpath
30
1085}-
1086-
1087void QQuickPathCatmullRomCurve::addToPath(QPainterPath &path, const QQuickPathData &data)-
1088{-
1089-
1090-
1091-
1092-
1093-
1094-
1095 QPointF prevFar, prev, point, next;-
1096-
1097-
1098 int index = data.index - 1;-
1099 QQuickCurve *curve = index == -1
index == -1Description
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
FALSEevaluated 30 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
? 0 : data.curves.at(index);
12-30
1100 if (qobject_cast<QQuickPathCatmullRomCurve*>(curve)
qobject_cast<Q...Curve*>(curve)Description
TRUEevaluated 30 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
FALSEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
) {
12-30
1101 prev = path.currentPosition();-
1102 prevFar = previousPathPosition(path);-
1103 }
executed 30 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickpath
else {
30
1104 prev = path.currentPosition();-
1105 bool prevFarSet = false;-
1106 if (index == -1
index == -1Description
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
FALSEnever evaluated
&& data.curves.count() > 1
data.curves.count() > 1Description
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
FALSEnever evaluated
) {
0-12
1107 if (qobject_cast<QQuickPathCatmullRomCurve*>(data.curves.at(data.curves.count()-1))
qobject_cast<Q...es.count()-1))Description
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
FALSEnever evaluated
) {
0-12
1108-
1109 QPointF pos = prev;-
1110 QQuickPathData loopData;-
1111 loopData.endPoint = data.endPoint;-
1112 loopData.curves = data.curves;-
1113 for (int i = data.index; i < data.curves.count()
i < data.curves.count()Description
TRUEevaluated 42 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
FALSEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
; ++i) {
12-42
1114 loopData.index = i;-
1115 pos = positionForCurve(loopData, pos);-
1116 if (i == data.curves.count()-2
i == data.curves.count()-2Description
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
FALSEevaluated 30 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
)
12-30
1117 prevFar = pos;
executed 12 times by 2 tests: prevFar = pos;
Executed by:
  • tst_qquickanimations
  • tst_qquickpath
12
1118 }
executed 42 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickpath
42
1119 if (pos == QPointF(path.elementAt(0))
pos == QPointF....elementAt(0))Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
) {
4-8
1120-
1121-
1122 prevFarSet = true;-
1123 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickpath
4
1124 }
executed 12 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickpath
12
1125 }
executed 12 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickpath
12
1126 if (!prevFarSet
!prevFarSetDescription
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
)
4-8
1127 prevFar = prev;
executed 8 times by 2 tests: prevFar = prev;
Executed by:
  • tst_qquickanimations
  • tst_qquickpath
8
1128 }
executed 12 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickpath
12
1129-
1130-
1131 point = positionForCurve(data, path.currentPosition());-
1132-
1133-
1134 index = data.index + 1;-
1135 if (index < data.curves.count()
index < data.curves.count()Description
TRUEevaluated 30 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
FALSEevaluated 12 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
&& qobject_cast<QQuickPathCatmullRomCurve*>(data.curves.at(index))
qobject_cast<Q...ves.at(index))Description
TRUEevaluated 30 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
FALSEnever evaluated
) {
0-30
1136 QQuickPathData nextData;-
1137 nextData.index = index;-
1138 nextData.endPoint = data.endPoint;-
1139 nextData.curves = data.curves;-
1140 next = positionForCurve(nextData, point);-
1141 }
executed 30 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickpath
else {
30
1142 if (point == QPointF(path.elementAt(0))
point == QPoin....elementAt(0))Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
&& qobject_cast<QQuickPathCatmullRomCurve*>(data.curves.at(0))
qobject_cast<Q....curves.at(0))Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
FALSEnever evaluated
&& path.elementCount() >= 3
path.elementCount() >= 3Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickpath
FALSEnever evaluated
) {
0-8
1143-
1144-
1145 next = QPointF(path.elementAt(3));-
1146 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickpath
else
4
1147 next = point;
executed 8 times by 2 tests: next = point;
Executed by:
  • tst_qquickanimations
  • tst_qquickpath
8
1148 }-
1149 QPointF control1(prevFar.x() * qreal(-0.167) +-
1150 prev.x() +-
1151 point.x() * qreal(0.167),-
1152 prevFar.y() * qreal(-0.167) +-
1153 prev.y() +-
1154 point.y() * qreal(0.167));-
1155-
1156 QPointF control2(prev.x() * qreal(0.167) +-
1157 point.x() +-
1158 next.x() * qreal(-0.167),-
1159 prev.y() * qreal(0.167) +-
1160 point.y() +-
1161 next.y() * qreal(-0.167));-
1162-
1163 path.cubicTo(control1, control2, point);-
1164}
executed 42 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickpath
42
1165qreal QQuickPathArc::radiusX() const-
1166{-
1167 return
executed 2 times by 1 test: return _radiusX;
Executed by:
  • tst_qquickpath
_radiusX;
executed 2 times by 1 test: return _radiusX;
Executed by:
  • tst_qquickpath
2
1168}-
1169-
1170void QQuickPathArc::setRadiusX(qreal radius)-
1171{-
1172 if (_radiusX == radius
_radiusX == radiusDescription
TRUEnever evaluated
FALSEevaluated 70 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickshape
)
0-70
1173 return;
never executed: return;
0
1174-
1175 _radiusX = radius;-
1176 radiusXChanged();-
1177 changed();-
1178}
executed 70 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickshape
70
1179-
1180qreal QQuickPathArc::radiusY() const-
1181{-
1182 return
executed 2 times by 1 test: return _radiusY;
Executed by:
  • tst_qquickpath
_radiusY;
executed 2 times by 1 test: return _radiusY;
Executed by:
  • tst_qquickpath
2
1183}-
1184-
1185void QQuickPathArc::setRadiusY(qreal radius)-
1186{-
1187 if (_radiusY == radius
_radiusY == radiusDescription
TRUEnever evaluated
FALSEevaluated 70 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickshape
)
0-70
1188 return;
never executed: return;
0
1189-
1190 _radiusY = radius;-
1191 radiusYChanged();-
1192 changed();-
1193}
executed 70 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickshape
70
1194bool QQuickPathArc::useLargeArc() const-
1195{-
1196 return
executed 2 times by 1 test: return _useLargeArc;
Executed by:
  • tst_qquickpath
_useLargeArc;
executed 2 times by 1 test: return _useLargeArc;
Executed by:
  • tst_qquickpath
2
1197}-
1198-
1199void QQuickPathArc::setUseLargeArc(bool largeArc)-
1200{-
1201 if (_useLargeArc == largeArc
_useLargeArc == largeArcDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_examples
FALSEevaluated 26 times by 1 test
Evaluated by:
  • tst_examples
)
2-26
1202 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_examples
2
1203-
1204 _useLargeArc = largeArc;-
1205 useLargeArcChanged();-
1206 changed();-
1207}
executed 26 times by 1 test: end of block
Executed by:
  • tst_examples
26
1208QQuickPathArc::ArcDirection QQuickPathArc::direction() const-
1209{-
1210 return
executed 2 times by 1 test: return _direction;
Executed by:
  • tst_qquickpath
_direction;
executed 2 times by 1 test: return _direction;
Executed by:
  • tst_qquickpath
2
1211}-
1212-
1213void QQuickPathArc::setDirection(ArcDirection direction)-
1214{-
1215 if (_direction == direction
_direction == directionDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_examples
)
6-8
1216 return;
executed 6 times by 2 tests: return;
Executed by:
  • tst_examples
  • tst_qquickpath
6
1217-
1218 _direction = direction;-
1219 directionChanged();-
1220 changed();-
1221}
executed 8 times by 1 test: end of block
Executed by:
  • tst_examples
8
1222qreal QQuickPathArc::xAxisRotation() const-
1223{-
1224 return
never executed: return _xAxisRotation;
_xAxisRotation;
never executed: return _xAxisRotation;
0
1225}-
1226-
1227void QQuickPathArc::setXAxisRotation(qreal rotation)-
1228{-
1229 if (_xAxisRotation == rotation
_xAxisRotation == rotationDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_examples
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_examples
)
4
1230 return;
executed 4 times by 1 test: return;
Executed by:
  • tst_examples
4
1231-
1232 _xAxisRotation = rotation;-
1233 xAxisRotationChanged();-
1234 changed();-
1235}
executed 4 times by 1 test: end of block
Executed by:
  • tst_examples
4
1236-
1237void QQuickPathArc::addToPath(QPainterPath &path, const QQuickPathData &data)-
1238{-
1239 const QPointF &startPoint = path.currentPosition();-
1240 const QPointF &endPoint = positionForCurve(data, startPoint);-
1241 QQuickSvgParser::pathArc(path,-
1242 _radiusX,-
1243 _radiusY,-
1244 _xAxisRotation,-
1245 _useLargeArc,-
1246 _direction == Clockwise ? 1 : 0,-
1247 endPoint.x(),-
1248 endPoint.y(),-
1249 startPoint.x(), startPoint.y());-
1250}
executed 178 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpath
  • tst_qquickshape
178
1251qreal QQuickPathAngleArc::centerX() const-
1252{-
1253 return
executed 2 times by 1 test: return _centerX;
Executed by:
  • tst_qquickpath
_centerX;
executed 2 times by 1 test: return _centerX;
Executed by:
  • tst_qquickpath
2
1254}-
1255-
1256void QQuickPathAngleArc::setCenterX(qreal centerX)-
1257{-
1258 if (_centerX == centerX
_centerX == centerXDescription
TRUEnever evaluated
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
)
0-6
1259 return;
never executed: return;
0
1260-
1261 _centerX = centerX;-
1262 centerXChanged();-
1263 changed();-
1264}
executed 6 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpath
6
1265-
1266qreal QQuickPathAngleArc::centerY() const-
1267{-
1268 return
executed 2 times by 1 test: return _centerY;
Executed by:
  • tst_qquickpath
_centerY;
executed 2 times by 1 test: return _centerY;
Executed by:
  • tst_qquickpath
2
1269}-
1270-
1271void QQuickPathAngleArc::setCenterY(qreal centerY)-
1272{-
1273 if (_centerY == centerY
_centerY == centerYDescription
TRUEnever evaluated
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
)
0-6
1274 return;
never executed: return;
0
1275-
1276 _centerY = centerY;-
1277 centerXChanged();-
1278 changed();-
1279}
executed 6 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpath
6
1280qreal QQuickPathAngleArc::radiusX() const-
1281{-
1282 return
executed 2 times by 1 test: return _radiusX;
Executed by:
  • tst_qquickpath
_radiusX;
executed 2 times by 1 test: return _radiusX;
Executed by:
  • tst_qquickpath
2
1283}-
1284-
1285void QQuickPathAngleArc::setRadiusX(qreal radius)-
1286{-
1287 if (_radiusX == radius
_radiusX == radiusDescription
TRUEnever evaluated
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
)
0-6
1288 return;
never executed: return;
0
1289-
1290 _radiusX = radius;-
1291 radiusXChanged();-
1292 changed();-
1293}
executed 6 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpath
6
1294-
1295qreal QQuickPathAngleArc::radiusY() const-
1296{-
1297 return
executed 2 times by 1 test: return _radiusY;
Executed by:
  • tst_qquickpath
_radiusY;
executed 2 times by 1 test: return _radiusY;
Executed by:
  • tst_qquickpath
2
1298}-
1299-
1300void QQuickPathAngleArc::setRadiusY(qreal radius)-
1301{-
1302 if (_radiusY == radius
_radiusY == radiusDescription
TRUEnever evaluated
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
)
0-6
1303 return;
never executed: return;
0
1304-
1305 _radiusY = radius;-
1306 radiusYChanged();-
1307 changed();-
1308}
executed 6 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpath
6
1309qreal QQuickPathAngleArc::startAngle() const-
1310{-
1311 return
executed 2 times by 1 test: return _startAngle;
Executed by:
  • tst_qquickpath
_startAngle;
executed 2 times by 1 test: return _startAngle;
Executed by:
  • tst_qquickpath
2
1312}-
1313-
1314void QQuickPathAngleArc::setStartAngle(qreal angle)-
1315{-
1316 if (_startAngle == angle
_startAngle == angleDescription
TRUEnever evaluated
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
)
0-6
1317 return;
never executed: return;
0
1318-
1319 _startAngle = angle;-
1320 startAngleChanged();-
1321 changed();-
1322}
executed 6 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpath
6
1323qreal QQuickPathAngleArc::sweepAngle() const-
1324{-
1325 return
executed 6 times by 2 tests: return _sweepAngle;
Executed by:
  • tst_examples
  • tst_qquickpath
_sweepAngle;
executed 6 times by 2 tests: return _sweepAngle;
Executed by:
  • tst_examples
  • tst_qquickpath
6
1326}-
1327-
1328void QQuickPathAngleArc::setSweepAngle(qreal angle)-
1329{-
1330 if (_sweepAngle == angle
_sweepAngle == angleDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_examples
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpath
)
2-4
1331 return;
executed 4 times by 1 test: return;
Executed by:
  • tst_examples
4
1332-
1333 _sweepAngle = angle;-
1334 sweepAngleChanged();-
1335 changed();-
1336}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickpath
2
1337bool QQuickPathAngleArc::moveToStart() const-
1338{-
1339 return
executed 2 times by 1 test: return _moveToStart;
Executed by:
  • tst_qquickpath
_moveToStart;
executed 2 times by 1 test: return _moveToStart;
Executed by:
  • tst_qquickpath
2
1340}-
1341-
1342void QQuickPathAngleArc::setMoveToStart(bool move)-
1343{-
1344 if (_moveToStart == move
_moveToStart == moveDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpath
)
0-2
1345 return;
never executed: return;
0
1346-
1347 _moveToStart = move;-
1348 moveToStartChanged();-
1349 changed();-
1350}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickpath
2
1351-
1352void QQuickPathAngleArc::addToPath(QPainterPath &path, const QQuickPathData &)-
1353{-
1354 qreal x = _centerX - _radiusX;-
1355 qreal y = _centerY - _radiusY;-
1356 qreal width = _radiusX * 2;-
1357 qreal height = _radiusY * 2;-
1358 if (_moveToStart
_moveToStartDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpath
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickpath
)
2-6
1359 path.arcMoveTo(x, y, width, height, -_startAngle);
executed 6 times by 2 tests: path.arcMoveTo(x, y, width, height, -_startAngle);
Executed by:
  • tst_examples
  • tst_qquickpath
6
1360 path.arcTo(x, y, width, height, -_startAngle, -_sweepAngle);-
1361}
executed 8 times by 2 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickpath
8
1362QString QQuickPathSvg::path() const-
1363{-
1364 return
executed 2 times by 1 test: return _path;
Executed by:
  • tst_qquickpath
_path;
executed 2 times by 1 test: return _path;
Executed by:
  • tst_qquickpath
2
1365}-
1366-
1367void QQuickPathSvg::setPath(const QString &path)-
1368{-
1369 if (_path == path
_path == pathDescription
TRUEnever evaluated
FALSEevaluated 8 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
)
0-8
1370 return;
never executed: return;
0
1371-
1372 _path = path;-
1373 pathChanged();-
1374 changed();-
1375}
executed 8 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
8
1376-
1377void QQuickPathSvg::addToPath(QPainterPath &path, const QQuickPathData &)-
1378{-
1379 QQuickSvgParser::parsePathDataFast(_path, path);-
1380}
executed 8 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpath
8
1381qreal QQuickPathPercent::value() const-
1382{-
1383 return
executed 10 times by 1 test: return _value;
Executed by:
  • tst_qquickpathview
_value;
executed 10 times by 1 test: return _value;
Executed by:
  • tst_qquickpathview
10
1384}-
1385-
1386void QQuickPathPercent::setValue(qreal value)-
1387{-
1388 if (_value != value
_value != valueDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickpathview
FALSEnever evaluated
) {
0-4
1389 _value = value;-
1390 valueChanged();-
1391 changed();-
1392 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickpathview
4
1393}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickpathview
4
1394-
1395-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0