Bug 369085 - Umbrello and KMymoney build with KF5 do not show icons
Summary: Umbrello and KMymoney build with KF5 do not show icons
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kiconthemes
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.36.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Christoph Feck
URL:
Keywords:
: 369086 369087 (view as bug list)
Depends on:
Blocks: 382423
  Show dependency treegraph
 
Reported: 2016-09-19 22:33 UTC by Ralf Habacker
Modified: 2022-08-15 07:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2016-09-19 22:33:11 UTC
Running umbrello compiled for KF5 on Windows with KDE/emerge does not show any icons in the diagram tool bar.


Reproducible: Always

Steps to Reproduce:
1. Compile umbrello for KF5 on Windows using KDE/emerge
2. start umbrello


Actual Results:  
The diagram tool bar does not show any icons

Expected Results:  
The diagram tool bar should show icons.
Comment 1 Ralf Habacker 2016-09-20 18:40:40 UTC
Bug has been detected with KDE Frameworks 5.22.
Comment 2 Ralf Habacker 2016-12-26 21:17:19 UTC
The problem happens because on windows there is a misunderstanding between expected and installed path of ui_standards.rc.
Comment 3 Ralf Habacker 2016-12-26 21:23:39 UTC
Kxmlgui installs ui_standards.rc into <install-root>/etc/xdg/ui/ui_standards.rc and uses QStandardPaths::locate(QStandardPaths::GenericConfigLocation, QStringLiteral("ui/ui_standards.rc")) which is resolved on linux to "/etc/xdg/ui/ui_standards.rc" and on windows to "C:/Users/<USER>/AppData/Local/ui/ui_standards.rc" or "C:/ProgramData/ui/ui_standards.rc".
Comment 4 Ralf Habacker 2016-12-27 08:05:07 UTC
The current QStandardPath implementation in Qt5 only supports hardcoded installation pathes 

1. bound to a fixed drive and 
2. bound to a fixed path 

KDE Applications on Window provided as portable, setup or msi packages have all required Qt5 and KF5 libraries bundled in the related binary packages. Issue 2 makes it impossible to build portable applications and to use installers with  with different frameworks versions because ui_standards.rc would be overwritten by other installers.

To solve the issues kxmlgui needs to embed ui_standards.rc into the installed shared library.
Another approach would be to patch Qt5 to support QStandardPaths directories relative to the Qt installation pathes
Comment 5 Ralf Habacker 2016-12-29 11:12:14 UTC
(In reply to Ralf Habacker from comment #4)
> To solve the issues kxmlgui needs to embed ui_standards.rc into the
> installed shared library.
kxmlgui already embeds ui_standards.rc into the shared library but installs the file too. The currently implemented logic prevents loading the embeded file if a related file is located in the file system (see https://cgit.kde.org/kxmlgui.git/tree/src/kxmlguiclient.cpp#n202) which the result that no ui_standards.rc file is loaded.
Comment 6 Ralf Habacker 2017-08-16 20:20:39 UTC
Moved the ui_standards.rc related stuff to bug 383609.

Retesting with KF 5.36 shows that there are still no icons in tool bars, which could be verified by downloading a portable snapshot for windows from https://software.opensuse.org/package/mingw32-umbrello5-portable?search_term=mingw32-umbrello5-portable

Using the workaround for loading the ui_standards.rc shows that there are still no icons on the toolbar, which let me think that this issue may have a different root cause. Because icon display is provided by kiconthemes library, I assume the root cause may be caused by this library. Any hints welcome how to fix the issue.
Comment 7 Ralf Habacker 2017-08-16 20:36:41 UTC
umbrello/KF5 on linux does not show this issue which let me think that this issue must be related to the windows implementation of kiconthemes.
Comment 8 Ralf Habacker 2018-08-02 08:49:21 UTC
It looks that kiconthemes on Windows only supports binary icon resources, which is only implemented in the breeze, but not in the currently used oxygen icon package.
Comment 9 Ralf Habacker 2018-08-02 08:50:06 UTC
*** Bug 369086 has been marked as a duplicate of this bug. ***
Comment 10 Ralf Habacker 2018-08-02 08:50:37 UTC
*** Bug 369087 has been marked as a duplicate of this bug. ***
Comment 11 Ralf Habacker 2021-02-28 02:31:19 UTC
(In reply to Ralf Habacker from comment #8)
> It looks that kiconthemes on Windows only supports binary icon resources,
> which is only implemented in the breeze, but not in the currently used
> oxygen icon package.

As a result of an investigation conducted for kmymoney, it looks like the rcc file provided by the Breeze theme can be used by a KF5 application on Windows if it is installed in the QStandardPaths::AppDataLocation directory and renamed to icontheme.rcc e.g.

copy <install-root>/share/icons/breeze/breeze-icons.rcc <install-root>/share/<appname>/icontheme.rcc
Comment 12 Ralf Habacker 2021-03-01 08:45:43 UTC
(In reply to Ralf Habacker from comment #11)

> <install-root>/share/<appname>/icontheme.rcc

Further investigation shows, that kiconthemes works by default in a "standalone" mode dedicated for a single appplication and ignores any installed KF5 icon themes provided for example by the mingw32-breeze5-icons package.
Comment 13 Ralf Habacker 2021-03-31 14:47:43 UTC
(In reply to Ralf Habacker from comment #12)
> Further investigation shows, that kiconthemes works by default in a
> "standalone" mode dedicated for a single appplication and ignores any
> installed KF5 icon themes provided for example by the mingw32-breeze5-icons package.

See https://github.com/KDE/kiconthemes/blob/master/README.md for the reference
Comment 14 Ralf Habacker 2022-08-15 07:56:30 UTC
Fixed by using workaround mentioned at https://bugs.kde.org/show_bug.cgi?id=369085#c11