summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-06-19 22:36:00 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2021-06-20 10:32:53 +0200
commit75651b0d83a785d1cb8411d36317b0452cb1144b (patch)
tree70dce5258da3b9fc082908e636fb40673b9cb490 /media-gfx/krita/files
parentsci-astronomy/kstars: Drop 3.5.1 (diff)
downloadgentoo-75651b0d83a785d1cb8411d36317b0452cb1144b.tar.gz
gentoo-75651b0d83a785d1cb8411d36317b0452cb1144b.tar.bz2
gentoo-75651b0d83a785d1cb8411d36317b0452cb1144b.zip
media-gfx/krita: 4.4.5 version bump
Introduce dev-python/sip slot op Restrict to =media-libs/opencolorio-1* Bug: https://bugs.gentoo.org/793887 Bug: https://bugs.gentoo.org/795786 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-gfx/krita/files')
-rw-r--r--media-gfx/krita/files/krita-4.4.5-pykrita-crash-on-exit.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/media-gfx/krita/files/krita-4.4.5-pykrita-crash-on-exit.patch b/media-gfx/krita/files/krita-4.4.5-pykrita-crash-on-exit.patch
new file mode 100644
index 000000000000..1939c962815e
--- /dev/null
+++ b/media-gfx/krita/files/krita-4.4.5-pykrita-crash-on-exit.patch
@@ -0,0 +1,55 @@
+From a0c29913114164ff3f2ba4e255ccee1c52cb3e86 Mon Sep 17 00:00:00 2001
+From: Alvin Wong <alvin@alvinhc.com>
+Date: Sat, 19 Jun 2021 16:29:45 +0800
+Subject: [PATCH] Fix PyKrita cleanup using qApp::aboutToQuit to prevent crash
+
+Suspecting that we can't have Python clean up its QObject's inside
+QCoreApplication's destructor, but must be done before it.
+
+BUG: 417465
+
+* asturm 2021-06-20: mangled w/ a6296beb25c98d9a4b5a136e0088959bf51d550a
+---
+ plugins/extensions/pykrita/plugin/plugin.cpp | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/plugins/extensions/pykrita/plugin/plugin.cpp b/plugins/extensions/pykrita/plugin/plugin.cpp
+index ef0e27eb65..66f552b007 100644
+--- a/plugins/extensions/pykrita/plugin/plugin.cpp
++++ b/plugins/extensions/pykrita/plugin/plugin.cpp
+@@ -13,6 +13,8 @@
+ #include <kis_preference_set_registry.h>
+ #include "pyqtpluginsettings.h"
+
++#include <QCoreApplication>
++
+ #include <Krita.h>
+
+ K_PLUGIN_FACTORY_WITH_JSON(KritaPyQtPluginFactory, "kritapykrita.json", registerPlugin<KritaPyQtPlugin>();)
+@@ -74,15 +76,18 @@ KritaPyQtPlugin::KritaPyQtPlugin(QObject *parent, const QVariantList &)
+ Q_FOREACH (Extension *extension, Krita::instance()->extensions()) {
+ extension->setup();
+ }
++
++ // This ensures that QObject's owned by Python are destructed before
++ // the destructor of QCoreApplication is called, in order to prevent
++ // a crash on exit.
++ // See https://bugs.kde.org/show_bug.cgi?id=417465
++ connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, this, []() { PyKrita::finalize(); });
+ }
+
+ KritaPyQtPlugin::~KritaPyQtPlugin()
+ {
+- // XXX: With Qt 5.14, this crashes Krita on exit. See https://bugs.kde.org/show_bug.cgi?id=417465
+- // So, for now, we just don't call finalize...
+-#if QT_VERSION < QT_VERSION_CHECK(5,14,0)
+- PyKrita::finalize();
+-#endif
++ // Don't call PyKrita::finalize here, because that can result in a crash
++ // deep inside Qt.
+ }
+
+ #include "plugin.moc"
+--
+GitLab
+