From cec00375ea75fa47444f7ecaa76d74a95f7db4e9 Mon Sep 17 00:00:00 2001 From: "craig.p.drummond@gmail.com" Date: Tue, 11 Jun 2013 11:03:39 +0000 Subject: [PATCH] Fix build when there is no QGtkStyle --- support/gtkstyle.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/support/gtkstyle.cpp b/support/gtkstyle.cpp index 0d1ceac21..1a5fa6db9 100644 --- a/support/gtkstyle.cpp +++ b/support/gtkstyle.cpp @@ -111,6 +111,7 @@ void GtkStyle::drawSelection(const QStyleOptionViewItemV4 &opt, QPainter *painte painter->setOpacity(opacityB4); } +#if !defined Q_OS_WIN && !defined QT_NO_STYLE_GTK // For some reason, dconf does not seem to terminate correclty when run under some desktops (e.g. KDE) // Destrying the QProcess seems to block, causing the app to appear to hang before starting. // So, create QProcess on the heap - and only wait 100ms for response. Connect finished to deleteLater @@ -130,6 +131,7 @@ static QString runProc(const QString &cmd, const QStringList &args) process->kill(); return QString(); } +#endif // Copied from musique QString GtkStyle::themeName() @@ -217,10 +219,12 @@ void GtkStyle::applyTheme(QWidget *widget) { #if defined Q_OS_WIN || defined QT_NO_STYLE_GTK Q_UNUSED(widget) + #ifndef ENABLE_KDE_SUPPORT if (!plainProxyStyle) { plainProxyStyle=new ProxyStyle(); qApp->setStyle(plainProxyStyle); } + #endif #else if (widget && isActive()) { QString theme=GtkStyle::themeName().toLower();