File indexing completed on 2024-11-10 04:56:26
0001 /* 0002 SPDX-FileCopyrightText: 2023 Marco Martin <mart@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include <KGlobalAccel> 0008 0009 #include <QAction> 0010 #include <QGuiApplication> 0011 #include <QStandardPaths> 0012 0013 int main(int argc, char **argv) 0014 { 0015 QGuiApplication app(argc, argv); 0016 0017 const QStringList actionNames{ 0018 QStringLiteral("Walk Through Desktops"), 0019 QStringLiteral("Walk Through Desktops (Reverse)"), 0020 QStringLiteral("Walk Through Desktop List"), 0021 QStringLiteral("Walk Through Desktop List (Reverse)"), 0022 }; 0023 0024 for (const QString &actionName : actionNames) { 0025 QAction action; 0026 action.setObjectName(actionName); 0027 action.setProperty("componentName", QStringLiteral("kwin")); 0028 KGlobalAccel::self()->setShortcut(&action, {QKeySequence()}, KGlobalAccel::NoAutoloading); 0029 KGlobalAccel::self()->removeAllShortcuts(&action); 0030 } 0031 0032 return 0; 0033 }