File indexing completed on 2024-09-08 13:16:55
0001 #include <QApplication> 0002 #include <QDBusConnection> 0003 #include <QDBusMessage> 0004 #include <QDBusReply> 0005 #include <QDebug> 0006 0007 #include "kded.h" 0008 0009 int main(int argc, char **argv) 0010 { 0011 QApplication app(argc, argv); 0012 0013 QDBusInterface kdedInterface("org.kde.kded5", "/kded", "org.kde.kded5"); 0014 QDBusReply<QStringList> reply = kdedInterface.call("loadedModules"); 0015 0016 if (reply.value().contains("khotkeys")) { 0017 qDebug() << "The khotkeys module is already running."; 0018 qDebug() << "To unload it run:"; 0019 qDebug() << "qdbus org.kde.kded5 /kded org.kde.kded5.unloadModule khotkeys"; 0020 exit(-1); 0021 } 0022 0023 KHotKeysModule module(&app, QVariantList()); 0024 return app.exec(); 0025 }