diff --git a/libsearch/appsearch/app-search-plugin.cpp b/libsearch/appsearch/app-search-plugin.cpp index b9e4189..2bf9d10 100644 --- a/libsearch/appsearch/app-search-plugin.cpp +++ b/libsearch/appsearch/app-search-plugin.cpp @@ -320,19 +320,23 @@ bool AppSearchPlugin::launch(const QString &path) bool AppSearchPlugin::addPanelShortcut(const QString& path) { DataCollecter::collectLaunchEvent(QStringLiteral("applicationSearch"), QStringLiteral("addPanelShortcut")); - QDBusInterface iface("com.ukui.panel.desktop", - "/", - "com.ukui.panel.desktop", + QDBusInterface iface("org.ukui.taskManager", + "/taskManager", + "org.ukui.taskManager", QDBusConnection::sessionBus()); if(iface.isValid()) { - QDBusReply isExist = iface.call("CheckIfExist", path); - if(isExist) { + QDBusReply isExist = iface.call("checkQuickLauncher", path); + if (isExist) { qWarning() << "Add shortcut to panel failed, because it is already existed!"; return false; } - QDBusReply ret = iface.call("AddToTaskbar", path); - qDebug() << "Add shortcut to panel successed!"; - return true; + QDBusReply ret = iface.call("addQuickLauncher", path); + if (ret.isValid()) { + qDebug() << "Add shortcut to taskManager successed!"; + return true; + } else { + qWarning() << "Fail to add shortcut to taskManager!"; + } } return false; }