Commit 4f57cbfd authored by Patrick José Pereira's avatar Patrick José Pereira

QGCMapPolygon: Remove deprecated intersect function

Signed-off-by: 's avatarPatrick José Pereira <patrickelectric@gmail.com>
parent bb855cc2
......@@ -453,7 +453,12 @@ void QGCMapPolygon::offset(double distance)
QGeoCoordinate tangentOrigin = vertexCoordinate(0);
for (int i=0; i<rgOffsetEdges.count(); i++) {
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?
qWarning("Intersection failed");
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment