diff options
author | Harald Fernengel <harald@trolltech.com> | 2009-06-15 12:17:17 (GMT) |
---|---|---|
committer | Harald Fernengel <harald@trolltech.com> | 2009-06-15 12:17:17 (GMT) |
commit | 217d263ee1feb5a0c2b19d634093f4c7975ac7c9 (patch) | |
tree | 72bdeece4c24b515926a6904b53d484e61b3d534 /src/gui/painting/qpainterpath.h | |
parent | 2a91ca517826c8a4e5f432ad026106542f02f852 (diff) | |
download | Qt-217d263ee1feb5a0c2b19d634093f4c7975ac7c9.zip Qt-217d263ee1feb5a0c2b19d634093f4c7975ac7c9.tar.gz Qt-217d263ee1feb5a0c2b19d634093f4c7975ac7c9.tar.bz2 |
Fixes leak introduced by QScopedPointer
QPainterPath is kinda evil with a somewhat public private class and a
really private cast, so we need to up-cast the d pointer when deleting.
RevBy: aportale
Diffstat (limited to 'src/gui/painting/qpainterpath.h')
-rw-r--r-- | src/gui/painting/qpainterpath.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h index 0513593..e12194e 100644 --- a/src/gui/painting/qpainterpath.h +++ b/src/gui/painting/qpainterpath.h @@ -57,6 +57,7 @@ QT_MODULE(Gui) class QFont; class QPainterPathPrivate; +struct QPainterPathPrivateHandler; class QPainterPathData; class QPainterPathStrokerPrivate; class QPolygonF; @@ -196,7 +197,7 @@ public: QPainterPath &operator-=(const QPainterPath &other); private: - QScopedSharedPointer<QPainterPathPrivate> d_ptr; + QScopedCustomPointer<QPainterPathPrivate, QPainterPathPrivateHandler> d_ptr; inline void ensureData() { if (!d_ptr) ensureData_helper(); } void ensureData_helper(); @@ -230,8 +231,7 @@ public: friend class QPainterPathStrokerPrivate; friend class QMatrix; friend class QTransform; - friend class QScopedSharedPointer<QPainterPathPrivate>; - friend class QScopedSharedPointerHandler<QPainterPathPrivate>; + friend struct QPainterPathPrivateHandler; #ifndef QT_NO_DATASTREAM friend Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QPainterPath &); friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QPainterPath &); |