QGtkStyle: remove an unnecessary sanity check for theme name
authorJ-P Nurmi <jpnurmi@digia.com>
Thu, 20 Sep 2012 15:09:49 +0000 (17:09 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 21 Sep 2012 22:47:40 +0000 (00:47 +0200)
QGtkStyle was unable to detect the current GTK+ theme.

Change-Id: Ifd816e044bb8294f4ee2e3598ff53eb7cbce6064
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
src/widgets/styles/qgtkstyle_p.cpp

index 8378403..1c8e148 100644 (file)
@@ -519,10 +519,7 @@ void QGtkStylePrivate::initGtkWidgets() const
     if (!gtkWidgetMap()->contains("GtkWindow") && themeName.isEmpty()) {
         themeName = getThemeName();
 
-        if (themeName.isEmpty()) {
-            qWarning("QGtkStyle was unable to detect the current GTK+ theme.");
-            return;
-        } else if (themeName == QLS("Qt") || themeName == QLS("Qt4")) {
+        if (themeName == QLS("Qt") || themeName == QLS("Qt4")) {
             // Due to namespace conflicts with Qt3 and obvious recursion with Qt4,
             // we cannot support the GTK_Qt Gtk engine
             qWarning("QGtkStyle cannot be used together with the GTK_Qt engine.");