[kstyle] Use KWindowSystem to determine on which platform we are

Less code duplication and works better in case of e.g. flatpak.
wilder-pre-rebase
Martin Flöser 9 years ago
parent 95fe389b9a
commit b081281d9b
  1. 4
      kstyle/breezehelper.cpp

@ -1420,7 +1420,7 @@ namespace Breeze
{
#if BREEZE_HAVE_X11
#if QT_VERSION >= 0x050000
static const bool s_isX11 = QX11Info::isPlatformX11();
static const bool s_isX11 = KWindowSystem::isPlatformX11();
return s_isX11;
#else
return true;
@ -1435,7 +1435,7 @@ namespace Breeze
bool Helper::isWayland()
{
#if QT_VERSION >= 0x050000
static const bool s_isWayland = qApp->platformName().startsWith(QLatin1String("wayland"));
static const bool s_isWayland = KWindowSystem::isPlatformWayland();
return s_isWayland;
#else
return false;

Loading…
Cancel
Save