summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qstroker.cpp
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-03-03 12:06:58 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-03-05 17:56:45 +0000
commit10ec683a968486df68c013f456df4d1798ea27d3 (patch)
treefe8e12527e68529579a97ac1993d78b15e80160f /src/gui/painting/qstroker.cpp
parentef0a77d87230d7875522e517b3e6c99ce3b7113e (diff)
QLineF: mark angle(const QLineF&) as deprecated
QLineF::angle(const QLineF&) was deprecated during Qt4 times but not decorated with QT_DEPRECATED_X. Add this so it can be removed with Qt6 Change-Id: I8950b646cc5fa8206e47bdd16647d17d615f6c6a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/painting/qstroker.cpp')
-rw-r--r--src/gui/painting/qstroker.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp
index c01531caf2..f8f8d72d14 100644
--- a/src/gui/painting/qstroker.cpp
+++ b/src/gui/painting/qstroker.cpp
@@ -173,15 +173,12 @@ template <class Iterator> bool qt_stroke_side(Iterator *it, QStroker *stroker,
bool capFirst, QLineF *startTangent);
/*******************************************************************************
- * QLineF::angle gives us the smalles angle between two lines. Here we
- * want to identify the line's angle direction on the unit circle.
+ * QLineF::angleTo gives us the angle between two lines with respecting the direction.
+ * Here we want to identify the line's angle direction on the unit circle.
*/
static inline qreal adapted_angle_on_x(const QLineF &line)
{
- qreal angle = line.angle(QLineF(0, 0, 1, 0));
- if (line.dy() > 0)
- angle = 360 - angle;
- return angle;
+ return QLineF(0, 0, 1, 0).angleTo(line);
}
QStrokerOps::QStrokerOps()