From a144820ae775c630bc9aed40c35af3f93518187c Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 21 Jul 2020 15:15:06 +0200 Subject: [PATCH] QLine: swap IntersectType and IntersectionType Make IntersectionType the enum and the obsolete IntersectType an alias, with at least a comment to say it's deprecated. Adjust the docs to match. Task-number: QTBUG-85700 Change-Id: I0de9166b0d936f5b9a15fdd4f90cf7b01198e8d7 Reviewed-by: Konstantin Shegunov Reviewed-by: Lars Knoll --- src/corelib/tools/qline.cpp | 11 ++--------- src/corelib/tools/qline.h | 7 ++++--- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp index e652f84772..1b029a0b8e 100644 --- a/src/corelib/tools/qline.cpp +++ b/src/corelib/tools/qline.cpp @@ -363,19 +363,12 @@ QDataStream &operator>>(QDataStream &stream, QLine &line) */ /*! - \enum QLineF::IntersectType + \typealias QLineF::IntersectType \obsolete Use QLineF::IntersectionType instead. - - \value NoIntersection - Lines do not intersect. - \value UnboundedIntersection - Lines intersect, but not within the range defined by their lengths. - \value BoundedIntersection - Lnes intersect within the range defined by their lengths. */ /*! - \typealias QLineF::IntersectionType + \enum QLineF::IntersectionType Describes the intersection between two lines. diff --git a/src/corelib/tools/qline.h b/src/corelib/tools/qline.h index 8889c4afb9..b11c23e05a 100644 --- a/src/corelib/tools/qline.h +++ b/src/corelib/tools/qline.h @@ -213,11 +213,12 @@ Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QLine &); /******************************************************************************* * class QLineF *******************************************************************************/ -class Q_CORE_EXPORT QLineF { +class Q_CORE_EXPORT QLineF +{ public: - enum IntersectType { NoIntersection, BoundedIntersection, UnboundedIntersection }; - using IntersectionType = IntersectType; + enum IntersectionType { NoIntersection, BoundedIntersection, UnboundedIntersection }; + using IntersectType = IntersectionType; // deprecated name constexpr inline QLineF(); constexpr inline QLineF(const QPointF &pt1, const QPointF &pt2);