Add palette() and further hints to QtGui/QPlatformTheme.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Fri, 10 Feb 2012 16:17:36 +0000 (17:17 +0100)
committerQt by Nokia <qt-info@nokia.com>
Fri, 17 Feb 2012 10:44:29 +0000 (11:44 +0100)
commit4cf0deef73ff2f24a80622ec5f391d10c74ea6c7
treec34fb7c1e9b9488ca42ce8d681876515194aba2d
parent71bad3e8180297351b143271856b4b6732169f39
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>
31 files changed:
src/gui/kernel/qguiapplication.cpp
src/gui/kernel/qpalette.cpp
src/gui/kernel/qplatformtheme_qpa.cpp
src/gui/kernel/qplatformtheme_qpa.h
src/platformsupport/platformsupport.pro
src/platformsupport/services/genericunix/qgenericunixservices.cpp
src/platformsupport/services/genericunix/qgenericunixservices_p.h
src/platformsupport/themes/genericunix/genericunix.pri [new file with mode: 0644]
src/platformsupport/themes/genericunix/qgenericunixthemes.cpp [new file with mode: 0644]
src/platformsupport/themes/genericunix/qgenericunixthemes_p.h [new file with mode: 0644]
src/platformsupport/themes/themes.pri [new file with mode: 0644]
src/plugins/platforms/cocoa/qcocoatheme.h
src/plugins/platforms/cocoa/qcocoatheme.mm
src/plugins/platforms/windows/qtwindows_additional.h
src/plugins/platforms/windows/qtwindowsglobal.h
src/plugins/platforms/windows/qwindowscontext.cpp
src/plugins/platforms/windows/qwindowscontext.h
src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp
src/plugins/platforms/windows/qwindowstheme.cpp
src/plugins/platforms/windows/qwindowstheme.h
src/plugins/platforms/xcb/qxcbintegration.cpp
src/plugins/platforms/xcb/qxcbintegration.h
src/widgets/kernel/qapplication.cpp
src/widgets/kernel/qapplication_qpa.cpp
src/widgets/kernel/qguiplatformplugin.cpp
src/widgets/kernel/qguiplatformplugin_p.h
src/widgets/kernel/qicon.cpp
src/widgets/kernel/qiconloader.cpp
src/widgets/styles/qcommonstyle.cpp
tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp