Port KeyboardLayout component to use generated DBus interface
ClosedPublic

Authored by davidedmundson on Jul 31 2019, 12:36 AM.

Details

Summary

QDBusInterface is useful for runtime introspection but little else.

As we know the interface in advance we can generate the keyboard layouts
interface and have non blocking, easier to read, easier to maintain
code.

Test Plan

Opened lock screen, it had the whole list, cycled between them

Diff Detail

Repository
R120 Plasma Workspace
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 14593
Build 14611: arc lint + arc unit
Restricted Application added a project: Plasma. · View Herald TranscriptJul 31 2019, 12:36 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Jul 31 2019, 12:36 AM
broulik accepted this revision.Jul 31 2019, 6:45 AM
This revision is now accepted and ready to land.Jul 31 2019, 6:45 AM
This revision was automatically updated to reflect the committed changes.
bam added a subscriber: bam.Nov 4 2020, 2:56 PM

Does it mean we now have to manually synchronize DBus API here in .xml and on KWin side?

meven added a subscriber: meven.EditedNov 5 2020, 5:38 AM
In D22846#676700, @bam wrote:

Does it mean we now have to manually synchronize DBus API here in .xml and on KWin side?

Only if the API breaks (which is pretty much guaranteed not to happen) or we need a need field / function from the DBUS API.

Does it mean we now have to manually synchronize DBus API here in .xml and on KWin side?

It does, but that's easier to do that keeping code in sync

bam added a comment.Nov 5 2020, 8:51 PM

I wonder if we could "share" that .xml between server and client somehow..

I wonder if we could "share" that .xml between server and client somehow..

We do in some cases. Interface headers are installed into /usr/share/dbus-1/interfaces

Then KWinDBusInterfaceConfig.cmake.in tells other projects where these files are