diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,7 @@ find_package(KF5XmlGui CONFIG QUIET) find_package(KF5ConfigWidgets CONFIG QUIET) find_package(KF5Config CONFIG QUIET) +find_package(KF5Crash CONFIG QUIET) find_package(KDSoap CONFIG QUIET) set_package_properties(KDSoap PROPERTIES diff --git a/config-upnp-qt.h.cmake b/config-upnp-qt.h.cmake --- a/config-upnp-qt.h.cmake +++ b/config-upnp-qt.h.cmake @@ -12,6 +12,8 @@ #cmakedefine01 KF5Config_FOUND +#cmakedefine01 KF5Crash_FOUND + #cmakedefine01 UPNPQT_FOUND #cmakedefine01 Qt5DBus_FOUND diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -160,6 +160,13 @@ ) endif() + if (KF5Crash_FOUND) + target_link_libraries(elisa + LINK_PRIVATE + KF5::Crash + ) + endif() + if (UPNPQT_FOUND) target_link_libraries(elisa LINK_PRIVATE diff --git a/src/upnpControl.cpp b/src/upnpControl.cpp --- a/src/upnpControl.cpp +++ b/src/upnpControl.cpp @@ -68,6 +68,10 @@ #include #endif +#if defined KF5Crash_FOUND +#include +#endif + #include #include @@ -86,6 +90,10 @@ { QApplication app(argc, argv); +#if defined KF5Crash_FOUND + KCrash::initialize(); +#endif + QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("new-audio-alarm"))); KLocalizedString::setApplicationDomain("elisa");