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.
This commit is contained in:
Simon De Backer
2020-05-28 19:02:50 +02:00
committed by Laurent Trinques
parent 0611fe2798
commit 86a4701d2b

View File

@@ -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);