From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/kjots/, app-text/kjots/files/
Date: Tue, 21 Apr 2020 14:41:05 +0000 (UTC) [thread overview]
Message-ID: <1587480052.ddbdc7ce709c3f8af620e8d06f5847cbe73ec50e.asturm@gentoo> (raw)
commit: ddbdc7ce709c3f8af620e8d06f5847cbe73ec50e
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 21 14:33:22 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Apr 21 14:40:52 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddbdc7ce
app-text/kjots: Adapt the code to >=kde-frameworks/kbookmarks-5.69
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=384000
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/kjots-5.0.2-kf5bookmarks-5.69.patch | 67 ++++++++++++++++++++++
app-text/kjots/kjots-5.0.2-r1.ebuild | 49 ++++++++++++++++
2 files changed, 116 insertions(+)
diff --git a/app-text/kjots/files/kjots-5.0.2-kf5bookmarks-5.69.patch b/app-text/kjots/files/kjots-5.0.2-kf5bookmarks-5.69.patch
new file mode 100644
index 00000000000..63bda683122
--- /dev/null
+++ b/app-text/kjots/files/kjots-5.0.2-kf5bookmarks-5.69.patch
@@ -0,0 +1,67 @@
+From ca6f4b963e83ed91cc7314e1b60fe6607b61b53e Mon Sep 17 00:00:00 2001
+From: Igor Poboiko <igor.poboiko@gmail.com>
+Date: Sun, 12 Apr 2020 17:55:24 +0300
+Subject: [KJots] Fix bookmarks actions
+
+Summary:
+This patch ports KJots from deprecated `KBookmarksMenu` API (see {D25660}).
+
+On my machine, it also fixes a crash (`bm_action` was null for some reason,
+I did not investigate it though).
+
+It also fixes the shortcuts collision (`action->setShortcut` was not enough,
+one also needs to run `actionCollection->setDefaultShortcut`).
+
+BUG: 384000
+
+Test Plan:
+1) Start KJots
+2) It don't crash, and `Ambiguous shortcuts` dialog does not appear)
+3) Open `Bookmarks` menu, the shortcut is `Ctrl+Shift+B`.
+
+Reviewers: dvratil
+
+Reviewed By: dvratil
+
+Subscribers: winterz, kde-pim
+
+Tags: #kde_pim
+
+Differential Revision: https://phabricator.kde.org/D28775
+---
+ src/kjotswidget.cpp | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/src/kjotswidget.cpp b/src/kjotswidget.cpp
+index 865129b..e343bbd 100644
+--- a/src/kjotswidget.cpp
++++ b/src/kjotswidget.cpp
+@@ -353,17 +353,20 @@ KJotsWidget::KJotsWidget(QWidget *parent, KXMLGUIClient *xmlGuiClient, Qt::Windo
+ bookmarkMenu = actionCollection->add<KActionMenu>(QLatin1String("bookmarks"));
+ bookmarkMenu->setText(i18n("&Bookmarks"));
+ KJotsBookmarks *bookmarks = new KJotsBookmarks(treeview);
+- /*KBookmarkMenu *bmm =*/ new KBookmarkMenu(
++ KBookmarkMenu *bmm = new KBookmarkMenu(
+ KBookmarkManager::managerForFile(
+ QStandardPaths::standardLocations(QStandardPaths::AppDataLocation).first() + QStringLiteral("/kjots/bookmarks.xml"),
+ QStringLiteral("kjots")),
+- bookmarks, bookmarkMenu->menu(), actionCollection);
++ bookmarks, bookmarkMenu->menu());
+
+ // "Add bookmark" and "make text bold" actions have conflicting shortcuts (ctrl + b)
+ // Make add_bookmark use ctrl+shift+b to resolve that.
+- QAction *bm_action = qobject_cast<QAction *>(actionCollection->action(QLatin1String("add_bookmark")));
+- Q_ASSERT(bm_action);
+- bm_action->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_B);
++ QAction *bm_action = bmm->addBookmarkAction();
++ actionCollection->addAction(QStringLiteral("add_bookmark"), bm_action);
++ actionCollection->setDefaultShortcut(bm_action, Qt::CTRL | Qt::SHIFT | Qt::Key_B);
++ actionCollection->addAction(QStringLiteral("edit_bookmark"), bmm->editBookmarksAction());
++ actionCollection->addAction(QStringLiteral("add_bookmarks_list"), bmm->bookmarkTabsAsFolderAction());
++
+
+ KStandardAction::find(this, SLOT(onShowSearch()), actionCollection);
+ action = KStandardAction::findNext(this, SLOT(onRepeatSearch()), actionCollection);
+--
+cgit v1.1
+
diff --git a/app-text/kjots/kjots-5.0.2-r1.ebuild b/app-text/kjots/kjots-5.0.2-r1.ebuild
new file mode 100644
index 00000000000..841544075ce
--- /dev/null
+++ b/app-text/kjots/kjots-5.0.2-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+KFMIN=5.60.0
+QTMIN=5.12.3
+inherit ecm kde.org
+
+DESCRIPTION="Note taking utility by KDE"
+HOMEPAGE="https://userbase.kde.org/KJots https://community.kde.org/PIM/KJots"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="5"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# drop kbookmarks subslot operator when KFMIN >= 5.69.0
+DEPEND="
+ dev-libs/grantlee:5
+ dev-libs/libxslt
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtprintsupport-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-apps/akonadi-19.04.3:5
+ >=kde-apps/akonadi-notes-19.04.3:5
+ >=kde-apps/kmime-19.04.3:5
+ >=kde-apps/kontactinterface-19.04.3:5
+ >=kde-apps/kpimtextedit-19.04.3:5
+ >=kde-frameworks/kbookmarks-${KFMIN}:5=
+ >=kde-frameworks/kcmutils-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/kitemmodels-${KFMIN}:5
+ >=kde-frameworks/kparts-${KFMIN}:5
+ >=kde-frameworks/ktextwidgets-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+"
+RDEPEND="${DEPEND}
+ !app-text/kjots:4
+"
+
+PATCHES=( "${FILESDIR}/${P}-kf5bookmarks-5.69.patch" ) # KDE-Bug 384000
next reply other threads:[~2020-04-21 14:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 14:41 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-09-20 8:42 [gentoo-commits] repo/gentoo:master commit in: app-text/kjots/, app-text/kjots/files/ Andreas Sturmlechner
2022-03-20 13:53 Andreas Sturmlechner
2022-05-09 0:34 Andreas Sturmlechner
2022-08-28 13:05 Andreas Sturmlechner
2023-04-30 14:04 Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1587480052.ddbdc7ce709c3f8af620e8d06f5847cbe73ec50e.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox