From 5715a66650174f8df85f8776d0ab6d98b6b83adb Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Mon, 18 Jan 2010 18:35:23 +0100 Subject: 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 --- src/gui/image/qpixmap_s60.cpp | 4 ++-- 1 file 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 data(new QS60PixmapData(QPixmapData::PixmapType)); + QScopedPointer data(QPixmapData::create(0,0, QPixmapData::PixmapType)); data->fromNativeType(reinterpret_cast(bitmap), QPixmapData::FbsBitmap); QPixmap pixmap(data.take()); return pixmap; @@ -735,7 +735,7 @@ QPixmap QPixmap::fromSymbianRSgImage(RSgImage *sgImage) if (!sgImage) return QPixmap(); - QScopedPointer data(new QS60PixmapData(QPixmapData::PixmapType)); + QScopedPointer data(QPixmapData::create(0,0, QPixmapData::PixmapType)); data->fromNativeType(reinterpret_cast(sgImage), QPixmapData::SgImage); QPixmap pixmap(data.take()); return pixmap; -- cgit v0.12