summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qline.h
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-03-03 12:14:43 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-04-25 17:58:40 +0000
commitc530ca1c170798159c3d84029841a1224d1cdc65 (patch)
tree99636a80d404634838ea440d9c066dd614e21839 /src/corelib/tools/qline.h
parent220028d37c38835987b817193ecaf0e2a1ad066b (diff)
QLineF: add intersects() as a replacement for intersect()
QLineF::intersect() does not follow the naming rules for functions. Therefore add a replacement function intersects() instead and also rename the return type from IntersectType to IntersectionType [ChangeLog][QtCore][QLineF] added QLineF::intersects() as a replacement for QLineF::intersect() Change-Id: I744b960ea339cb817facb12f296f78cca3e7d938 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Diffstat (limited to 'src/corelib/tools/qline.h')
-rw-r--r--src/corelib/tools/qline.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/tools/qline.h b/src/corelib/tools/qline.h
index 14980b60a0..c96d624afd 100644
--- a/src/corelib/tools/qline.h
+++ b/src/corelib/tools/qline.h
@@ -215,6 +215,7 @@ class Q_CORE_EXPORT QLineF {
public:
enum IntersectType { NoIntersection, BoundedIntersection, UnboundedIntersection };
+ using IntersectionType = IntersectType;
Q_DECL_CONSTEXPR inline QLineF();
Q_DECL_CONSTEXPR inline QLineF(const QPointF &pt1, const QPointF &pt2);
@@ -248,10 +249,11 @@ public:
Q_REQUIRED_RESULT QLineF unitVector() const;
Q_REQUIRED_RESULT Q_DECL_CONSTEXPR inline QLineF normalVector() const;
- // ### Qt 6: rename intersects() or intersection() and rename IntersectType IntersectionType
- IntersectType intersect(const QLineF &l, QPointF *intersectionPoint) const;
+ IntersectionType intersects(const QLineF &l, QPointF *intersectionPoint) const;
#if QT_DEPRECATED_SINCE(5, 14)
+ QT_DEPRECATED_VERSION_X(5, 14, "Use intersects() instead")
+ IntersectType intersect(const QLineF &l, QPointF *intersectionPoint) const;
QT_DEPRECATED_X("Use angleTo() instead, take care that the return value is between 0 and 360 degree.")
qreal angle(const QLineF &l) const;
#endif