Avoid race on keyboard layout registering

If a service name exists, the relevant object at that path always
should, otherwise it's technically racey due to DBus running in another
thread.
This commit is contained in:
David Edmundson 2021-01-20 23:27:02 +00:00
parent 523ad8e25c
commit b918361acf

View file

@ -188,8 +188,8 @@ KeyboardLayoutDBusInterface::KeyboardLayoutDBusInterface(Xkb *xkb, const KConfig
qDBusRegisterMetaType<LayoutNames>();
qDBusRegisterMetaType<QVector<LayoutNames>>();
QDBusConnection::sessionBus().registerService(s_keyboardService);
QDBusConnection::sessionBus().registerObject(s_keyboardObject, this, QDBusConnection::ExportAllSlots | QDBusConnection::ExportAllSignals);
QDBusConnection::sessionBus().registerService(s_keyboardService);
}
KeyboardLayoutDBusInterface::~KeyboardLayoutDBusInterface()