From 86a4701d2ba22d6b8c4a55ba8cbdeaa8d79069b1 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Thu, 28 May 2020 19:02:50 +0200 Subject: [PATCH] fix deprecated warning QLineF::intersect This function is obsolete. Use QLineF::intersects(const QLineF &line, QPointF *intersectionPoint) const instead. This function was introduced in Qt 5.14. --- sources/qet.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sources/qet.cpp b/sources/qet.cpp index 83e716afe..0b5c68a71 100644 --- a/sources/qet.cpp +++ b/sources/qet.cpp @@ -173,7 +173,11 @@ bool QET::orthogonalProjection(const QPointF &point, const QLineF &line, QPointF // determine le point d'intersection des deux droites = le projete orthogonal QPointF intersection_point; - QLineF::IntersectType it = line.intersect(perpendicular_line, &intersection_point); +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) + QLineF::IntersectType it = line.intersect(perpendicular_line, &intersection_point); // ### Qt 6: remove +#else + QLineF::IntersectType it = line.intersects(perpendicular_line, &intersection_point); +#endif // ne devrait pas arriver (mais bon...) if (it == QLineF::NoIntersection) return(false);