Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
KmPlot
Commits
b478528c
Commit
b478528c
authored
Oct 17, 2022
by
Nicolas Fella
Browse files
Port away from deprecated QLineF::intersect
parent
88dd56a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
kmplot/view.cpp
View file @
b478528c
...
...
@@ -1923,13 +1923,13 @@ void View::drawLabel(QPainter *painter, const QColor &color, const QPointF &real
QPointF
intersect
=
bestCenter
;
// Where does line intersect the rectangle?
if
(
QLineF
(
rect
.
topLeft
(),
rect
.
topRight
()).
intersect
(
line
,
&
intersect
)
==
QLineF
::
BoundedIntersection
)
if
(
QLineF
(
rect
.
topLeft
(),
rect
.
topRight
()).
intersect
s
(
line
,
&
intersect
)
==
QLineF
::
BoundedIntersection
)
lineStart
=
intersect
;
else
if
(
QLineF
(
rect
.
topRight
(),
rect
.
bottomRight
()).
intersect
(
line
,
&
intersect
)
==
QLineF
::
BoundedIntersection
)
else
if
(
QLineF
(
rect
.
topRight
(),
rect
.
bottomRight
()).
intersect
s
(
line
,
&
intersect
)
==
QLineF
::
BoundedIntersection
)
lineStart
=
intersect
;
else
if
(
QLineF
(
rect
.
bottomRight
(),
rect
.
bottomLeft
()).
intersect
(
line
,
&
intersect
)
==
QLineF
::
BoundedIntersection
)
else
if
(
QLineF
(
rect
.
bottomRight
(),
rect
.
bottomLeft
()).
intersect
s
(
line
,
&
intersect
)
==
QLineF
::
BoundedIntersection
)
lineStart
=
intersect
;
else
if
(
QLineF
(
rect
.
bottomLeft
(),
rect
.
topLeft
()).
intersect
(
line
,
&
intersect
)
==
QLineF
::
BoundedIntersection
)
else
if
(
QLineF
(
rect
.
bottomLeft
(),
rect
.
topLeft
()).
intersect
s
(
line
,
&
intersect
)
==
QLineF
::
BoundedIntersection
)
lineStart
=
intersect
;
painter
->
drawLine
(
lineStart
,
pixelCenter
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment