summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-10-07 14:33:23 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-10-07 14:33:23 (GMT)
commitffc4b43af90e5a4cb73ac2003a06f78c1d70d435 (patch)
tree10aa32055188684ee6924bb6f9f7cd386c170116 /src/gui
parent91efdcaed6fe9e931b049460d9a177a4c4e5ac3e (diff)
parent8082a800a55875fd2e64cf2ab5c6fa2c26722132 (diff)
downloadQt-ffc4b43af90e5a4cb73ac2003a06f78c1d70d435.zip
Qt-ffc4b43af90e5a4cb73ac2003a06f78c1d70d435.tar.gz
Qt-ffc4b43af90e5a4cb73ac2003a06f78c1d70d435.tar.bz2
Merge branch 4.7 into qt-master-from-4.7
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qpaintengine_s60.cpp63
1 files changed, 41 insertions, 22 deletions
diff --git a/src/gui/painting/qpaintengine_s60.cpp b/src/gui/painting/qpaintengine_s60.cpp
index 068ca0c..d7fc0af 100644
--- a/src/gui/painting/qpaintengine_s60.cpp
+++ b/src/gui/painting/qpaintengine_s60.cpp
@@ -59,44 +59,63 @@ bool QS60PaintEngine::begin(QPaintDevice *device)
{
Q_D(QS60PaintEngine);
- pixmapData->beginDataAccess();
- 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;
+ if (pixmapData->classId() == QPixmapData::RasterClass) {
+ pixmapData->beginDataAccess();
+ 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;
+ }
+
+ return QRasterPaintEngine::begin(device);
}
bool QS60PaintEngine::end()
{
- bool ret = QRasterPaintEngine::end();
- pixmapData->endDataAccess();
- return ret;
+ if (pixmapData->classId() == QPixmapData::RasterClass) {
+ bool ret = QRasterPaintEngine::end();
+ pixmapData->endDataAccess();
+ return ret;
+ }
+ return QRasterPaintEngine::end();
}
void QS60PaintEngine::drawPixmap(const QPointF &p, const QPixmap &pm)
{
- QS60PixmapData *srcData = static_cast<QS60PixmapData *>(pm.pixmapData());
- srcData->beginDataAccess();
- QRasterPaintEngine::drawPixmap(p, pm);
- srcData->endDataAccess();
+ if (pm.pixmapData()->classId() == QPixmapData::RasterClass) {
+ QS60PixmapData *srcData = static_cast<QS60PixmapData *>(pm.pixmapData());
+ srcData->beginDataAccess();
+ QRasterPaintEngine::drawPixmap(p, pm);
+ srcData->endDataAccess();
+ } else {
+ QRasterPaintEngine::drawPixmap(p, pm);
+ }
}
void QS60PaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr)
{
- QS60PixmapData *srcData = static_cast<QS60PixmapData *>(pm.pixmapData());
- srcData->beginDataAccess();
- QRasterPaintEngine::drawPixmap(r, pm, sr);
- srcData->endDataAccess();
+ if (pm.pixmapData()->classId() == QPixmapData::RasterClass) {
+ QS60PixmapData *srcData = static_cast<QS60PixmapData *>(pm.pixmapData());
+ srcData->beginDataAccess();
+ QRasterPaintEngine::drawPixmap(r, pm, sr);
+ srcData->endDataAccess();
+ } else {
+ QRasterPaintEngine::drawPixmap(r, pm, sr);
+ }
}
void QS60PaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &sr)
{
- QS60PixmapData *srcData = static_cast<QS60PixmapData *>(pm.pixmapData());
- srcData->beginDataAccess();
- QRasterPaintEngine::drawTiledPixmap(r, pm, sr);
- srcData->endDataAccess();
+ if (pm.pixmapData()->classId() == QPixmapData::RasterClass) {
+ QS60PixmapData *srcData = static_cast<QS60PixmapData *>(pm.pixmapData());
+ srcData->beginDataAccess();
+ QRasterPaintEngine::drawTiledPixmap(r, pm, sr);
+ srcData->endDataAccess();
+ } else {
+ QRasterPaintEngine::drawTiledPixmap(r, pm, sr);
+ }
}
void QS60PaintEngine::prepare(QImage *image)