kwin/kcmkwin/kwindecoration
David Edmundson 3709996f8a Fix KWin decoration KCM showing correct index at startup
Summary:
The KCM has a context property of the currently set theme index. This is
set before the decorations model is populated, so it is currently always
-1.

This model is populated after the constructor but before
KCModule::load().

KCModule::load is called from KCModule::showEvent so before
QQuickGridView will start doing anything with delegates.

This fixes the problem simply and also avoid parsing the config file
multiple times.

This bug was introduced in 5.9.4:

Someone made a (tested) change to make sure the view scrolled to the
right place on startup.
I then made a (tested) commit fixing the crash on exit
The author then updated his patch to my changes, but now in a way that
didn't work.

Test Plan:
Opened system settings module with a million decorations.
The correct entry was visible and highlighted.

Reviewers: #plasma, graesslin

Reviewed By: #plasma, graesslin

Subscribers: plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D5401
2017-04-13 11:54:39 +01:00
..
declarative-plugin Fix crash on dragging titlebar buttons in System Settings 2017-04-12 18:16:52 +01:00
qml Fix KWin decoration KCM showing correct index at startup 2017-04-13 11:54:39 +01:00
CMakeLists.txt [kcmkwin/deco] Drop outdated source and ui files 2014-12-09 16:14:03 +01:00
decorationmodel.cpp [kcmkwin/deco] Add configuration for decoration plugin/themes 2014-12-05 13:44:16 +01:00
decorationmodel.h [kcmkwin/deco] Add configuration for decoration plugin/themes 2014-12-05 13:44:16 +01:00
kcm.cpp Fix KWin decoration KCM showing correct index at startup 2017-04-13 11:54:39 +01:00
kcm.h Fix KWin decoration KCM showing correct index at startup 2017-04-13 11:54:39 +01:00
kcm.ui overhaul of deco kcm 2015-10-05 23:40:46 +02:00
kwindecoration.desktop SVN_SILENT made messages (.desktop file) - always resolve ours 2016-12-13 05:42:59 +01:00
Messages.sh extract the strings also from QML 2014-12-16 21:02:27 +01:00