https://bugs.kde.org/show_bug.cgi?id=358681

--- Comment #5 from Jan Kundrát <j...@kde.org> ---
@onli, Qt proxy models can be "stacked" on top of each other. That's for
example how Trojita works already -- there's a huge model
(src/Imap/Model/Model.cpp) which presents a lazily populated tree view of an
entire IMAP server, including all mailboxes and all messages in there. You can
see this in the GUI, check the IMAP -> Debugging -> Show full tree.

The widget at the left edge of Trojita is powered by a proxy model which simply
presents a transformed view of the entire IMAP model by only including
mailboxes (in other words, everything else is filtered out).

Similarly, the message listing is powered by another chain of proxy models. At
first, only a flat list of messages is provided by
src/Imap/Model/MsgListModel.cpp which filters out the IMAP's "everything" model
by offering a view on just a single level in the tree. This flat list of
messages is then processed by a very complex proxy, the ThreadingMsgListModel
which adds a completely different tree structure based on the flow of messages.
Finally, this threading tree is proxied by yet another model, the
PrettyMsgListModel, which should ideally just format this for the GUI, but in
practice it unfortunately also implements the filtering for unread messages.

What I would like to get is a patch which inserts another proxy between the
ThreadingMsgListModel and the PrettyMsgListModel. Please read through the
http://api.kde.org/frameworks-api/frameworks5-apidocs/kitemmodels/html/classKRecursiveFilterProxyModel.html
for why a simple reimplementation of a
QSortFilterProxyModel::filterAcceptsRow() is not enough.

I won't merge your patch because it attacks the problem on a wrong level -- and
because it does not work when threading is active.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to