src/gui/painting/qpaintengine_s60.cpp
branchRCL_3
changeset 4 3b1da2848fc7
parent 0 1918ee327afb
equal deleted inserted replaced
3:41300fa6a67c 4:3b1da2848fc7
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
    45 QT_BEGIN_NAMESPACE
    45 QT_BEGIN_NAMESPACE
    46 
    46 
    47 class QS60PaintEnginePrivate : public QRasterPaintEnginePrivate
    47 class QS60PaintEnginePrivate : public QRasterPaintEnginePrivate
    48 {
    48 {
    49 public:
    49 public:
    50     QS60PaintEnginePrivate(QS60PaintEngine *engine) { Q_UNUSED(engine); }
    50     QS60PaintEnginePrivate() {}
    51 };
    51 };
    52 
    52 
    53 QS60PaintEngine::QS60PaintEngine(QPaintDevice *device, QS60PixmapData *data)
    53 QS60PaintEngine::QS60PaintEngine(QPaintDevice *device, QS60PixmapData *data)
    54     : QRasterPaintEngine(*(new QS60PaintEnginePrivate(this)), device), pixmapData(data)
    54     : QRasterPaintEngine(*(new QS60PaintEnginePrivate), device), pixmapData(data)
    55 {
    55 {
    56 }
    56 }
    57 
    57 
    58 bool QS60PaintEngine::begin(QPaintDevice *device)
    58 bool QS60PaintEngine::begin(QPaintDevice *device)
    59 {
    59 {
       
    60     Q_D(QS60PaintEngine);
       
    61 
    60     pixmapData->beginDataAccess();
    62     pixmapData->beginDataAccess();
    61     return QRasterPaintEngine::begin(device);
    63     bool ret = QRasterPaintEngine::begin(device);
       
    64     // Make sure QPaintEngine::paintDevice() returns the proper device.
       
    65     // QRasterPaintEngine changes pdev to QImage in case of RasterClass QPixmapData
       
    66     // which is incorrect in Symbian.
       
    67     d->pdev = device;
       
    68     return ret;
    62 }
    69 }
    63 
    70 
    64 bool QS60PaintEngine::end()
    71 bool QS60PaintEngine::end()
    65 {
    72 {
    66     bool ret = QRasterPaintEngine::end();
    73     bool ret = QRasterPaintEngine::end();