- Add patch to fix kio_help crashing on start:

* 0001-kio_help-Fix-crash-in-QCoreApplication-when-accessin.patch

OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kio?expand=0&rev=237
This commit is contained in:
Fabian Vogt 2018-10-18 14:41:30 +00:00 committed by Git OBS Bridge
parent 8015cc35fa
commit 9429fa4bee
3 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,45 @@
From cf3b0d102855a4a90db3fb65a99e0009fcdd3755 Mon Sep 17 00:00:00 2001
From: Michael Pyne <mpyne@kde.org>
Date: Sat, 13 Oct 2018 19:09:50 -0400
Subject: [PATCH] kio_help: Fix crash in QCoreApplication when accessing
help://.
A recent commit d428fc8e6447ede81f1e1911d0b66b39265672f3 removed old
custom crash handling code in favor of KCrash. But this actually adds a
dependency on there being a valid QCoreApplication object.
I took from the example of the similar kio_file to simply create the
QCoreApplication here.
BUG:399709
Differential Revision: https://phabricator.kde.org/D16189
---
src/ioslaves/help/main.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/ioslaves/help/main.cpp b/src/ioslaves/help/main.cpp
index f09987aa..f800a9d0 100644
--- a/src/ioslaves/help/main.cpp
+++ b/src/ioslaves/help/main.cpp
@@ -10,6 +10,7 @@ extern "C" int xmlLoadExtDtdDefaultValue;
#include <QDebug>
+#include <QCoreApplication>
#include <QString>
#include <stdlib.h>
@@ -40,6 +41,9 @@ extern "C"
{
Q_DECL_EXPORT int kdemain(int argc, char **argv)
{
+ QCoreApplication app(argc, argv); // needed for KCrash
+ app.setApplicationName(QStringLiteral("kio_help"));
+
KDocTools::setupStandardDirs();
//qDebug() << "Starting " << getpid();
--
2.19.0

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Oct 18 14:40:57 UTC 2018 - Fabian Vogt <fabian@ritter-vogt.de>
- Add patch to fix kio_help crashing on start:
* 0001-kio_help-Fix-crash-in-QCoreApplication-when-accessin.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Oct 16 08:02:19 UTC 2018 - Luca Beltrame <lbeltrame@kde.org> Tue Oct 16 08:02:19 UTC 2018 - Luca Beltrame <lbeltrame@kde.org>

View File

@ -33,6 +33,8 @@ Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%
Source1: baselibs.conf Source1: baselibs.conf
# PATCH-FIX-OPENSUSE kio_help-fallback-to-kde4-docs.patch -- allow kio_help to see into kde4 documentation, needed especially for khelpcenter5 # PATCH-FIX-OPENSUSE kio_help-fallback-to-kde4-docs.patch -- allow kio_help to see into kde4 documentation, needed especially for khelpcenter5
Patch0: kio_help-fallback-to-kde4-docs.patch Patch0: kio_help-fallback-to-kde4-docs.patch
# PATCH-FIX-UPSTREAM
Patch1: 0001-kio_help-Fix-crash-in-QCoreApplication-when-accessin.patch
BuildRequires: cmake >= 3.0 BuildRequires: cmake >= 3.0
BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version} BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version}
BuildRequires: fdupes BuildRequires: fdupes