Commit 10d647c4 authored by David Redondo's avatar David Redondo 🏎
Browse files

Make krunner dbus activatable

There is a spec for dbus activiation https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#dbus
and using this is better instead of of having this dbus-send hack.
parent 7ca34e0b
......@@ -30,8 +30,8 @@ target_compile_definitions(krunner PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}
install(TARGETS krunner ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES ${krunner_dbusAppXML} DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR} )
configure_file(krunner.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/krunner.desktop @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/krunner.desktop DESTINATION ${KDE_INSTALL_DATADIR}/kglobalaccel)
configure_file(org.kde.krunner.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/org.kde.krunner.desktop @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.krunner.desktop DESTINATION ${KDE_INSTALL_DATADIR}/kglobalaccel)
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KRunnerAppDBusInterface")
configure_package_config_file(KRunnerAppDBusInterfaceConfig.cmake.in
......
......@@ -118,6 +118,11 @@ int main(int argc, char **argv)
parser.parse(arguments);
updateVisibility();
});
QObject::connect(&service, &KDBusService::activateActionRequested, &view, [&view] (const QString &action) {
if (action == QLatin1String("RunClipboard")) {
view.displayWithClipboardContents();
}
});
return app.exec();
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment