summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap_raster.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-10-13 14:25:18 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-13 15:07:41 +0200
commit1582407fc782c0befd0760633324dd5c206524a1 (patch)
treee993d66e824da41ece006d44c48acd4df0ba749e /src/gui/image/qpixmap_raster.cpp
parent30cb91e17d2fbbdce90f7542f44e12af971ba2de (diff)
Remove Q_WS_ and Q_OS_SYMBIAN from QtGui.
Change-Id: I2ac3376513c3fbfc81a2e695a73a0d948d2696bc Reviewed-on: http://codereview.qt-project.org/6607 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/gui/image/qpixmap_raster.cpp')
-rw-r--r--src/gui/image/qpixmap_raster.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index ce7d66043c..887074c7b7 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -98,22 +98,10 @@ QPlatformPixmap *QRasterPlatformPixmap::createCompatiblePlatformPixmap() const
void QRasterPlatformPixmap::resize(int width, int height)
{
QImage::Format format;
-#ifdef Q_WS_QWS
- if (pixelType() == BitmapType) {
- format = QImage::Format_Mono;
- } else {
- format = QScreen::instance()->pixelFormat();
- if (format == QImage::Format_Invalid)
- format = QImage::Format_ARGB32_Premultiplied;
- else if (format == QImage::Format_Indexed8) // currently not supported
- format = QImage::Format_RGB444;
- }
-#else
if (pixelType() == BitmapType)
format = QImage::Format_MonoLSB;
else
format = QNativeImage::systemFormat();
-#endif
image = QImage(width, height, format);
w = width;
@@ -340,41 +328,6 @@ void QRasterPlatformPixmap::createPixmapForImage(QImage &sourceImage, Qt::ImageC
if (flags & Qt::NoFormatConversion)
format = sourceImage.format();
else
-#ifdef Q_WS_QWS
- if (pixelType() == BitmapType) {
- format = QImage::Format_Mono;
- } else {
- format = QScreen::instance()->pixelFormat();
- if (format == QImage::Format_Invalid)
- format = QImage::Format_ARGB32_Premultiplied;
- else if (format == QImage::Format_Indexed8) // currently not supported
- format = QImage::Format_RGB444;
- }
-
- if (sourceImage.hasAlphaChannel()
- && ((flags & Qt::NoOpaqueDetection)
- || const_cast<QImage &>(sourceImage).data_ptr()->checkForAlphaPixels())) {
- switch (format) {
- case QImage::Format_RGB16:
- format = QImage::Format_ARGB8565_Premultiplied;
- break;
- case QImage::Format_RGB666:
- format = QImage::Format_ARGB6666_Premultiplied;
- break;
- case QImage::Format_RGB555:
- format = QImage::Format_ARGB8555_Premultiplied;
- break;
- case QImage::Format_RGB444:
- format = QImage::Format_ARGB4444_Premultiplied;
- break;
- default:
- format = QImage::Format_ARGB32_Premultiplied;
- break;
- }
- } else if (format == QImage::Format_Invalid) {
- format = QImage::Format_ARGB32_Premultiplied;
- }
-#else
if (pixelType() == BitmapType) {
format = QImage::Format_MonoLSB;
} else {
@@ -416,7 +369,6 @@ void QRasterPlatformPixmap::createPixmapForImage(QImage &sourceImage, Qt::ImageC
}
}
}
-#endif
if (inPlace && sourceImage.d->convertInPlace(format, flags)) {
image = sourceImage;