[KeyboardDaemon] Don't call getCurrentLayout() in destructor
ClosedPublic

Authored by broulik on Sep 20 2016, 1:12 PM.

Details

Summary

It does X calls and might crash kded on logout. Since we already have a currentLayout member, there's no need to get it afresh.

BUG: 364340
FIXED-IN: 5.8.0

Test Plan

Verified that changing the keyboard layout through the tray icon invokes KeyboardDaemon::layoutChanged() where currentLayout is updated.
Then kquitapp kded5 and it saved the proper layout.
Didn't test whether other means (there's perhaps other ways the layout can change? dunno, it's X.) still work.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik updated this revision to Diff 6828.Sep 20 2016, 1:12 PM
broulik retitled this revision from to [KeyboardDaemon] Don't call getCurrentLayout() in destructor.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added reviewers: Plasma, sitter.
broulik set the repository for this revision to R119 Plasma Desktop.
Restricted Application added a project: Plasma. · View Herald TranscriptSep 20 2016, 1:12 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sitter edited edge metadata.Sep 21 2016, 8:24 AM

seems to not be crashing anymore. unfortunately I can't comment on the correctness of the change

mart accepted this revision.Sep 21 2016, 9:22 AM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Sep 21 2016, 9:22 AM
This revision was automatically updated to reflect the committed changes.