Summary: | QQC2-Desktop-Style causes RDM to not show toolbar buttons | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-qqc2-desktop-style | Reporter: | groot |
Component: | general | Assignee: | Marco Martin <notmart> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kde, nate, noahadvs, swills |
Priority: | NOR | ||
Version: | 5.73.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | FreeBSD | ||
Latest Commit: | https://invent.kde.org/frameworks/qqc2-desktop-style/commit/015891bf58b5f96ae142920bba48b92fe31ea0e4 | Version Fixed In: | 5.76 |
Sentry Crash Report: |
Description
groot
2020-10-08 13:52:17 UTC
Notes for build-from-source on KDE neon: - git clone --recursive https://github.com/uglide/RedisDesktopManager.git -b 2020 rdm - cd rdm/src ; qmake . ; make -j2 Needs libqt5charts5-dev (and more qt development stuff) From my own testing with GammaRay, the problem seems to be that qrc:/ urls are not working with qqc2-desktop-style's StyleItem element.
If you use a hard coded path like `/home/<user>/src/RedisDesktopManager/src/resources/images/help.svg`, an icon will show.
If you use a theme icon like `go-next`, an icon will show.
I believe the problem is at lines 185 and 186 of qqc2-desktop-style/plugin/kquickstyleitem.cpp:
182 │ const QVariant icon = m_properties[QStringLiteral("icon")];
183 │ if (icon.canConvert<QIcon>()) {
184 │ opt->icon = icon.value<QIcon>();
>185 │ } else if (icon.canConvert<QUrl>() && icon.value<QUrl>().isLocalFile()) {
>186 │ opt->icon = QIcon(icon.value<QUrl>().toLocalFile());
187 │ } else if (icon.canConvert<QString>()) {
188 │ opt->icon = m_theme->iconFromTheme(icon.value<QString>(), m_properties[QStringLiteral("iconColor")].value<QColor>());
189 │ }
By the way, if you are trying to build the project from source, you must edit 3rdparty.pri if you get the following error: g++: error: /media/noah-ihdd/src/RedisDesktopManager/3rdparty/lz4//build/cmake/liblz4.a: No such file or directory Here's what you must change: Line 33: -LZ4DIR = $$PWD/lz4/ +LZ4DIR = $$PWD/lz4 Line 59: - LIBS += -lz $$LZ4DIR/build/cmake/liblz4.a + LIBS += -lz $$LZ4DIR/lib/liblz4.a Notes for build-from-source on KDE neon: - ensure you have a viable development environment. You will need to install gcc, g++, make, git, ... - you will need Qt5 development environment things as well, look for -dev packages - sudo apt install libqt5charts5-dev liblz4-dev qml-module-qtcharts qml-module-qt-labs-qmlmodels - git clone --recursive https://github.com/uglide/RedisDesktopManager.git -b 2020 rdm - cd rdm/src ; qmake . ; make -j2 - the build will fail, eventually, with a message like `src/RedisDesktopManager/3rdparty/lz4//build/cmake/liblz4.a: No such file or directory` . Edit the Makefile, and in the line that sets the `LIBS` variable (around line 43), replace the full path of liblz4.a there -- which is pointing into the source directory -- with a full path of the system's liblz4.a. That is somewhere under /usr .. Debian multilib gets me down. - run make again to complete the build - ../bin/linux/release/rdm (this will show you the problem where no icons show up on the buttons) From here, the behavior of the application is the same on KDE neon Linux as on FreeBSD: no icons on buttons, or tiny icons (in Material style) or regular icons when the session and XDG things are turned off. If the application doesn't start, check the console output: I may not have listed all of the QML dependencies it needs. A possibly relevant merge request was started @ https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/35 Git commit 015891bf58b5f96ae142920bba48b92fe31ea0e4 by Noah Davis. Committed on 09/10/2020 at 02:25. Pushed by ndavis into branch 'master'. Add support for qrc icons to StyleItem FIXED-IN: 5.76 M +37 -24 plugin/kquickstyleitem.cpp M +1 -0 plugin/kquickstyleitem_p.h https://invent.kde.org/frameworks/qqc2-desktop-style/commit/015891bf58b5f96ae142920bba48b92fe31ea0e4 |