Saves us some of the boilerplate code
Details
Diff Detail
- Repository
- R127 KWayland
- Branch
- arcpatch-D22362
- Lint
Lint Skipped Excuse: x - Unit
No Unit Test Coverage - Build Status
Buildable 17545 Build 17563: arc lint + arc unit
As discussed in the Plasma sprint.
Removes some boilerplate code and turns it into C++ overrides.
As some background:
At a recent Plasma sprint, one comment was that adding protocols to KWayland was an absolute pain involving writing a tonne of boiler plate. My experience adding a protocol to Qt was relatively painless.
We said we'd try on a really simple protocol.
IMHO this looks encouraging.
Obviously having a mix of styles isn't great, but something has to be first.
One thing we need to resolve is
QtWaylandServer::org_kde_kwin_keystate
will call init which will call wl_global_create
Global::Private will call wl_global_create
Calling that twice is wrong.
I was looking into this and realised it's not really easy to solve. The reason is that KWayland::Server::Global was designed to be able to expose the wl_global as if it was useful, but this is something you never do. The wl_global is private on the generated code so we can't access it. I'll provide a workaround for now to keep the conversation alive, but I'd say at least operator wl_global*(); should get deprecated.