diff options
Diffstat (limited to 'src/gui/painting/qpainterpath.cpp')
-rw-r--r-- | src/gui/painting/qpainterpath.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index 38acc66ba4..46a525b7a0 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -88,15 +88,6 @@ static bool hasValidCoords(QRectF r) return isValidCoord(r.x()) && isValidCoord(r.y()) && isValidCoord(r.width()) && isValidCoord(r.height()); } -struct QPainterPathPrivateDeleter -{ - static inline void cleanup(QPainterPathPrivate *d) - { - if (d && !d->ref.deref()) - delete d; - } -}; - // This value is used to determine the length of control point vectors // when approximating arc segments as curves. The factor is multiplied // with the radius of the circle. @@ -575,23 +566,13 @@ QPainterPath::QPainterPath(const QPointF &startPoint) void QPainterPath::detach() { - if (d_ptr->ref.loadRelaxed() != 1) - detach_helper(); + d_ptr.detach(); setDirty(true); } /*! \internal */ -void QPainterPath::detach_helper() -{ - QPainterPathPrivate *data = new QPainterPathPrivate(*d_func()); - d_ptr.reset(data); -} - -/*! - \internal -*/ void QPainterPath::ensureData_helper() { QPainterPathPrivate *data = new QPainterPathPrivate; |