From 4dccb53e00af59d78d1d07b05064ca6c7844206f1f1056a078026d8b58e4ca5b Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Mon, 20 Apr 2020 09:59:15 +0000 Subject: [PATCH] Accepting request 795743 from home:wolfi323:test - Add Always-create-actioncollection.patch to fix crash in Konqueror when going to a subfolder in the bookmarks menu (boo#1169838) OBS-URL: https://build.opensuse.org/request/show/795743 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kbookmarks?expand=0&rev=199 --- Always-create-actioncollection.patch | 45 ++++++++++++++++++++++++++++ kbookmarks.changes | 7 +++++ kbookmarks.spec | 3 ++ 3 files changed, 55 insertions(+) create mode 100644 Always-create-actioncollection.patch diff --git a/Always-create-actioncollection.patch b/Always-create-actioncollection.patch new file mode 100644 index 0000000..76bb75a --- /dev/null +++ b/Always-create-actioncollection.patch @@ -0,0 +1,45 @@ +From 4b3fc2aedd86505a47b9b185e086ef253e73ede8 Mon Sep 17 00:00:00 2001 +From: Nicolas Fella +Date: Mon, 13 Apr 2020 19:14:56 +0200 +Subject: Always create actioncollection + +Summary: Otherwise subclasses that unconditionally use m_actionCollection will get crashes. Observed in D28789 + +Reviewers: #frameworks, dfaure, stefanocrocco + +Reviewed By: dfaure + +Subscribers: kde-frameworks-devel + +Tags: #frameworks + +Differential Revision: https://phabricator.kde.org/D28800 +--- + src/kbookmarkmenu.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/kbookmarkmenu.cpp b/src/kbookmarkmenu.cpp +index 34720ba..56a4359 100644 +--- a/src/kbookmarkmenu.cpp ++++ b/src/kbookmarkmenu.cpp +@@ -72,7 +72,7 @@ KBookmarkMenu::KBookmarkMenu(KBookmarkManager *mgr, + + KBookmarkMenu::KBookmarkMenu(KBookmarkManager* manager, KBookmarkOwner* _owner, QMenu* _parentMenu) + : QObject(), +- m_actionCollection(nullptr), ++ m_actionCollection(new KActionCollection(this)), + d(new KBookmarkMenuPrivate()), + m_bIsRoot(true), + m_pManager(manager), +@@ -124,7 +124,7 @@ KBookmarkMenu::KBookmarkMenu(KBookmarkManager *mgr, + QMenu *_parentMenu, + const QString &parentAddress) + : QObject(), +- m_actionCollection(nullptr), ++ m_actionCollection(new KActionCollection(this)), + d(new KBookmarkMenuPrivate()), + m_bIsRoot(false), + m_pManager(mgr), +-- +cgit v1.1 + diff --git a/kbookmarks.changes b/kbookmarks.changes index e849c0b..d150703 100644 --- a/kbookmarks.changes +++ b/kbookmarks.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Apr 20 09:19:16 UTC 2020 - Wolfgang Bauer + +- Add Always-create-actioncollection.patch to fix crash in + Konqueror when going to a subfolder in the bookmarks menu + (boo#1169838) + ------------------------------------------------------------------- Sun Apr 5 19:45:20 UTC 2020 - Christophe Giboudeaux diff --git a/kbookmarks.spec b/kbookmarks.spec index 10da710..f1f214d 100644 --- a/kbookmarks.spec +++ b/kbookmarks.spec @@ -36,6 +36,8 @@ Source1: https://download.kde.org/stable/frameworks/%{_tar_path}/%{name}- Source2: frameworks.keyring %endif Source99: baselibs.conf +# PATCH-FIX-UPSTREAM +Patch: Always-create-actioncollection.patch BuildRequires: cmake >= 3.5 BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version} BuildRequires: fdupes @@ -83,6 +85,7 @@ manipulating bookmarks using the XBEL format %prep %setup -q +%autopatch -p1 %build %cmake_kf5 -d build