diff --git a/appmenu.cpp b/appmenu.cpp index ba53f1d17f..05a78f1d8b 100644 --- a/appmenu.cpp +++ b/appmenu.cpp @@ -29,9 +29,9 @@ along with this program. If not, see . namespace KWin { -static const char *KDED_SERVICE = "org.kde.kded"; -static const char *KDED_APPMENU_PATH = "/modules/appmenu"; -static const char *KDED_INTERFACE = "org.kde.kded"; +static QString KDED_SERVICE = QStringLiteral("org.kde.kded"); +static QString KDED_APPMENU_PATH = QStringLiteral("/modules/appmenu"); +static QString KDED_INTERFACE = QStringLiteral("org.kde.kded"); KWIN_SINGLETON_FACTORY(ApplicationMenu) @@ -39,13 +39,13 @@ ApplicationMenu::ApplicationMenu(QObject *parent) : QObject(parent) { QDBusConnection dbus = QDBusConnection::sessionBus(); - dbus.connect(KDED_SERVICE, KDED_APPMENU_PATH, KDED_INTERFACE, "showRequest", + dbus.connect(KDED_SERVICE, KDED_APPMENU_PATH, KDED_INTERFACE, QStringLiteral("showRequest"), this, SLOT(slotShowRequest(qulonglong))); - dbus.connect(KDED_SERVICE, KDED_APPMENU_PATH, KDED_INTERFACE, "menuAvailable", + dbus.connect(KDED_SERVICE, KDED_APPMENU_PATH, KDED_INTERFACE, QStringLiteral("menuAvailable"), this, SLOT(slotMenuAvailable(qulonglong))); - dbus.connect(KDED_SERVICE, KDED_APPMENU_PATH, KDED_INTERFACE, "menuHidden", + dbus.connect(KDED_SERVICE, KDED_APPMENU_PATH, KDED_INTERFACE, QStringLiteral("menuHidden"), this, SLOT(slotMenuHidden(qulonglong))); - dbus.connect(KDED_SERVICE, KDED_APPMENU_PATH, KDED_INTERFACE, "clearMenus", + dbus.connect(KDED_SERVICE, KDED_APPMENU_PATH, KDED_INTERFACE, QStringLiteral("clearMenus"), this, SLOT(slotClearMenus())); } @@ -89,7 +89,7 @@ void ApplicationMenu::slotClearMenus() void ApplicationMenu::showApplicationMenu(const QPoint &p, const xcb_window_t id) { QList args = QList() << p.x() << p.y() << qulonglong(id); - QDBusMessage method = QDBusMessage::createMethodCall(KDED_SERVICE, KDED_APPMENU_PATH, KDED_INTERFACE, "showMenu"); + QDBusMessage method = QDBusMessage::createMethodCall(KDED_SERVICE, KDED_APPMENU_PATH, KDED_INTERFACE, QStringLiteral("showMenu")); method.setArguments(args); QDBusConnection::sessionBus().asyncCall(method); }