diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-02-10 17:17:36 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-17 11:44:29 +0100 |
commit | 4cf0deef73ff2f24a80622ec5f391d10c74ea6c7 (patch) | |
tree | c34fb7c1e9b9488ca42ce8d681876515194aba2d /src/plugins/platforms/xcb | |
parent | 71bad3e8180297351b143271856b4b6732169f39 (diff) |
Add palette() and further hints to QtGui/QPlatformTheme.
- Move palette() from deprecated QtWidgets/QGuiPlatformPlugin
to QtGui/QPlatformTheme, Make it return a const * since
QPalette does not have isNull().
- Initialize QGuiApplication::palette() and
QApplication::systemPalette() from it.
- Do not initialize QPalette from QGuiApplication::palette()
unless app_pal is non-null (default to Qt::black if it is 0).
This avoids initialization order crashes/recursions in the
QPA plugin. Streamline initialization function.
- Remove styleName(), systemIconThemeName() and iconSearchPaths()
from QGuiPlatformPlugin and re-add them as
QPlatformTheme::themeHint().
- Remove styleHint() from QGuiPlatformPlugin, add it to
QPlatformTheme::themeHint().
- Add UNIX themes with factory function (Generic,
KDE, Gnome), taking it from Qt 4.8 code (stripping the
KDE 3 code).
- Implement Windows palettes.
Task-number: QTBUG-24204
Change-Id: Ie27ec035df4f84c42deaffc4816b2e53ce705462
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbintegration.cpp | 9 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbintegration.h | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index c976e75dbf..e7cdef4da9 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -70,6 +70,7 @@ #endif #include <private/qplatforminputcontextfactory_qpa_p.h> +#include <private/qgenericunixthemes_p.h> #include <qplatforminputcontext_qpa.h> #if defined(XCB_USE_GLX) @@ -87,7 +88,8 @@ QT_BEGIN_NAMESPACE QXcbIntegration::QXcbIntegration(const QStringList ¶meters) : m_eventDispatcher(createUnixEventDispatcher()), - m_services(new QGenericUnixServices) + m_services(new QGenericUnixServices), + m_theme(QGenericUnixTheme::createUnixTheme()) { QGuiApplicationPrivate::instance()->setEventDispatcher(m_eventDispatcher); @@ -278,4 +280,9 @@ QPlatformServices *QXcbIntegration::services() const return m_services.data(); } +QPlatformTheme *QXcbIntegration::platformTheme() const +{ + return m_theme.data(); +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h index 0f20658c70..457f90d6e0 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.h +++ b/src/plugins/platforms/xcb/qxcbintegration.h @@ -85,6 +85,8 @@ public: QPlatformServices *services() const; + QPlatformTheme *platformTheme() const; + private: QList<QXcbConnection *> m_connections; @@ -101,6 +103,7 @@ private: #endif QScopedPointer<QPlatformServices> m_services; + QScopedPointer<QPlatformTheme> m_theme; }; QT_END_NAMESPACE |