diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2023-08-31 13:20:31 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2023-09-06 08:55:46 +0200 |
commit | 03dab7544eef6205d751003453d7c316c983b096 (patch) | |
tree | a994520869be92244510275314be7b0a2875a7af /src/quick/util/qquickpath.cpp | |
parent | e898c06759b5c5a6138fac6f9a2cb31388ea3da9 (diff) |
Rename Path.simplified to simplify
simplified() sounds like it should be invokable, since we have
precedents like QString::simplified() and QPainterPath::simplified().
We might even want a QML API like that some day.
The new name more clearly indicates that it will internally simplify
itself.
Pick-to: 6.6
Change-Id: I6b6ced667f78317c374fa02338752d15b35b8ed4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/quick/util/qquickpath.cpp')
-rw-r--r-- | src/quick/util/qquickpath.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/quick/util/qquickpath.cpp b/src/quick/util/qquickpath.cpp index 6aa4d49651..da43df7b1a 100644 --- a/src/quick/util/qquickpath.cpp +++ b/src/quick/util/qquickpath.cpp @@ -372,7 +372,7 @@ void QQuickPath::processPath() d->_path = createPath(QPointF(), QPointF(), d->_attributes, d->pathLength, d->_attributePoints, &d->closed); } - if (d->simplified) + if (d->simplify) d->_path = d->_path.simplified(); emit changed(); @@ -715,7 +715,7 @@ void QQuickPath::invalidateSequentialHistory() const d->prevBez.isValid = false; } -/*! \qmlproperty bool QtQuick::Path::simplified +/*! \qmlproperty bool QtQuick::Path::simplify \since 6.6 When set to true, the path will be simplified. This implies merging all subpaths that intersect, @@ -723,22 +723,22 @@ void QQuickPath::invalidateSequentialHistory() const merged. The simplified path is intended to be used with ShapePath.OddEvenFill. Bezier curves may be flattened to line segments due to numerical instability of doing bezier curve intersections. */ -void QQuickPath::setSimplified(bool simplified) +void QQuickPath::setSimplify(bool s) { Q_D(QQuickPath); - if (d->simplified == simplified) + if (d->simplify == s) return; - d->simplified = simplified; + d->simplify = s; processPath(); - emit simplifiedChanged(); + emit simplifyChanged(); } -bool QQuickPath::simplified() const +bool QQuickPath::simplify() const { Q_D(const QQuickPath); - return d->simplified; + return d->simplify; } /*! |