Qt6 insists on that. We can do this either by including the moc files,
or by including the corresponding headers in the header defining the
properties, the former seems cleaner.
It's mostly useful to be able to hide the virtual keyboard like we do in
Plasma Mobile from the bottom panel, should probably replace the SNI
from KWin.
Use the system's virtual keyboard instead of relying on
QtVirtualKeyboard specifically for the lock screen.
It means less code (when we can remove the virtual keyboard part),
better integration and one dependency less.
Return "layout" and "layoutsList" Properties where all layouts names are
now stored.
getLayoutLongName() DBus method is not used any more so it was also
deleted from DBus API in KWin and P-D, see corresponding commits there.
The Properties interface allows QML code be more declarative.
There is a trade-off though as now we have to:
- store all layout names on client side, even if it's not needed for
base QML layout component here
- duplicate layouts in layoutsList Property as they are also stored in
Action objects of the plasmoid in P-D.
Rework DBus API - getLayoutsList() now provides full details about the
layouts.
Remove Q_PROPERTY's as they are not make much sense here.
Port to a fully event-driven interface towards QML.
Considerations:
* In any point of time, the only layout info client might need is about:
- a single layout (the current one)
- list of all layouts configured (e.g to fill context menu entries)
There is no chance it might need to asqure some random layout info
which is not current.
* To get current layout Display Name, client shouldn't have to asqure
the current layout itself first - such dependecy makes code based on
async DBus API unnecessary complicated.
* Shall the layouts context menu be ever desired, it would be easy to
implement by adding both Name lists (Short/Long) and Index getters to
the API.
KWin/P-D parts:
impr: Keyboard Layout DBus API: drop excessive method arguments
No need to reimplement switching to the next layout logic in every QML
code - implemenation is already there on KWin/P-D side
KWin/P-D parts:
impr: Keyboard Layout DBus API: expose switchToNextLayout() method
KWin Wayland initially misused the DBus API and passed Long layout Name
via currentLayoutDisplayName() method which is wrong.
Instead, the new currentLayoutLongName() property should be added,
and Short Name be passed via currentLayoutDisplayName() as it is for
X11.
When layout changes, the country code (or short layout name) should be passed via DBus
from compositor to this C++ QML plugin, and then to a keyboard applet for
indication
CCBUG: 390079
KWin commit: "feat: expose keyboard layout Short Name via DBus"
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
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22846
Summary:
The keyboard layout kded module does also register a dedicated DBus
service and a dedicated object. By using the newer service name we
can also provide the same on Wayland where there is no kded module
for keyboard.
Test Plan: Not yet tested as I'm on Wayland
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D4322
Summary:
Also set a consistent naming structure and to be only Info+ by default.
This may mean you need to update your logging rules if you want debug
output.
Reviewers: #plasma, hein
Reviewed By: #plasma, hein
Subscribers: graesslin, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1956