Bug 433472 - InlineMessage does not support icon.name
Summary: InlineMessage does not support icon.name
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: Master
Platform: Other All
: NOR normal
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-23 09:20 UTC by Dan Leinir Turthra Jensen
Modified: 2021-02-23 10:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Leinir Turthra Jensen 2021-02-23 09:20:09 UTC
Attempting to use Kirigami.InlineMessage and assigning an icon by name fails (and requires that it is done by icon.source instead), which is inconsistent with how the rest of our APIs tend to do things, and leads to odd looking code, where the InlineMessage itself needs icon.source to be set, while the actions use icon.name.

A cursory glance suggests this is due to the custom IconPropertiesGroup, which only has source, but a fix to introduce a more expected API might be as simple as an alias between source and name, but also it seems unintended and thought a bug might be useful.

For example:
file:///usr/lib64/qt5/qml/org/kde/kirigami.2/PageRow.qml:575: Error: Error while loading page: qrc:/qml/BrowsingPage.qml:89 Cannot assign to non-existent property "name"
Comment 1 Marco Martin 2021-02-23 10:55:39 UTC
Git commit d59709be6dc4053736fb1726e0f60977f543bdce by Marco Martin.
Committed on 23/02/2021 at 10:55.
Pushed by mart into branch 'master'.

support icon.name

M  +2    -1    src/controls/OverlayDrawer.qml
M  +6    -1    src/controls/swipenavigator/PrivateSwipeTabBar.qml
M  +3    -1    src/controls/templates/InlineMessage.qml
M  +1    -1    src/controls/templates/OverlaySheet.qml
M  +2    -2    src/controls/templates/private/GenericDrawerIcon.qml
M  +1    -0    src/controls/templates/private/IconPropertiesGroup.qml

https://invent.kde.org/frameworks/kirigami/commit/d59709be6dc4053736fb1726e0f60977f543bdce