From b918361acf4e6e5ba5d90c12595d11186a8b8555 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 20 Jan 2021 23:27:02 +0000 Subject: [PATCH] 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. --- keyboard_layout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard_layout.cpp b/keyboard_layout.cpp index 9f1ae6003f..8ebc095a94 100644 --- a/keyboard_layout.cpp +++ b/keyboard_layout.cpp @@ -188,8 +188,8 @@ KeyboardLayoutDBusInterface::KeyboardLayoutDBusInterface(Xkb *xkb, const KConfig qDBusRegisterMetaType(); qDBusRegisterMetaType>(); - QDBusConnection::sessionBus().registerService(s_keyboardService); QDBusConnection::sessionBus().registerObject(s_keyboardObject, this, QDBusConnection::ExportAllSlots | QDBusConnection::ExportAllSignals); + QDBusConnection::sessionBus().registerService(s_keyboardService); } KeyboardLayoutDBusInterface::~KeyboardLayoutDBusInterface()