EntityOrderProxyModel: support adding a favorite at a specific position
ClosedPublic

Authored by dfaure on Dec 19 2017, 10:24 PM.

Details

Summary

If EntityTreeModel::modelIndexForCollection() doesn't find the
collection we're dropping, then insert it first (via the base class
dropMimeData) and then look for it again, to handle it as a move.

I hope this doesn't affect other EOPM users than the favorites model;
but when reordering a full ETM surely the dropped folder is somewhere in the
ETM.

Test Plan

When using the ListView mode for the favorites, this allows to
directly drop a new folder (from the folder tree) to a specific position,
as shown by the "between items" drop indicator.

Diff Detail

Repository
R165 Akonadi
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
dfaure created this revision.Dec 19 2017, 10:24 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptDec 19 2017, 10:24 PM
dfaure requested review of this revision.Dec 19 2017, 10:24 PM
dvratil accepted this revision.Dec 23 2017, 11:30 PM

Works and does not seem to affect any other views on top of EOPM.

This revision is now accepted and ready to land.Dec 23 2017, 11:30 PM
dfaure closed this revision.Dec 24 2017, 10:33 AM