tools/qpoint.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3QDataStream &operator<<(QDataStream &s, const QPoint &p) -
4{ -
5 if (s.version() == 1)
partially evaluated: s.version() == 1
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:109
0-109
6 s << (qint16)p.x() << (qint16)p.y();
never executed: s << (qint16)p.x() << (qint16)p.y();
0
7 else -
8 s << (qint32)p.x() << (qint32)p.y();
executed: s << (qint32)p.x() << (qint32)p.y();
Execution Count:109
109
9 return s;
executed: return s;
Execution Count:109
109
10} -
11QDataStream &operator>>(QDataStream &s, QPoint &p) -
12{ -
13 if (s.version() == 1) {
partially evaluated: s.version() == 1
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:121
0-121
14 qint16 x, y; -
15 s >> x; p.rx() = x; -
16 s >> y; p.ry() = y; -
17 }
never executed: }
0
18 else { -
19 qint32 x, y; -
20 s >> x; p.rx() = x; -
21 s >> y; p.ry() = y; -
22 }
executed: }
Execution Count:121
121
23 return s;
executed: return s;
Execution Count:121
121
24} -
25QDebug operator<<(QDebug dbg, const QPoint &p) { -
26 dbg.nospace() << "QPoint(" << p.x() << ',' << p.y() << ')'; -
27 return dbg.space();
executed: return dbg.space();
Execution Count:23
23
28} -
29 -
30QDebug operator<<(QDebug d, const QPointF &p) -
31{ -
32 d.nospace() << "QPointF(" << p.x() << ", " << p.y() << ')'; -
33 return d.space();
executed: return d.space();
Execution Count:3
3
34} -
35QDataStream &operator<<(QDataStream &s, const QPointF &p) -
36{ -
37 s << double(p.x()) << double(p.y()); -
38 return s;
executed: return s;
Execution Count:116
116
39} -
40QDataStream &operator>>(QDataStream &s, QPointF &p) -
41{ -
42 double x, y; -
43 s >> x; -
44 s >> y; -
45 p.setX(qreal(x)); -
46 p.setY(qreal(y)); -
47 return s;
executed: return s;
Execution Count:122
122
48} -
49 -
50 -
51 -
52 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial