summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qbrush.cpp
diff options
context:
space:
mode:
authorHarald Fernengel <harald@trolltech.com>2009-08-24 08:29:45 (GMT)
committerHarald Fernengel <harald@trolltech.com>2009-08-24 08:31:31 (GMT)
commit84081ce91c56168edd686a404b405dcad5f74106 (patch)
treed87584eafc3fef2079e20253db56529caba275be /src/gui/painting/qbrush.cpp
parent94c444e71e6a36cfbd3782416200ff20bdd1cea9 (diff)
downloadQt-84081ce91c56168edd686a404b405dcad5f74106.zip
Qt-84081ce91c56168edd686a404b405dcad5f74106.tar.gz
Qt-84081ce91c56168edd686a404b405dcad5f74106.tar.bz2
Remove QScopedCustomPointer
Use QScopedPointer with a custom deleter instead, so we can remove the awful QScopedCustomPointer once and for all :) Reviewed-by: Thiago
Diffstat (limited to 'src/gui/painting/qbrush.cpp')
-rw-r--r--src/gui/painting/qbrush.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index b005842..a52a270 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -389,20 +389,20 @@ void QBrush::init(const QColor &color, Qt::BrushStyle style)
{
switch(style) {
case Qt::NoBrush:
- d.data_ptr() = nullBrushInstance();
+ d.reset(nullBrushInstance());
d->ref.ref();
if (d->color != color) setColor(color);
return;
case Qt::TexturePattern:
- d.data_ptr() = new QTexturedBrushData;
+ d.reset(new QTexturedBrushData);
break;
case Qt::LinearGradientPattern:
case Qt::RadialGradientPattern:
case Qt::ConicalGradientPattern:
- d.data_ptr() = new QGradientBrushData;
+ d.reset(new QGradientBrushData);
break;
default:
- d.data_ptr() = new QBrushData;
+ d.reset(new QBrushData);
break;
}
d->ref = 1;
@@ -460,7 +460,7 @@ QBrush::QBrush(Qt::BrushStyle style)
if (qbrush_check_type(style))
init(Qt::black, style);
else {
- d.data_ptr() = nullBrushInstance();
+ d.reset(nullBrushInstance());
d->ref.ref();
}
}
@@ -476,7 +476,7 @@ QBrush::QBrush(const QColor &color, Qt::BrushStyle style)
if (qbrush_check_type(style))
init(color, style);
else {
- d.data_ptr() = nullBrushInstance();
+ d.reset(nullBrushInstance());
d->ref.ref();
}
}
@@ -493,7 +493,7 @@ QBrush::QBrush(Qt::GlobalColor color, Qt::BrushStyle style)
if (qbrush_check_type(style))
init(color, style);
else {
- d.data_ptr() = nullBrushInstance();
+ d.reset(nullBrushInstance());
d->ref.ref();
}
}