OpenCoverage

qsgsimplerectnode.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/util/qsgsimplerectnode.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3QSGSimpleRectNode::QSGSimpleRectNode(const QRectF &rect, const QColor &color)-
4 : m_geometry(QSGGeometry::defaultAttributes_Point2D(), 4)-
5{-
6 (void)reserved;;-
7 QSGGeometry::updateRectGeometry(&m_geometry, rect);-
8 m_material.setColor(color);-
9 setMaterial(&m_material);-
10 setGeometry(&m_geometry);-
11}
never executed: end of block
0
12-
13-
14-
15-
16-
17-
18-
19QSGSimpleRectNode::QSGSimpleRectNode()-
20 : m_geometry(QSGGeometry::defaultAttributes_Point2D(), 4)-
21{-
22 QSGGeometry::updateRectGeometry(&m_geometry, QRectF());-
23 setMaterial(&m_material);-
24 setGeometry(&m_geometry);-
25}
executed 200010 times by 3 tests: end of block
Executed by:
  • tst_nodestest
  • tst_qquickshape
  • tst_scenegraph
200010
26-
27-
28-
29-
30-
31-
32void QSGSimpleRectNode::setRect(const QRectF &rect)-
33{-
34 QSGGeometry::updateRectGeometry(&m_geometry, rect);-
35 markDirty(QSGNode::DirtyGeometry);-
36}
executed 200010 times by 3 tests: end of block
Executed by:
  • tst_nodestest
  • tst_qquickshape
  • tst_scenegraph
200010
37QRectF QSGSimpleRectNode::rect() const-
38{-
39 const QSGGeometry::Point2D *pts = m_geometry.vertexDataAsPoint2D();-
40 return
executed 98 times by 1 test: return QRectF(pts[0].x, pts[0].y, pts[3].x - pts[0].x, pts[3].y - pts[0].y);
Executed by:
  • tst_qquickshape
QRectF(pts[0].x,
executed 98 times by 1 test: return QRectF(pts[0].x, pts[0].y, pts[3].x - pts[0].x, pts[3].y - pts[0].y);
Executed by:
  • tst_qquickshape
98
41 pts[0].y,
executed 98 times by 1 test: return QRectF(pts[0].x, pts[0].y, pts[3].x - pts[0].x, pts[3].y - pts[0].y);
Executed by:
  • tst_qquickshape
98
42 pts[3].x - pts[0].x,
executed 98 times by 1 test: return QRectF(pts[0].x, pts[0].y, pts[3].x - pts[0].x, pts[3].y - pts[0].y);
Executed by:
  • tst_qquickshape
98
43 pts[3].y - pts[0].y);
executed 98 times by 1 test: return QRectF(pts[0].x, pts[0].y, pts[3].x - pts[0].x, pts[3].y - pts[0].y);
Executed by:
  • tst_qquickshape
98
44}-
45-
46-
47-
48-
49-
50-
51void QSGSimpleRectNode::setColor(const QColor &color)-
52{-
53 if (color != m_material.color()
color != m_material.color()Description
TRUEevaluated 200000 times by 1 test
Evaluated by:
  • tst_scenegraph
FALSEnever evaluated
) {
0-200000
54 m_material.setColor(color);-
55 markDirty(QSGNode::DirtyMaterial);-
56 }
executed 200000 times by 1 test: end of block
Executed by:
  • tst_scenegraph
200000
57}
executed 200000 times by 1 test: end of block
Executed by:
  • tst_scenegraph
200000
58-
59-
60-
61-
62-
63-
64QColor QSGSimpleRectNode::color() const-
65{-
66 return
executed 40 times by 1 test: return m_material.color();
Executed by:
  • tst_qquickshape
m_material.color();
executed 40 times by 1 test: return m_material.color();
Executed by:
  • tst_qquickshape
40
67}-
68-
69-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0