From 95b5a56071b30217735a2fc37ab25c347ca437b6 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Tue, 23 Jun 2020 12:52:53 +0200 Subject: Improve deprecation message for QLine::angle(QLine) angleTo() always gives an answer measured ccw, so between 0 and 360 degrees. The deprecated angle() would give either cw or ccw, depending on which is smaller, so between 0 and 180 degrees. Help users porting by showing a simple way to achieve the angle() behavior in the deprecation message. Change-Id: I66f77d2b4e688562e443428209737aa3332a448f Pick-to: 5.15 Fixes: QTBUG-85087 Reviewed-by: Lars Knoll --- src/corelib/tools/qline.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/tools/qline.h') diff --git a/src/corelib/tools/qline.h b/src/corelib/tools/qline.h index c96d624afd..d4f62024d1 100644 --- a/src/corelib/tools/qline.h +++ b/src/corelib/tools/qline.h @@ -254,7 +254,7 @@ public: #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.") + QT_DEPRECATED_X("Use qMin(l1.angleTo(l2), l2.angleTo(l1)) instead") qreal angle(const QLineF &l) const; #endif -- cgit v1.2.3