D12303: Fix handling of cut collections.

David Faure noreply at phabricator.kde.org
Wed Apr 18 08:47:30 BST 2018


dfaure created this revision.
dfaure added reviewers: mlaurent, dvratil.
Restricted Application added a project: KDE PIM.
dfaure requested review of this revision.

REVISION SUMMARY
  For many years I would randomly see one of my email folders become
  unselectable, often my inbox, for no apparent reason. And if it was
  actually selected when this happened, then switching to another folder
  would select both (not being able to unselect the now-unselectable one),
  showing the merged view in the messagelist.
  Only apparent solution was a kmail restart.
  I finally found what triggered all this: Ctrl+X !
  Cut collections were marked as selectable, but not enabled, which
  effectively made them unselectable.
  
  New solution: leaving flags untouched in the model, and simply changing
  the text color in the delegate, for cut collections.
  This makes cut collections still fully work, just like you can fully
  interact with cut files in a file manager.
  
  I wonder if we want to do the same with cut items, but I'm not sure where
  the delegate(s) are, and how to catch them all. The risk of accidentally
  cutting is much lower with items anyway (Ctrl+Alt+X).
  Also, this code came from the fix for bug 213466, which was about items
  in the first place (not collections).

TEST PLAN
  click on email folder, Ctrl+X. Try it, it's fun.

REPOSITORY
  R165 Akonadi

BRANCH
  Applications/18.04

REVISION DETAIL
  https://phabricator.kde.org/D12303

AFFECTED FILES
  src/core/models/entitytreemodel.cpp
  src/core/models/entitytreemodel.h
  src/widgets/collectionstatisticsdelegate.cpp

To: dfaure, mlaurent, dvratil
Cc: #kde_pim, dvasin, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20180418/c4822e2d/attachment.html>


More information about the kde-pim mailing list