From 35a21fdd1f996faf7582776b6965fde3ce353154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Fri, 5 Jun 2020 13:44:19 -0300 Subject: [PATCH] QGroundControlQmlGlobal: Remove deprecated intersect function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/QmlControls/QGroundControlQmlGlobal.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/QmlControls/QGroundControlQmlGlobal.cc b/src/QmlControls/QGroundControlQmlGlobal.cc index 20ac868a1..8ab82bcd7 100644 --- a/src/QmlControls/QGroundControlQmlGlobal.cc +++ b/src/QmlControls/QGroundControlQmlGlobal.cc @@ -221,7 +221,13 @@ bool QGroundControlQmlGlobal::linesIntersect(QPointF line1A, QPointF line1B, QPo { QPointF intersectPoint; - return QLineF(line1A, line1B).intersect(QLineF(line2A, line2B), &intersectPoint) == QLineF::BoundedIntersection && +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) + auto intersect = QLineF(line1A, line1B).intersect(QLineF(line2A, line2B), &intersectPoint); +#else + auto intersect = QLineF(line1A, line1B).intersects(QLineF(line2A, line2B), &intersectPoint); +#endif + + return intersect == QLineF::BoundedIntersection && intersectPoint != line1A && intersectPoint != line1B; } -- 2.22.0