1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
From 57df81cd8a11c4dbe170f9d81abd5b35b4887e0b Mon Sep 17 00:00:00 2001
From: Ahmad Samir <a.samirh78@gmail.com>
Date: Fri, 17 Apr 2020 13:14:26 +0200
Subject: Adapt the code to KBookmarkMenu-5.69 changes
Test Plan:
Bookmarks menu still works, and the bookmark actions still show in the
shortcuts editor dialog.
Reviewers: #konversation, psn
Reviewed By: #konversation, psn
Subscribers: #konversation
Differential Revision: https://phabricator.kde.org/D28911
---
src/bookmarkhandler.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/bookmarkhandler.cpp b/src/bookmarkhandler.cpp
index 5a70591..74b51ff 100644
--- a/src/bookmarkhandler.cpp
+++ b/src/bookmarkhandler.cpp
@@ -21,7 +21,10 @@ Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
#include "connectionmanager.h"
#include "viewer/viewcontainer.h"
+#include <KActionCollection>
+#include <kbookmarks_version.h>
#include <KBookmarkMenu>
+#include <QMenu>
#include <QStandardPaths>
@@ -41,7 +44,12 @@ m_mainWindow(mainWindow)
manager->setEditorOptions(i18n("Konversation Bookmarks Editor"), false);
manager->setUpdate( true );
+#if KBOOKMARKS_VERSION < QT_VERSION_CHECK(5, 69, 0)
m_bookmarkMenu = new KBookmarkMenu(manager, this, menu, m_mainWindow->actionCollection());
+#else
+ m_bookmarkMenu = new KBookmarkMenu(manager, this, menu);
+ m_mainWindow->actionCollection()->addActions(menu->actions());
+#endif
}
KonviBookmarkHandler::~KonviBookmarkHandler()
--
cgit v1.1
|