From c5b5cd3d704bf7c84634188d44c5208fbe55e25b Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Wed, 1 Jul 2009 12:00:16 +1000 Subject: OpenVG compile fix - use const_cast instead of static_cast Reviewed-by: trustme --- src/openvg/qpaintengine_vg.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index 37945bf..c7fe604 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -1320,11 +1320,11 @@ QPainterState *QVGPaintEngine::createState(QPainterState *orig) const if (!orig) { return new QVGPainterState(); } else { - QVGPaintEnginePrivate *d = - static_cast(d_ptr); + Q_D(const QVGPaintEngine); + QVGPaintEnginePrivate *d2 = const_cast(d); QVGPainterState *origState = static_cast(orig); - origState->savedDirty = d->dirty; - d->dirty = 0; + origState->savedDirty = d2->dirty; + d2->dirty = 0; return new QVGPainterState(*origState); } } -- cgit v0.12