Skip to content

Commit

Permalink
Add support for loading theme plugins.
Browse files Browse the repository at this point in the history
Use QGenericUnixTheme to return a list of themes and create new
QPlatformTheme objects.

Change-Id: Iaac113aad3bc088f51695c224433287701113960
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
  • Loading branch information
plfiorini authored and Jørgen Lind committed Aug 16, 2012
1 parent ddaa441 commit abdce58
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/plugins/platforms/wayland/qwaylandintegration.cpp
Expand Up @@ -50,6 +50,7 @@

#include "QtPlatformSupport/private/qgenericunixfontdatabase_p.h"
#include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>
#include <QtPlatformSupport/private/qgenericunixthemes_p.h>

#include <QtGui/private/qguiapplication_p.h>

Expand Down Expand Up @@ -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);
}
5 changes: 5 additions & 0 deletions src/plugins/platforms/wayland/qwaylandintegration.h
Expand Up @@ -80,6 +80,11 @@ class QWaylandIntegration : public QPlatformIntegration
QPlatformServices *services() const;

QWaylandDisplay *display() const;

QStringList themeNames() const;

QPlatformTheme *createPlatformTheme(const QString &name) const;

private:
QPlatformFontDatabase *mFontDb;
QAbstractEventDispatcher *mEventDispatcher;
Expand Down

0 comments on commit abdce58

Please sign in to comment.