Skip to content
  • Igor Poboiko's avatar
    [Akonadi/PasteHelper] Add support for items linking · 8f174824
    Igor Poboiko authored
    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
    
    Reviewers: dvratil
    
    Reviewed By: dvratil
    
    Subscribers: kde-pim
    
    Tags: #kde_pim
    
    Differential Revision: https://phabricator.kde.org/D28432
    8f174824