From 74d7b3dcfc9c879a04e6d03a1d9ed8ea363d6d2d Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Dec 15 2014 15:18:35 +0000 Subject: pull in fix for crash-on-close regression (kde#341187) --- diff --git a/0001-Stop-crashing-on-exit-when-being-used-solely-as-a-KP.patch b/0001-Stop-crashing-on-exit-when-being-used-solely-as-a-KP.patch new file mode 100644 index 0000000..f8b61d1 --- /dev/null +++ b/0001-Stop-crashing-on-exit-when-being-used-solely-as-a-KP.patch @@ -0,0 +1,81 @@ +From cd8ad2761d41d1ec0a18cff7f4d166b53c899fc2 Mon Sep 17 00:00:00 2001 +From: Raphael Kubo da Costa +Date: Mon, 24 Nov 2014 01:37:06 +0200 +Subject: [PATCH] Stop crashing on exit when being used solely as a KPart. + +This change fixes a crash introduced by commit 3b981ca ("Remove Part +from KXMLGUIFactory on exit"). + +Part::~Part() is the wrong place to call KXMLGUIFactory::removeClient(), +as it assumes addClient() had been called in the first place. + +This is only true if Ark is called as a standalone program, since that +is done in MainWindow::loadPart()'s call to KXMLGuiWindow::createGUI(). + +Conversely, if the Ark KPart is being used as an embedded viewer in, +say, Konqueror or to preview an archive inside an archive (ie. Ark +inside Ark) that does not hold true and we try to access a +KXMLGUIFactory that does not exist. + +Instead, call KXMLGuiWindow::removeClient() in MainWindow's destructor, +since in this case we are certain that addClient() was been called +before. + +CCBUG: 341187 + +(cherry picked from commit 9c30f30b38c36a31e6fcb3aa047a0247ac5a22fb) +This was committed for completeness, as there will be no additional +releases from the KDE/4.14 branch. + +Conflicts: + part/part.cpp +--- + app/mainwindow.cpp | 3 +++ + part/part.cpp | 3 --- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp +index aee8231..181fe76 100644 +--- a/app/mainwindow.cpp ++++ b/app/mainwindow.cpp +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -69,6 +70,8 @@ MainWindow::~MainWindow() + if (m_recentFilesAction) { + m_recentFilesAction->saveEntries(KGlobal::config()->group("Recent Files")); + } ++ ++ guiFactory()->removeClient(m_part); + delete m_part; + m_part = 0; + } +diff --git a/part/part.cpp b/part/part.cpp +index bae4882..09fe1cb 100644 +--- a/part/part.cpp ++++ b/part/part.cpp +@@ -53,7 +53,6 @@ + #include + #include + #include +-#include + + #include + #include +@@ -138,8 +137,6 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList& args) + + Part::~Part() + { +- factory()->removeClient(this); +- + saveSplitterSizes(); + + m_extractFilesAction->menu()->deleteLater(); +-- +1.9.3 + diff --git a/ark.spec b/ark.spec index 794e1f9..0f448c4 100644 --- a/ark.spec +++ b/ark.spec @@ -5,7 +5,7 @@ Name: ark Summary: Archive manager Version: 4.14.3 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: http://utils.kde.org/projects/ark @@ -26,6 +26,7 @@ Patch53: ark-4.9.97-improve_subfolder_autodetection.patch Patch54: ark-unar-06.patch ## upstream patches +Patch101: 0001-Stop-crashing-on-exit-when-being-used-solely-as-a-KP.patch BuildRequires: bzip2-devel BuildRequires: desktop-file-utils @@ -86,6 +87,7 @@ Provides: kdeutils-ark-libs = 6:%{version}-%{release} %patch50 -p1 -b .namelink_skip %patch53 -p1 -b .improve_subfolder_autodetection %patch54 -p1 -b .unar-06 +%patch101 -p1 -b .0001 %build @@ -147,6 +149,9 @@ fi %changelog +* Mon Dec 15 2014 Rex Dieter 4.14.3-3 +- pull in fix for crash-on-close regression (kde#341187) + * Tue Nov 18 2014 Rex Dieter 4.14.3-2 - omit KXMLGUIClient patch, it was fixed differently upstream (kde#340991)