Sets Oxygen as the only fallback icon theme
authorLuís Pereira <luis.artur.pereira@gmail.com>
Fri, 22 Apr 2016 10:10:34 +0000 (11:10 +0100)
committerLuís Pereira <luis.artur.pereira@gmail.com>
Fri, 22 Apr 2016 10:10:34 +0000 (11:10 +0100)
LXQt historically used Oxygen.
Having a list of "fallbacks" defeats the purpose of a fallback: something
to use in last resort.
failback variable renamed to fallback.

lxqtsettings.cpp

index 1822653..9abdb46 100644 (file)
@@ -664,24 +664,13 @@ GlobalSettings::GlobalSettings():
 {
     if (value("icon_theme").toString().isEmpty())
     {
-        QStringList failback;
-        failback << "oxygen";
-        failback << "Tango";
-        failback << "Prudence-icon";
-        failback << "Humanity";
-        failback << "elementary";
-        failback << "gnome";
-
+        const QString fallback(QLatin1String("oxygen"));
 
         QDir dir("/usr/share/icons/");
-        foreach (QString s, failback)
+        if (dir.exists(fallback))
         {
-            if (dir.exists(s))
-            {
-                setValue("icon_theme", s);
-                sync();
-                break;
-            }
+            setValue("icon_theme", fallback);
+            sync();
         }
     }