summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_s60.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qpaintengine_s60.cpp')
-rw-r--r--src/gui/painting/qpaintengine_s60.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gui/painting/qpaintengine_s60.cpp b/src/gui/painting/qpaintengine_s60.cpp
index 6f4f398..c5840f1 100644
--- a/src/gui/painting/qpaintengine_s60.cpp
+++ b/src/gui/painting/qpaintengine_s60.cpp
@@ -47,18 +47,25 @@ QT_BEGIN_NAMESPACE
class QS60PaintEnginePrivate : public QRasterPaintEnginePrivate
{
public:
- QS60PaintEnginePrivate(QS60PaintEngine *engine) { Q_UNUSED(engine); }
+ QS60PaintEnginePrivate() {}
};
QS60PaintEngine::QS60PaintEngine(QPaintDevice *device, QS60PixmapData *data)
- : QRasterPaintEngine(*(new QS60PaintEnginePrivate(this)), device), pixmapData(data)
+ : QRasterPaintEngine(*(new QS60PaintEnginePrivate), device), pixmapData(data)
{
}
bool QS60PaintEngine::begin(QPaintDevice *device)
{
+ Q_D(QS60PaintEngine);
+
pixmapData->beginDataAccess();
- return QRasterPaintEngine::begin(device);
+ bool ret = QRasterPaintEngine::begin(device);
+ // Make sure QPaintEngine::paintDevice() returns the proper device.
+ // QRasterPaintEngine changes pdev to QImage in case of RasterClass QPixmapData
+ // which is incorrect in Symbian.
+ d->pdev = device;
+ return ret;
}
bool QS60PaintEngine::end()