Hello community, here is the log from the commit of package kjots for openSUSE:Factory checked in at 2020-04-22 20:59:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kjots (Old) and /work/SRC/openSUSE:Factory/.kjots.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kjots" Wed Apr 22 20:59:29 2020 rev:8 rq:796312 version:5.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/kjots/kjots.changes 2016-12-26 21:43:42.613978143 +0100 +++ /work/SRC/openSUSE:Factory/.kjots.new.2738/kjots.changes 2020-04-22 20:59:32.340167340 +0200 @@ -1,0 +2,6 @@ +Mon Apr 20 11:08:57 UTC 2020 - wba...@tmo.at + +- Add Fix-bookmarks-actions.patch to fix "Ambiguous shortcuts" + warning and a possible crash on start (kde#384000) + +------------------------------------------------------------------- New: ---- Fix-bookmarks-actions.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kjots.spec ++++++ --- /var/tmp/diff_new_pack.488i4y/_old 2020-04-22 20:59:33.644169936 +0200 +++ /var/tmp/diff_new_pack.488i4y/_new 2020-04-22 20:59:33.648169944 +0200 @@ -1,7 +1,7 @@ # # spec file for package kjots # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -20,10 +20,12 @@ Version: 5.0.2 Release: 0 Summary: A note taking application for KDE using Akonadi -License: GPL-2.0 and LGPL-2.1+ +License: GPL-2.0-only AND LGPL-2.1-or-later Group: System/GUI/KDE -Url: http://www.kde.org +URL: http://www.kde.org Source0: http://download.kde.org/stable/kjots/%{version}/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM +Patch0: Fix-bookmarks-actions.patch BuildRequires: akonadi-server-devel BuildRequires: extra-cmake-modules BuildRequires: grantlee5-devel @@ -53,6 +55,7 @@ %prep %setup -q +%autopatch -p1 %build %cmake_kf5 -d build ++++++ Fix-bookmarks-actions.patch ++++++ >From ca6f4b963e83ed91cc7314e1b60fe6607b61b53e Mon Sep 17 00:00:00 2001 From: Igor Poboiko <igor.pobo...@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