mirror of https://github.com/KDE/kasts.git
Set up crash handling
This commit is contained in:
parent
365142c9fb
commit
919ae39cb5
|
@ -18,6 +18,7 @@ Dependencies:
|
|||
- 'on': ['Linux', 'FreeBSD', 'Windows']
|
||||
'require':
|
||||
'frameworks/qqc2-desktop-style': '@latest-kf6'
|
||||
'frameworks/kcrash': '@latest-kf6'
|
||||
|
||||
Options:
|
||||
require-passing-tests-on: [ 'Linux', 'FreeBSD', 'Windows' ]
|
||||
|
|
|
@ -73,6 +73,7 @@ if (ANDROID)
|
|||
find_package(Gradle)
|
||||
else()
|
||||
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS Widgets DBus)
|
||||
find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS Crash)
|
||||
endif()
|
||||
|
||||
add_definitions(-DQT_NO_CAST_FROM_ASCII
|
||||
|
|
|
@ -329,7 +329,7 @@ if(ANDROID)
|
|||
)
|
||||
ecm_add_android_apk(kasts ANDROID_DIR ${CMAKE_SOURCE_DIR}/android)
|
||||
else()
|
||||
target_link_libraries(kasts PRIVATE Qt::Widgets)
|
||||
target_link_libraries(kasts PRIVATE Qt::Widgets KF6::Crash)
|
||||
endif()
|
||||
|
||||
install(TARGETS kasts ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
#include <QGuiApplication>
|
||||
#else
|
||||
#include <QApplication>
|
||||
|
||||
#include <KCrash>
|
||||
#endif
|
||||
|
||||
#include <KAboutData>
|
||||
|
@ -114,6 +116,10 @@ int main(int argc, char *argv[])
|
|||
about.addAuthor(i18n("Bart De Vries"), QString(), QStringLiteral("bart@mogwai.be"));
|
||||
KAboutData::setApplicationData(about);
|
||||
|
||||
#ifndef Q_OS_ANDROID
|
||||
KCrash::initialize();
|
||||
#endif
|
||||
|
||||
about.setupCommandLine(&parser);
|
||||
parser.process(app);
|
||||
QString feedURL = parser.value(addFeedOption);
|
||||
|
|
Loading…
Reference in New Issue