Make Dolphin's SortFilterProxyModel for KDirModel public

Rafael Fernández López ereslibre at gmail.com
Fri Jul 20 14:46:13 BST 2007


Hi all,

I am not able to reply as fast as I would like to since I'm not at home.
PLEASE on the SVN rules there is clearly said: Do not make changes you dont
understand. Therefore:

+#if 0 //didnt get what's the purpose of the function...
+bool KDirSortFilterProxyModel::lessThanGeneralPurpose(const QModelIndex
&left,
+                                                         const QModelIndex
&right) const

So, this method is ESSENTIAL on the categorized view. We could either do
this or add another method that sets a QSortFilterProxyModel for the
categorized view apart from the model itself. The main reason is that the
lessThanGeneralPurpose method will do a "basic" sorting, just for finding
out categories, and their order. Then over those elements DISORDERED on
categories, the lessThan method will be applied for each category. That is
because we can't just apply the same sorting for those two different tasks.

Basically, if you commit your changes (or if they are already committed),
KCategorizedView is broken.

I don't think is the best moment to push this kind of changes to kdelibs
right now, since we said it is pretty frozen. And this kind of changes (as
well as KCategorizedView moving to kdelibs) were dated for 4.1 at least. So
please, don't push this kind of changes to kdelibs.

Bye and thanks,
Rafael Fernández López.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070720/87e1a16b/attachment.htm>


More information about the kde-core-devel mailing list