Enable KCrash for all executables

(cherry picked from commit 75bd1c694e)
This commit is contained in:
Nicolas Fella 2024-07-31 22:44:55 +02:00
parent 75ecb0fd74
commit a40b694b5c
16 changed files with 31 additions and 5 deletions

View file

@ -24,6 +24,7 @@ Dependencies:
'frameworks/kpeople': '@stable'
'frameworks/kwindowsystem': '@stable'
'frameworks/qqc2-desktop-style': '@stable'
'frameworks/kcrash': '@stable'
'libraries/kirigami-addons': '@latest'
- 'on': ['Linux/Qt5', 'FreeBSD/Qt5']
'require':

View file

@ -92,7 +92,7 @@ add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_NO_KEYWORDS -DQT_NO_CAST_FROM_
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS DBus Quick QuickControls2 Network Multimedia)
find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS I18n ConfigWidgets DBusAddons IconThemes Notifications
KIO KCMUtils Service Solid Kirigami People WindowSystem GuiAddons DocTools)
KIO KCMUtils Service Solid Kirigami People WindowSystem GuiAddons DocTools Crash)
if (WIN32)
get_filename_component(WINDOWS_KITS_DIR

View file

@ -44,7 +44,7 @@ ecm_target_qml_sources(kdeconnect-app SOURCES
qml/Settings.qml
)
target_link_libraries(kdeconnect-app PRIVATE Qt::Quick Qt::QuickControls2 Qt::Widgets KF6::CoreAddons KF6::I18n KF6::KCMUtils)
target_link_libraries(kdeconnect-app PRIVATE Qt::Quick Qt::QuickControls2 Qt::Widgets KF6::CoreAddons KF6::I18n KF6::KCMUtils KF6::Crash)
install(TARGETS kdeconnect-app ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS org.kde.kdeconnect.app.desktop DESTINATION ${KDE_INSTALL_APPDIR})

View file

@ -16,6 +16,7 @@
#include "kdeconnect-version.h"
#include <KAboutData>
#include <KColorSchemeManager>
#include <KCrash>
#include <KLocalizedContext>
#include <KLocalizedString>
@ -37,6 +38,8 @@ int main(int argc, char *argv[])
aboutData.setBugAddress("https://bugs.kde.org/enter_bug.cgi?product=kdeconnect&component=common");
KAboutData::setApplicationData(aboutData);
KCrash::initialize();
#ifdef Q_OS_WIN
KColorSchemeManager manager;
QApplication::setStyle(QStringLiteral("breeze"));

View file

@ -9,6 +9,7 @@ target_link_libraries(kdeconnect-cli
kdeconnectversion
KF6::CoreAddons
KF6::I18n
KF6::Crash
)
install(TARGETS kdeconnect-cli ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})

View file

@ -12,6 +12,7 @@
#include <QTextStream>
#include <KAboutData>
#include <KCrash>
#include "interfaces/conversationmessage.h"
#include "interfaces/dbushelpers.h"
@ -33,6 +34,8 @@ int main(int argc, char **argv)
i18n("(C) 2015 Aleix Pol Gonzalez"));
KAboutData::setApplicationData(about);
KCrash::initialize();
about.addAuthor(i18n("Aleix Pol Gonzalez"), QString(), QStringLiteral("aleixpol@kde.org"));
about.addAuthor(i18n("Albert Vaca Cintora"), QString(), QStringLiteral("albertvaka@gmail.com"));
QCommandLineParser parser;

View file

@ -13,6 +13,7 @@ target_link_libraries(kdeconnectd
KF6::Notifications
KF6::I18n
KF6::WindowSystem
KF6::Crash
Qt::Widgets)
ecm_mark_nongui_executable(kdeconnectd)

View file

@ -19,6 +19,7 @@
#endif
#include <KAboutData>
#include <KCrash>
#include <KDBusService>
#include <KIO/Global>
#include <KIO/JobTracker>
@ -147,6 +148,8 @@ int main(int argc, char *argv[])
KAboutData::setApplicationData(aboutData);
app.setQuitOnLastWindowClosed(false);
KCrash::initialize();
QCommandLineParser parser;
QCommandLineOption replaceOption({QStringLiteral("replace")}, i18n("Replace an existing instance"));
parser.addOption(replaceOption);

View file

