Bug 417983

Summary: Nothing happens when "Use" button of GHNS window is clicked
Product: [Frameworks and Libraries] frameworks-knewstuff Reporter: Patrick Silva <bugseforuns>
Component: generalAssignee: Jeremy Whiting <jpwhiting>
Status: RESOLVED FIXED    
Severity: normal CC: admin, alexander.lohnau, kdelibs-bugs, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 5.83
Attachments: screenshot

Description Patrick Silva 2020-02-21 11:00:37 UTC
Created attachment 126253 [details]
screenshot

STEPS TO REPRODUCE
1. install icon theme or wallpaper via GHNS window
2. after installation, click on "Use" button (see the attached screenshot)
3. 

OBSERVED RESULT
othing happens

EXPECTED RESULT
icon theme should be applied

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.68.0
Qt Version: 5.14.1
Comment 1 Patrick Silva 2020-07-22 12:23:26 UTC
It's still reproducible even with a new user account.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.19.80
KDE Frameworks Version: 5.73.0
Qt Version: 5.14.2
Comment 2 Alexander Lohnau 2020-07-24 11:35:55 UTC
Then this seems to be an issue with the adoption command located in https://invent.kde.org/plasma/plasma-workspace/-/blob/master/kcms/icons/changeicons.cpp
Comment 3 Alexander Lohnau 2020-08-09 09:04:43 UTC
To avoid implementing synchronization between the adoption command (this gets executed when "use" is clicked) and the KCM we have to implement a new API which is signal/slot based, instead of process based. This allows us to communicate between the KNS dialog and the KCM.

A implementation for this is already in development :-)
Comment 4 Alexander Lohnau 2020-11-19 15:46:33 UTC
Git commit 858dec4c07561e6c834686c3ff14ed624238cdcc by Alexander Lohnau.
Committed on 19/11/2020 at 15:46.
Pushed by alex into branch 'master'.

Rework adoption API

This reworks the existing adoption API which adds warnings/error messages to it. In order for the KCMs to react to the adoption event the `signalEntryEvent` signal was added.

Also this fixes the buttons in the UI being clickable.

M  +1    -1    src/core/CMakeLists.txt
M  +115  -62   src/core/engine.cpp
M  +34   -0    src/core/engine.h
M  +6    -0    src/core/entryinternal.h
M  +3    -2    src/core/errorcode.h
M  +1    -1    src/qtquick/qml/Page.qml
M  +1    -1    src/qtquick/qml/private/entrygriddelegates/BigPreviewDelegate.qml
M  +1    -1    src/qtquick/qml/private/entrygriddelegates/ThumbDelegate.qml
M  +1    -1    src/qtquick/qml/private/entrygriddelegates/TileDelegate.qml
M  +1    -4    src/qtquick/quickitemsmodel.cpp
M  +2    -4    src/ui/itemsviewdelegate.cpp

https://invent.kde.org/frameworks/knewstuff/commit/858dec4c07561e6c834686c3ff14ed624238cdcc
Comment 5 Patrick Silva 2020-11-22 12:30:56 UTC
"Use" button is working as expected on neon unstable.
Can we close this report Alexander?
Comment 6 Alexander Lohnau 2020-11-22 12:58:34 UTC
There are still some UI sync issues in the KCMs. And in the Wallpaper KNS dialog the "Use" button doesn't work for a few wallpapers.

Also Discover hasn't been ported to the new API.

(MRs are for the most part made and are waiting to be reviewed)
Comment 7 Alexander Lohnau 2020-11-23 15:28:41 UTC
Git commit b96ce5510dd94f6a49f2598d1667810cbb96af4d by Alexander Lohnau.
Committed on 23/11/2020 at 14:26.
Pushed by alex into branch 'master'.

Use new adoption API from KNS

The `executables()` method is not needed, it was just used to get the constructed
adoption command and to check if the command is empty.
In that very unlikely case that we want to adopt an
entry, even though there is no adoption command is handled in KNS.

M  +1    -1    CMakeLists.txt
M  +5    -15   libdiscover/backends/KNSBackend/KNSResource.cpp
M  +1    -2    libdiscover/backends/KNSBackend/KNSResource.h

https://invent.kde.org/plasma/discover/commit/b96ce5510dd94f6a49f2598d1667810cbb96af4d
Comment 8 Alexander Lohnau 2020-11-24 09:07:00 UTC
Git commit 07cf18a6b8ca50c65225daca9c1941ff2e2e54ab by Alexander Lohnau.
Committed on 24/11/2020 at 09:02.
Pushed by alex into branch 'master'.

Reload KCM when entry was adopted

This solves the UI sync issues when using the adoption command.

M  +3    -6    kcms/icons/main.cpp
M  +1    -1    kcms/icons/main.h
M  +6    -1    kcms/icons/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/commit/07cf18a6b8ca50c65225daca9c1941ff2e2e54ab
Comment 9 Alexander Lohnau 2021-05-31 07:11:22 UTC
Git commit 9c238c9305e8830e2c7b3f0cc528e93dba31296e by Alexander Lohnau.
Committed on 31/05/2021 at 07:11.
Pushed by alex into branch 'master'.

colors KCM: Port away from deprecated KNS signals & react to adoption

M  +41   -42   kcms/colors/colors.cpp
M  +3    -2    kcms/colors/colors.h
M  +9    -3    kcms/colors/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/commit/9c238c9305e8830e2c7b3f0cc528e93dba31296e