diff options
-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; |