Various cleanup to global shortcuts code

This commit is contained in:
Jonas Kvinge
2021-09-01 21:37:11 +02:00
parent 49d9ded684
commit 20a23c2868
20 changed files with 447 additions and 198 deletions

View File

@@ -42,16 +42,22 @@ const char *GlobalShortcutsBackendKDE::kKdeService = "org.kde.kglobalaccel";
const char *GlobalShortcutsBackendKDE::kKdePath = "/kglobalaccel";
GlobalShortcutsBackendKDE::GlobalShortcutsBackendKDE(GlobalShortcutsManager *manager, QObject *parent)
: GlobalShortcutsBackend(manager, parent),
: GlobalShortcutsBackend(manager, GlobalShortcutsBackend::Type_KDE, parent),
interface_(nullptr),
component_(nullptr) {}
bool GlobalShortcutsBackendKDE::IsAvailable() {
bool GlobalShortcutsBackendKDE::IsKDEAvailable() {
return QDBusConnection::sessionBus().interface()->isServiceRegistered(kKdeService);
}
bool GlobalShortcutsBackendKDE::IsAvailable() const {
return IsKDEAvailable();
}
bool GlobalShortcutsBackendKDE::DoRegister() {
qLog(Debug) << "Registering";