[SCM] kiconthemes packaging branch, master, updated. debian/5.37.0-2-91-gfbba7f0

Maximiliano Curia maxy at moszumanska.debian.org
Tue Jan 2 18:43:22 UTC 2018


Gitweb-URL: http://git.debian.org/?p=pkg-kde/frameworks/kiconthemes.git;a=commitdiff;h=eab5e6d

The following commit has been merged in the master branch:
commit eab5e6debf20e42c2ab43f8ec4fdf55f69b486a5
Author: Harald Sitter <sitter at kde.org>
Date:   Fri May 13 15:48:16 2016 +0200

    import upstream patch
---
 ...0001-refine-current-icon-theme-heuristics.patch | 86 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 87 insertions(+)

diff --git a/debian/patches/0001-refine-current-icon-theme-heuristics.patch b/debian/patches/0001-refine-current-icon-theme-heuristics.patch
new file mode 100644
index 0000000..8c372a9
--- /dev/null
+++ b/debian/patches/0001-refine-current-icon-theme-heuristics.patch
@@ -0,0 +1,86 @@
+From 1425523dad0ba4f3acb9d0caa0ff772fd0a1a7e2 Mon Sep 17 00:00:00 2001
+From: Harald Sitter <sitter at kde.org>
+Date: Fri, 13 May 2016 15:46:55 +0200
+Subject: [PATCH] refine current icon theme heuristics
+
+this is to prevent incorrect default themes when a themeplugin is
+available
+
+current icon theme is now decided as follows
+- application config contains Icons/Theme config
+- QIcon has a theme set
+- kdelogbals config contains Icons/Theme config
+- hard coded default
+
+for all these steps hicolor is excluded as valid option as it is not a
+complete icon theme on its own, so we'd rather have the hardcoded default
+intead of plain hicolor (since we inherit hicolor anyway)
+
+This improves icon theming in the following ways
+a) without kdeglobals we don't always end up using the default (oxygen)
+b) with a theme plugin any environment can force a theme different from
+   what is set in kdeglobals. this in particular would for example allow
+   xfce/gnome/unity to have a platform plugin and use the correct icons
+   even when the application uses kiconthemes.
+
+a) in particular was causing the entire workspace on first login to use
+oxygen if startup was too fast so that kde4breeze would not have written
+a kdeglobals file with Theme=breeze by the time plasma started.
+
+REVIEW: 127905
+---
+ src/kicontheme.cpp | 30 ++++++++++++++++++------------
+ 1 file changed, 18 insertions(+), 12 deletions(-)
+
+diff --git a/src/kicontheme.cpp b/src/kicontheme.cpp
+index 23bbb4e..351f002 100644
+--- a/src/kicontheme.cpp
++++ b/src/kicontheme.cpp
+@@ -119,7 +119,6 @@ private:
+ KIconTheme::KIconTheme(const QString &name, const QString &appName, const QString &basePathHint)
+     : d(new KIconThemePrivate)
+ {
+-
+     d->mInternalName = name;
+ 
+     QStringList themeDirs;
+@@ -500,18 +499,25 @@ QString KIconTheme::current()
+         return *_theme();
+     }
+ 
+-    KConfigGroup cg(KSharedConfig::openConfig(), "Icons");
+-    *_theme() = cg.readEntry("Theme", defaultThemeName());
+-    if (*_theme() == QLatin1String("hicolor")) {
+-        *_theme() = defaultThemeName();
++    QString theme;
++    // Check application specific config for a theme setting.
++    KConfigGroup app_cg(KSharedConfig::openConfig(QString(), KConfig::NoGlobals), "Icons");
++    theme = app_cg.readEntry("Theme", QString());
++    if (theme.isEmpty() || theme == QLatin1String("hicolor")) {
++        // No theme, try to use Qt's. A Platform plugin might have set
++        // a good theme there.
++        theme = QIcon::themeName();
++    }
++    if (theme.isEmpty() || theme == QLatin1String("hicolor")) {
++        // Still no theme, try config with kdeglobals.
++        KConfigGroup cg(KSharedConfig::openConfig(), "Icons");
++        QString theme = cg.readEntry("Theme", QString());
++    }
++    if (theme.isEmpty() || theme == QLatin1String("hicolor")) {
++        // Still no good theme, use default.
++        theme = defaultThemeName();
+     }
+-    /*    if (_theme->isEmpty())
+-        {
+-            if (QPixmap::defaultDepth() > 8)
+-                *_theme = defaultThemeName();
+-            else
+-                *_theme = QLatin1String("locolor");
+-        }*/
++    *_theme() = theme;
+     return *_theme();
+ }
+ 
+-- 
+2.7.4
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..a0ea16e
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-refine-current-icon-theme-heuristics.patch

-- 
kiconthemes packaging



More information about the pkg-kde-commits mailing list