summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-02-08 08:40:48 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-10 22:53:13 +0100
commitc908fc4448989d0319f86da35c8fa66ad1440fa2 (patch)
treed3cc0c1980a0cb48b6a423478aa80c9b9af51280 /src/plugins/platforms/xcb
parentd43a01e1496c9be16cd2e3dc290bf70e926ceb99 (diff)
Add QPlatformServices class.
- Add QPlatformServices as back-end for QDesktopServices. - Bring back UNIX/Linux desktop detection in platformsupport as a generic implementation. - Add Windows implementation. Reviewed-by: Morten Johan Sorvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Anselmo Lacerda S. de Melo <anselmo.melo@openbossa.org> Change-Id: If94bb65755df4f849edd83c57143ee2c73002137 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp10
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.h4
2 files changed, 13 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index 40359169ca..0f7648a21b 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -53,6 +53,8 @@
#include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>
#include <QtPlatformSupport/private/qgenericunixfontdatabase_p.h>
+#include <QtPlatformSupport/private/qgenericunixfontdatabase_p.h>
+#include <QtPlatformSupport/private/qgenericunixservices_p.h>
#include <stdio.h>
@@ -84,7 +86,8 @@
QT_BEGIN_NAMESPACE
QXcbIntegration::QXcbIntegration(const QStringList &parameters)
- : m_eventDispatcher(createUnixEventDispatcher())
+ : m_eventDispatcher(createUnixEventDispatcher()),
+ m_services(new QGenericUnixServices)
{
QGuiApplicationPrivate::instance()->setEventDispatcher(m_eventDispatcher);
@@ -268,4 +271,9 @@ QPlatformSharedGraphicsCache *QXcbIntegration::createPlatformSharedGraphicsCache
}
#endif
+QPlatformServices *QXcbIntegration::services() const
+{
+ return m_services.data();
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h
index eefecd509b..77d0e4903c 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.h
+++ b/src/plugins/platforms/xcb/qxcbintegration.h
@@ -81,6 +81,8 @@ public:
QPlatformSharedGraphicsCache *createPlatformSharedGraphicsCache(const char *cacheId) const;
#endif
+ QPlatformServices *services() const;
+
private:
QList<QXcbConnection *> m_connections;
@@ -95,6 +97,8 @@ private:
#if defined(QT_USE_XCB_SHARED_GRAPHICS_CACHE)
QScopedPointer<QPlatformSharedGraphicsCache> m_sharedGraphicsCache;
#endif
+
+ QScopedPointer<QPlatformServices> m_services;
};
QT_END_NAMESPACE