File Use-KCrash.patch of Package kjumpingcube.5217
From: Frederik Schwarzer <schwarzerf@gmail.com>
Date: Wed, 27 Jan 2016 10:16:59 +0000
Subject: Use KCrash.
X-Git-Tag: v16.03.80
X-Git-Url: http://quickgit.kde.org/?p=kjumpingcube.git&a=commitdiff&h=482b9cf76083e8e41dad9e4561bacc6f507cc352
---
Use KCrash.
---
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,14 +2,16 @@
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.3.0")
+set (KF5_MIN_VERSION "5.15.0")
find_package(ECM 1.7.0 REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Qml Quick QuickWidgets Svg Test)
-find_package(KF5 REQUIRED COMPONENTS
+find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
CoreAddons
Config
+ Crash
ItemModels
WidgetsAddons
WindowSystem
@@ -22,7 +24,8 @@
KIO
NotifyConfig
NewStuff
- KDELibs4Support)
+ KDELibs4Support
+)
find_package(KF5KDEGames 4.9.0 REQUIRED)
find_package(Phonon4Qt5 CONFIG REQUIRED)
@@ -36,8 +39,8 @@
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
-add_subdirectory( pics )
-add_subdirectory( doc )
+add_subdirectory(pics)
+add_subdirectory(doc)
########### next target ###############
@@ -50,30 +53,42 @@
ai_main.cpp
ai_kepler.cpp
ai_newton.cpp
- ai_box.cpp )
+ ai_box.cpp
+)
-ki18n_wrap_ui(kjumpingcube_SRCS settings.ui )
+ki18n_wrap_ui(kjumpingcube_SRCS settings.ui)
-kconfig_add_kcfg_files(kjumpingcube_SRCS prefs.kcfgc )
+kconfig_add_kcfg_files(kjumpingcube_SRCS prefs.kcfgc)
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*-apps-kjumpingcube.png")
ecm_add_app_icon(kjumpingcube_SRCS ICONS ${ICONS_SRCS})
add_executable(kjumpingcube ${kjumpingcube_SRCS})
-target_link_libraries(kjumpingcube KF5::KIOCore KF5KDEGames KF5::XmlGui KF5::KDELibs4Support Qt5::Svg)
+target_link_libraries(kjumpingcube
+ KF5::KIOCore
+ KF5KDEGames
+ KF5::XmlGui
+ KF5::KDELibs4Support
+ Qt5::Svg
+)
-install(TARGETS kjumpingcube ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
+install(TARGETS kjumpingcube ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ###############
-install( PROGRAMS org.kde.kjumpingcube.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
-install( FILES kjumpingcube.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR} )
-install( FILES kjumpingcubeui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kjumpingcube )
+install(PROGRAMS org.kde.kjumpingcube.desktop DESTINATION ${KDE_INSTALL_APPDIR})
+install(FILES kjumpingcube.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
+install(FILES kjumpingcubeui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kjumpingcube)
-ecm_install_icons( ICONS 128-apps-kjumpingcube.png 16-apps-kjumpingcube.png 22-apps-kjumpingcube.png 32-apps-kjumpingcube.png 48-apps-kjumpingcube.png 64-apps-kjumpingcube.png DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor )
-
-
-
+ecm_install_icons(ICONS
+ 128-apps-kjumpingcube.png
+ 16-apps-kjumpingcube.png
+ 22-apps-kjumpingcube.png
+ 32-apps-kjumpingcube.png
+ 48-apps-kjumpingcube.png
+ 64-apps-kjumpingcube.png
+ DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor
+)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
--- a/main.cpp
+++ b/main.cpp
@@ -24,6 +24,7 @@
#include <KAboutData>
+#include <KCrash>
#include <QApplication>
#include <KLocalizedString>
#include <QCommandLineParser>
@@ -59,6 +60,7 @@
QCommandLineParser parser;
KAboutData::setApplicationData(aboutData);
+ KCrash::initialize();
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);