kcms/lnf: Simplify Theme's contents and selection representation
Currently the code to represent a Theme's contents and the user selection use different representations at different places which make it a bit tangled and less scalable, requiring some boilerplate both in C++ and QML to map between them:
- Theme's contents: they are read in
KCMLookAndFeel
and stored as multiple boolean roles in the themes' model. - User selection: they are stored as two different enum flags (for appearance and layout) in the
LookAndFeelManager
This MR tries to improve this situation:
- use a common representation (
Contents
enum flags) - move the user selection to the
KCMLookAndFeel
class. - move the theme management bits (which deals with the package files) together in the
LookAndFeelManager
- move and adapt also the "remove theme" functionality added in !2499 (merged)
- reduce the amount of model roles required
Presented as a series of atomic patches to hopefully ease review and in case of unexpected regressions, but they can as well get squashed.
I'm not sure whether to target Plasma 6 or 5.27 due to the soft freeze, but I wonder if that will make it more difficult in the future to port back possible bugfixes.
Edited by Ismael Asensio