On Thu, Apr 22, 2021 at 11:56:46PM +0200, Patrick Wildt wrote:
> Looks like we're not alone:
> 
> https://www.reddit.com/r/archlinux/comments/m6qvsa/mumble_no_icons_on_the_main_window_am_i_the_only/
> https://www.reddit.com/r/openSUSE/comments/mcf946/broken_mumble_since_2_or_three_snapshots_on/
Thanks for digging, so it's a kiconthemes bug according to the fix
OpenSUSE applied.

Here's a cherry-pick of their fix that makes icons show up in mumble
again with kiconthemes.

Alterntively, it looks like kf5 5.80.1 (we are on 5.80.0) has the fix,
but I won't attempt to update the entire suite just for this.


Feedback? OK?


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/kf5/kiconthemes/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- Makefile    23 Jan 2021 18:09:53 -0000      1.14
+++ Makefile    22 Apr 2021 23:32:25 -0000
@@ -2,6 +2,7 @@
 
 COMMENT =              KDE icon GUI utility library
 DISTNAME =             kiconthemes-${VERSION}
+REVISION =             0
 
 SHARED_LIBS =          KF5IconThemes           5.1
 
Index: patches/patch-src_kiconloader_cpp
===================================================================
RCS file: patches/patch-src_kiconloader_cpp
diff -N patches/patch-src_kiconloader_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_kiconloader_cpp   22 Apr 2021 23:36:57 -0000
@@ -0,0 +1,26 @@
+$OpenBSD$
+
+Fix icon loading for applications like Mumble, cherry-picked from
+https://build.opensuse.org/package/view_file/KDE:Frameworks5/kiconthemes/0001-ensure-qrc-QDir-searchPaths-work-for-icons.patch?expand=1&rev=5462e1e1e4e6e4cae6ff7bddc99b03d7
+
+Index: src/kiconloader.cpp
+--- src/kiconloader.cpp.orig
++++ src/kiconloader.cpp
+@@ -1204,7 +1204,7 @@ QString KIconLoader::iconPath(const QString &_name, in
+         return QString();
+     }
+ 
+-    if (_name.isEmpty() || !pathIsRelative(_name)) {
++    if (_name.isEmpty() || !QDir::isRelativePath(_name)) {
+         // we have either an absolute path or nothing to work with
+         return _name;
+     }
+@@ -1327,7 +1327,7 @@ QPixmap KIconLoader::loadScaledIcon(const QString &_na
+         name = 
QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + 
QLatin1Char('/') + name + QStringLiteral(".png");
+     }
+ 
+-    bool absolutePath = !pathIsRelative(name);
++    bool absolutePath = !QDir::isRelativePath(name);
+     if (!absolutePath) {
+         name = d->removeIconExtension(name);
+     }

Reply via email to