--nextPart4844159.YnbLrun6Ys Content-Type: multipart/mixed; boundary="nextPart303692304.Fux5iuFnfv" Content-Transfer-Encoding: 7Bit This is a multi-part message in MIME format. --nextPart303692304.Fux5iuFnfv Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" Hi, In data sabato 10 febbraio 2018 21:18:19 CET, Thomas Baumgart ha scritto: > this commit on the 5.0 branch > > commit 9b27c432ef80c9d4a35bc9dff37619cde9673343 > Author: Pino Toscano > Date: Thu Feb 8 22:16:47 2018 +0100 > > cmake: install local icons in the local datadir > > Install all the local actions icons to the kmymoney data directory, to > avoid polluting the global icon themes. > > Fixes commit d9cf5550c478d95d4faf312c1149f30829829516. > > apparently causes that the icons are not shown anymore in the application. Any > idea of what to look for? I see, the icon loading code uses QIcon, which does not know about local paths for icons. Can you please try the attached patch, which switches to KIconLoader? Since kmymoney has a lot of own icons, I'd really avoid to install them in the global icon themes, with the risk of clashes with the themes themselves. Also, the above commit makes the situation as it was in kmymoney 4.x. Thanks, -- Pino Toscano --nextPart303692304.Fux5iuFnfv Content-Disposition: attachment; filename="kmm_icons.diff" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="kmm_icons.diff" diff --git a/kmymoney/icons/CMakeLists.txt b/kmymoney/icons/CMakeLists.txt index 099a740c..a0c41c40 100644 --- a/kmymoney/icons/CMakeLists.txt +++ b/kmymoney/icons/CMakeLists.txt @@ -33,7 +33,7 @@ set (icons_SOURCES add_library(kmm_icons SHARED ${icons_SOURCES}) generate_export_header(kmm_icons) -target_link_libraries(kmm_icons PRIVATE Qt5::Core Qt5::Gui) +target_link_libraries(kmm_icons PRIVATE Qt5::Core Qt5::Gui KF5::IconThemes) set_target_properties(kmm_icons PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} diff --git a/kmymoney/icons/icons.cpp b/kmymoney/icons/icons.cpp index e0e79c92..0e681ffb 100644 --- a/kmymoney/icons/icons.cpp +++ b/kmymoney/icons/icons.cpp @@ -23,6 +23,8 @@ #include #include +#include + namespace Icons { QHash sStandardIcons; @@ -347,7 +349,7 @@ namespace Icons { // try to retrieve the main icon from cache if (!QPixmapCache::find(iconName, pxIcon)) { - pxIcon = QIcon::fromTheme(iconName).pixmap(size); + pxIcon = KDE::icon(iconName).pixmap(size); QPixmapCache::insert(iconName, pxIcon); } @@ -355,7 +357,7 @@ namespace Icons { return pxIcon; QPainter pixmapPainter(&pxIcon); - QPixmap pxOverlay = QIcon::fromTheme(overlayName).pixmap(size); + QPixmap pxOverlay = KDE::icon(overlayName).pixmap(size); int x, y; switch (corner) { @@ -390,6 +392,6 @@ namespace Icons { if (sComposedIcons.contains(icon)) return overlayIcon(sComposedIcons[icon]); - return QIcon::fromTheme(sStandardIcons[icon]); + return KDE::icon(sStandardIcons[icon]); } } --nextPart303692304.Fux5iuFnfv-- --nextPart4844159.YnbLrun6Ys Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQQ1ubO/s+l2X9kOMCJM0famIH8vegUCWoE9sQAKCRBM0famIH8v enUxAKCIUOiB5CiPfVBZJYa9PP0uL4QeRACfWqZQFQnnkjStZOSCF1F9hxfkS4o= =QDJx -----END PGP SIGNATURE----- --nextPart4844159.YnbLrun6Ys--