https://bugs.kde.org/show_bug.cgi?id=488870

--- Comment #17 from rallyemax <kdeb...@syrinx2112.addy.io> ---
I think I inadvertently fixed this by temporarily trying to merely *reduce* the
number of errors by moving the KeyboardIndicator.KeyState element out of the
Repeater element. Doing this didn't just reduce the errors, it eliminated them.

I hesitate to file a MR at the gitlab repo because I have no idea why moving
the element up two levels in the hierarchy resolved the error. On the other
hand, I think it's objectively correct to move the KeyboardIndicator.KeyState
out of the Repeater element because there is no reason to run that code for
each element in the app menu. 

Here is the relevant commit at my fork of the GitHub mirror of the official
repo:
https://github.com/rallyemax/plasma-workspace/commit/62c615773d7f4f618b44b6aa98c9becb1e55e3fa

You can try the fix yourself by modifying your installed QML file. In Arch, the
file is at
/usr/share/plasma/plasmoids/org.kde.plasma.appmenu/contents/ui/main.qml. You'll
need to restart the session (log out and back in) for the change to become
effective. Obviously changing system files like this can be risky, so proceed
carefully and at your own risk. You can always safely restore by reinstalling
the package.

Can anyone who knows QML explain why this change eliminated the error? I looked
through QML docs and even the QML Book, but I didn't find any hints. It almost
feels like KeyState being invoked from the MenuDelegate element scope is the
issue, since MenuDelegate doesn't import KeyboardIndicator ... but that feels
like a super restrictive interpretation of lexical scope and just feels like
the wrong explanation.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to