summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJani Hautakangas <ext-jani.hautakangas@nokia.com>2010-03-05 09:22:12 (GMT)
committerJani Hautakangas <ext-jani.hautakangas@nokia.com>2010-03-05 09:26:05 (GMT)
commitab12c1c804ee40931515a0d53e5dc70db373f3bd (patch)
treedaebd8acd48aee80d1ef77ccdabc946292e878e2
parenta0d7a5cf999fe3adac2b2166085194cf93a4a424 (diff)
downloadQt-ab12c1c804ee40931515a0d53e5dc70db373f3bd.zip
Qt-ab12c1c804ee40931515a0d53e5dc70db373f3bd.tar.gz
Qt-ab12c1c804ee40931515a0d53e5dc70db373f3bd.tar.bz2
Fix for QTBUG-8762 QApplication::setGraphicsSystem("raster") crashes.
QRasterGraphicsSystem tries to create QRasterPixmapData and QRasterWindowSurface if QApplication::setGraphicsSystem("raster") is used. On Symbian it should create QS60PixmapData and QS60WindowSurface. Task-number: QTBUG-8762 Reviewed-by: Jason Barron
-rw-r--r--src/gui/painting/qgraphicssystem_raster.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/painting/qgraphicssystem_raster.cpp b/src/gui/painting/qgraphicssystem_raster.cpp
index f90aea0..909508e 100644
--- a/src/gui/painting/qgraphicssystem_raster.cpp
+++ b/src/gui/painting/qgraphicssystem_raster.cpp
@@ -41,19 +41,32 @@
#include "qgraphicssystem_raster_p.h"
+#ifdef Q_OS_SYMBIAN
+#include "private/qpixmap_s60_p.h"
+#include "private/qwindowsurface_s60_p.h"
+#else
#include "private/qpixmap_raster_p.h"
#include "private/qwindowsurface_raster_p.h"
+#endif
QT_BEGIN_NAMESPACE
QPixmapData *QRasterGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const
{
+#ifdef Q_OS_SYMBIAN
+ return new QS60PixmapData(type);
+#else
return new QRasterPixmapData(type);
+#endif
}
QWindowSurface *QRasterGraphicsSystem::createWindowSurface(QWidget *widget) const
{
+#ifdef Q_OS_SYMBIAN
+ return new QS60WindowSurface(widget);
+#else
return new QRasterWindowSurface(widget);
+#endif
}
QT_END_NAMESPACE