Skip to content
Commit 3709996f authored by David Edmundson's avatar David Edmundson
Browse files

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
parent 819c6458
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment