From abdce5881c2d2ae129addc600ad0236660b9fc70 Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Wed, 15 Aug 2012 23:03:38 +0200 Subject: Add support for loading theme plugins. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use QGenericUnixTheme to return a list of themes and create new QPlatformTheme objects. Change-Id: Iaac113aad3bc088f51695c224433287701113960 Reviewed-by: Jørgen Lind --- src/plugins/platforms/wayland/qwaylandintegration.cpp | 11 +++++++++++ src/plugins/platforms/wayland/qwaylandintegration.h | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp index 97a259d0..9606f7c8 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp @@ -50,6 +50,7 @@ #include "QtPlatformSupport/private/qgenericunixfontdatabase_p.h" #include +#include #include @@ -199,3 +200,13 @@ QWaylandDisplay *QWaylandIntegration::display() const { return mDisplay; } + +QStringList QWaylandIntegration::themeNames() const +{ + return QGenericUnixTheme::themeNames(); +} + +QPlatformTheme *QWaylandIntegration::createPlatformTheme(const QString &name) const +{ + return QGenericUnixTheme::createUnixTheme(name); +} diff --git a/src/plugins/platforms/wayland/qwaylandintegration.h b/src/plugins/platforms/wayland/qwaylandintegration.h index 9bb6130a..ff10f014 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.h +++ b/src/plugins/platforms/wayland/qwaylandintegration.h @@ -80,6 +80,11 @@ public: QPlatformServices *services() const; QWaylandDisplay *display() const; + + QStringList themeNames() const; + + QPlatformTheme *createPlatformTheme(const QString &name) const; + private: QPlatformFontDatabase *mFontDb; QAbstractEventDispatcher *mEventDispatcher; -- cgit v1.2.1