Line | Source | Count |
1 | | - |
2 | | - |
3 | QDebug operator<<(QDebug dbg, const QLine &p) | - |
4 | { | - |
5 | QDebugStateSaver saver(dbg); | - |
6 | dbg.nospace() << "QLine(" << p.p1() << ',' << p.p2() << ')'; | - |
7 | returnexecuted 2 times by 2 tests: return dbg; dbg;executed 2 times by 2 tests: return dbg; | 2 |
8 | } | - |
9 | QDataStream &operator<<(QDataStream &stream, const QLine &line) | - |
10 | { | - |
11 | stream << line.p1() << line.p2(); | - |
12 | returnexecuted 3 times by 2 tests: return stream; Executed by:- tst_QMetaType
- tst_QVariant
stream;executed 3 times by 2 tests: return stream; Executed by:- tst_QMetaType
- tst_QVariant
| 3 |
13 | } | - |
14 | QDataStream &operator>>(QDataStream &stream, QLine &line) | - |
15 | { | - |
16 | QPoint p1, p2; | - |
17 | stream >> p1; | - |
18 | stream >> p2; | - |
19 | line = QLine(p1, p2); | - |
20 | | - |
21 | returnexecuted 7 times by 2 tests: return stream; Executed by:- tst_QMetaType
- tst_QVariant
stream;executed 7 times by 2 tests: return stream; Executed by:- tst_QMetaType
- tst_QVariant
| 7 |
22 | } | - |
23 | qreal QLineF::length() const | - |
24 | { | - |
25 | qreal x = pt2.x() - pt1.x(); | - |
26 | qreal y = pt2.y() - pt1.y(); | - |
27 | returnexecuted 133358 times by 22 tests: return qSqrt(x*x + y*y); Executed by:- tst_QAccessibility
- tst_QBrush
- tst_QCheckBox
- tst_QDataStream
- tst_QGestureRecognizer
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QPrinter
- tst_QProgressBar
- tst_QStyle
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
qSqrt(x*x + y*y);executed 133358 times by 22 tests: return qSqrt(x*x + y*y); Executed by:- tst_QAccessibility
- tst_QBrush
- tst_QCheckBox
- tst_QDataStream
- tst_QGestureRecognizer
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QPrinter
- tst_QProgressBar
- tst_QStyle
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
| 133358 |
28 | } | - |
29 | qreal QLineF::angle() const | - |
30 | { | - |
31 | const qreal dx = pt2.x() - pt1.x(); | - |
32 | const qreal dy = pt2.y() - pt1.y(); | - |
33 | | - |
34 | const qreal theta = qAtan2(-dy, dx) * 360.0 / 6.28318530717958647692528676655900576; | - |
35 | | - |
36 | const qreal theta_normalized = theta < 0TRUE | evaluated 53865 times by 16 testsEvaluated by:- tst_QCheckBox
- tst_QGestureRecognizer
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
| FALSE | evaluated 54312 times by 11 testsEvaluated by:- tst_QGestureRecognizer
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
|
? theta + 360 : theta; | 53865-54312 |
37 | | - |
38 | if (qFuzzyCompare(theta_normalized, qreal(360))TRUE | evaluated 2 times by 1 test | FALSE | evaluated 108175 times by 16 testsEvaluated by:- tst_QCheckBox
- tst_QGestureRecognizer
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
|
) | 2-108175 |
39 | returnexecuted 2 times by 1 test: return qreal(0); qreal(0);executed 2 times by 1 test: return qreal(0); | 2 |
40 | else | - |
41 | returnexecuted 108175 times by 16 tests: return theta_normalized; Executed by:- tst_QCheckBox
- tst_QGestureRecognizer
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
theta_normalized;executed 108175 times by 16 tests: return theta_normalized; Executed by:- tst_QCheckBox
- tst_QGestureRecognizer
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
| 108175 |
42 | } | - |
43 | void QLineF::setAngle(qreal angle) | - |
44 | { | - |
45 | const qreal angleR = angle * 6.28318530717958647692528676655900576 / 360.0; | - |
46 | const qreal l = length(); | - |
47 | | - |
48 | const qreal dx = qCos(angleR) * l; | - |
49 | const qreal dy = -qSin(angleR) * l; | - |
50 | | - |
51 | pt2.rx() = pt1.x() + dx; | - |
52 | pt2.ry() = pt1.y() + dy; | - |
53 | }executed 1804 times by 1 test: end of block | 1804 |
54 | QLineF QLineF::fromPolar(qreal length, qreal angle) | - |
55 | { | - |
56 | const qreal angleR = angle * 6.28318530717958647692528676655900576 / 360.0; | - |
57 | returnexecuted 4169 times by 2 tests: return QLineF(0, 0, qCos(angleR) * length, -qSin(angleR) * length); Executed by:- tst_QLine
- tst_QPainterPath
QLineF(0, 0, qCos(angleR) * length, -qSin(angleR) * length);executed 4169 times by 2 tests: return QLineF(0, 0, qCos(angleR) * length, -qSin(angleR) * length); Executed by:- tst_QLine
- tst_QPainterPath
| 4169 |
58 | } | - |
59 | | - |
60 | | - |
61 | | - |
62 | | - |
63 | | - |
64 | | - |
65 | | - |
66 | QLineF QLineF::unitVector() const | - |
67 | { | - |
68 | qreal x = pt2.x() - pt1.x(); | - |
69 | qreal y = pt2.y() - pt1.y(); | - |
70 | | - |
71 | qreal len = qSqrt(x*x + y*y); | - |
72 | QLineF f(p1(), QPointF(pt1.x() + x/len, pt1.y() + y/len)); | - |
73 | | - |
74 | | - |
75 | if (qAbs(f.length() - 1) >= 0.001TRUE | never evaluated | FALSE | evaluated 102875 times by 16 testsEvaluated by:- tst_QAccessibility
- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
|
) | 0-102875 |
76 | QMessageLogger(__FILE__, 641, __PRETTY_FUNCTION__).warning("QLine::unitVector: New line does not have unit length"); never executed: QMessageLogger(__FILE__, 641, __PRETTY_FUNCTION__).warning("QLine::unitVector: New line does not have unit length"); | 0 |
77 | | - |
78 | | - |
79 | returnexecuted 102875 times by 16 tests: return f; Executed by:- tst_QAccessibility
- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
f;executed 102875 times by 16 tests: return f; Executed by:- tst_QAccessibility
- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
| 102875 |
80 | } | - |
81 | QLineF::IntersectType QLineF::intersect(const QLineF &l, QPointF *intersectionPoint) const | - |
82 | { | - |
83 | | - |
84 | const QPointF a = pt2 - pt1; | - |
85 | const QPointF b = l.pt1 - l.pt2; | - |
86 | const QPointF c = pt1 - l.pt1; | - |
87 | | - |
88 | const qreal denominator = a.y() * b.x() - a.x() * b.y(); | - |
89 | if (denominator == 0TRUE | evaluated 3700 times by 9 testsEvaluated by:- tst_QCheckBox
- tst_QGraphicsItem
- tst_QGraphicsScene
- tst_QGraphicsView
- tst_QLine
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
| FALSE | evaluated 53468 times by 15 testsEvaluated by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
|
|| !qt_is_finite(denominator)TRUE | never evaluated | FALSE | evaluated 53468 times by 15 testsEvaluated by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
|
) | 0-53468 |
90 | returnexecuted 3700 times by 9 tests: return NoIntersection; Executed by:- tst_QCheckBox
- tst_QGraphicsItem
- tst_QGraphicsScene
- tst_QGraphicsView
- tst_QLine
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
NoIntersection;executed 3700 times by 9 tests: return NoIntersection; Executed by:- tst_QCheckBox
- tst_QGraphicsItem
- tst_QGraphicsScene
- tst_QGraphicsView
- tst_QLine
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
| 3700 |
91 | | - |
92 | const qreal reciprocal = 1 / denominator; | - |
93 | const qreal na = (b.y() * c.x() - b.x() * c.y()) * reciprocal; | - |
94 | if (intersectionPointTRUE | evaluated 53468 times by 15 testsEvaluated by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
| FALSE | never evaluated |
) | 0-53468 |
95 | *executed 53468 times by 15 tests: *intersectionPoint = pt1 + a * na; Executed by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
intersectionPoint = pt1 + a * na;executed 53468 times by 15 tests: *intersectionPoint = pt1 + a * na; Executed by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
| 53468 |
96 | | - |
97 | if (na < 0TRUE | evaluated 36 times by 6 testsEvaluated by:- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QMdiSubWindow
- tst_QPainter
- tst_QTouchEvent
- tst_QTreeWidget
| FALSE | evaluated 53432 times by 15 testsEvaluated by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
|
|| na > 1TRUE | evaluated 26230 times by 14 testsEvaluated by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
| FALSE | evaluated 27202 times by 15 testsEvaluated by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
|
) | 36-53432 |
98 | returnexecuted 26266 times by 14 tests: return UnboundedIntersection; Executed by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
UnboundedIntersection;executed 26266 times by 14 tests: return UnboundedIntersection; Executed by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
| 26266 |
99 | | - |
100 | const qreal nb = (a.x() * c.y() - a.y() * c.x()) * reciprocal; | - |
101 | if (nb < 0TRUE | never evaluated | FALSE | evaluated 27202 times by 15 testsEvaluated by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
|
|| nb > 1TRUE | evaluated 1 time by 1 test | FALSE | evaluated 27201 times by 15 testsEvaluated by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
|
) | 0-27202 |
102 | returnexecuted 1 time by 1 test: return UnboundedIntersection; UnboundedIntersection;executed 1 time by 1 test: return UnboundedIntersection; | 1 |
103 | | - |
104 | returnexecuted 27201 times by 15 tests: return BoundedIntersection; Executed by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
BoundedIntersection;executed 27201 times by 15 tests: return BoundedIntersection; Executed by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
| 27201 |
105 | } | - |
106 | qreal QLineF::angleTo(const QLineF &l) const | - |
107 | { | - |
108 | if (isNull()TRUE | never evaluated | FALSE | evaluated 52787 times by 15 testsEvaluated by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
|
|| l.isNull()TRUE | never evaluated | FALSE | evaluated 52787 times by 15 testsEvaluated by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
|
) | 0-52787 |
109 | return never executed: return 0; 0;never executed: return 0; | 0 |
110 | | - |
111 | const qreal a1 = angle(); | - |
112 | const qreal a2 = l.angle(); | - |
113 | | - |
114 | const qreal delta = a2 - a1; | - |
115 | const qreal delta_normalized = delta < 0TRUE | evaluated 19559 times by 10 testsEvaluated by:- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
| FALSE | evaluated 33228 times by 15 testsEvaluated by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
|
? delta + 360 : delta; | 19559-33228 |
116 | | - |
117 | if (qFuzzyCompare(delta, qreal(360))TRUE | never evaluated | FALSE | evaluated 52787 times by 15 testsEvaluated by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
|
) | 0-52787 |
118 | return never executed: return 0; 0;never executed: return 0; | 0 |
119 | else | - |
120 | returnexecuted 52787 times by 15 tests: return delta_normalized; Executed by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
delta_normalized;executed 52787 times by 15 tests: return delta_normalized; Executed by:- tst_QCheckBox
- tst_QGraphicsEffectSource
- tst_QGraphicsItem
- tst_QGraphicsProxyWidget
- tst_QGraphicsScene
- tst_QGraphicsSceneIndex
- tst_QGraphicsView
- tst_QGraphicsWidget
- tst_QLine
- tst_QMdiSubWindow
- tst_QPainter
- tst_QPainterPath
- tst_QTouchEvent
- tst_QTreeView
- tst_QTreeWidget
| 52787 |
121 | } | - |
122 | qreal QLineF::angle(const QLineF &l) const | - |
123 | { | - |
124 | if (isNull()TRUE | never evaluated | FALSE | evaluated 183 times by 1 test |
|| l.isNull()TRUE | never evaluated | FALSE | evaluated 183 times by 1 test |
) | 0-183 |
125 | return never executed: return 0; 0;never executed: return 0; | 0 |
126 | qreal cos_line = (dx()*l.dx() + dy()*l.dy()) / (length()*l.length()); | - |
127 | qreal rad = 0; | - |
128 | | - |
129 | if (cos_line >= -1.0TRUE | evaluated 183 times by 1 test | FALSE | never evaluated |
&& cos_line <= 1.0TRUE | evaluated 182 times by 1 test | FALSE | evaluated 1 time by 1 test |
) rad = qAcos( cos_line );executed 182 times by 1 test: rad = qAcos( cos_line ); | 0-183 |
130 | returnexecuted 183 times by 1 test: return rad * 360 / 6.28318530717958647692528676655900576; rad * 360 / 6.28318530717958647692528676655900576;executed 183 times by 1 test: return rad * 360 / 6.28318530717958647692528676655900576; | 183 |
131 | } | - |
132 | | - |
133 | | - |
134 | | - |
135 | QDebug operator<<(QDebug dbg, const QLineF &p) | - |
136 | { | - |
137 | QDebugStateSaver saver(dbg); | - |
138 | dbg.nospace() << "QLineF(" << p.p1() << ',' << p.p2() << ')'; | - |
139 | returnexecuted 2 times by 2 tests: return dbg; dbg;executed 2 times by 2 tests: return dbg; | 2 |
140 | } | - |
141 | QDataStream &operator<<(QDataStream &stream, const QLineF &line) | - |
142 | { | - |
143 | stream << line.p1() << line.p2(); | - |
144 | returnexecuted 3 times by 2 tests: return stream; Executed by:- tst_QMetaType
- tst_QVariant
stream;executed 3 times by 2 tests: return stream; Executed by:- tst_QMetaType
- tst_QVariant
| 3 |
145 | } | - |
146 | QDataStream &operator>>(QDataStream &stream, QLineF &line) | - |
147 | { | - |
148 | QPointF start, end; | - |
149 | stream >> start; | - |
150 | stream >> end; | - |
151 | line = QLineF(start, end); | - |
152 | | - |
153 | returnexecuted 7 times by 2 tests: return stream; Executed by:- tst_QMetaType
- tst_QVariant
stream;executed 7 times by 2 tests: return stream; Executed by:- tst_QMetaType
- tst_QVariant
| 7 |
154 | } | - |
155 | | - |
156 | | - |
157 | | - |
158 | | - |
| | |