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 <kshegunov@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Edward Welbourne 2020-07-21 15:15:06 +02:00
parent 26547c296b
commit a144820ae7
2 changed files with 6 additions and 12 deletions

View File

@ -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.

View File

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