Commit fa8c52da authored by Patrick José Pereira's avatar Patrick José Pereira

QGCMapPolyline: Remove deprecated intersect function

Signed-off-by: 's avatarPatrick José Pereira <patrickelectric@gmail.com>
parent f35613ca
......@@ -329,7 +329,12 @@ QList<QGeoCoordinate> QGCMapPolyline::offsetPolyline(double distance)
// Intersect the offset edges to generate new central vertices
QPointF newVertex;
for (int i=1; i<rgOffsetEdges.count(); i++) {
if (rgOffsetEdges[i - 1].intersect(rgOffsetEdges[i], &newVertex) == QLineF::NoIntersection) {
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
auto intersect = rgOffsetEdges[i - 1].intersect(rgOffsetEdges[i], &newVertex);
#else
auto intersect = rgOffsetEdges[i - 1].intersects(rgOffsetEdges[i], &newVertex);
#endif
if (intersect == QLineF::NoIntersection) {
// Two lines are colinear
newVertex = rgOffsetEdges[i].p2();
}
......
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