summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2010-01-18 18:35:23 +0100
committerJason Barron <jbarron@trolltech.com>2010-03-15 15:15:07 +0100
commit5715a66650174f8df85f8776d0ab6d98b6b83adb (patch)
tree7996aa9313f0f6063790ffd014e53f640f09362d
parente52ed5b7375af6b9968ef91b296f52ee92dc6b29 (diff)
Fix fromSymbian*() image conversion functions.
Do not explicitly create instances of QS60PixmapData in this function because it is possible that we are using another graphics system. The fromNativeType() function is virtual so the graphics system will create the right version of the pixmap data for us and ensure that we get into the right implementation. Reviewed-by: Aleksandar Sasha Babic
-rw-r--r--src/gui/image/qpixmap_s60.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp
index 4f3a719937..a13c8c82e9 100644
--- a/src/gui/image/qpixmap_s60.cpp
+++ b/src/gui/image/qpixmap_s60.cpp
@@ -337,7 +337,7 @@ QPixmap QPixmap::fromSymbianCFbsBitmap(CFbsBitmap *bitmap)
if (!bitmap)
return QPixmap();
- QScopedPointer<QS60PixmapData> data(new QS60PixmapData(QPixmapData::PixmapType));
+ QScopedPointer<QPixmapData> data(QPixmapData::create(0,0, QPixmapData::PixmapType));
data->fromNativeType(reinterpret_cast<void*>(bitmap), QPixmapData::FbsBitmap);
QPixmap pixmap(data.take());
return pixmap;
@@ -735,7 +735,7 @@ QPixmap QPixmap::fromSymbianRSgImage(RSgImage *sgImage)
if (!sgImage)
return QPixmap();
- QScopedPointer<QS60PixmapData> data(new QS60PixmapData(QPixmapData::PixmapType));
+ QScopedPointer<QPixmapData> data(QPixmapData::create(0,0, QPixmapData::PixmapType));
data->fromNativeType(reinterpret_cast<void*>(sgImage), QPixmapData::SgImage);
QPixmap pixmap(data.take());
return pixmap;