mirror of
https://invent.kde.org/network/falkon.git
synced 2024-09-21 09:42:10 +02:00
KDESupport: Use KCrash for crash reporting
This commit is contained in:
parent
05772edbee
commit
05fa1338d8
|
@ -102,12 +102,16 @@ if (PKG_CONFIG_FOUND)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Optional: KWallet + KIO
|
# Optional: KWallet, KIO, KCrash, KCoreAddons
|
||||||
set(KF5_MIN_VERSION "5.27.0")
|
set(KF5_MIN_VERSION "5.27.0")
|
||||||
find_package(KF5Wallet ${KF5_MIN_VERSION} CONFIG)
|
find_package(KF5Wallet ${KF5_MIN_VERSION} CONFIG)
|
||||||
set_package_properties(KF5Wallet PROPERTIES DESCRIPTION "KDESupport plugin" TYPE OPTIONAL)
|
set_package_properties(KF5Wallet PROPERTIES DESCRIPTION "KDESupport plugin" TYPE OPTIONAL)
|
||||||
find_package(KF5KIO ${KF5_MIN_VERSION} CONFIG)
|
find_package(KF5KIO ${KF5_MIN_VERSION} CONFIG)
|
||||||
set_package_properties(KF5KIO PROPERTIES DESCRIPTION "KDESupport plugin" TYPE OPTIONAL)
|
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
|
# Optional: PySide2
|
||||||
find_package(PySide2 "2.0.0")
|
find_package(PySide2 "2.0.0")
|
||||||
|
|
|
@ -13,7 +13,7 @@ if (GNOME_KEYRING_FOUND)
|
||||||
add_subdirectory(GnomeKeyringPasswords)
|
add_subdirectory(GnomeKeyringPasswords)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (KF5Wallet_FOUND AND KF5KIO_FOUND)
|
if (KF5Wallet_FOUND AND KF5KIO_FOUND AND KF5Crash_FOUND AND KF5CoreAddons_FOUND)
|
||||||
add_subdirectory(KDESupport)
|
add_subdirectory(KDESupport)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -13,4 +13,11 @@ qt5_add_resources(RSCS ${KDESupport_RSCS})
|
||||||
|
|
||||||
add_library(KDESupport MODULE ${KDESupport_SRCS} ${RSCS})
|
add_library(KDESupport MODULE ${KDESupport_SRCS} ${RSCS})
|
||||||
install(TARGETS KDESupport DESTINATION ${FALKON_INSTALL_PLUGINDIR})
|
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
|
||||||
|
)
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#include "kioschemehandler.h"
|
#include "kioschemehandler.h"
|
||||||
#include "webpage.h"
|
#include "webpage.h"
|
||||||
|
|
||||||
|
#include <KCrash>
|
||||||
|
#include <KAboutData>
|
||||||
#include <KProtocolInfo>
|
#include <KProtocolInfo>
|
||||||
|
|
||||||
#include <QWebEngineProfile>
|
#include <QWebEngineProfile>
|
||||||
|
@ -60,6 +62,12 @@ void KDESupportPlugin::init(InitState state, const QString &settingsPath)
|
||||||
mApp->webProfile()->installUrlSchemeHandler(protocol.toUtf8(), handler);
|
mApp->webProfile()->installUrlSchemeHandler(protocol.toUtf8(), handler);
|
||||||
WebPage::addSupportedScheme(protocol);
|
WebPage::addSupportedScheme(protocol);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KAboutData aboutData(QSL("falkon"), QSL("Falkon"), QCoreApplication::applicationVersion());
|
||||||
|
KAboutData::setApplicationData(aboutData);
|
||||||
|
|
||||||
|
KCrash::initialize();
|
||||||
|
KCrash::setFlags(KCrash::KeepFDs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KDESupportPlugin::unload()
|
void KDESupportPlugin::unload()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user