From kde-commits Mon Oct 24 14:11:18 2016 From: Thomas Friedrichsmeier Date: Mon, 24 Oct 2016 14:11:18 +0000 To: kde-commits Subject: [rkward/frameworks] /: Enable use of drkonqi, if available at compile time Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=147731828728374 Git commit 250cc6c4aaa78a8fcd2ad0d151368c80830a89dd by Thomas Friedrichsmei= er. 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 W= ebKit Script PrintSupport) -FIND_PACKAGE(KF5 5.2 REQUIRED COMPONENTS CoreAddons DocTools I18n XmlGui T= extEditor WidgetsAddons WebKit Parts Config Notifications WindowSystem) +FIND_PACKAGE(KF5 5.2 REQUIRED COMPONENTS CoreAddons DocTools I18n XmlGui T= extEditor WidgetsAddons WebKit Parts Config Notifications WindowSystem OPTI= ONAL_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 di= alogs plugin settings dataeditor core scriptbackends rbackend misc KF5::Win= dowSystem Qt5::Widgets KF5::XmlGui ${LibIntl_LIBRARIES}) +TARGET_LINK_LIBRARIES(rkward.frontend windows ${RKWARD_ADDLIBS} agents dia= logs plugin settings dataeditor core scriptbackends rbackend misc KF5::Wind= owSystem 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=3D1) +ENDIF(KF5Crash_FOUND) = # wrapper executable GET_DIRECTORY_PROPERTY(R_EXECUTABLE DIRECTORY rbackend DEFINITION R_EXECUT= ABLE) 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 #include #include +#ifdef WITH_KCRASH +# include +#endif = #include #include @@ -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 ("rkwar= d://")); // Don't complain when trying to open help pages