mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 16:50:53 +01:00
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:
committed by
Laurent Trinques
parent
0611fe2798
commit
86a4701d2b
@@ -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
|
// determine le point d'intersection des deux droites = le projete orthogonal
|
||||||
QPointF intersection_point;
|
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...)
|
// ne devrait pas arriver (mais bon...)
|
||||||
if (it == QLineF::NoIntersection) return(false);
|
if (it == QLineF::NoIntersection) return(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user