public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/kig] epel10: Backport upstream patch for crash on startup (kde#469962, #2209374).
@ 2026-08-04 19:45 Kevin Kofler
  0 siblings, 0 replies; only message in thread
From: Kevin Kofler @ 2026-08-04 19:45 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/kig
            Branch : epel10
            Commit : 886a10d0ba5610b993baa9d5e55016b09ae1ccd6
            Author : Kevin Kofler <Kevin@tigcc.ticalc.org>
            Date   : 2023-05-23T23:53:11+02:00
            Stats  : +71/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/kig/c/886a10d0ba5610b993baa9d5e55016b09ae1ccd6?branch=epel10

            Log:
            Backport upstream patch for crash on startup (kde#469962, #2209374).

* Tue May 23 2023 Kevin Kofler <Kevin@tigcc.ticalc.org> - 23.04.1-2
- backport upstream patch for crash on startup (kde#469962, #2209374)

---
diff --git a/kig-23.04.1-kde#469962-rh#2209374.patch b/kig-23.04.1-kde#469962-rh#2209374.patch
new file mode 100644
index 0000000..bae1bd5
--- /dev/null
+++ b/kig-23.04.1-kde#469962-rh#2209374.patch
@@ -0,0 +1,57 @@
+From bca478c18b1a64f96c63cbe87111c79155bf7eb5 Mon Sep 17 00:00:00 2001
+From: Nicolas Fella <nicolas.fella@gmx.de>
+Date: Thu, 18 May 2023 21:06:42 +0200
+Subject: [PATCH] Fix loading kig part
+
+c1f566d4790c33055fa42b60ae2b00728ba1a271 changed the part to embed JSON metadata
+
+That doesn't work with the legacy KService-based part loading, so use the proper way
+
+BUG: 469962
+(cherry picked from commit 8cabd8421629520ce4e7f0060684c01982ff45fe)
+---
+ kig/kig.cpp | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/kig/kig.cpp b/kig/kig.cpp
+index 8d686909..0f79e3c9 100644
+--- a/kig/kig.cpp
++++ b/kig/kig.cpp
+@@ -21,8 +21,8 @@
+ #include <KEditToolBar>
+ #include <KLocalizedString>
+ #include <KMessageBox>
++#include <KPluginFactory>
+ #include <KRecentFilesAction>
+-#include <KService>
+ #include <KSharedConfig>
+ #include <KStandardAction>
+ #include <KTipDialog>
+@@ -33,8 +33,6 @@ Kig::Kig()
+     : KParts::MainWindow()
+     , m_part(nullptr)
+ {
+-    KService::Ptr kigpartService = KService::serviceByDesktopName(QStringLiteral("kig_part"));
+-
+     setObjectName(QStringLiteral("Kig"));
+     // setting the configuration file
+     config = new KConfig(QStringLiteral("kigrc"));
+@@ -43,9 +41,12 @@ Kig::Kig()
+     // then, setup our actions
+     setupActions();
+ 
+-    if (kigpartService) {
+-        m_part = kigpartService->createInstance<KParts::ReadWritePart>(this);
+-        m_mimeTypes = kigpartService->mimeTypes();
++    const KPluginMetaData partMetaData(QLatin1String("kf") + QT_STRINGIFY(QT_VERSION_MAJOR) + QLatin1String("/parts/kigpart"));
++    const auto result = KPluginFactory::instantiatePlugin<KParts::ReadWritePart>(partMetaData, this);
++
++    if (result) {
++        m_part = result.plugin;
++        m_mimeTypes = partMetaData.mimeTypes();
+         if (m_part) {
+             // tell the KParts::MainWindow that this is indeed the main widget
+             setCentralWidget(m_part->widget());
+-- 
+GitLab
+

diff --git a/kig.spec b/kig.spec
index 4724633..e4d1f22 100644
--- a/kig.spec
+++ b/kig.spec
@@ -4,7 +4,7 @@
 Name:    kig
 Summary: Interactive Geometry 
 Version: 23.04.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 License: GPLv2+
 URL:     https://invent.kde.org/education/%{name}
@@ -23,6 +23,15 @@ Source0: http://download.kde.org/%{stable}/release-service/%{version}/src/%{name
 # https://git.reviewboard.kde.org/r/126549/
 Patch1: 0001-explicitly-use-QLibrary-to-load-libpython-like-pykde.patch
 
+## upstream patches
+# from release/23.04, should be upstream in 23.04.2:
+# https://bugs.kde.org/show_bug.cgi?id=469962
+# https://bugzilla.redhat.com/show_bug.cgi?id=2209374
+# https://invent.kde.org/education/kig/-/commit/bca478c18b1a64f96c63cbe87111c79155bf7eb5
+# fix loading Kig part (crash on startup, kde#469962, #2209374)
+# upstream patch by Nicolas Fella, backported to 23.04 by Albert Astals Cid
+Patch100: kig-23.04.1-kde#469962-rh#2209374.patch
+
 BuildRequires: boost-devel
 BuildRequires: python3
 BuildRequires: python3-rpm-macros
@@ -63,6 +72,7 @@ Conflicts: kdeedu-math < 4.7.0-10
 %setup  -q
 
 %patch1 -p1 -b .0001
+%patch100 -p1 -b .#2209374
 
 sed -ie "s|^#!/usr/bin/env python3$|#!%{__python3}|" pykig/pykig.py
 
@@ -113,6 +123,9 @@ desktop-file-validate %{buildroot}%{_kf5_datadir}/applications/org.kde.%{name}.d
 
 
 %changelog
+* Tue May 23 2023 Kevin Kofler <Kevin@tigcc.ticalc.org> - 23.04.1-2
+- backport upstream patch for crash on startup (kde#469962, #2209374)
+
 * Sat May 13 2023 Marc Deop i Argemí <marcdeop@fedoraproject.org> - 23.04.1-1
 - 23.04.1
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-04 19:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-04 19:45 [rpms/kig] epel10: Backport upstream patch for crash on startup (kde#469962, #2209374) Kevin Kofler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox