Bug 382136 - KWin script KCM does not refresh after uninstalling scripts
Summary: KWin script KCM does not refresh after uninstalling scripts
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kwinscripts (show other bugs)
Version: 5.19.4
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords: reproducible
Depends on:
Blocks:
 
Reported: 2017-07-08 21:09 UTC by Fabian Vogt
Modified: 2020-08-31 06:37 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.20


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Vogt 2017-07-08 21:09:14 UTC
- Open kwin script kcm
- Install a new script using GHNS
- Close the GHNS dialog -> new script shown
- Uninstall the script again
- Close the GHNS dialog -> new script still shown
Comment 1 Martin Flöser 2017-07-09 19:51:54 UTC
This looks to me like a problem in knewstuff. KWin has the following piece of code:

    connect(ui->ghnsButton, &KNS3::Button::dialogFinished, this, [this](const KNS3::Entry::List &changedEntries) {
        if (!changedEntries.isEmpty()) {
            updateListViewContents();
        }
    });

Which means the list is empty when removing a script and thus the update is not executed.
Comment 2 Fabian Vogt 2017-07-09 19:54:26 UTC
(In reply to Martin Flöser from comment #1)
> This looks to me like a problem in knewstuff. KWin has the following piece
> of code:
> 
>     connect(ui->ghnsButton, &KNS3::Button::dialogFinished, this,
> [this](const KNS3::Entry::List &changedEntries) {
>         if (!changedEntries.isEmpty()) {
>             updateListViewContents();
>         }
>     });
> 
> Which means the list is empty when removing a script and thus the update is
> not executed.

It looks to me more like KPluginSelector does not allow removal of entries
Comment 3 Christophe Marin 2019-08-22 15:43:57 UTC
Still valid in master.
Comment 4 Alexander Lohnau 2020-07-18 19:07:15 UTC
Git commit a876403cc6bb52064bbdac4130d34f1004554d85 by Alexander Lohnau.
Committed on 18/07/2020 at 19:00.
Pushed by dfaure into branch 'master'.

Add method to clear plugin selector

This will allow us to reset the state, for instance if
we uninstall entries in a KNS dialog.

M  +12   -0    src/kpluginselector.cpp
M  +6    -0    src/kpluginselector.h
M  +1    -0    src/kpluginselector_p.h

https://invent.kde.org/frameworks/kcmutils/commit/a876403cc6bb52064bbdac4130d34f1004554d85
Comment 5 Bug Janitor Service 2020-08-08 15:28:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/175
Comment 6 Alexander Lohnau 2020-08-31 06:37:09 UTC
Git commit 0d3c20d3866b4ed53a13b06d1aa37d3a974ba0f4 by Alexander Lohnau.
Committed on 31/08/2020 at 06:35.
Pushed by alex into branch 'master'.

Clear plugins after changing KNS entires
FIXED-IN: 5.20

M  +1    -0    kcmkwin/kwinscripts/module.cpp

https://invent.kde.org/plasma/kwin/commit/0d3c20d3866b4ed53a13b06d1aa37d3a974ba0f4