Commit da52990c authored by Volker Krause's avatar Volker Krause
Browse files

Use KCrash when available

parent 7ac2fc22
......@@ -89,7 +89,7 @@ if (ANDROID)
else()
find_package(Qt5 REQUIRED COMPONENTS Widgets DBus)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS DBusAddons)
find_package(KF5 ${KF5_MIN_VERSION} COMPONENTS Solid)
find_package(KF5 ${KF5_MIN_VERSION} COMPONENTS Solid Crash)
endif()
add_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_URL_CAST_FROM_STRING)
......
......@@ -175,6 +175,9 @@ else ()
)
set_target_properties(itinerary-app PROPERTIES OUTPUT_NAME "itinerary")
endif()
if (TARGET KF5::Crash)
target_link_libraries(itinerary-app PRIVATE KF5::Crash)
endif()
install(TARGETS itinerary-app ${INSTALL_TARGETS_DEFAULT_ARGS})
ecm_install_icons(ICONS 48-apps-itinerary.svg DESTINATION ${KDE_INSTALL_ICONDIR})
......
......@@ -52,6 +52,8 @@
#include <KLocalizedContext>
#include <KLocalizedString>
#include <KAboutData>
#include <QQuickStyle>
#include <QQmlApplicationEngine>
#include <QQmlContext>
......@@ -203,11 +205,16 @@ int main(int argc, char **argv)
QGuiApplication::setApplicationDisplayName(i18n("KDE Itinerary"));
QGuiApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("itinerary")));
auto aboutData = KAboutData::applicationData();
aboutData.setProductName("KDE Itinerary/general"); // Bugzilla product/component name
aboutData.setLicense(KAboutLicense::LGPL);
KAboutData::setApplicationData(aboutData);
QCommandLineParser parser;
parser.addHelpOption();
parser.addVersionOption();
aboutData.setupCommandLine(&parser);
parser.addPositionalArgument(QStringLiteral("file"), i18n("PkPass or JSON-LD file to import."));
parser.process(app);
aboutData.processCommandLine(&parser);
#ifndef Q_OS_ANDROID
KDBusService service(KDBusService::Unique);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment