SHA256
1
0
forked from pool/kbookmarks
kbookmarks/Always-create-actioncollection.patch
Fabian Vogt 4dccb53e00 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
2020-04-20 09:59:15 +00:00

46 lines
1.4 KiB
Diff

From 4b3fc2aedd86505a47b9b185e086ef253e73ede8 Mon Sep 17 00:00:00 2001
From: Nicolas Fella <nicolas.fella@gmx.de>
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