Qt 4.8
Static Public Functions | List of all members
QBrushDataPointerDeleter Struct Reference

Static Public Functions

static void cleanup (QBrushData *d)
 
static void deleteData (QBrushData *d)
 

Detailed Description

Definition at line 236 of file qbrush.cpp.

Functions

◆ cleanup()

static void QBrushDataPointerDeleter::cleanup ( QBrushData d)
inlinestatic

Definition at line 254 of file qbrush.cpp.

255  {
256  if (d && !d->ref.deref()) {
257  deleteData(d);
258  }
259  }
bool deref()
Atomically decrements the value of this QAtomicInt.
QAtomicInt ref
Definition: qbrush.h:176
static void deleteData(QBrushData *d)
Definition: qbrush.cpp:238

◆ deleteData()

static void QBrushDataPointerDeleter::deleteData ( QBrushData d)
inlinestatic

Definition at line 238 of file qbrush.cpp.

Referenced by QBrush::cleanUp().

239  {
240  switch (d->style) {
241  case Qt::TexturePattern:
242  delete static_cast<QTexturedBrushData*>(d);
243  break;
247  delete static_cast<QGradientBrushData*>(d);
248  break;
249  default:
250  delete d;
251  }
252  }
double d
Definition: qnumeric_p.h:62
Qt::BrushStyle style
Definition: qbrush.h:177

The documentation for this struct was generated from the following file: