Bug 475514 - Cannot install things from ThumbDelegate or BigPreviewDelegate install buttons
Summary: Cannot install things from ThumbDelegate or BigPreviewDelegate install buttons
Status: RESOLVED FIXED
Alias: None
Product: frameworks-knewstuff
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Neon Linux
: NOR major
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-10-12 13:13 UTC by Patrick Silva
Modified: 2023-10-13 20:22 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2023-10-12 13:13:46 UTC
STEPS TO REPRODUCE
1. open Icons KCM
2. click on "Get new..." button
3. search for "dracula"
4. click on "Install" button of Dracula icons theme

OBSERVED RESULT
nothing happens

EXPECTED RESULT
the icon theme is installed

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.240.0
Qt Version: 6.6.0
Graphics Platform: Wayland
Comment 1 Nate Graham 2023-10-12 20:23:56 UTC
Can confirm. Console log says:

qrc:/qt/qml/org/kde/newstuff/private/entrygriddelegates/BigPreviewDelegate.qml:54: TypeError: Property 'install' of object ItemsModel(0x4c7b0b0) is not a function
Comment 2 Nate Graham 2023-10-12 20:25:36 UTC
Looks like the install button on the GridTileDelegate works, but not the other delegate types.
Comment 3 Nate Graham 2023-10-12 20:31:51 UTC
The situation appears to be messy; functions are called from:
- newStuffModel
- newStuffModel.engine
- newStuffEngine

Alexander, do you have some clarity on which one is right? A naive test of replacing `newStuffModel.install` with `newStuffEngine.install` everywhere seems to work, but I don't feel like I have enough context to feel confident that it's the right change, or that making this change for other functions would also be right.
Comment 4 Bug Janitor Service 2023-10-13 05:48:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/knewstuff/-/merge_requests/275
Comment 5 Alexander Lohnau 2023-10-13 05:50:08 UTC
> - newStuffModel.engine
> - newStuffEngine

That refers to the exact same object ;)
Comment 6 Alexander Lohnau 2023-10-13 20:22:49 UTC
Git commit a5197c9e4fa5940f645684c996ca1af3c85bfcb2 by Alexander Lohnau.
Committed on 13/10/2023 at 07:47.
Pushed by alex into branch 'master'.

Ensure to call install/uninstall on quick engine instead of model

M  +1    -1    src/qtquick/qml/private/entrygriddelegates/BigPreviewDelegate.qml
M  +2    -2    src/qtquick/qml/private/entrygriddelegates/ThumbDelegate.qml

https://invent.kde.org/frameworks/knewstuff/-/commit/a5197c9e4fa5940f645684c996ca1af3c85bfcb2