qtui: Fix icon loading and improve icon theme support
[quassel.git] / src / qtui / qtuiapplication.cpp
index 73e67b2..6c744c2 100644 (file)
@@ -20,8 +20,8 @@
 
 #include "qtuiapplication.h"
 
-#include <QIcon>
 #include <QDir>
+#include <QFile>
 #include <QStringList>
 
 #ifdef HAVE_KDE4
@@ -109,30 +109,6 @@ bool QtUiApplication::init()
             return false;
         }
 
-        // Checking if settings Icon Theme is valid
-        QString savedIcontheme = QtUiSettings().value("IconTheme", QVariant("")).toString();
-#ifndef WITH_OXYGEN
-        if (savedIcontheme == "oxygen")
-            QtUiSettings().remove("IconTheme");
-#endif
-#ifndef WITH_BREEZE
-        if (savedIcontheme == "breeze")
-            QtUiSettings().remove("IconTheme");
-#endif
-#ifndef WITH_BREEZE_DARK
-        if (savedIcontheme == "breezedark")
-            QtUiSettings().remove("IconTheme");
-#endif
-
-        // Set the icon theme
-        if (Quassel::isOptionSet("icontheme"))
-            QIcon::setThemeName(Quassel::optionValue("icontheme"));
-        else if (QtUiSettings().value("IconTheme", QVariant("")).toString() != "")
-            QIcon::setThemeName(QtUiSettings().value("IconTheme").toString());
-        else if (QIcon::themeName().isEmpty())
-            // Some platforms don't set a default icon theme; chances are we can find our bundled theme though
-            QIcon::setThemeName("breeze");
-
         Client::init(new QtUi());
 
         // Init UI only after the event loop has started
@@ -143,7 +119,6 @@ bool QtUiApplication::init()
             QtUi::mainWindow()->quit();
         });
 
-
         return true;
     }
     return false;