Happy New Year!
[quassel.git] / src / qtui / qtuiapplication.cpp
index 5bf11bb..e484fec 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2014 by the Quassel Project                        *
+ *   Copyright (C) 2005-2015 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -68,10 +68,6 @@ QtUiApplication::QtUiApplication(int &argc, char **argv)
 #else
     qInstallMessageHandler(Client::logMessage);
 #endif
-
-    // Some platforms don't set a default icon theme; chances are we can find our bundled Oxygen theme though
-    if (QIcon::themeName().isEmpty())
-        QIcon::setThemeName("oxygen");
 }
 
 
@@ -122,6 +118,13 @@ bool QtUiApplication::init()
             return false;
         }
 
+        // Set the icon theme
+        if (Quassel::isOptionSet("icontheme"))
+            QIcon::setThemeName(Quassel::optionValue("icontheme"));
+        else if (QIcon::themeName().isEmpty())
+            // Some platforms don't set a default icon theme; chances are we can find our bundled Oxygen theme though
+            QIcon::setThemeName("oxygen");
+
         // session resume
         QtUi *gui = new QtUi();
         Client::init(gui);