Fixes the preselected decoration style on module load.
Also:
- Prevent the module state to be set to modified on resize.
- Fix QML errors in logs.
Fixes the preselected decoration style on module load.
Also:
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
kcmkwin/kwindecoration/kcm.cpp | ||
---|---|---|
109 | This is done on line 317. What's the advantage of doing it here? | |
319 | Creating delegates in a grid view is async from setting the model. Setting the curentIndex before the delegate is created is the bug that the existing code is trying to fix. (even though I agree the current solution is quite wrong) A common pattern is to update the grid index inside the delegate constructor | |
kcmkwin/kwindecoration/qml/Previews.qml | ||
38 | This line is still relevant | |
76–77 | why this? |
kcmkwin/kwindecoration/kcm.cpp | ||
---|---|---|
109 | It's to prevent "undefined reference" errors in the qml. I could have used typeof() != "undefined" in the QML but this is cleaner | |
319 | I rewrote the whole thing, thank you for the tip! | |
kcmkwin/kwindecoration/qml/Previews.qml | ||
76–77 | Leftover from my initial investigation |
Yep :) I just am not able to reach anongit.kde.org for fetching, is that a known issue at the moment?
BTW this patch doesn't fully fix https://bugs.kde.org/show_bug.cgi?id=397595 for me. The active decoration theme is now correctly selected when opening the KCM standalone in kcmshell5, but it's still unselected from within System Settings itself.