summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qsurfaceformat.cpp4
-rw-r--r--src/gui/painting/qpainterpath.cpp24
-rw-r--r--src/gui/painting/qpainterpath.h5
-rw-r--r--src/gui/painting/qpainterpath_p.h1
4 files changed, 23 insertions, 11 deletions
diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp
index 59c469ae6b6..b53e1a63870 100644
--- a/src/gui/kernel/qsurfaceformat.cpp
+++ b/src/gui/kernel/qsurfaceformat.cpp
@@ -552,7 +552,7 @@ void QSurfaceFormat::setAlphaBufferSize(int size)
and used choice is the former (16-bit), for example when high dynamic range
rendering is desired.
- \since 6.10
+ \since 6.11
\sa colorComponentType()
*/
@@ -567,7 +567,7 @@ void QSurfaceFormat::setColorComponentType(ColorComponentType type)
/*!
\return the color component type.
- \since 6.10
+ \since 6.11
\sa setColorComponentType()
*/
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index b13b1bcad34..a6e540015d7 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -36,6 +36,8 @@
QT_BEGIN_NAMESPACE
+QT_DEFINE_QESDP_SPECIALIZATION_DTOR(QPainterPathPrivate)
+
static inline bool isValidCoord(qreal c)
{
if (sizeof(qreal) >= sizeof(double))
@@ -512,6 +514,15 @@ QPainterPath::QPainterPath() noexcept
QPainterPath::QPainterPath(const QPainterPath &other) = default;
/*!
+ \fn QPainterPath::QPainterPath(QPainterPath &&other)
+ \since 6.10
+
+ Move-constructs a new painter path from \a other.
+
+ The moved-from object \a other is placed in the default-constructed state.
+*/
+
+/*!
Creates a QPainterPath object with the given \a startPoint as its
current position.
*/
@@ -3193,9 +3204,10 @@ qreal QPainterPath::slopeAtPercent(qreal t) const
/*!
\since 6.10
- Returns the section of the path between the length fractions \a f1 and \a f2. The effective range
- of the fractions are from 0, denoting the start point of the path, to 1, denoting its end point.
- The fractions are linear with respect to path length, in contrast to the percentage \e t values.
+ Returns the section of the path between the length fractions \a fromFraction and \a toFraction.
+ The effective range of the fractions are from 0, denoting the start point of the path, to 1,
+ denoting its end point. The fractions are linear with respect to path length, in contrast to the
+ percentage \e t values.
The value of \a offset will be added to the fraction values. If that causes an over- or underflow
of the [0, 1] range, the values will be wrapped around, as will the resulting path. The effective
@@ -3206,13 +3218,13 @@ qreal QPainterPath::slopeAtPercent(qreal t) const
\sa length(), percentAtLength(), setCachingEnabled()
*/
-QPainterPath QPainterPath::trimmed(qreal f1, qreal f2, qreal offset) const
+QPainterPath QPainterPath::trimmed(qreal fromFraction, qreal toFraction, qreal offset) const
{
if (isEmpty())
return *this;
- f1 = qBound(qreal(0), f1, qreal(1));
- f2 = qBound(qreal(0), f2, qreal(1));
+ qreal f1 = qBound(qreal(0), fromFraction, qreal(1));
+ qreal f2 = qBound(qreal(0), toFraction, qreal(1));
if (f1 > f2)
qSwap(f1, f2);
if (qFuzzyCompare(f2 - f1, qreal(1))) // Shortcut for no trimming
diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h
index 2d502936dfd..2e449a8835e 100644
--- a/src/gui/painting/qpainterpath.h
+++ b/src/gui/painting/qpainterpath.h
@@ -17,7 +17,6 @@ QT_BEGIN_NAMESPACE
class QFont;
class QPainterPathPrivate;
-struct QPainterPathPrivateDeleter;
class QPainterPathStrokerPrivate;
class QPen;
class QPolygonF;
@@ -25,6 +24,7 @@ class QRegion;
class QTransform;
class QVectorPath;
+QT_DECLARE_QESDP_SPECIALIZATION_DTOR(QPainterPathPrivate)
class Q_GUI_EXPORT QPainterPath
{
public:
@@ -56,6 +56,7 @@ public:
explicit QPainterPath(const QPointF &startPoint);
QPainterPath(const QPainterPath &other);
QPainterPath &operator=(const QPainterPath &other);
+ QPainterPath(QPainterPath &&other) noexcept = default;
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QPainterPath)
~QPainterPath();
@@ -141,7 +142,7 @@ public:
QPointF pointAtPercent(qreal t) const;
qreal angleAtPercent(qreal t) const;
qreal slopeAtPercent(qreal t) const;
- [[nodiscard]] QPainterPath trimmed(qreal f1, qreal f2, qreal offset = 0) const;
+ [[nodiscard]] QPainterPath trimmed(qreal fromFraction, qreal toFraction, qreal offset = 0) const;
bool intersects(const QPainterPath &p) const;
bool contains(const QPainterPath &p) const;
diff --git a/src/gui/painting/qpainterpath_p.h b/src/gui/painting/qpainterpath_p.h
index de8aedb5be4..aaa22355cd8 100644
--- a/src/gui/painting/qpainterpath_p.h
+++ b/src/gui/painting/qpainterpath_p.h
@@ -100,7 +100,6 @@ public:
friend class QPainterPathStrokerPrivate;
friend class QTransform;
friend class QVectorPath;
- friend struct QPainterPathPrivateDeleter;
#ifndef QT_NO_DATASTREAM
friend Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QPainterPath &);
friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QPainterPath &);