D26506: [KDED KCM] Rewrite as KDeclarative ScrollViewKCM
Kai Uwe Broulik
noreply at phabricator.kde.org
Tue Jan 7 21:43:52 GMT 2020
broulik created this revision.
broulik added reviewers: Plasma, VDG.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
broulik requested review of this revision.
REVISION SUMMARY
This rewrites the "Background services" KCM in QML using `ScrollViewKCM`.
The two separate list views are merged into a single one with the configurable services at the top, and the ones that are loaded on-demand and "only for your convenience" at the bottom.
A search field is added searching through name and plugin ID. Since the sortable table headers are gone, a filter combo is provided instead to filter for all, running, or non running services.
As an extra Schmankerl when starting a service that immediately disables itself again (which technically isn't an error that would be indicated as such) a hint is shown to the user so they're not left wondering why it doesn't start.
Furthermore, the code is cleaned up a lot (quite eerie, adding a 2020 Copyright to an existing 2002 one :), ported to json plugin data, and a proper `QAbstractListModel` added.
TEST PLAN
F7868523: Screenshot_20200107_223707.png <https://phabricator.kde.org/F7868523>
F7868524: Screenshot_20200107_223814.png <https://phabricator.kde.org/F7868524>
Trying to start the device automounter which disables itself on load when automounting is disabled in the KCM
F7868525: Screenshot_20200107_223859.png <https://phabricator.kde.org/F7868525>
Starting or stopping a service shows a little animation
F7868531: Screenshot_20200107_224027.png <https://phabricator.kde.org/F7868531>
This is mostly for when you apply changes and kded reloads, it will start all autoloaded modules, even if user manually stopped them. Originally I wanted to show an inline message along the lines of "some services were started again when you saved your changes because..." but that turned out to be too brittle/unreliable.
Issues remaining:
- Somehow that Kirigami listdelegate feature of adding right padding to take into account the scrollbar doesn't work in ScrollViewKCM
- Since it's using delegaterecycler, the animation will play as you scroll up and down since as far as the item is concerned, status does change.
- Some qt 5.14 adjustments (qregisteranonymoustype)
- I get a binding loop on `Kirigami.AbstractListItem.implicitHeight` for my delegate for some reason
REPOSITORY
R119 Plasma Desktop
REVISION DETAIL
https://phabricator.kde.org/D26506
AFFECTED FILES
kcms/kded/CMakeLists.txt
kcms/kded/filterproxymodel.cpp
kcms/kded/filterproxymodel.h
kcms/kded/kcmkded.cpp
kcms/kded/kcmkded.desktop
kcms/kded/kcmkded.h
kcms/kded/modulesmodel.cpp
kcms/kded/modulesmodel.h
kcms/kded/package/contents/ui/main.qml
kcms/kded/package/metadata.desktop
To: broulik, #plasma, #vdg
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200107/44e75194/attachment.html>
More information about the Plasma-devel
mailing list