summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2010-01-18 17:35:23 (GMT)
committerJason Barron <jbarron@trolltech.com>2010-03-15 14:15:07 (GMT)
commit5715a66650174f8df85f8776d0ab6d98b6b83adb (patch)
tree7996aa9313f0f6063790ffd014e53f640f09362d /src/gui/image
parente52ed5b7375af6b9968ef91b296f52ee92dc6b29 (diff)
downloadQt-5715a66650174f8df85f8776d0ab6d98b6b83adb.zip
Qt-5715a66650174f8df85f8776d0ab6d98b6b83adb.tar.gz
Qt-5715a66650174f8df85f8776d0ab6d98b6b83adb.tar.bz2
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
Diffstat (limited to 'src/gui/image')
-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 4f3a719..a13c8c8 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;