D25220: KCM Style : kcm state is handled by ManagedConfigModule, properties are bound to settings, making it a bit simpler.

Kevin Ottens noreply at phabricator.kde.org
Tue Nov 12 13:45:20 GMT 2019


ervin added inline comments.

INLINE COMMENTS

> crossi wrote in kcmstyle.cpp:248
> m_model->selectedStyle() is bound to m_settings->widgetStyle() and vice versa, so I need to save previous state to allow a rollback.
> I should have used m_settings->widgetStyle() here and after for consistency.

As far as rollback goes (might not be enough in your case), wouldn't checking for isSaveNeeded() on the settings and rollbacking it all be enough?

We can't rollback a single item though, I guess that would be the main limitation in your case... Maybe that's something to add to KConfigSkeletonItem?

Answer might be no to both, I'm just looking for opportunities to simplify code in modules. :-)

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D25220

To: crossi, #plasma, ervin, bport, mart, broulik
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, 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/20191112/2abaa598/attachment-0001.html>


More information about the Plasma-devel mailing list