fill layouts from X server when there are no layouts in config
ClosedPublic

Authored by McPain on May 30 2019, 9:56 AM.

Details

Summary

BUG: 348198

Test Plan
  1. move ~/.config/kxkbrc
  2. connect a USB keyboard
  3. layout changing works

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.
McPain created this revision.May 30 2019, 9:56 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 30 2019, 9:56 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
McPain requested review of this revision.May 30 2019, 9:56 AM
McPain added reviewers: ngraham, broulik.
McPain updated this revision to Diff 58911.May 30 2019, 1:43 PM
  1. Overwrite configureLayouts based on whether layouts is empty or not
  2. Make sure fetched layouts were saved to config

The paths in this diff seem wrong (BUILD/plasma-desktop-5.15.4/kcms/keyboard/keyboard_config.cpp). Also the repo it's intended for is not specified. It would be very helpful if you could use arc for patches in the future.

https://community.kde.org/Infrastructure/Phabricator#Using_Arcanist

McPain updated this revision to Diff 58932.May 31 2019, 7:14 AM
McPain set the repository for this revision to R119 Plasma Desktop.

updated paths

Thanks, it works now!

kcms/keyboard/keyboard_config.cpp
112

While you're touching this, port away from foreach, which is deprecated.

Also more const

McPain updated this revision to Diff 58950.May 31 2019, 2:13 PM

foreach -> for
use const

ngraham added inline comments.May 31 2019, 2:36 PM
kcms/keyboard/keyboard_config.cpp
112

Style: space between for and (

116

Ditto

McPain updated this revision to Diff 58951.May 31 2019, 2:51 PM

style: for

McPain marked 3 inline comments as done.May 31 2019, 2:51 PM
ngraham accepted this revision.May 31 2019, 3:13 PM

Looks good and works for me, though I'm not super familiar with this code so I'd appreciate a review from @hein or @broulik.

This revision is now accepted and ready to land.May 31 2019, 3:13 PM
McPain added a comment.Jun 3 2019, 9:31 AM

Looks good and works for me, though I'm not super familiar with this code so I'd appreciate a review from @hein or @broulik.

I'll land this tomorrow if everything will be still ok

This revision was automatically updated to reflect the committed changes.