diff --git a/D16183.diff b/D16183.diff new file mode 100644 index 0000000..b2da131 --- /dev/null +++ b/D16183.diff @@ -0,0 +1,16 @@ +diff --git a/src/kcrash.cpp b/src/kcrash.cpp +--- a/src/kcrash.cpp ++++ b/src/kcrash.cpp +@@ -135,7 +135,10 @@ + qCDebug(LOG_KCRASH) << "KCrash disabled through environment."; + } + +- KCrash::setApplicationFilePath(QCoreApplication::applicationFilePath()); ++ if (QCoreApplication::instance()) ++ KCrash::setApplicationFilePath(QCoreApplication::applicationFilePath()); ++ else ++ qWarning() << "This process needs a QCoreApplication instance in order to use KCrash"; + + s_coreConfig(); // Initialize. + } + diff --git a/kf5-kcrash.spec b/kf5-kcrash.spec index 1c1d8f7..01136ca 100755 --- a/kf5-kcrash.spec +++ b/kf5-kcrash.spec @@ -2,7 +2,7 @@ Name: kf5-%{framework} Version: 5.51.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: KDE Frameworks 5 Tier 2 addon for handling application crashes License: LGPLv2+ @@ -17,6 +17,10 @@ URL: https://cgit.kde.org/%{framework}.git %endif Source0: http://download.kde.org/%{stable}/frameworks/%{majmin}/%{framework}-%{version}.tar.xz +## upstream patches +# https://phabricator.kde.org/D16183 +Patch1: https://phabricator.kde.org/file/data/tyfruhevy6a3jhg5ns7p/PHID-FILE-6lgblwlrp6pq6ziqhjjc/D16183.diff + BuildRequires: extra-cmake-modules >= %{majmin} BuildRequires: kf5-kcoreaddons-devel >= %{majmin} BuildRequires: kf5-kwindowsystem-devel >= %{majmin} @@ -40,7 +44,7 @@ developing applications that use %{name}. %prep -%autosetup -n %{framework}-%{version} +%autosetup -n %{framework}-%{version} -p1 %build @@ -74,6 +78,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %changelog +* Sun Oct 14 2018 Rex Dieter - 5.51.0-2 +- KCrash: fix crash when used in an app without QCoreApplication + * Wed Oct 10 2018 Rex Dieter - 5.51.0-1 - 5.51.0