summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-03-31 09:41:39 +0200
committerJørgen Lind <jorgen.lind@nokia.com>2010-03-31 11:32:07 +0200
commita93f6b21f636df4840f86099c76d287afb978001 (patch)
treedc85d58ebc1ac7ee9d653157f42242cbc379a636
parenta31270b5fc88460d6923ac1f2b5b6e90da59c9c8 (diff)
Refactoring GraphicsSystem to QPlatformIntegration
QPlatformIntegration is the "main" integration class which needs to be subclassed. This is done so that we don't pollute GraphicsSystem with functionality that really does not belong there. In lighthouse applications needs now to be started with -platform some_platform
-rw-r--r--src/gui/image/qnativeimage.cpp2
-rw-r--r--src/gui/image/qpixmap_blitter.cpp2
-rw-r--r--src/gui/image/qpixmap_lite.cpp2
-rw-r--r--src/gui/kernel/kernel.pri10
-rw-r--r--src/gui/kernel/qapplication.cpp12
-rw-r--r--src/gui/kernel/qapplication_lite.cpp36
-rw-r--r--src/gui/kernel/qapplication_p.h15
-rw-r--r--src/gui/kernel/qdesktopwidget_lite.cpp24
-rw-r--r--src/gui/kernel/qplatformintegration_lite.cpp18
-rw-r--r--src/gui/kernel/qplatformintegration_lite.h73
-rw-r--r--src/gui/kernel/qplatformintegrationfactory_lite.cpp88
-rw-r--r--src/gui/kernel/qplatformintegrationfactory_lite_p.h78
-rw-r--r--src/gui/kernel/qplatformintegrationplugin_lite.cpp55
-rw-r--r--src/gui/kernel/qplatformintegrationplugin_lite.h92
-rw-r--r--src/gui/kernel/qplatformscreen_lite.cpp15
-rw-r--r--src/gui/kernel/qplatformscreen_lite.h31
-rw-r--r--src/gui/kernel/qwidget_lite.cpp14
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h16
-rw-r--r--src/gui/painting/painting.pri6
-rw-r--r--src/gui/painting/qcolormap_lite.cpp8
-rw-r--r--src/gui/painting/qgraphicssystem.cpp54
-rw-r--r--src/gui/painting/qgraphicssystem_lite.cpp62
-rw-r--r--src/gui/painting/qgraphicssystem_lite_p.h70
-rw-r--r--src/gui/painting/qgraphicssystem_p.h27
-rw-r--r--src/gui/painting/qgraphicssystemcursor_lite.cpp2
-rw-r--r--src/gui/painting/qgraphicssystemcursor_lite.h5
-rw-r--r--src/plugins/graphicssystems/blittable/blittable.pro3
-rw-r--r--src/plugins/graphicssystems/blittable/qgraphicssystem_blittable.h6
-rw-r--r--src/plugins/graphicssystems/graphicssystems.pro8
-rw-r--r--src/plugins/graphicssystems/minimal/minimal.pro10
-rw-r--r--src/plugins/graphicssystems/minimal/qgraphicssystem_minimal.cpp70
-rw-r--r--src/plugins/platforms/fb_base/fb_base.cpp (renamed from src/plugins/graphicssystems/fb_base/fb_base.cpp)0
-rw-r--r--src/plugins/platforms/fb_base/fb_base.h (renamed from src/plugins/graphicssystems/fb_base/fb_base.h)0
-rw-r--r--src/plugins/platforms/fb_base/fb_base.pri (renamed from src/plugins/graphicssystems/fb_base/fb_base.pri)0
-rw-r--r--src/plugins/platforms/fb_base/fb_base.pro (renamed from src/plugins/graphicssystems/fb_base/fb_base.pro)0
-rw-r--r--src/plugins/platforms/linuxfb/linuxfb.pro (renamed from src/plugins/graphicssystems/linuxfb/linuxfb.pro)0
-rw-r--r--src/plugins/platforms/linuxfb/main.cpp (renamed from src/plugins/graphicssystems/linuxfb/main.cpp)0
-rw-r--r--src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.cpp (renamed from src/plugins/graphicssystems/linuxfb/qgraphicssystem_linuxfb.cpp)0
-rw-r--r--src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.h (renamed from src/plugins/graphicssystems/linuxfb/qgraphicssystem_linuxfb.h)0
-rw-r--r--src/plugins/platforms/minimal/main.cpp (renamed from src/plugins/graphicssystems/minimal/main.cpp)16
-rw-r--r--src/plugins/platforms/minimal/minimal.pro13
-rw-r--r--src/plugins/platforms/minimal/qplatformintegration_minimal.cpp25
-rw-r--r--src/plugins/platforms/minimal/qplatformintegration_minimal.h (renamed from src/plugins/graphicssystems/minimal/qgraphicssystem_minimal.h)22
-rw-r--r--src/plugins/platforms/minimal/qwindowsurface_minimal.cpp (renamed from src/plugins/graphicssystems/minimal/qwindowsurface_minimal.cpp)26
-rw-r--r--src/plugins/platforms/minimal/qwindowsurface_minimal.h (renamed from src/plugins/graphicssystems/minimal/qwindowsurface_minimal.h)10
-rw-r--r--src/plugins/platforms/minimaldfb/main.cpp (renamed from src/plugins/graphicssystems/minimaldfb/main.cpp)0
-rw-r--r--src/plugins/platforms/minimaldfb/minimaldfb.pro (renamed from src/plugins/graphicssystems/minimaldfb/minimaldfb.pro)0
-rw-r--r--src/plugins/platforms/minimaldfb/qblitter_directfb.cpp (renamed from src/plugins/graphicssystems/minimaldfb/qblitter_directfb.cpp)4
-rw-r--r--src/plugins/platforms/minimaldfb/qblitter_directfb.h (renamed from src/plugins/graphicssystems/minimaldfb/qblitter_directfb.h)4
-rw-r--r--src/plugins/platforms/minimaldfb/qdirectfbconvenience.cpp (renamed from src/plugins/graphicssystems/minimaldfb/qdirectfbconvenience.cpp)0
-rw-r--r--src/plugins/platforms/minimaldfb/qdirectfbconvenience.h (renamed from src/plugins/graphicssystems/minimaldfb/qdirectfbconvenience.h)0
-rw-r--r--src/plugins/platforms/minimaldfb/qdirectfbcursor.cpp (renamed from src/plugins/graphicssystems/minimaldfb/qdirectfbcursor.cpp)0
-rw-r--r--src/plugins/platforms/minimaldfb/qdirectfbcursor.h (renamed from src/plugins/graphicssystems/minimaldfb/qdirectfbcursor.h)0
-rw-r--r--src/plugins/platforms/minimaldfb/qdirectfbinput.cpp (renamed from src/plugins/graphicssystems/minimaldfb/qdirectfbinput.cpp)0
-rw-r--r--src/plugins/platforms/minimaldfb/qdirectfbinput.h (renamed from src/plugins/graphicssystems/minimaldfb/qdirectfbinput.h)0
-rw-r--r--src/plugins/platforms/minimaldfb/qgraphicssystem_minimaldfb.cpp (renamed from src/plugins/graphicssystems/minimaldfb/qgraphicssystem_minimaldfb.cpp)4
-rw-r--r--src/plugins/platforms/minimaldfb/qgraphicssystem_minimaldfb.h (renamed from src/plugins/graphicssystems/minimaldfb/qgraphicssystem_minimaldfb.h)2
-rw-r--r--src/plugins/platforms/minimaldfb/qwindowsurface_minimaldfb.cpp (renamed from src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.cpp)4
-rw-r--r--src/plugins/platforms/minimaldfb/qwindowsurface_minimaldfb.h (renamed from src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.h)0
-rw-r--r--src/plugins/platforms/openkode/frag.glslf (renamed from src/plugins/graphicssystems/openkode/frag.glslf)0
-rw-r--r--src/plugins/platforms/openkode/frag.h (renamed from src/plugins/graphicssystems/openkode/frag.h)0
-rw-r--r--src/plugins/platforms/openkode/main.cpp (renamed from src/plugins/graphicssystems/openkode/main.cpp)0
-rw-r--r--src/plugins/platforms/openkode/openkode.pro (renamed from src/plugins/graphicssystems/openkode/openkode.pro)0
-rw-r--r--src/plugins/platforms/openkode/qgraphicssystem_openkode.cpp (renamed from src/plugins/graphicssystems/openkode/qgraphicssystem_openkode.cpp)0
-rw-r--r--src/plugins/platforms/openkode/qgraphicssystem_openkode.h (renamed from src/plugins/graphicssystems/openkode/qgraphicssystem_openkode.h)0
-rw-r--r--src/plugins/platforms/openkode/qwindowsurface_openkode.cpp (renamed from src/plugins/graphicssystems/openkode/qwindowsurface_openkode.cpp)0
-rw-r--r--src/plugins/platforms/openkode/qwindowsurface_openkode.h (renamed from src/plugins/graphicssystems/openkode/qwindowsurface_openkode.h)0
-rw-r--r--src/plugins/platforms/openkode/vert.glslv (renamed from src/plugins/graphicssystems/openkode/vert.glslv)0
-rw-r--r--src/plugins/platforms/openkode/vert.h (renamed from src/plugins/graphicssystems/openkode/vert.h)0
-rw-r--r--src/plugins/platforms/openvglite/main.cpp (renamed from src/plugins/graphicssystems/openvglite/main.cpp)0
-rw-r--r--src/plugins/platforms/openvglite/openvglite.pro (renamed from src/plugins/graphicssystems/openvglite/openvglite.pro)0
-rw-r--r--src/plugins/platforms/openvglite/qgraphicssystem_vglite.cpp (renamed from src/plugins/graphicssystems/openvglite/qgraphicssystem_vglite.cpp)0
-rw-r--r--src/plugins/platforms/openvglite/qgraphicssystem_vglite.h (renamed from src/plugins/graphicssystems/openvglite/qgraphicssystem_vglite.h)0
-rw-r--r--src/plugins/platforms/openvglite/qwindowsurface_vglite.cpp (renamed from src/plugins/graphicssystems/openvglite/qwindowsurface_vglite.cpp)0
-rw-r--r--src/plugins/platforms/openvglite/qwindowsurface_vglite.h (renamed from src/plugins/graphicssystems/openvglite/qwindowsurface_vglite.h)0
-rw-r--r--src/plugins/platforms/platforms.pro14
-rw-r--r--src/plugins/platforms/qvfb/main.cpp (renamed from src/plugins/graphicssystems/qvfb/main.cpp)0
-rw-r--r--src/plugins/platforms/qvfb/qgraphicssystem_qvfb.cpp (renamed from src/plugins/graphicssystems/qvfb/qgraphicssystem_qvfb.cpp)0
-rw-r--r--src/plugins/platforms/qvfb/qgraphicssystem_qvfb.h (renamed from src/plugins/graphicssystems/qvfb/qgraphicssystem_qvfb.h)0
-rw-r--r--src/plugins/platforms/qvfb/qvfb.pro (renamed from src/plugins/graphicssystems/qvfb/qvfb.pro)0
-rw-r--r--src/plugins/platforms/qvfb/qwindowsurface_qvfb.cpp (renamed from src/plugins/graphicssystems/qvfb/qwindowsurface_qvfb.cpp)0
-rw-r--r--src/plugins/platforms/qvfb/qwindowsurface_qvfb.h (renamed from src/plugins/graphicssystems/qvfb/qwindowsurface_qvfb.h)0
-rw-r--r--src/plugins/platforms/testlite/main.cpp (renamed from src/plugins/graphicssystems/testlite/main.cpp)0
-rw-r--r--src/plugins/platforms/testlite/qgraphicssystem_testlite.cpp (renamed from src/plugins/graphicssystems/testlite/qgraphicssystem_testlite.cpp)0
-rw-r--r--src/plugins/platforms/testlite/qgraphicssystem_testlite.h (renamed from src/plugins/graphicssystems/testlite/qgraphicssystem_testlite.h)0
-rw-r--r--src/plugins/platforms/testlite/qwindowsurface_testlite.cpp (renamed from src/plugins/graphicssystems/testlite/qwindowsurface_testlite.cpp)0
-rw-r--r--src/plugins/platforms/testlite/qwindowsurface_testlite.h (renamed from src/plugins/graphicssystems/testlite/qwindowsurface_testlite.h)0
-rw-r--r--src/plugins/platforms/testlite/testlite.pro (renamed from src/plugins/graphicssystems/testlite/testlite.pro)0
-rw-r--r--src/plugins/platforms/testlite/x11util.cpp (renamed from src/plugins/graphicssystems/testlite/x11util.cpp)0
-rw-r--r--src/plugins/platforms/testlite/x11util.h (renamed from src/plugins/graphicssystems/testlite/x11util.h)0
-rw-r--r--src/plugins/platforms/vnc/main.cpp (renamed from src/plugins/graphicssystems/vnc/main.cpp)0
-rw-r--r--src/plugins/platforms/vnc/qgraphicssystem_vnc.cpp (renamed from src/plugins/graphicssystems/vnc/qgraphicssystem_vnc.cpp)0
-rw-r--r--src/plugins/platforms/vnc/qgraphicssystem_vnc.h (renamed from src/plugins/graphicssystems/vnc/qgraphicssystem_vnc.h)0
-rw-r--r--src/plugins/platforms/vnc/qvnccursor.cpp (renamed from src/plugins/graphicssystems/vnc/qvnccursor.cpp)0
-rw-r--r--src/plugins/platforms/vnc/qvnccursor.h (renamed from src/plugins/graphicssystems/vnc/qvnccursor.h)0
-rw-r--r--src/plugins/platforms/vnc/qvncserver.cpp (renamed from src/plugins/graphicssystems/vnc/qvncserver.cpp)0
-rw-r--r--src/plugins/platforms/vnc/qvncserver.h (renamed from src/plugins/graphicssystems/vnc/qvncserver.h)0
-rw-r--r--src/plugins/platforms/vnc/vnc.pro (renamed from src/plugins/graphicssystems/vnc/vnc.pro)0
98 files changed, 778 insertions, 280 deletions
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index 3420778c43..d4cbdc6fe9 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -288,7 +288,7 @@ QNativeImage::~QNativeImage()
QImage::Format QNativeImage::systemFormat()
{
#ifdef Q_WS_LITE
- return QApplicationPrivate::graphicsSystem()->screens().at(0)->format();
+ return QApplicationPrivate::platformIntegration()->screens().at(0)->format();
#else
return QImage::Format_RGB32;
#endif
diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp
index 6dcf7c7780..38a2f8104e 100644
--- a/src/gui/image/qpixmap_blitter.cpp
+++ b/src/gui/image/qpixmap_blitter.cpp
@@ -57,7 +57,7 @@ void QBlittablePixmapData::resize(int width, int height)
delete m_engine;
m_engine = 0;
#ifdef Q_WS_LITE
- d = QApplicationPrivate::graphicsSystem()->screens().at(0)->depth();
+ d = QApplicationPrivate::platformIntegration()->screens().at(0)->depth();
#endif
w = width;
h = height;
diff --git a/src/gui/image/qpixmap_lite.cpp b/src/gui/image/qpixmap_lite.cpp
index d263855cfb..61be2169d0 100644
--- a/src/gui/image/qpixmap_lite.cpp
+++ b/src/gui/image/qpixmap_lite.cpp
@@ -45,5 +45,5 @@
QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h)
{
- return QApplicationPrivate::graphicsSystem()->grabWindow(window, x, y, w, h);
+ return QApplicationPrivate::platformIntegration()->grabWindow(window, x, y, w, h);
}
diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri
index 96892d2b9e..cf5ec9289c 100644
--- a/src/gui/kernel/kernel.pri
+++ b/src/gui/kernel/kernel.pri
@@ -203,6 +203,10 @@ embedded_lite {
kernel/qgenericplugin_lite.h \
kernel/qeventdispatcher_lite_p.h \
kernel/qwindowsysteminterface.h \
+ kernel/qplatformintegration_lite.h \
+ kernel/qplatformscreen_lite.h \
+ kernel/qplatformintegrationfactory_lite_p.h \
+ kernel/qplatformintegrationplugin_lite.h \
SOURCES += \
kernel/qapplication_lite.cpp \
@@ -216,7 +220,11 @@ embedded_lite {
kernel/qsound_lite.cpp \
kernel/qwidget_lite.cpp \
kernel/qeventdispatcher_lite.cpp \
- kernel/qwindowsysteminterface.cpp
+ kernel/qwindowsysteminterface.cpp \
+ kernel/qplatformintegration_lite.cpp \
+ kernel/qplatformscreen_lite.cpp \
+ kernel/qplatformintegrationfactory_lite.cpp \
+ kernel/qplatformintegrationplugin_lite.cpp
contains(QT_CONFIG, glib) {
SOURCES += \
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 4782d7ca05..a1882765ae 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -441,6 +441,9 @@ QPalette *QApplicationPrivate::sys_pal = 0; // default system palette
QPalette *QApplicationPrivate::set_pal = 0; // default palette set by programmer
QGraphicsSystem *QApplicationPrivate::graphics_system = 0; // default graphics system
+#if defined(Q_WS_LITE)
+QPlatformIntegration *QApplicationPrivate::platform_integration = 0;
+#endif
QString QApplicationPrivate::graphics_system_name; // graphics system id - for delayed initialization
Q_GLOBAL_STATIC(QMutex, applicationFontMutex)
@@ -771,7 +774,6 @@ void QApplicationPrivate::construct(
)
{
initResources();
-
graphics_system_name = QLatin1String(qgetenv("QT_DEFAULT_GRAPHICS_SYSTEM"));
qt_is_gui_used = (qt_appType != QApplication::Tty);
@@ -939,10 +941,12 @@ void QApplicationPrivate::initialize()
// Set up which span functions should be used in raster engine...
qInitDrawhelperAsm();
-#if !defined(Q_WS_X11) && !defined(Q_WS_QWS)
+#if !defined(Q_WS_X11) && !defined(Q_WS_QWS) && !defined(Q_WS_LITE)
// initialize the graphics system - on X11 this is initialized inside
// qt_init() in qapplication_x11.cpp because of several reasons.
// On QWS, the graphics system is set by the QScreen plugin.
+ // For lighthouse it will be initialized to QLiteGraphicsSystem
+ // when the platformIntegration plugin is instansiated in qt_init(
graphics_system = QGraphicsSystemFactory::create(graphics_system_name);
#endif
#ifndef QT_NO_WHEELEVENT
@@ -1561,7 +1565,11 @@ QStyle* QApplication::setStyle(const QString& style)
void QApplication::setGraphicsSystem(const QString &system)
{
+#if !defined(Q_WS_LITE)
QApplicationPrivate::graphics_system_name = system;
+#else
+ Q_UNUSED(system)
+#endif
}
/*!
diff --git a/src/gui/kernel/qapplication_lite.cpp b/src/gui/kernel/qapplication_lite.cpp
index 5d7ab5a489..c8d65ff019 100644
--- a/src/gui/kernel/qapplication_lite.cpp
+++ b/src/gui/kernel/qapplication_lite.cpp
@@ -53,13 +53,15 @@
#include "private/qwidget_p.h"
#include "qgenericpluginfactory_lite.h"
+#include "qplatformintegrationfactory_lite_p.h"
#include <qdesktopwidget.h>
#include <qinputcontext.h>
-#include "private/qgraphicssystem_p.h"
+#include <QtGui/private/qgraphicssystem_lite_p.h>
#include <QGraphicsSystemCursor>
#include <qdebug.h>
#include <QWindowSystemInterface>
+#include <QPlatformIntegration>
QT_BEGIN_NAMESPACE
@@ -386,10 +388,9 @@ void QApplication::restoreOverrideCursor()
QWidget *QApplication::topLevelAt(const QPoint &pos)
{
- QGraphicsSystem *gs = QApplicationPrivate::graphicsSystem();
- if (!gs)
- return 0;
- QGraphicsSystemScreen *screen = gs->screens().first();
+ QPlatformIntegration *pi = QApplicationPrivate::platformIntegration();
+
+ QPlatformScreen *screen = pi->screens().first();
if (!screen)
return 0;
QWidget *w = screen->topLevelAt(pos);
@@ -404,6 +405,23 @@ void QApplication::alert(QWidget *, int)
{
}
+static void init_platform(const QString &name)
+{
+ QApplicationPrivate::platform_integration = QPlatformIntegrationFactory::create(name);
+ QApplicationPrivate::graphics_system = new QLiteGraphicsSystem;
+ if (!QApplicationPrivate::platform_integration) {
+ QStringList keys = QPlatformIntegrationFactory::keys();
+ QString fatalMessage =
+ QString::fromLatin1("Failed to load platform plugin \"%1\". Available platforms are: \n").arg(name);
+ foreach(QString key, keys) {
+ fatalMessage.append(key + QString::fromLatin1("\n"));
+ }
+ qFatal("%s", fatalMessage.toLocal8Bit().constData());
+
+ }
+
+}
+
static void init_plugins(const QList<QByteArray> pluginList)
{
for (int i = 0; i < pluginList.count(); ++i) {
@@ -447,6 +465,7 @@ void qt_init(QApplicationPrivate *priv, int type)
}
QList<QByteArray> pluginList;
+ QString platformName = qgetenv("QT_LITE_PLATFORM");
// Get command line params
@@ -460,6 +479,9 @@ void qt_init(QApplicationPrivate *priv, int type)
if (arg == "-fn" || arg == "-font") {
if (++i < argc)
appFont = argv[i];
+ } else if (arg == "-platform") {
+ if (++i < argc)
+ platformName = argv[i];
} else if (arg == "-plugin") {
if (++i < argc)
pluginList << argv[i];
@@ -473,9 +495,6 @@ void qt_init(QApplicationPrivate *priv, int type)
priv->argc = j;
}
-
-
-
#if 0
QByteArray pluginEnv = qgetenv("QT_LITE_PLUGINS");
if (!pluginEnv.isEmpty()) {
@@ -483,6 +502,7 @@ void qt_init(QApplicationPrivate *priv, int type)
}
#endif
+ init_platform(platformName);
init_plugins(pluginList);
QColormap::initialize();
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index 2cf5fce0af..d0ab0c4b0f 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -78,6 +78,7 @@
#endif
#ifdef Q_WS_LITE
#include <QWindowSystemInterface>
+#include "QtGui/qplatformintegration_lite.h"
#endif
QT_BEGIN_NAMESPACE
@@ -312,10 +313,15 @@ public:
static QString desktopStyleKey();
static QGraphicsSystem *graphicsSystem()
-#if !defined(Q_WS_QWS)
- { return graphics_system; }
-#else
+#if defined(Q_WS_QWS)
{ return QScreen::instance()->graphicsSystem(); }
+#else
+ { return graphics_system; }
+#endif
+
+#if defined(Q_WS_LITE)
+ static QPlatformIntegration *platformIntegration()
+ { return platform_integration; }
#endif
void createEventDispatcher();
@@ -417,6 +423,9 @@ public:
static QPalette *set_pal;
static QGraphicsSystem *graphics_system;
static QString graphics_system_name;
+#if defined(Q_WS_LITE)
+ static QPlatformIntegration *platform_integration;
+#endif
private:
static QFont *app_font; // private for a reason! Always use QApplication::font() instead!
diff --git a/src/gui/kernel/qdesktopwidget_lite.cpp b/src/gui/kernel/qdesktopwidget_lite.cpp
index a3535fb93e..b077d57fec 100644
--- a/src/gui/kernel/qdesktopwidget_lite.cpp
+++ b/src/gui/kernel/qdesktopwidget_lite.cpp
@@ -69,10 +69,8 @@ int QDesktopWidget::primaryScreen() const
int QDesktopWidget::numScreens() const
{
- QGraphicsSystem *gs = QApplicationPrivate::graphicsSystem();
- if (!gs)
- return 0;
- return qMax(gs->screens().size(), 1);
+ QPlatformIntegration *pi = QApplicationPrivate::platformIntegration();
+ return qMax(pi->screens().size(), 1);
}
QWidget *QDesktopWidget::screen(int)
@@ -82,10 +80,8 @@ QWidget *QDesktopWidget::screen(int)
const QRect QDesktopWidget::availableGeometry(int screenNo) const
{
- QGraphicsSystem *gs = QApplicationPrivate::graphicsSystem();
- if (!gs)
- return QRect();
- QList<QGraphicsSystemScreen *> screens = gs->screens();
+ QPlatformIntegration *pi = QApplicationPrivate::platformIntegration();
+ QList<QPlatformScreen *> screens = pi->screens();
if (screenNo == -1)
screenNo = 0;
if (screenNo < 0 || screenNo >= screens.size())
@@ -96,10 +92,8 @@ const QRect QDesktopWidget::availableGeometry(int screenNo) const
const QRect QDesktopWidget::screenGeometry(int screenNo) const
{
- QGraphicsSystem *gs = QApplicationPrivate::graphicsSystem();
- if (!gs)
- return QRect();
- QList<QGraphicsSystemScreen *> screens = gs->screens();
+ QPlatformIntegration *pi = QApplicationPrivate::platformIntegration();
+ QList<QPlatformScreen *> screens = pi->screens();
if (screenNo == -1)
screenNo = 0;
if (screenNo < 0 || screenNo >= screens.size())
@@ -122,10 +116,8 @@ int QDesktopWidget::screenNumber(const QWidget *w) const
int QDesktopWidget::screenNumber(const QPoint &p) const
{
- QGraphicsSystem *gs = QApplicationPrivate::graphicsSystem();
- if (!gs)
- return -1;
- QList<QGraphicsSystemScreen *> screens = gs->screens();
+ QPlatformIntegration *pi = QApplicationPrivate::platformIntegration();
+ QList<QPlatformScreen *> screens = pi->screens();
for (int i = 0; i < screens.size(); ++i)
if (screens[i]->geometry().contains(p))
diff --git a/src/gui/kernel/qplatformintegration_lite.cpp b/src/gui/kernel/qplatformintegration_lite.cpp
new file mode 100644
index 0000000000..0e28fc6222
--- /dev/null
+++ b/src/gui/kernel/qplatformintegration_lite.cpp
@@ -0,0 +1,18 @@
+#include "qplatformintegration_lite.h"
+
+QT_BEGIN_NAMESPACE
+
+QBlittable *QPlatformIntegration::createBlittable(const QSize &) const
+{ return 0; }
+
+QPixmap QPlatformIntegration::grabWindow(WId window, int x, int y, int width, int height) const
+{
+ Q_UNUSED(window);
+ Q_UNUSED(x);
+ Q_UNUSED(y);
+ Q_UNUSED(width);
+ Q_UNUSED(height);
+ return QPixmap();
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformintegration_lite.h b/src/gui/kernel/qplatformintegration_lite.h
new file mode 100644
index 0000000000..543b7bc54f
--- /dev/null
+++ b/src/gui/kernel/qplatformintegration_lite.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMINTEGRATION_H
+#define QPLATFORMINTEGRATION_H
+
+#include <QtGui/private/qgraphicssystem_p.h>
+#include <QtGui/qplatformscreen_lite.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class Q_GUI_EXPORT QPlatformIntegration
+{
+public:
+ virtual ~QPlatformIntegration() { };
+
+// GraphicsSystem functions
+ virtual QPixmapData *createPixmapData(QPixmapData::PixelType type) const = 0;
+ virtual QWindowSurface *createWindowSurface(QWidget *widget) const = 0;
+ virtual QBlittable *createBlittable(const QSize &size) const;
+
+// Window System functions
+ virtual QList<QPlatformScreen *> screens() const = 0;
+ virtual QPixmap grabWindow(WId window, int x, int y, int width, int height) const;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QPLATFORMINTEGRATION_H
diff --git a/src/gui/kernel/qplatformintegrationfactory_lite.cpp b/src/gui/kernel/qplatformintegrationfactory_lite.cpp
new file mode 100644
index 0000000000..7f650e9623
--- /dev/null
+++ b/src/gui/kernel/qplatformintegrationfactory_lite.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qplatformintegrationfactory_lite_p.h"
+#include <QPlatformIntegrationPlugin>
+#include "private/qfactoryloader_p.h"
+#include "qmutex.h"
+
+#include "qapplication.h"
+#include "qdebug.h"
+
+QT_BEGIN_NAMESPACE
+
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
+ (QPlatformIntegrationFactoryInterface_iid, QLatin1String("/platforms"), Qt::CaseInsensitive))
+#endif
+
+QPlatformIntegration *QPlatformIntegrationFactory::create(const QString& key)
+{
+ QPlatformIntegration *ret = 0;
+ QString platform = key.toLower();
+
+ qDebug() << loader()->keys();
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+ if (QPlatformIntegrationFactoryInterface *factory = qobject_cast<QPlatformIntegrationFactoryInterface*>(loader()->instance(platform)))
+ ret = factory->create(platform);
+#endif
+
+ return ret;
+}
+
+/*!
+ Returns the list of valid keys, i.e. the keys this factory can
+ create styles for.
+
+ \sa create()
+*/
+QStringList QPlatformIntegrationFactory::keys()
+{
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
+ QStringList list = loader()->keys();
+#else
+ QStringList list;
+#endif
+ return list;
+}
+
+QT_END_NAMESPACE
+
diff --git a/src/gui/kernel/qplatformintegrationfactory_lite_p.h b/src/gui/kernel/qplatformintegrationfactory_lite_p.h
new file mode 100644
index 0000000000..ba02d2c6b6
--- /dev/null
+++ b/src/gui/kernel/qplatformintegrationfactory_lite_p.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMINTEGRATIONFACTORY_H
+#define QPLATFORMINTEGRATIONFACTORY_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qstringlist.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class QPlatformIntegration;
+
+class QPlatformIntegrationFactory
+{
+public:
+ static QStringList keys();
+ static QPlatformIntegration *create(const QString&);
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QPLATFORMINTEGRATIONFACTORY_H
+
diff --git a/src/gui/kernel/qplatformintegrationplugin_lite.cpp b/src/gui/kernel/qplatformintegrationplugin_lite.cpp
new file mode 100644
index 0000000000..cb1ed83e57
--- /dev/null
+++ b/src/gui/kernel/qplatformintegrationplugin_lite.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qplatformintegrationplugin_lite.h"
+
+QT_BEGIN_NAMESPACE
+
+QPlatformIntegrationPlugin::QPlatformIntegrationPlugin(QObject *parent)
+ : QObject(parent)
+{
+}
+
+QPlatformIntegrationPlugin::~QPlatformIntegrationPlugin()
+{
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformintegrationplugin_lite.h b/src/gui/kernel/qplatformintegrationplugin_lite.h
new file mode 100644
index 0000000000..0e116f2342
--- /dev/null
+++ b/src/gui/kernel/qplatformintegrationplugin_lite.h
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMINTEGRATIONPLUGIN_H
+#define QPLATFORMINTEGRATIONPLUGIN_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/qplugin.h>
+#include <QtCore/qfactoryinterface.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class QPlatformIntegration;
+
+struct QPlatformIntegrationFactoryInterface : public QFactoryInterface
+{
+ virtual QPlatformIntegration *create(const QString &key) = 0;
+};
+
+#define QPlatformIntegrationFactoryInterface_iid "com.nokia.Qt.QPlatformIntegrationFactoryInterface"
+
+Q_DECLARE_INTERFACE(QPlatformIntegrationFactoryInterface, QPlatformIntegrationFactoryInterface_iid)
+
+class Q_GUI_EXPORT QPlatformIntegrationPlugin : public QObject, public QPlatformIntegrationFactoryInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QPlatformIntegrationFactoryInterface:QFactoryInterface)
+public:
+ explicit QPlatformIntegrationPlugin(QObject *parent = 0);
+ ~QPlatformIntegrationPlugin();
+
+ virtual QStringList keys() const = 0;
+ virtual QPlatformIntegration *create(const QString &key) = 0;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QPLATFORMINTEGRATIONPLUGIN_H
diff --git a/src/gui/kernel/qplatformscreen_lite.cpp b/src/gui/kernel/qplatformscreen_lite.cpp
new file mode 100644
index 0000000000..f2ea2f8100
--- /dev/null
+++ b/src/gui/kernel/qplatformscreen_lite.cpp
@@ -0,0 +1,15 @@
+#include "qplatformscreen_lite.h"
+
+QWidget *QPlatformScreen::topLevelAt(const QPoint & pos) const
+{
+ QWidgetList list = QApplication::topLevelWidgets();
+ for (int i = list.size()-1; i >= 0; --i) {
+ QWidget *w = list[i];
+ //### mask is ignored
+ if (w != QApplication::desktop() && w->isVisible() && w->geometry().contains(pos))
+ return w;
+ }
+
+ return 0;
+}
+
diff --git a/src/gui/kernel/qplatformscreen_lite.h b/src/gui/kernel/qplatformscreen_lite.h
new file mode 100644
index 0000000000..ef90dee27d
--- /dev/null
+++ b/src/gui/kernel/qplatformscreen_lite.h
@@ -0,0 +1,31 @@
+#ifndef QPLATFORMSCREEN_H
+#define QPLATFORMSCREEN_H
+
+#include <QtCore/qrect.h>
+#include <QtGui/qimage.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class Q_GUI_EXPORT QPlatformScreen
+{
+public:
+ virtual ~QPlatformScreen() { }
+
+ virtual QRect geometry() const = 0;
+ virtual QRect availableGeometry() const {return geometry();};
+ virtual int depth() const = 0;
+ virtual QImage::Format format() const = 0;
+ virtual QSize physicalSize() const = 0;
+ virtual void setDirty(const QRect &) {}
+ virtual QWidget *topLevelAt(const QPoint &point) const;
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QPLATFORMSCREEN_H
diff --git a/src/gui/kernel/qwidget_lite.cpp b/src/gui/kernel/qwidget_lite.cpp
index bcbcd8298f..add5592ad8 100644
--- a/src/gui/kernel/qwidget_lite.cpp
+++ b/src/gui/kernel/qwidget_lite.cpp
@@ -51,7 +51,7 @@
#include <QGraphicsSystemCursor>
QT_BEGIN_NAMESPACE
-static QGraphicsSystemScreen *qt_screenForWidget(const QWidget *w);
+static QPlatformScreen *qt_screenForWidget(const QWidget *w);
void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool /*destroyOldWindow*/)
{
@@ -535,7 +535,7 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &r)
scrollRect(r, dx, dy);
}
-static QGraphicsSystemScreen *qt_screenForWidget(const QWidget *w)
+static QPlatformScreen *qt_screenForWidget(const QWidget *w)
{
if (!w)
return 0;
@@ -544,12 +544,8 @@ static QGraphicsSystemScreen *qt_screenForWidget(const QWidget *w)
frame.moveTopLeft(w->mapToGlobal(QPoint(0, 0)));
const QPoint p = (frame.topLeft() + frame.bottomRight()) / 2;
- QGraphicsSystem *gs = QApplicationPrivate::graphicsSystem();
- if (!gs) {
- qWarning("qt_screenForWidget: no graphics system");
- return 0;
- }
- QList<QGraphicsSystemScreen *> screens = gs->screens();
+ QPlatformIntegration *pi = QApplicationPrivate::platformIntegration();
+ QList<QPlatformScreen *> screens = pi->screens();
for (int i = 0; i < screens.size(); ++i) {
if (screens[i]->geometry().contains(p))
@@ -569,7 +565,7 @@ int QWidget::metric(PaintDeviceMetric m) const
{
Q_D(const QWidget);
- QGraphicsSystemScreen *screen = qt_screenForWidget(this);
+ QPlatformScreen *screen = qt_screenForWidget(this);
if (!screen) {
if (m == PdmDpiX || m == PdmDpiY)
return 72;
diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h
index fee7e75cf5..70b28301d6 100644
--- a/src/gui/kernel/qwindowsysteminterface.h
+++ b/src/gui/kernel/qwindowsysteminterface.h
@@ -41,14 +41,18 @@
#ifndef QWINDOWSYSTEMINTERFACE_H
#define QWINDOWSYSTEMINTERFACE_H
-#include <QTime>
-#include <qwindowdefs.h>
-#include <QEvent>
-#include <QWidget>
-#include <QWeakPointer>
+#include <QtCore/QTime>
+#include <QtGui/qwindowdefs.h>
+#include <QtCore/QEvent>
+#include <QtGui/QWidget>
+#include <QtCore/QWeakPointer>
+
+QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Gui)
+
class Q_GUI_EXPORT QWindowSystemInterface
{
public:
@@ -129,5 +133,7 @@ public:
static QWindowSystemInterface::UserEvent * getUserEvent() { return userEventQueue.takeFirst(); }
static void queueUserEvent(QWindowSystemInterface::UserEvent *ev) { userEventQueue.append(ev); }
};
+
QT_END_NAMESPACE
+QT_END_HEADER
#endif // QWINDOWSYSTEMINTERFACE_H
diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri
index 3273cb352f..c4e8f7a1dc 100644
--- a/src/gui/painting/painting.pri
+++ b/src/gui/painting/painting.pri
@@ -187,9 +187,11 @@ embedded_lite {
SOURCES += \
painting/qcolormap_lite.cpp \
painting/qpaintdevice_lite.cpp \
- painting/qgraphicssystemcursor_lite.cpp
+ painting/qgraphicssystemcursor_lite.cpp \
+ painting/qgraphicssystem_lite.cpp
HEADERS += \
- painting/qgraphicssystemcursor_lite.h
+ painting/qgraphicssystemcursor_lite.h \
+ painting/qgraphicssystem_lite_p.h
}
symbian {
diff --git a/src/gui/painting/qcolormap_lite.cpp b/src/gui/painting/qcolormap_lite.cpp
index 1c1e9cfd14..1f4fea8e41 100644
--- a/src/gui/painting/qcolormap_lite.cpp
+++ b/src/gui/painting/qcolormap_lite.cpp
@@ -67,12 +67,8 @@ void QColormap::initialize()
{
screenMap = new QColormapPrivate;
- QGraphicsSystem *gs = QApplicationPrivate::graphicsSystem();
- if (!gs)
- return;
- QList<QGraphicsSystemScreen *> screens = gs->screens();
- if (screens.isEmpty())
- return;
+ QPlatformIntegration *pi = QApplicationPrivate::platformIntegration();
+ QList<QPlatformScreen*> screens = pi->screens();
screenMap->depth = screens[0]->depth();
if (screenMap->depth < 8) {
diff --git a/src/gui/painting/qgraphicssystem.cpp b/src/gui/painting/qgraphicssystem.cpp
index ebc504bfb9..c9866ae631 100644
--- a/src/gui/painting/qgraphicssystem.cpp
+++ b/src/gui/painting/qgraphicssystem.cpp
@@ -51,9 +51,7 @@
# include <private/qpixmap_mac_p.h>
#endif
#ifdef Q_WS_LITE
-# include <private/qpixmap_raster_p.h>
-# include <qapplication.h>
-# include <qdesktopwidget.h>
+# include <QtGui/private/qapplication_p.h>
#endif
#ifdef Q_WS_S60
# include <private/qpixmap_s60_p.h>
@@ -65,6 +63,9 @@ QGraphicsSystem::~QGraphicsSystem()
{
}
+QBlittable *QGraphicsSystem::createBlittable(const QSize &) const
+{ return 0; }
+
QPixmapData *QGraphicsSystem::createDefaultPixmapData(QPixmapData::PixelType type)
{
#ifdef Q_WS_QWS
@@ -77,7 +78,7 @@ QPixmapData *QGraphicsSystem::createDefaultPixmapData(QPixmapData::PixelType typ
#elif defined(Q_WS_MAC)
return new QMacPixmapData(type);
#elif defined(Q_WS_LITE)
- return new QRasterPixmapData(type);
+ return QApplicationPrivate::platformIntegration()->createPixmapData(type);
#elif defined(Q_WS_S60)
return new QS60PixmapData(type);
#elif !defined(Q_WS_QWS)
@@ -86,49 +87,4 @@ QPixmapData *QGraphicsSystem::createDefaultPixmapData(QPixmapData::PixelType typ
return 0;
}
-#ifdef Q_WS_LITE
-QWidget *QGraphicsSystemScreen::topLevelAt(const QPoint & pos) const
-{
- QWidgetList list = QApplication::topLevelWidgets();
- for (int i = list.size()-1; i >= 0; --i) {
- QWidget *w = list[i];
- //### mask is ignored
- if (w != QApplication::desktop() && w->isVisible() && w->geometry().contains(pos))
- return w;
- }
-
- return 0;
-}
-
-QList<QGraphicsSystemScreen *> QGraphicsSystem::screens() const
-{
- return QList<QGraphicsSystemScreen *>();
-}
-
-QPixmap QGraphicsSystem::grabWindow(WId window, int x, int y, int width, int height) const
-{
- Q_UNUSED(window);
- Q_UNUSED(x);
- Q_UNUSED(y);
- Q_UNUSED(width);
- Q_UNUSED(height);
- return QPixmap();
-}
-
-
-QGraphicsSystemScreen::QGraphicsSystemScreen(QObject *parent)
- : QObject(parent)
-{}
-
-QGraphicsSystemScreen::~QGraphicsSystemScreen()
-{
-}
-
-QRect QGraphicsSystemScreen::availableGeometry() const
-{
- return geometry();
-}
-
-#endif //Q_WS_LITE
-
QT_END_NAMESPACE
diff --git a/src/gui/painting/qgraphicssystem_lite.cpp b/src/gui/painting/qgraphicssystem_lite.cpp
new file mode 100644
index 0000000000..42e723862b
--- /dev/null
+++ b/src/gui/painting/qgraphicssystem_lite.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qgraphicssystem_lite_p.h"
+#include <QtGui/private/qapplication_p.h>
+
+QT_BEGIN_NAMESPACE
+
+QPixmapData *QLiteGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const
+{
+ return QApplicationPrivate::platformIntegration()->createPixmapData(type);
+}
+
+QWindowSurface *QLiteGraphicsSystem::createWindowSurface(QWidget *widget) const
+{
+ return QApplicationPrivate::platformIntegration()->createWindowSurface(widget);
+}
+
+QBlittable *QLiteGraphicsSystem::createBlittable(const QSize &size) const
+{
+ return QApplicationPrivate::platformIntegration()->createBlittable(size);
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/painting/qgraphicssystem_lite_p.h b/src/gui/painting/qgraphicssystem_lite_p.h
new file mode 100644
index 0000000000..e29fa83290
--- /dev/null
+++ b/src/gui/painting/qgraphicssystem_lite_p.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGRAPHICSSYSTEM_MAC_P_H
+#define QGRAPHICSSYSTEM_MAC_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "private/qgraphicssystem_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class Q_GUI_EXPORT QLiteGraphicsSystem : public QGraphicsSystem
+{
+public:
+ QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
+ QWindowSurface *createWindowSurface(QWidget *widget) const;
+ QBlittable *createBlittable(const QSize &size) const;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/gui/painting/qgraphicssystem_p.h b/src/gui/painting/qgraphicssystem_p.h
index 03b0f48a90..e1e15e09f4 100644
--- a/src/gui/painting/qgraphicssystem_p.h
+++ b/src/gui/painting/qgraphicssystem_p.h
@@ -64,37 +64,14 @@ QT_BEGIN_NAMESPACE
class QPixmapFilter;
class QBlittable;
-#ifdef Q_WS_LITE
-class Q_GUI_EXPORT QGraphicsSystemScreen : public QObject
-{
- Q_OBJECT
-public:
- QGraphicsSystemScreen(QObject *parent = 0);
- virtual ~QGraphicsSystemScreen();
-
- virtual QRect geometry() const = 0;
- virtual QRect availableGeometry() const;
- virtual int depth() const = 0;
- virtual QImage::Format format() const = 0;
- virtual QSize physicalSize() const = 0;
- virtual void setDirty(const QRect &) {}
- virtual QWidget *topLevelAt(const QPoint &point) const;
-};
-#endif // Q_WS_LITE
-
class Q_GUI_EXPORT QGraphicsSystem
{
public:
virtual QPixmapData *createPixmapData(QPixmapData::PixelType type) const = 0;
virtual QWindowSurface *createWindowSurface(QWidget *widget) const = 0;
- virtual QBlittable *createBlittable(const QSize &) const { return 0; }
-
- virtual ~QGraphicsSystem() = 0;
+ virtual QBlittable *createBlittable(const QSize &size) const;
-#ifdef Q_WS_LITE
- virtual QList<QGraphicsSystemScreen *> screens() const;
- virtual QPixmap grabWindow(WId window, int x, int y, int width, int height) const;
-#endif
+ virtual ~QGraphicsSystem();
//### Remove this & change qpixmap.cpp & qbitmap.cpp once every platform is gaurenteed
// to have a graphics system.
diff --git a/src/gui/painting/qgraphicssystemcursor_lite.cpp b/src/gui/painting/qgraphicssystemcursor_lite.cpp
index 76b7d97582..fdb026c248 100644
--- a/src/gui/painting/qgraphicssystemcursor_lite.cpp
+++ b/src/gui/painting/qgraphicssystemcursor_lite.cpp
@@ -94,7 +94,7 @@ QPointer<QGraphicsSystemCursor> QGraphicsSystemCursor::instance = 0;
Constructs a QGraphicsSystemCursor
*/
-QGraphicsSystemCursor::QGraphicsSystemCursor(QGraphicsSystemScreen *scr )
+QGraphicsSystemCursor::QGraphicsSystemCursor(QPlatformScreen *scr )
: screen(scr)
{
instance = this;
diff --git a/src/gui/painting/qgraphicssystemcursor_lite.h b/src/gui/painting/qgraphicssystemcursor_lite.h
index 0d57d52e12..5288b83017 100644
--- a/src/gui/painting/qgraphicssystemcursor_lite.h
+++ b/src/gui/painting/qgraphicssystemcursor_lite.h
@@ -47,6 +47,7 @@
#include <QPointer>
#include <QObject>
#include "qgraphicssystem_p.h"
+#include <QPlatformScreen>
QT_BEGIN_NAMESPACE
@@ -68,7 +69,7 @@ private:
class Q_GUI_EXPORT QGraphicsSystemCursor : public QObject {
public:
- QGraphicsSystemCursor(QGraphicsSystemScreen *);
+ QGraphicsSystemCursor(QPlatformScreen *);
// input methods
virtual void pointerEvent(const QMouseEvent & event) { Q_UNUSED(event); }
@@ -79,7 +80,7 @@ public:
protected:
static QPointer<QGraphicsSystemCursor> instance; // limit 1 cursor at a time
- QGraphicsSystemScreen * screen; // Where to request an update
+ QPlatformScreen* screen; // Where to request an update
};
QT_END_NAMESPACE
diff --git a/src/plugins/graphicssystems/blittable/blittable.pro b/src/plugins/graphicssystems/blittable/blittable.pro
index 596e92fc80..34c416548c 100644
--- a/src/plugins/graphicssystems/blittable/blittable.pro
+++ b/src/plugins/graphicssystems/blittable/blittable.pro
@@ -5,8 +5,7 @@ QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/graphicssystems
SOURCES = main.cpp
HEADERS = qblittable_image.h \
- qgraphicssystem_blittable.h \
- qwindowsurface_imageblittable.h
+ qgraphicssystem_blittable.h
target.path += $$[QT_INSTALL_PLUGINS]/graphicssystems
INSTALLS += target
diff --git a/src/plugins/graphicssystems/blittable/qgraphicssystem_blittable.h b/src/plugins/graphicssystems/blittable/qgraphicssystem_blittable.h
index b42021ee59..d45907f8b6 100644
--- a/src/plugins/graphicssystems/blittable/qgraphicssystem_blittable.h
+++ b/src/plugins/graphicssystems/blittable/qgraphicssystem_blittable.h
@@ -43,5 +43,11 @@ public:
QImage *image = new QImage(size, QImage::Format_ARGB32_Premultiplied);
return new QImageBlittable(image,true);
}
+
+ QList<QGraphicsSystemScreen *> screens()
+ { return m_screens; }
+
+ QList<QGraphicsSystemScreen *> m_screens;
};
+
diff --git a/src/plugins/graphicssystems/graphicssystems.pro b/src/plugins/graphicssystems/graphicssystems.pro
index a5116d00d0..c00c9ff8cc 100644
--- a/src/plugins/graphicssystems/graphicssystems.pro
+++ b/src/plugins/graphicssystems/graphicssystems.pro
@@ -13,11 +13,3 @@ contains(QT_CONFIG, shivavg) {
# Only works under X11 at present
!win32:!embedded:!mac:SUBDIRS += shivavg
}
-
-embedded_lite: {
- SUBDIRS += minimal
-}
-
-embedded_lite:x11 {
- SUBDIRS += linuxfb
-}
diff --git a/src/plugins/graphicssystems/minimal/minimal.pro b/src/plugins/graphicssystems/minimal/minimal.pro
deleted file mode 100644
index 11604dd45a..0000000000
--- a/src/plugins/graphicssystems/minimal/minimal.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TARGET = qminimalgraphicssystem
-include(../../qpluginbase.pri)
-
-QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/graphicssystems
-
-SOURCES = main.cpp qgraphicssystem_minimal.cpp qwindowsurface_minimal.cpp
-HEADERS = qgraphicssystem_minimal.h qwindowsurface_minimal.h
-
-target.path += $$[QT_INSTALL_PLUGINS]/graphicssystems
-INSTALLS += target
diff --git a/src/plugins/graphicssystems/minimal/qgraphicssystem_minimal.cpp b/src/plugins/graphicssystems/minimal/qgraphicssystem_minimal.cpp
deleted file mode 100644
index 78aff06ae4..0000000000
--- a/src/plugins/graphicssystems/minimal/qgraphicssystem_minimal.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qgraphicssystem_minimal.h"
-#include "qwindowsurface_minimal.h"
-#include <QtGui/private/qpixmap_raster_p.h>
-
-QT_BEGIN_NAMESPACE
-
-QMinimalGraphicsSystem::QMinimalGraphicsSystem()
-{
- mPrimaryScreen = new QMinimalGraphicsSystemScreen();
-
- mPrimaryScreen->mGeometry = QRect(0, 0, 240, 320);
- mPrimaryScreen->mDepth = 16;
- mPrimaryScreen->mFormat = QImage::Format_RGB16;
- mPrimaryScreen->mPhysicalSize = QSize(40, 54);
-
- mScreens.append(mPrimaryScreen);
-}
-
-QPixmapData *QMinimalGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const
-{
- return new QRasterPixmapData(type);
-}
-
-QWindowSurface *QMinimalGraphicsSystem::createWindowSurface(QWidget *widget) const
-{
- return new QMinimalWindowSurface(mPrimaryScreen, widget);
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/graphicssystems/fb_base/fb_base.cpp b/src/plugins/platforms/fb_base/fb_base.cpp
index d30746ade2..d30746ade2 100644
--- a/src/plugins/graphicssystems/fb_base/fb_base.cpp
+++ b/src/plugins/platforms/fb_base/fb_base.cpp
diff --git a/src/plugins/graphicssystems/fb_base/fb_base.h b/src/plugins/platforms/fb_base/fb_base.h
index 7f9b005cf1..7f9b005cf1 100644
--- a/src/plugins/graphicssystems/fb_base/fb_base.h
+++ b/src/plugins/platforms/fb_base/fb_base.h
diff --git a/src/plugins/graphicssystems/fb_base/fb_base.pri b/src/plugins/platforms/fb_base/fb_base.pri
index 41bd87fbca..41bd87fbca 100644
--- a/src/plugins/graphicssystems/fb_base/fb_base.pri
+++ b/src/plugins/platforms/fb_base/fb_base.pri
diff --git a/src/plugins/graphicssystems/fb_base/fb_base.pro b/src/plugins/platforms/fb_base/fb_base.pro
index e08c0c5571..e08c0c5571 100644
--- a/src/plugins/graphicssystems/fb_base/fb_base.pro
+++ b/src/plugins/platforms/fb_base/fb_base.pro
diff --git a/src/plugins/graphicssystems/linuxfb/linuxfb.pro b/src/plugins/platforms/linuxfb/linuxfb.pro
index 031b843735..031b843735 100644
--- a/src/plugins/graphicssystems/linuxfb/linuxfb.pro
+++ b/src/plugins/platforms/linuxfb/linuxfb.pro
diff --git a/src/plugins/graphicssystems/linuxfb/main.cpp b/src/plugins/platforms/linuxfb/main.cpp
index 4d03fe57a9..4d03fe57a9 100644
--- a/src/plugins/graphicssystems/linuxfb/main.cpp
+++ b/src/plugins/platforms/linuxfb/main.cpp
diff --git a/src/plugins/graphicssystems/linuxfb/qgraphicssystem_linuxfb.cpp b/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.cpp
index 44960bb321..44960bb321 100644
--- a/src/plugins/graphicssystems/linuxfb/qgraphicssystem_linuxfb.cpp
+++ b/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.cpp
diff --git a/src/plugins/graphicssystems/linuxfb/qgraphicssystem_linuxfb.h b/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.h
index cc8ce7e80e..cc8ce7e80e 100644
--- a/src/plugins/graphicssystems/linuxfb/qgraphicssystem_linuxfb.h
+++ b/src/plugins/platforms/linuxfb/qgraphicssystem_linuxfb.h
diff --git a/src/plugins/graphicssystems/minimal/main.cpp b/src/plugins/platforms/minimal/main.cpp
index 2e9d80e8f8..44c274be27 100644
--- a/src/plugins/graphicssystems/minimal/main.cpp
+++ b/src/plugins/platforms/minimal/main.cpp
@@ -39,33 +39,33 @@
**
****************************************************************************/
-#include <private/qgraphicssystemplugin_p.h>
-#include "qgraphicssystem_minimal.h"
+#include <QtGui/QPlatformIntegrationPlugin>
+#include "qplatformintegration_minimal.h"
QT_BEGIN_NAMESPACE
-class QMinimalGraphicsSystemPlugin : public QGraphicsSystemPlugin
+class QMinimalIntegrationPlugin : public QPlatformIntegrationPlugin
{
public:
QStringList keys() const;
- QGraphicsSystem *create(const QString&);
+ QPlatformIntegration *create(const QString&);
};
-QStringList QMinimalGraphicsSystemPlugin::keys() const
+QStringList QMinimalIntegrationPlugin::keys() const
{
QStringList list;
list << "Minimal";
return list;
}
-QGraphicsSystem* QMinimalGraphicsSystemPlugin::create(const QString& system)
+QPlatformIntegration *QMinimalIntegrationPlugin::create(const QString& system)
{
if (system.toLower() == "minimal")
- return new QMinimalGraphicsSystem;
+ return new QMinimalIntegration;
return 0;
}
-Q_EXPORT_PLUGIN2(minimal, QMinimalGraphicsSystemPlugin)
+Q_EXPORT_PLUGIN2(minimal, QMinimalIntegrationPlugin)
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro
new file mode 100644
index 0000000000..567b551876
--- /dev/null
+++ b/src/plugins/platforms/minimal/minimal.pro
@@ -0,0 +1,13 @@
+TARGET = qminimalgraphicssystem
+include(../../qpluginbase.pri)
+
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms
+
+SOURCES = main.cpp \
+ qplatformintegration_minimal.cpp \
+ qwindowsurface_minimal.cpp
+HEADERS = qplatformintegration_minimal.h \
+ qwindowsurface_minimal.h
+
+target.path += $$[QT_INSTALL_PLUGINS]/platforms
+INSTALLS += target
diff --git a/src/plugins/platforms/minimal/qplatformintegration_minimal.cpp b/src/plugins/platforms/minimal/qplatformintegration_minimal.cpp
new file mode 100644
index 0000000000..693e0c3270
--- /dev/null
+++ b/src/plugins/platforms/minimal/qplatformintegration_minimal.cpp
@@ -0,0 +1,25 @@
+#include "qplatformintegration_minimal.h"
+#include "qwindowsurface_minimal.h"
+
+#include <QtGui/private/qpixmap_raster_p.h>
+
+QMinimalIntegration::QMinimalIntegration()
+{
+ QMinimalScreen *mPrimaryScreen = new QMinimalScreen();
+
+ mPrimaryScreen->mGeometry = QRect(0, 0, 240, 320);
+ mPrimaryScreen->mDepth = 16;
+ mPrimaryScreen->mFormat = QImage::Format_RGB16;
+ mPrimaryScreen->mPhysicalSize = QSize(40, 54);
+
+ mScreens.append(mPrimaryScreen);
+}
+
+QPixmapData *QMinimalIntegration::createPixmapData(QPixmapData::PixelType type) const
+{
+ return new QRasterPixmapData(type);
+}
+QWindowSurface *QMinimalIntegration::createWindowSurface(QWidget *widget) const
+{
+ return new QMinimalWindowSurface(widget);
+}
diff --git a/src/plugins/graphicssystems/minimal/qgraphicssystem_minimal.h b/src/plugins/platforms/minimal/qplatformintegration_minimal.h
index 5bf230f3cb..d4eb78b456 100644
--- a/src/plugins/graphicssystems/minimal/qgraphicssystem_minimal.h
+++ b/src/plugins/platforms/minimal/qplatformintegration_minimal.h
@@ -1,3 +1,4 @@
+
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
@@ -39,19 +40,19 @@
**
****************************************************************************/
-#ifndef QGRAPHICSSYSTEM_MINIMAL_H
-#define QGRAPHICSSYSTEM_MINIMAL_H
+#ifndef QPLATFORMINTEGRATION_MINIMAL_H
+#define QPLATFORMINTEGRATION_MINIMAL_H
-#include <QtGui/private/qgraphicssystem_p.h>
+#include <QtGui/QPlatformIntegration>
+#include <QtGui/QPlatformScreen>
QT_BEGIN_NAMESPACE
-class QMinimalGraphicsSystemScreen : public QGraphicsSystemScreen
+class QMinimalScreen : public QPlatformScreen
{
public:
- QMinimalGraphicsSystemScreen()
+ QMinimalScreen()
: mDepth(16), mFormat(QImage::Format_RGB16) {}
- ~QMinimalGraphicsSystemScreen() {}
QRect geometry() const { return mGeometry; }
int depth() const { return mDepth; }
@@ -65,19 +66,18 @@ public:
QSize mPhysicalSize;
};
-class QMinimalGraphicsSystem : public QGraphicsSystem
+class QMinimalIntegration : public QPlatformIntegration
{
public:
- QMinimalGraphicsSystem();
+ QMinimalIntegration();
QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
QWindowSurface *createWindowSurface(QWidget *widget) const;
- QList<QGraphicsSystemScreen *> screens() const { return mScreens; }
+ QList<QPlatformScreen *> screens() const { return mScreens; }
private:
- QMinimalGraphicsSystemScreen *mPrimaryScreen;
- QList<QGraphicsSystemScreen *> mScreens;
+ QList<QPlatformScreen *> mScreens;
};
QT_END_NAMESPACE
diff --git a/src/plugins/graphicssystems/minimal/qwindowsurface_minimal.cpp b/src/plugins/platforms/minimal/qwindowsurface_minimal.cpp
index a87e6906a1..0b2bdd2fef 100644
--- a/src/plugins/graphicssystems/minimal/qwindowsurface_minimal.cpp
+++ b/src/plugins/platforms/minimal/qwindowsurface_minimal.cpp
@@ -40,15 +40,13 @@
****************************************************************************/
#include "qwindowsurface_minimal.h"
-#include "qgraphicssystem_minimal.h"
#include <QtCore/qdebug.h>
+#include <QtGui/private/qapplication_p.h>
QT_BEGIN_NAMESPACE
-QMinimalWindowSurface::QMinimalWindowSurface
- (QMinimalGraphicsSystemScreen *screen, QWidget *window)
- : QWindowSurface(window),
- mScreen(screen)
+QMinimalWindowSurface::QMinimalWindowSurface(QWidget *window)
+ : QWindowSurface(window)
{
//qDebug() << "QMinimalWindowSurface::QMinimalWindowSurface:" << (long)this;
}
@@ -79,23 +77,9 @@ void QMinimalWindowSurface::setGeometry(const QRect &rect)
{
//qDebug() << "QMinimalWindowSurface::setGeometry:" << (long)this << rect;
QWindowSurface::setGeometry(rect);
+ QImage::Format format = QApplicationPrivate::platformIntegration()->screens().first()->format();
if (mImage.size() != rect.size())
- mImage = QImage(rect.size(), mScreen->format());
-}
-
-bool QMinimalWindowSurface::scroll(const QRegion &area, int dx, int dy)
-{
- return QWindowSurface::scroll(area, dx, dy);
-}
-
-void QMinimalWindowSurface::beginPaint(const QRegion &region)
-{
- Q_UNUSED(region);
-}
-
-void QMinimalWindowSurface::endPaint(const QRegion &region)
-{
- Q_UNUSED(region);
+ mImage = QImage(rect.size(), format);
}
QT_END_NAMESPACE
diff --git a/src/plugins/graphicssystems/minimal/qwindowsurface_minimal.h b/src/plugins/platforms/minimal/qwindowsurface_minimal.h
index c7593e71c4..959a73140c 100644
--- a/src/plugins/graphicssystems/minimal/qwindowsurface_minimal.h
+++ b/src/plugins/platforms/minimal/qwindowsurface_minimal.h
@@ -46,25 +46,17 @@
QT_BEGIN_NAMESPACE
-class QMinimalGraphicsSystemScreen;
-
class QMinimalWindowSurface : public QWindowSurface
{
public:
- QMinimalWindowSurface
- (QMinimalGraphicsSystemScreen *screen, QWidget *window);
+ QMinimalWindowSurface(QWidget *window);
~QMinimalWindowSurface();
QPaintDevice *paintDevice();
void flush(QWidget *widget, const QRegion &region, const QPoint &offset);
void setGeometry(const QRect &rect);
- bool scroll(const QRegion &area, int dx, int dy);
-
- void beginPaint(const QRegion &region);
- void endPaint(const QRegion &region);
private:
- QMinimalGraphicsSystemScreen *mScreen;
QImage mImage;
};
diff --git a/src/plugins/graphicssystems/minimaldfb/main.cpp b/src/plugins/platforms/minimaldfb/main.cpp
index fe9407c2d5..fe9407c2d5 100644
--- a/src/plugins/graphicssystems/minimaldfb/main.cpp
+++ b/src/plugins/platforms/minimaldfb/main.cpp
diff --git a/src/plugins/graphicssystems/minimaldfb/minimaldfb.pro b/src/plugins/platforms/minimaldfb/minimaldfb.pro
index b6c2ea8f05..b6c2ea8f05 100644
--- a/src/plugins/graphicssystems/minimaldfb/minimaldfb.pro
+++ b/src/plugins/platforms/minimaldfb/minimaldfb.pro
diff --git a/src/plugins/graphicssystems/minimaldfb/qblitter_directfb.cpp b/src/plugins/platforms/minimaldfb/qblitter_directfb.cpp
index ded57d3cd3..070c5633f7 100644
--- a/src/plugins/graphicssystems/minimaldfb/qblitter_directfb.cpp
+++ b/src/plugins/platforms/minimaldfb/qblitter_directfb.cpp
@@ -8,7 +8,7 @@
#include <directfb.h>
-QDirectFbBlitter::QDirectFbBlitter(const QRect &rect, IDirectFBSurface *surface)
+QDirectFbBlitter::QDirectFbBlitter(const QSize &rect, IDirectFBSurface *surface)
: QBlittable(rect, QBlittable::Capabilities(QBlittable::SolidRectCapability
|QBlittable::SourcePixmapCapability
|QBlittable::SourceOverPixmapCapability
@@ -83,7 +83,7 @@ void QDirectFbBlitter::drawPixmap(const QRectF &rect, const QPixmap &pixmap, con
QImage *QDirectFbBlitter::doLock()
{
Q_ASSERT(m_surface);
- Q_ASSERT(rect().isValid());
+ Q_ASSERT(size().isValid());
void *mem;
int bpl;
diff --git a/src/plugins/graphicssystems/minimaldfb/qblitter_directfb.h b/src/plugins/platforms/minimaldfb/qblitter_directfb.h
index 8d24678708..85a303a085 100644
--- a/src/plugins/graphicssystems/minimaldfb/qblitter_directfb.h
+++ b/src/plugins/platforms/minimaldfb/qblitter_directfb.h
@@ -3,14 +3,14 @@
#include "qdirectfbconvenience.h"
-#include <private/qpaintengine_blitter_p.h>
+#include <private/qblittable_p.h>
#include <directfb.h>
class QDirectFbBlitter : public QBlittable
{
public:
- QDirectFbBlitter(const QRect &rect, IDirectFBSurface *surface = 0);
+ QDirectFbBlitter(const QSize &size, IDirectFBSurface *surface = 0);
virtual ~QDirectFbBlitter();
virtual void fillRect(const QRectF &rect, const QColor &color);
diff --git a/src/plugins/graphicssystems/minimaldfb/qdirectfbconvenience.cpp b/src/plugins/platforms/minimaldfb/qdirectfbconvenience.cpp
index 8594c09ca0..8594c09ca0 100644
--- a/src/plugins/graphicssystems/minimaldfb/qdirectfbconvenience.cpp
+++ b/src/plugins/platforms/minimaldfb/qdirectfbconvenience.cpp
diff --git a/src/plugins/graphicssystems/minimaldfb/qdirectfbconvenience.h b/src/plugins/platforms/minimaldfb/qdirectfbconvenience.h
index 0b1a24f330..0b1a24f330 100644
--- a/src/plugins/graphicssystems/minimaldfb/qdirectfbconvenience.h
+++ b/src/plugins/platforms/minimaldfb/qdirectfbconvenience.h
diff --git a/src/plugins/graphicssystems/minimaldfb/qdirectfbcursor.cpp b/src/plugins/platforms/minimaldfb/qdirectfbcursor.cpp
index 229a87597f..229a87597f 100644
--- a/src/plugins/graphicssystems/minimaldfb/qdirectfbcursor.cpp
+++ b/src/plugins/platforms/minimaldfb/qdirectfbcursor.cpp
diff --git a/src/plugins/graphicssystems/minimaldfb/qdirectfbcursor.h b/src/plugins/platforms/minimaldfb/qdirectfbcursor.h
index 064a33678c..064a33678c 100644
--- a/src/plugins/graphicssystems/minimaldfb/qdirectfbcursor.h
+++ b/src/plugins/platforms/minimaldfb/qdirectfbcursor.h
diff --git a/src/plugins/graphicssystems/minimaldfb/qdirectfbinput.cpp b/src/plugins/platforms/minimaldfb/qdirectfbinput.cpp
index 74a38a45a5..74a38a45a5 100644
--- a/src/plugins/graphicssystems/minimaldfb/qdirectfbinput.cpp
+++ b/src/plugins/platforms/minimaldfb/qdirectfbinput.cpp
diff --git a/src/plugins/graphicssystems/minimaldfb/qdirectfbinput.h b/src/plugins/platforms/minimaldfb/qdirectfbinput.h
index 31aa082de9..31aa082de9 100644
--- a/src/plugins/graphicssystems/minimaldfb/qdirectfbinput.h
+++ b/src/plugins/platforms/minimaldfb/qdirectfbinput.h
diff --git a/src/plugins/graphicssystems/minimaldfb/qgraphicssystem_minimaldfb.cpp b/src/plugins/platforms/minimaldfb/qgraphicssystem_minimaldfb.cpp
index 4489e31c86..212f3a9f75 100644
--- a/src/plugins/graphicssystems/minimaldfb/qgraphicssystem_minimaldfb.cpp
+++ b/src/plugins/platforms/minimaldfb/qgraphicssystem_minimaldfb.cpp
@@ -110,9 +110,9 @@ QWindowSurface *QDirectFbGraphicsSystem::createWindowSurface(QWidget *widget) co
return new QDirectFbWindowSurface (widget);
}
-QBlittable *QDirectFbGraphicsSystem::createBlittable(const QRect &rect) const
+QBlittable *QDirectFbGraphicsSystem::createBlittable(const QSize &size) const
{
- return new QDirectFbBlitter(rect);
+ return new QDirectFbBlitter(size);
}
QT_END_NAMESPACE
diff --git a/src/plugins/graphicssystems/minimaldfb/qgraphicssystem_minimaldfb.h b/src/plugins/platforms/minimaldfb/qgraphicssystem_minimaldfb.h
index b16153d83f..27bddfbeb2 100644
--- a/src/plugins/graphicssystems/minimaldfb/qgraphicssystem_minimaldfb.h
+++ b/src/plugins/platforms/minimaldfb/qgraphicssystem_minimaldfb.h
@@ -83,7 +83,7 @@ public:
QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
QWindowSurface *createWindowSurface(QWidget *widget) const;
- QBlittable *createBlittable(const QRect &rect) const;
+ QBlittable *createBlittable(const QSize &size) const;
QList<QGraphicsSystemScreen *> screens() const { return mScreens; }
diff --git a/src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.cpp b/src/plugins/platforms/minimaldfb/qwindowsurface_minimaldfb.cpp
index 07a9b8a109..68d5aa08a1 100644
--- a/src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.cpp
+++ b/src/plugins/platforms/minimaldfb/qwindowsurface_minimaldfb.cpp
@@ -92,7 +92,7 @@ QDirectFbWindowSurface::QDirectFbWindowSurface(QWidget *window)
m_dfbWindow->GetSurface(m_dfbWindow,&m_dfbSurface);
- QDirectFbBlitter *blitter = new QDirectFbBlitter(window->rect(), m_dfbSurface);
+ QDirectFbBlitter *blitter = new QDirectFbBlitter(window->rect().size(), m_dfbSurface);
m_pmdata = new QBlittablePixmapData(QPixmapData::PixmapType);
m_pmdata->setBlittable(blitter);
m_pixmap = new QPixmap(m_pmdata);
@@ -134,7 +134,7 @@ void QDirectFbWindowSurface::setGeometry(const QRect &rect)
//Have to add 1 ref ass it will be removed by deleting the old blitter in setBlittable
m_dfbSurface->AddRef(m_dfbSurface);
- QDirectFbBlitter *blitter = new QDirectFbBlitter(rect,m_dfbSurface);
+ QDirectFbBlitter *blitter = new QDirectFbBlitter(rect.size(),m_dfbSurface);
m_pmdata->setBlittable(blitter);
}
diff --git a/src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.h b/src/plugins/platforms/minimaldfb/qwindowsurface_minimaldfb.h
index ca34cbf484..ca34cbf484 100644
--- a/src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.h
+++ b/src/plugins/platforms/minimaldfb/qwindowsurface_minimaldfb.h
diff --git a/src/plugins/graphicssystems/openkode/frag.glslf b/src/plugins/platforms/openkode/frag.glslf
index a593434a38..a593434a38 100644
--- a/src/plugins/graphicssystems/openkode/frag.glslf
+++ b/src/plugins/platforms/openkode/frag.glslf
diff --git a/src/plugins/graphicssystems/openkode/frag.h b/src/plugins/platforms/openkode/frag.h
index 6575cb5c80..6575cb5c80 100644
--- a/src/plugins/graphicssystems/openkode/frag.h
+++ b/src/plugins/platforms/openkode/frag.h
diff --git a/src/plugins/graphicssystems/openkode/main.cpp b/src/plugins/platforms/openkode/main.cpp
index e9c10834b7..e9c10834b7 100644
--- a/src/plugins/graphicssystems/openkode/main.cpp
+++ b/src/plugins/platforms/openkode/main.cpp
diff --git a/src/plugins/graphicssystems/openkode/openkode.pro b/src/plugins/platforms/openkode/openkode.pro
index 055048daba..055048daba 100644
--- a/src/plugins/graphicssystems/openkode/openkode.pro
+++ b/src/plugins/platforms/openkode/openkode.pro
diff --git a/src/plugins/graphicssystems/openkode/qgraphicssystem_openkode.cpp b/src/plugins/platforms/openkode/qgraphicssystem_openkode.cpp
index 7a07776fc6..7a07776fc6 100644
--- a/src/plugins/graphicssystems/openkode/qgraphicssystem_openkode.cpp
+++ b/src/plugins/platforms/openkode/qgraphicssystem_openkode.cpp
diff --git a/src/plugins/graphicssystems/openkode/qgraphicssystem_openkode.h b/src/plugins/platforms/openkode/qgraphicssystem_openkode.h
index 7d73ae04b1..7d73ae04b1 100644
--- a/src/plugins/graphicssystems/openkode/qgraphicssystem_openkode.h
+++ b/src/plugins/platforms/openkode/qgraphicssystem_openkode.h
diff --git a/src/plugins/graphicssystems/openkode/qwindowsurface_openkode.cpp b/src/plugins/platforms/openkode/qwindowsurface_openkode.cpp
index b3f3965d48..b3f3965d48 100644
--- a/src/plugins/graphicssystems/openkode/qwindowsurface_openkode.cpp
+++ b/src/plugins/platforms/openkode/qwindowsurface_openkode.cpp
diff --git a/src/plugins/graphicssystems/openkode/qwindowsurface_openkode.h b/src/plugins/platforms/openkode/qwindowsurface_openkode.h
index bee94a5419..bee94a5419 100644
--- a/src/plugins/graphicssystems/openkode/qwindowsurface_openkode.h
+++ b/src/plugins/platforms/openkode/qwindowsurface_openkode.h
diff --git a/src/plugins/graphicssystems/openkode/vert.glslv b/src/plugins/platforms/openkode/vert.glslv
index 57b58669c9..57b58669c9 100644
--- a/src/plugins/graphicssystems/openkode/vert.glslv
+++ b/src/plugins/platforms/openkode/vert.glslv
diff --git a/src/plugins/graphicssystems/openkode/vert.h b/src/plugins/platforms/openkode/vert.h
index bdf564d3ff..bdf564d3ff 100644
--- a/src/plugins/graphicssystems/openkode/vert.h
+++ b/src/plugins/platforms/openkode/vert.h
diff --git a/src/plugins/graphicssystems/openvglite/main.cpp b/src/plugins/platforms/openvglite/main.cpp
index dc0b4a8c08..dc0b4a8c08 100644
--- a/src/plugins/graphicssystems/openvglite/main.cpp
+++ b/src/plugins/platforms/openvglite/main.cpp
diff --git a/src/plugins/graphicssystems/openvglite/openvglite.pro b/src/plugins/platforms/openvglite/openvglite.pro
index 9d7860abe7..9d7860abe7 100644
--- a/src/plugins/graphicssystems/openvglite/openvglite.pro
+++ b/src/plugins/platforms/openvglite/openvglite.pro
diff --git a/src/plugins/graphicssystems/openvglite/qgraphicssystem_vglite.cpp b/src/plugins/platforms/openvglite/qgraphicssystem_vglite.cpp
index 41b2303202..41b2303202 100644
--- a/src/plugins/graphicssystems/openvglite/qgraphicssystem_vglite.cpp
+++ b/src/plugins/platforms/openvglite/qgraphicssystem_vglite.cpp
diff --git a/src/plugins/graphicssystems/openvglite/qgraphicssystem_vglite.h b/src/plugins/platforms/openvglite/qgraphicssystem_vglite.h
index 512793d98d..512793d98d 100644
--- a/src/plugins/graphicssystems/openvglite/qgraphicssystem_vglite.h
+++ b/src/plugins/platforms/openvglite/qgraphicssystem_vglite.h
diff --git a/src/plugins/graphicssystems/openvglite/qwindowsurface_vglite.cpp b/src/plugins/platforms/openvglite/qwindowsurface_vglite.cpp
index c73e35ac63..c73e35ac63 100644
--- a/src/plugins/graphicssystems/openvglite/qwindowsurface_vglite.cpp
+++ b/src/plugins/platforms/openvglite/qwindowsurface_vglite.cpp
diff --git a/src/plugins/graphicssystems/openvglite/qwindowsurface_vglite.h b/src/plugins/platforms/openvglite/qwindowsurface_vglite.h
index 59faba8c7a..59faba8c7a 100644
--- a/src/plugins/graphicssystems/openvglite/qwindowsurface_vglite.h
+++ b/src/plugins/platforms/openvglite/qwindowsurface_vglite.h
diff --git a/src/plugins/platforms/platforms.pro b/src/plugins/platforms/platforms.pro
new file mode 100644
index 0000000000..968844321e
--- /dev/null
+++ b/src/plugins/platforms/platforms.pro
@@ -0,0 +1,14 @@
+TEMPLATE = subdirs
+contains(QT_CONFIG, openvg):contains(QT_CONFIG, egl) {
+ embedded_lite {
+ SUBDIRS += openvglite
+ }
+}
+
+embedded_lite {
+ SUBDIRS += minimal
+}
+
+embedded_lite:x11 {
+ SUBDIRS += testlite
+}
diff --git a/src/plugins/graphicssystems/qvfb/main.cpp b/src/plugins/platforms/qvfb/main.cpp
index b28dde8b76..b28dde8b76 100644
--- a/src/plugins/graphicssystems/qvfb/main.cpp
+++ b/src/plugins/platforms/qvfb/main.cpp
diff --git a/src/plugins/graphicssystems/qvfb/qgraphicssystem_qvfb.cpp b/src/plugins/platforms/qvfb/qgraphicssystem_qvfb.cpp
index 19058a696d..19058a696d 100644
--- a/src/plugins/graphicssystems/qvfb/qgraphicssystem_qvfb.cpp
+++ b/src/plugins/platforms/qvfb/qgraphicssystem_qvfb.cpp
diff --git a/src/plugins/graphicssystems/qvfb/qgraphicssystem_qvfb.h b/src/plugins/platforms/qvfb/qgraphicssystem_qvfb.h
index b31869ce2b..b31869ce2b 100644
--- a/src/plugins/graphicssystems/qvfb/qgraphicssystem_qvfb.h
+++ b/src/plugins/platforms/qvfb/qgraphicssystem_qvfb.h
diff --git a/src/plugins/graphicssystems/qvfb/qvfb.pro b/src/plugins/platforms/qvfb/qvfb.pro
index b32172587c..b32172587c 100644
--- a/src/plugins/graphicssystems/qvfb/qvfb.pro
+++ b/src/plugins/platforms/qvfb/qvfb.pro
diff --git a/src/plugins/graphicssystems/qvfb/qwindowsurface_qvfb.cpp b/src/plugins/platforms/qvfb/qwindowsurface_qvfb.cpp
index 0aafe28643..0aafe28643 100644
--- a/src/plugins/graphicssystems/qvfb/qwindowsurface_qvfb.cpp
+++ b/src/plugins/platforms/qvfb/qwindowsurface_qvfb.cpp
diff --git a/src/plugins/graphicssystems/qvfb/qwindowsurface_qvfb.h b/src/plugins/platforms/qvfb/qwindowsurface_qvfb.h
index 1971caa80b..1971caa80b 100644
--- a/src/plugins/graphicssystems/qvfb/qwindowsurface_qvfb.h
+++ b/src/plugins/platforms/qvfb/qwindowsurface_qvfb.h
diff --git a/src/plugins/graphicssystems/testlite/main.cpp b/src/plugins/platforms/testlite/main.cpp
index 28caea78bd..28caea78bd 100644
--- a/src/plugins/graphicssystems/testlite/main.cpp
+++ b/src/plugins/platforms/testlite/main.cpp
diff --git a/src/plugins/graphicssystems/testlite/qgraphicssystem_testlite.cpp b/src/plugins/platforms/testlite/qgraphicssystem_testlite.cpp
index 92e0ebce70..92e0ebce70 100644
--- a/src/plugins/graphicssystems/testlite/qgraphicssystem_testlite.cpp
+++ b/src/plugins/platforms/testlite/qgraphicssystem_testlite.cpp
diff --git a/src/plugins/graphicssystems/testlite/qgraphicssystem_testlite.h b/src/plugins/platforms/testlite/qgraphicssystem_testlite.h
index b2cd4964d7..b2cd4964d7 100644
--- a/src/plugins/graphicssystems/testlite/qgraphicssystem_testlite.h
+++ b/src/plugins/platforms/testlite/qgraphicssystem_testlite.h
diff --git a/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.cpp b/src/plugins/platforms/testlite/qwindowsurface_testlite.cpp
index c54f6eb9e4..c54f6eb9e4 100644
--- a/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.cpp
+++ b/src/plugins/platforms/testlite/qwindowsurface_testlite.cpp
diff --git a/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.h b/src/plugins/platforms/testlite/qwindowsurface_testlite.h
index 0c4df1a691..0c4df1a691 100644
--- a/src/plugins/graphicssystems/testlite/qwindowsurface_testlite.h
+++ b/src/plugins/platforms/testlite/qwindowsurface_testlite.h
diff --git a/src/plugins/graphicssystems/testlite/testlite.pro b/src/plugins/platforms/testlite/testlite.pro
index d483f457f8..d483f457f8 100644
--- a/src/plugins/graphicssystems/testlite/testlite.pro
+++ b/src/plugins/platforms/testlite/testlite.pro
diff --git a/src/plugins/graphicssystems/testlite/x11util.cpp b/src/plugins/platforms/testlite/x11util.cpp
index 6d2966f688..6d2966f688 100644
--- a/src/plugins/graphicssystems/testlite/x11util.cpp
+++ b/src/plugins/platforms/testlite/x11util.cpp
diff --git a/src/plugins/graphicssystems/testlite/x11util.h b/src/plugins/platforms/testlite/x11util.h
index 79e7461e67..79e7461e67 100644
--- a/src/plugins/graphicssystems/testlite/x11util.h
+++ b/src/plugins/platforms/testlite/x11util.h
diff --git a/src/plugins/graphicssystems/vnc/main.cpp b/src/plugins/platforms/vnc/main.cpp
index f10748aa2e..f10748aa2e 100644
--- a/src/plugins/graphicssystems/vnc/main.cpp
+++ b/src/plugins/platforms/vnc/main.cpp
diff --git a/src/plugins/graphicssystems/vnc/qgraphicssystem_vnc.cpp b/src/plugins/platforms/vnc/qgraphicssystem_vnc.cpp
index 7815f24c89..7815f24c89 100644
--- a/src/plugins/graphicssystems/vnc/qgraphicssystem_vnc.cpp
+++ b/src/plugins/platforms/vnc/qgraphicssystem_vnc.cpp
diff --git a/src/plugins/graphicssystems/vnc/qgraphicssystem_vnc.h b/src/plugins/platforms/vnc/qgraphicssystem_vnc.h
index b3349b73c2..b3349b73c2 100644
--- a/src/plugins/graphicssystems/vnc/qgraphicssystem_vnc.h
+++ b/src/plugins/platforms/vnc/qgraphicssystem_vnc.h
diff --git a/src/plugins/graphicssystems/vnc/qvnccursor.cpp b/src/plugins/platforms/vnc/qvnccursor.cpp
index fb214d80af..fb214d80af 100644
--- a/src/plugins/graphicssystems/vnc/qvnccursor.cpp
+++ b/src/plugins/platforms/vnc/qvnccursor.cpp
diff --git a/src/plugins/graphicssystems/vnc/qvnccursor.h b/src/plugins/platforms/vnc/qvnccursor.h
index 8ea0f45e64..8ea0f45e64 100644
--- a/src/plugins/graphicssystems/vnc/qvnccursor.h
+++ b/src/plugins/platforms/vnc/qvnccursor.h
diff --git a/src/plugins/graphicssystems/vnc/qvncserver.cpp b/src/plugins/platforms/vnc/qvncserver.cpp
index ea576d457d..ea576d457d 100644
--- a/src/plugins/graphicssystems/vnc/qvncserver.cpp
+++ b/src/plugins/platforms/vnc/qvncserver.cpp
diff --git a/src/plugins/graphicssystems/vnc/qvncserver.h b/src/plugins/platforms/vnc/qvncserver.h
index 4fcdbae1ac..4fcdbae1ac 100644
--- a/src/plugins/graphicssystems/vnc/qvncserver.h
+++ b/src/plugins/platforms/vnc/qvncserver.h
diff --git a/src/plugins/graphicssystems/vnc/vnc.pro b/src/plugins/platforms/vnc/vnc.pro
index 0b73b5bb2f..0b73b5bb2f 100644
--- a/src/plugins/graphicssystems/vnc/vnc.pro
+++ b/src/plugins/platforms/vnc/vnc.pro