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

Use KCrash when available

parent 7ac2fc22
...@@ -89,7 +89,7 @@ if (ANDROID) ...@@ -89,7 +89,7 @@ if (ANDROID)
else() else()
find_package(Qt5 REQUIRED COMPONENTS Widgets DBus) find_package(Qt5 REQUIRED COMPONENTS Widgets DBus)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS DBusAddons) 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() endif()
add_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_URL_CAST_FROM_STRING) add_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_URL_CAST_FROM_STRING)
......
...@@ -175,6 +175,9 @@ else () ...@@ -175,6 +175,9 @@ else ()
) )
set_target_properties(itinerary-app PROPERTIES OUTPUT_NAME "itinerary") set_target_properties(itinerary-app PROPERTIES OUTPUT_NAME "itinerary")
endif() endif()
if (TARGET KF5::Crash)
target_link_libraries(itinerary-app PRIVATE KF5::Crash)
endif()
install(TARGETS itinerary-app ${INSTALL_TARGETS_DEFAULT_ARGS}) install(TARGETS itinerary-app ${INSTALL_TARGETS_DEFAULT_ARGS})
ecm_install_icons(ICONS 48-apps-itinerary.svg DESTINATION ${KDE_INSTALL_ICONDIR}) ecm_install_icons(ICONS 48-apps-itinerary.svg DESTINATION ${KDE_INSTALL_ICONDIR})
......
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
#include <KLocalizedContext> #include <KLocalizedContext>
#include <KLocalizedString> #include <KLocalizedString>
#include <KAboutData>
#include <QQuickStyle> #include <QQuickStyle>
#include <QQmlApplicationEngine> #include <QQmlApplicationEngine>
#include <QQmlContext> #include <QQmlContext>
...@@ -203,11 +205,16 @@ int main(int argc, char **argv) ...@@ -203,11 +205,16 @@ int main(int argc, char **argv)
QGuiApplication::setApplicationDisplayName(i18n("KDE Itinerary")); QGuiApplication::setApplicationDisplayName(i18n("KDE Itinerary"));
QGuiApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("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; QCommandLineParser parser;
parser.addHelpOption(); aboutData.setupCommandLine(&parser);
parser.addVersionOption();
parser.addPositionalArgument(QStringLiteral("file"), i18n("PkPass or JSON-LD file to import.")); parser.addPositionalArgument(QStringLiteral("file"), i18n("PkPass or JSON-LD file to import."));
parser.process(app); parser.process(app);
aboutData.processCommandLine(&parser);
#ifndef Q_OS_ANDROID #ifndef Q_OS_ANDROID
KDBusService service(KDBusService::Unique); 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