@ -43,7 +43,7 @@ ecm_qt_declare_logging_category(kdeconnect-indicator
target_include_directories(kdeconnect-indicator PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/systray_actions)
target_link_libraries(kdeconnect-indicator Qt::Widgets KF6::CoreAddons KF6::I18n KF6::Notifications KF6::DBusAddons KF6::KCMUtils kdeconnectinterfaces kdeconnectcore kdeconnectversion)
target_link_libraries(kdeconnect-indicator Qt::Widgets KF6::CoreAddons KF6::I18n KF6::Notifications KF6::DBusAddons KF6::KCMUtils KF6::Crash kdeconnectinterfaces kdeconnectcore kdeconnectversion)
if (WIN32)
target_link_libraries(kdeconnect-indicator windowsapp)

View file

@ -22,6 +22,7 @@
#include <KAboutData>
#include <KCMultiDialog>
#include <KColorSchemeManager>
#include <KCrash>
#include <KDBusService>
#include <KLocalizedString>
@ -56,6 +57,8 @@ int main(int argc, char **argv)
i18n("(C) 2016 Aleix Pol Gonzalez"));
KAboutData::setApplicationData(about);
KCrash::initialize();
#ifdef Q_OS_WIN
KColorSchemeManager manager;
QApplication::setStyle(QStringLiteral("breeze"));

View file

@ -7,7 +7,7 @@ add_executable(kdeconnect-settings
${kdeconnect_custom_icons_SRCS}
)
target_link_libraries(kdeconnect-settings kdeconnectversion KF6::I18n KF6::KCMUtils KF6::DBusAddons KF6::WindowSystem)
target_link_libraries(kdeconnect-settings kdeconnectversion KF6::I18n KF6::KCMUtils KF6::DBusAddons KF6::WindowSystem KF6::Crash)
install(TARGETS kdeconnect-settings ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES org.kde.kdeconnect-settings.desktop DESTINATION ${KDE_INSTALL_APPDIR})

View file

@ -12,6 +12,7 @@
#include "kdeconnect-version.h"
#include <KAboutData>
#include <KCMultiDialog>
#include <KCrash>
#include <KDBusService>
#include <KLocalizedString>
#include <KWindowSystem>
@ -30,6 +31,8 @@ int main(int argc, char **argv)
i18n("(C) 2018-2020 Nicolas Fella"));
KAboutData::setApplicationData(about);
KCrash::initialize();
QCommandLineParser parser;
parser.addOption(QCommandLineOption(QStringLiteral("args"), i18n("Arguments for the config module"), QStringLiteral("args")));

View file

@ -67,6 +67,7 @@ target_link_libraries(kdeconnect-sms PRIVATE
KF6::I18n
KF6::People
KF6::KCMUtils
KF6::Crash
)
install(TARGETS kdeconnect-sms ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})

View file

@ -13,6 +13,7 @@
#include <KAboutData>
#include <KColorSchemeManager>
#include <KCrash>
#include <KDBusService>
#include <KLocalizedContext>
#include <KLocalizedString>
@ -57,6 +58,8 @@ int main(int argc, char *argv[])
aboutData.setBugAddress(QStringLiteral("https://bugs.kde.org/enter_bug.cgi?product=kdeconnect&component=messaging-application").toUtf8());
KAboutData::setApplicationData(aboutData);
KCrash::initialize();
#ifdef Q_OS_WIN
KColorSchemeManager manager;
QApplication::setStyle(QStringLiteral("breeze"));

View file

@ -16,7 +16,7 @@ target_link_libraries(kdeconnect-handler
KF6::ConfigWidgets
KF6::DBusAddons
KF6::I18n
KF6::KIOCore KF6::KIOFileWidgets KF6::KIOWidgets
KF6::KIOCore KF6::KIOFileWidgets KF6::KIOWidgets KF6::Crash
)
install(TARGETS kdeconnect-handler ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})

View file

@ -17,6 +17,7 @@
#include <KAboutData>
#include <KColorSchemeManager>
#include <KCrash>
#include <KDBusService>
#include <KLocalizedString>
#include <KUrlRequester>
@ -48,6 +49,9 @@ int main(int argc, char **argv)
about.addAuthor(QStringLiteral("Aleix Pol Gonzalez"), QString(), QStringLiteral("aleixpol@kde.org"));
about.setProgramLogo(QIcon(QStringLiteral(":/icons/kdeconnect/kdeconnect.svg")));
KAboutData::setApplicationData(about);
KCrash::initialize();
KDBusService dbusService(KDBusService::Unique);
#ifdef Q_OS_WIN