summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-05-03 14:22:36 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-05-03 14:23:39 +0200
commit075634945d5a9ba45fe7628c533977e6909f446d (patch)
tree62747ff9fd50bc2d17d99e5cd9b20c1adee03045 /src/gui/image
parent86f20c89af906ecd58a4da74f82bd895ec8392e8 (diff)
remove the graphicssystem code paths.
QPA's platform integration layer replaces the graphics system now.
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qbitmap.cpp4
-rw-r--r--src/gui/image/qnativeimage.cpp1
-rw-r--r--src/gui/image/qpixmap.cpp12
-rw-r--r--src/gui/image/qpixmap_blitter.cpp1
-rw-r--r--src/gui/image/qpixmap_qpa.cpp5
-rw-r--r--src/gui/image/qpixmapdata.cpp15
-rw-r--r--src/gui/image/qpixmapdatafactory.cpp19
-rw-r--r--src/gui/image/qpixmapfilter.cpp1
8 files changed, 11 insertions, 47 deletions
diff --git a/src/gui/image/qbitmap.cpp b/src/gui/image/qbitmap.cpp
index a405268818..ec2104fbbf 100644
--- a/src/gui/image/qbitmap.cpp
+++ b/src/gui/image/qbitmap.cpp
@@ -44,7 +44,7 @@
#include "qimage.h"
#include "qvariant.h"
#include <qpainter.h>
-#include <private/qgraphicssystem_p.h>
+#include <private/qguiapplication_qpa_p.h>
QT_BEGIN_NAMESPACE
@@ -274,7 +274,7 @@ QBitmap QBitmap::fromImage(const QImage &image, Qt::ImageConversionFlags flags)
img.setColor(1, c0);
}
- QScopedPointer<QPixmapData> data(QGraphicsSystem::createDefaultPixmapData(QPixmapData::BitmapType));
+ QScopedPointer<QPixmapData> data(QGuiApplicationPrivate::platformIntegration()->createPixmapData(QPixmapData::BitmapType));
data->fromImage(img, flags | Qt::MonoOnly);
return QPixmap(data.take());
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index 8face87a92..a5a4e7b614 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -46,7 +46,6 @@
#include "private/qpaintengine_raster_p.h"
#include "private/qapplication_p.h"
-#include "private/qgraphicssystem_p.h"
#if defined(Q_WS_X11) && !defined(QT_NO_MITSHM)
#include <qx11info_x11.h>
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index ee16e1bb18..7c1779236d 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -54,7 +54,6 @@
#include "qbuffer.h"
#include "qapplication.h"
#include <private/qapplication_p.h>
-#include <private/qgraphicssystem_p.h>
#include <private/qwidget_p.h>
#include "qevent.h"
#include "qfile.h"
@@ -1217,7 +1216,6 @@ QPixmap QPixmap::grabWidget(QWidget * widget, const QRect &rect)
graphics system is explicitly enabled.
\sa detach()
- \sa QApplication::setGraphicsSystem()
*/
Qt::HANDLE QPixmap::handle() const
@@ -1992,7 +1990,7 @@ int QPixmap::defaultDepth()
#elif defined(Q_OS_SYMBIAN)
return S60->screenDepth;
#elif defined(Q_WS_QPA)
- return 32; //LITE: use graphicssystem (we should do that in general)
+ return 32; //LITE: ### use graphicssystem (we should do that in general)
#endif
}
@@ -2084,9 +2082,7 @@ QPixmap QPixmap::fromImage(const QImage &image, Qt::ImageConversionFlags flags)
if (image.isNull())
return QPixmap();
- QGraphicsSystem* gs = QApplicationPrivate::graphicsSystem();
- QScopedPointer<QPixmapData> data(gs ? gs->createPixmapData(QPixmapData::PixmapType)
- : QGraphicsSystem::createDefaultPixmapData(QPixmapData::PixmapType));
+ QScopedPointer<QPixmapData> data(QGuiApplicationPrivate::platformIntegration()->createPixmapData(QPixmapData::PixmapType));
data->fromImage(image, flags);
return QPixmap(data.take());
}
@@ -2105,9 +2101,7 @@ QPixmap QPixmap::fromImage(const QImage &image, Qt::ImageConversionFlags flags)
*/
QPixmap QPixmap::fromImageReader(QImageReader *imageReader, Qt::ImageConversionFlags flags)
{
- QGraphicsSystem *gs = QApplicationPrivate::graphicsSystem();
- QScopedPointer<QPixmapData> data(gs ? gs->createPixmapData(QPixmapData::PixmapType)
- : QGraphicsSystem::createDefaultPixmapData(QPixmapData::PixmapType));
+ QScopedPointer<QPixmapData> data(QGuiApplicationPrivate::platformIntegration()->createPixmapData(QPixmapData::PixmapType));
data->fromImageReader(imageReader, flags);
return QPixmap(data.take());
}
diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp
index e2cd745e7c..fa8ae3deec 100644
--- a/src/gui/image/qpixmap_blitter.cpp
+++ b/src/gui/image/qpixmap_blitter.cpp
@@ -45,7 +45,6 @@
#include <qimage.h>
#include <private/qapplication_p.h>
-#include <private/qgraphicssystem_p.h>
#include <private/qblittable_p.h>
#include <private/qdrawhelper_p.h>
diff --git a/src/gui/image/qpixmap_qpa.cpp b/src/gui/image/qpixmap_qpa.cpp
index 61be2169d0..093b9b6a67 100644
--- a/src/gui/image/qpixmap_qpa.cpp
+++ b/src/gui/image/qpixmap_qpa.cpp
@@ -40,10 +40,9 @@
****************************************************************************/
#include <qpixmap.h>
-#include <private/qgraphicssystem_p.h>
-#include <private/qapplication_p.h>
+#include <private/qguiapplication_qpa_p.h>
QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h)
{
- return QApplicationPrivate::platformIntegration()->grabWindow(window, x, y, w, h);
+ return QGuiApplicationPrivate::platformIntegration()->grabWindow(window, x, y, w, h);
}
diff --git a/src/gui/image/qpixmapdata.cpp b/src/gui/image/qpixmapdata.cpp
index 8222d714dc..bc1a9c8db2 100644
--- a/src/gui/image/qpixmapdata.cpp
+++ b/src/gui/image/qpixmapdata.cpp
@@ -43,7 +43,6 @@
#include <QtCore/qbuffer.h>
#include <QtGui/qbitmap.h>
#include <QtGui/qimagereader.h>
-#include <private/qgraphicssystem_p.h>
#include <private/qapplication_p.h>
#include <private/qimagepixmapcleanuphooks_p.h>
@@ -54,12 +53,7 @@ const uchar qt_pixmap_bit_mask[] = { 0x01, 0x02, 0x04, 0x08,
QPixmapData *QPixmapData::create(int w, int h, PixelType type)
{
- QPixmapData *data;
- QGraphicsSystem* gs = QApplicationPrivate::graphicsSystem();
- if (gs)
- data = gs->createPixmapData(static_cast<QPixmapData::PixelType>(type));
- else
- data = QGraphicsSystem::createDefaultPixmapData(static_cast<QPixmapData::PixelType>(type));
+ QPixmapData *data = QGuiApplicationPrivate::platformIntegration()->createPixmapData(static_cast<QPixmapData::PixelType>(type));
data->resize(w, h);
return data;
}
@@ -95,12 +89,7 @@ QPixmapData::~QPixmapData()
QPixmapData *QPixmapData::createCompatiblePixmapData() const
{
- QPixmapData *d;
- QGraphicsSystem *gs = QApplicationPrivate::graphicsSystem();
- if (gs)
- d = gs->createPixmapData(pixelType());
- else
- d = QGraphicsSystem::createDefaultPixmapData(pixelType());
+ QPixmapData *d = QGuiApplicationPrivate::platformIntegration()->createPixmapData(pixelType());
return d;
}
diff --git a/src/gui/image/qpixmapdatafactory.cpp b/src/gui/image/qpixmapdatafactory.cpp
index ec53dcb9c1..109a39072a 100644
--- a/src/gui/image/qpixmapdatafactory.cpp
+++ b/src/gui/image/qpixmapdatafactory.cpp
@@ -61,7 +61,6 @@
#endif
#include "private/qapplication_p.h"
-#include "private/qgraphicssystem_p.h"
QT_BEGIN_NAMESPACE
@@ -76,22 +75,8 @@ public:
QPixmapData* QSimplePixmapDataFactory::create(QPixmapData::PixelType type)
{
- if (QApplicationPrivate::graphicsSystem())
- return QApplicationPrivate::graphicsSystem()->createPixmapData(type);
-
-#if defined(Q_WS_X11)
- return new QX11PixmapData(type);
-#elif defined(Q_WS_WIN)
- return new QRasterPixmapData(type);
-#elif defined(Q_WS_MAC)
- return new QMacPixmapData(type);
-#elif defined(Q_WS_QPA)
- return new QRasterPixmapData(type);
-#elif defined(Q_OS_SYMBIAN)
- return new QS60PixmapData(type);
-#else
-#error QSimplePixmapDataFactory::create() not implemented
-#endif
+ // ### should we always use Raster instead?
+ return QGuiApplicationPrivate::platformIntegration()->createPixmapData(type);
}
Q_GLOBAL_STATIC(QSimplePixmapDataFactory, factory)
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp
index c05afb052e..dd84c39500 100644
--- a/src/gui/image/qpixmapfilter.cpp
+++ b/src/gui/image/qpixmapfilter.cpp
@@ -49,7 +49,6 @@
#include "qvarlengtharray.h"
#include "private/qapplication_p.h"
-#include "private/qgraphicssystem_p.h"
#include "private/qpaintengineex_p.h"
#include "private/qpaintengine_raster_p.h"
#include "qmath.h"