diff --git a/CMakeLists.txt b/CMakeLists.txt index ef892ca0e..7408da3d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,12 +102,16 @@ if (PKG_CONFIG_FOUND) endif() endif() -# Optional: KWallet + KIO +# Optional: KWallet, KIO, KCrash, KCoreAddons set(KF5_MIN_VERSION "5.27.0") find_package(KF5Wallet ${KF5_MIN_VERSION} CONFIG) set_package_properties(KF5Wallet PROPERTIES DESCRIPTION "KDESupport plugin" TYPE OPTIONAL) find_package(KF5KIO ${KF5_MIN_VERSION} CONFIG) set_package_properties(KF5KIO PROPERTIES DESCRIPTION "KDESupport plugin" TYPE OPTIONAL) +find_package(KF5Crash ${KF5_MIN_VERSION} CONFIG) +set_package_properties(KF5Crash PROPERTIES DESCRIPTION "KDESupport plugin" TYPE OPTIONAL) +find_package(KF5CoreAddons ${KF5_MIN_VERSION} CONFIG) +set_package_properties(KF5CoreAddons PROPERTIES DESCRIPTION "KDESupport plugin" TYPE OPTIONAL) # Optional: PySide2 find_package(PySide2 "2.0.0") diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 9107b5f2c..9069d3326 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -13,7 +13,7 @@ if (GNOME_KEYRING_FOUND) add_subdirectory(GnomeKeyringPasswords) endif() -if (KF5Wallet_FOUND AND KF5KIO_FOUND) +if (KF5Wallet_FOUND AND KF5KIO_FOUND AND KF5Crash_FOUND AND KF5CoreAddons_FOUND) add_subdirectory(KDESupport) endif() diff --git a/src/plugins/KDESupport/CMakeLists.txt b/src/plugins/KDESupport/CMakeLists.txt index 479b7e53d..eea7e9531 100644 --- a/src/plugins/KDESupport/CMakeLists.txt +++ b/src/plugins/KDESupport/CMakeLists.txt @@ -13,4 +13,11 @@ qt5_add_resources(RSCS ${KDESupport_RSCS}) add_library(KDESupport MODULE ${KDESupport_SRCS} ${RSCS}) install(TARGETS KDESupport DESTINATION ${FALKON_INSTALL_PLUGINDIR}) -target_link_libraries(KDESupport FalkonPrivate KF5::Wallet KF5::KIOCore KF5::KIOWidgets) +target_link_libraries(KDESupport + FalkonPrivate + KF5::Wallet + KF5::KIOCore + KF5::KIOWidgets + KF5::Crash + KF5::CoreAddons +) diff --git a/src/plugins/KDESupport/kdesupportplugin.cpp b/src/plugins/KDESupport/kdesupportplugin.cpp index deeae6d4f..2ae5c8096 100644 --- a/src/plugins/KDESupport/kdesupportplugin.cpp +++ b/src/plugins/KDESupport/kdesupportplugin.cpp @@ -27,6 +27,8 @@ #include "kioschemehandler.h" #include "webpage.h" +#include +#include #include #include @@ -60,6 +62,12 @@ void KDESupportPlugin::init(InitState state, const QString &settingsPath) mApp->webProfile()->installUrlSchemeHandler(protocol.toUtf8(), handler); WebPage::addSupportedScheme(protocol); } + + KAboutData aboutData(QSL("falkon"), QSL("Falkon"), QCoreApplication::applicationVersion()); + KAboutData::setApplicationData(aboutData); + + KCrash::initialize(); + KCrash::setFlags(KCrash::KeepFDs); } void KDESupportPlugin::unload()