Commit b918361a authored by David Edmundson's avatar David Edmundson
Browse files

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.
parent 523ad8e2
...@@ -188,8 +188,8 @@ KeyboardLayoutDBusInterface::KeyboardLayoutDBusInterface(Xkb *xkb, const KConfig ...@@ -188,8 +188,8 @@ KeyboardLayoutDBusInterface::KeyboardLayoutDBusInterface(Xkb *xkb, const KConfig
qDBusRegisterMetaType<LayoutNames>(); qDBusRegisterMetaType<LayoutNames>();
qDBusRegisterMetaType<QVector<LayoutNames>>(); qDBusRegisterMetaType<QVector<LayoutNames>>();
QDBusConnection::sessionBus().registerService(s_keyboardService);
QDBusConnection::sessionBus().registerObject(s_keyboardObject, this, QDBusConnection::ExportAllSlots | QDBusConnection::ExportAllSignals); QDBusConnection::sessionBus().registerObject(s_keyboardObject, this, QDBusConnection::ExportAllSlots | QDBusConnection::ExportAllSignals);
QDBusConnection::sessionBus().registerService(s_keyboardService);
} }
KeyboardLayoutDBusInterface::~KeyboardLayoutDBusInterface() KeyboardLayoutDBusInterface::~KeyboardLayoutDBusInterface()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment