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
Valentin Platzgummer
qgroundcontrol
Commits
4f57cbfd
Commit
4f57cbfd
authored
Jun 05, 2020
by
Patrick José Pereira
Browse files
QGCMapPolygon: Remove deprecated intersect function
Signed-off-by:
Patrick José Pereira
<
patrickelectric@gmail.com
>
parent
bb855cc2
Changes
1
Show whitespace changes
Inline
Side-by-side
src/MissionManager/QGCMapPolygon.cc
View file @
4f57cbfd
...
@@ -453,7 +453,12 @@ void QGCMapPolygon::offset(double distance)
...
@@ -453,7 +453,12 @@ void QGCMapPolygon::offset(double distance)
QGeoCoordinate
tangentOrigin
=
vertexCoordinate
(
0
);
QGeoCoordinate
tangentOrigin
=
vertexCoordinate
(
0
);
for
(
int
i
=
0
;
i
<
rgOffsetEdges
.
count
();
i
++
)
{
for
(
int
i
=
0
;
i
<
rgOffsetEdges
.
count
();
i
++
)
{
int
prevIndex
=
i
==
0
?
rgOffsetEdges
.
count
()
-
1
:
i
-
1
;
int
prevIndex
=
i
==
0
?
rgOffsetEdges
.
count
()
-
1
:
i
-
1
;
if
(
rgOffsetEdges
[
prevIndex
].
intersect
(
rgOffsetEdges
[
i
],
&
newVertex
)
==
QLineF
::
NoIntersection
)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
auto
intersect
=
rgOffsetEdges
[
prevIndex
].
intersect
(
rgOffsetEdges
[
i
],
&
newVertex
);
#else
auto
intersect
=
rgOffsetEdges
[
prevIndex
].
intersects
(
rgOffsetEdges
[
i
],
&
newVertex
);
#endif
if
(
intersect
==
QLineF
::
NoIntersection
)
{
// FIXME: Better error handling?
// FIXME: Better error handling?
qWarning
(
"Intersection failed"
);
qWarning
(
"Intersection failed"
);
return
;
return
;
...
...
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