diff options
Diffstat (limited to 'src/gui/painting/qbrush.h')
-rw-r--r-- | src/gui/painting/qbrush.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/painting/qbrush.h b/src/gui/painting/qbrush.h index 6dbb94b..5479305 100644 --- a/src/gui/painting/qbrush.h +++ b/src/gui/painting/qbrush.h @@ -45,6 +45,7 @@ #include <QtCore/qpair.h> #include <QtCore/qpoint.h> #include <QtCore/qvector.h> +#include <QtCore/qscopedpointer.h> #include <QtGui/qcolor.h> #include <QtGui/qmatrix.h> #include <QtGui/qtransform.h> @@ -61,6 +62,7 @@ struct QBrushData; class QPixmap; class QGradient; class QVariant; +struct QBrushDataPointerHandler; class Q_GUI_EXPORT QBrush { @@ -126,13 +128,13 @@ private: friend bool Q_GUI_EXPORT qHasPixmapTexture(const QBrush& brush); void detach(Qt::BrushStyle newStyle); void init(const QColor &color, Qt::BrushStyle bs); - QBrushData *d; + QScopedCustomPointer<QBrushData, QBrushDataPointerHandler> d; void cleanUp(QBrushData *x); public: inline bool isDetached() const; typedef QBrushData * DataPtr; - inline DataPtr &data_ptr() { return d; } + inline DataPtr &data_ptr() { return d.data_ptr(); } }; inline void QBrush::setColor(Qt::GlobalColor acolor) |