D28432: [Akonadi/PasteHelper] Add support for items linking
Igor Poboiko
noreply at phabricator.kde.org
Mon Mar 30 13:31:04 BST 2020
poboiko created this revision.
poboiko added a reviewer: dvratil.
Herald added a project: KDE PIM.
poboiko requested review of this revision.
REVISION SUMMARY
When linking an item to a virtual collection via KAddressBook, `canPaste` check
fails because it's not aware of the context (i.e. action is `Link`, not `Copy`)
and checks only for `CanCreateItem` (which is not correct if we're linking).
This patch provides `Qt::DropAction action` parameter to `canPaste` method so
it is aware of action, and check for correct permissions based on that
TEST PLAN
1. Link an item via KAddressBook using Drag'n'Drop to some virtual collection
(e.g. Google Contacts Resource)
2. The item gets actually linked, instead of silently ignoring
REPOSITORY
R165 Akonadi
BRANCH
akonadi-paste-linking (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D28432
AFFECTED FILES
src/core/models/collectionmodel.cpp
src/core/models/itemmodel.cpp
src/core/pastehelper.cpp
src/core/pastehelper_p.h
src/widgets/actionstatemanager.cpp
To: poboiko, dvratil
Cc: kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200330/cbadcbfb/attachment-0001.html>
More information about the kde-pim
mailing list