diff options
author | Harald Fernengel <harald@trolltech.com> | 2009-08-13 13:29:25 (GMT) |
---|---|---|
committer | Harald Fernengel <harald@trolltech.com> | 2009-08-13 13:31:41 (GMT) |
commit | 7bce80068d1e8cc54ac129abb53545d6fad69bc1 (patch) | |
tree | 5bce95d9ebf3d373d9c7293ba804c74c14a0323f /src/gui/painting | |
parent | 962a44bb6113d095b64eb90fa5e6c70944c9c16a (diff) | |
download | Qt-7bce80068d1e8cc54ac129abb53545d6fad69bc1.zip Qt-7bce80068d1e8cc54ac129abb53545d6fad69bc1.tar.gz Qt-7bce80068d1e8cc54ac129abb53545d6fad69bc1.tar.bz2 |
Replace QCustomScopedPointer with QScopedPointer
First step to get rid of QCustomScopedPointer class
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 6 | ||||
-rw-r--r-- | src/gui/painting/qpainter.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 66e250f..fe1fb06 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -264,7 +264,8 @@ bool QPainterPrivate::attachPainterPrivate(QPainter *q, QPaintDevice *pdev) sp->d_ptr->d_ptrs = q_check_ptr((QPainterPrivate **)realloc(sp->d_ptr->d_ptrs, newSize)); } sp->d_ptr->d_ptrs[++sp->d_ptr->refcount - 2] = q->d_ptr.data(); - q->d_ptr.data_ptr() = sp->d_ptr.data(); + q->d_ptr.take(); + q->d_ptr.reset(sp->d_ptr.data()); Q_ASSERT(q->d_ptr->state); @@ -317,7 +318,8 @@ void QPainterPrivate::detachPainterPrivate(QPainter *q) d_ptrs[refcount - 1] = 0; q->restore(); - q->d_ptr.data_ptr() = original; + q->d_ptr.take(); + q->d_ptr.reset(original); if (emulationEngine) { extended = emulationEngine->real_engine; diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h index d660f03..14d1cf8 100644 --- a/src/gui/painting/qpainter.h +++ b/src/gui/painting/qpainter.h @@ -500,7 +500,7 @@ private: Q_DISABLE_COPY(QPainter) friend class Q3Painter; - QCustomScopedPointer<QPainterPrivate> d_ptr; + QScopedPointer<QPainterPrivate> d_ptr; friend class QFontEngine; friend class QFontEngineBox; |