From c908fc4448989d0319f86da35c8fa66ad1440fa2 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 8 Feb 2012 08:40:48 +0100 Subject: Add QPlatformServices class. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 Reviewed-by: Samuel Rødal Reviewed-by: Anselmo Lacerda S. de Melo Change-Id: If94bb65755df4f849edd83c57143ee2c73002137 Reviewed-by: Friedemann Kleint --- src/plugins/platforms/xcb/qxcbintegration.cpp | 10 +++++++++- src/plugins/platforms/xcb/qxcbintegration.h | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/xcb') 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 #include +#include +#include #include @@ -84,7 +86,8 @@ QT_BEGIN_NAMESPACE QXcbIntegration::QXcbIntegration(const QStringList ¶meters) - : 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 m_connections; @@ -95,6 +97,8 @@ private: #if defined(QT_USE_XCB_SHARED_GRAPHICS_CACHE) QScopedPointer m_sharedGraphicsCache; #endif + + QScopedPointer m_services; }; QT_END_NAMESPACE -- cgit v1.2.3