[rkward/frameworks] /: Enable use of drkonqi, if available at compile time

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Mon Oct 24 14:11:18 UTC 2016


Git commit 250cc6c4aaa78a8fcd2ad0d151368c80830a89dd by Thomas Friedrichsmeier.
Committed on 24/10/2016 at 14:11.
Pushed by tfry into branch 'frameworks'.

Enable use of drkonqi, if available at compile time

M  +1    -1    CMakeLists.txt
M  +5    -1    rkward/CMakeLists.txt
M  +6    -0    rkward/main.cpp

http://commits.kde.org/rkward/250cc6c4aaa78a8fcd2ad0d151368c80830a89dd

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 99e01c8..b3379ba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,7 +20,7 @@ INCLUDE(ECMInstallIcons)
 INCLUDE(FeatureSummary)
 
 FIND_PACKAGE(Qt5 5.2 CONFIG REQUIRED COMPONENTS Widgets Core Xml Network WebKit Script PrintSupport)
-FIND_PACKAGE(KF5 5.2 REQUIRED COMPONENTS CoreAddons DocTools I18n XmlGui TextEditor WidgetsAddons WebKit Parts Config Notifications WindowSystem)
+FIND_PACKAGE(KF5 5.2 REQUIRED COMPONENTS CoreAddons DocTools I18n XmlGui TextEditor WidgetsAddons WebKit Parts Config Notifications WindowSystem OPTIONAL_COMPONENTS Crash)
 FIND_PACKAGE(Gettext REQUIRED)
 
 # FindIntl in cmake is broken for MSVC on Windows, (and only included from 3.2.3 upwards).
diff --git a/rkward/CMakeLists.txt b/rkward/CMakeLists.txt
index 48962fb..1d7b4d1 100755
--- a/rkward/CMakeLists.txt
+++ b/rkward/CMakeLists.txt
@@ -53,7 +53,11 @@ IF(Q_WS_MAC)
 		@ONLY)
 ENDIF(Q_WS_MAC)
 
-TARGET_LINK_LIBRARIES(rkward.frontend  windows ${RKWARD_ADDLIBS} agents dialogs plugin settings dataeditor core scriptbackends rbackend misc KF5::WindowSystem Qt5::Widgets KF5::XmlGui ${LibIntl_LIBRARIES})
+TARGET_LINK_LIBRARIES(rkward.frontend windows ${RKWARD_ADDLIBS} agents dialogs plugin settings dataeditor core scriptbackends rbackend misc KF5::WindowSystem Qt5::Widgets KF5::XmlGui ${LibIntl_LIBRARIES})
+IF(KF5Crash_FOUND)
+	TARGET_LINK_LIBRARIES(rkward.frontend KF5::Crash)
+	SET_SOURCE_FILES_PROPERTIES(main.cpp PROPERTIES COMPILE_DEFINITIONS WITH_KCRASH=1)
+ENDIF(KF5Crash_FOUND)
 
 # wrapper executable
 GET_DIRECTORY_PROPERTY(R_EXECUTABLE DIRECTORY rbackend DEFINITION R_EXECUTABLE)
diff --git a/rkward/main.cpp b/rkward/main.cpp
index ea819ee..782a9e8 100644
--- a/rkward/main.cpp
+++ b/rkward/main.cpp
@@ -54,6 +54,9 @@
 #include <kaboutdata.h>
 #include <KLocalizedString>
 #include <KUrlAuthorized>
+#ifdef WITH_KCRASH
+#	include <KCrash>
+#endif
 
 #include <qstring.h>
 #include <QMutex>
@@ -131,6 +134,9 @@ int main (int argc, char *argv[]) {
 	}
 
 	QApplication app (argc, argv_copy);
+#ifdef WITH_KCRASH
+	KCrash::setDrKonqiEnabled (true);
+#endif
 	// Don't complain when linking rkward://-pages from Rd pages
 	KUrlAuthorized::allowUrlAction ("redirect", QUrl("http://"), QUrl ("rkward://"));
 	// Don't complain when trying to open help pages



More information about the rkward-tracker mailing list