From 0b6519bad4f97860424cc070d6c14120efbb4401 Mon Sep 17 00:00:00 2001 From: Luis Caceres Date: Fri, 6 Dec 2019 23:56:15 +0000 Subject: [PATCH] Fix build with DBus disabled --- src/core/kglobalaccelglobalshortcutbackend.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/kglobalaccelglobalshortcutbackend.cpp b/src/core/kglobalaccelglobalshortcutbackend.cpp index 3a3d04d26..a5e66efae 100644 --- a/src/core/kglobalaccelglobalshortcutbackend.cpp +++ b/src/core/kglobalaccelglobalshortcutbackend.cpp @@ -15,6 +15,7 @@ // (https://phabricator.kde.org/source/kglobalaccel) namespace { +#ifdef HAVE_DBUS QString compDisplayName() { if (!QGuiApplication::applicationDisplayName().isEmpty()) { return QGuiApplication::applicationDisplayName(); @@ -39,6 +40,7 @@ bool isCorrectMediaKeyShortcut(const GlobalShortcuts::Shortcut &shortcut) { return false; } } +#endif // HAVE_DBUS } // namespace #ifdef HAVE_DBUS @@ -95,6 +97,7 @@ bool KGlobalAccelShortcutBackend::DoRegister() { } void KGlobalAccelShortcutBackend::DoUnregister() { +#ifdef HAVE_DBUS if (!acquireInterface()) return; @@ -103,6 +106,7 @@ void KGlobalAccelShortcutBackend::DoUnregister() { for (const GlobalShortcuts::Shortcut &shortcut : manager_->shortcuts()) unregisterAction(shortcut.id, shortcut.action); +#endif // HAVE_DBUS } #ifdef HAVE_DBUS