Dolphin, KFileItemModel

Frank Reininghaus frank78ac at googlemail.com
Sat Feb 9 08:13:20 GMT 2013


Hi Emmanuel,

2013/2/9 Emmanuel Pescosta :
> Hello Dolphin developers,
> Hello Frank,
>
> I tried to fix those two bugs:
> * Bug 304565 - Network browser: details view breaks when expanding
> * Bug 312890 - Dolphin tries to render timeline:/ results as tree

thanks for analysing these problems :-)

> 1. I replaced the Dir-Lister signal "newItems" by "itemsAdded", so that
> Dolphin knows which "parentUrl/directoryUrl" the new items have -> Needed
> because some Kioslaves provide completely different file item Urls (e.g.
> timeline provides the normal file path instead of the timeline path)
>
> 2. I replaced almost all KFileItemLists by QList<ItemData*> and adjusted the
> createItemDataList function to make use of the provided
> "parentUrl/directoryUrl" -> So we have a correct item <-> parent connection,
> before we move all the newly added items to m_pendingItemsToInsert (was not
> possible with the old implementation, because it used the path provided by
> the file - failed with timeline, ...)
>
> 3. Adjusted the complete KFileItemModel class to work together with the new
> implementation
>
> ...
>
> But it doesn't work. (Final result as bad as before)
>
> => The big problem is, that Dolphin uses file Urls instead of the generated
> file/folder item structure almost everywhere (e.g.
> KFileItemModel::expandedParentsCountCompare) -> So kioslaves like timeline
> will never work as expected with this design, I think.

You're right, expandedParentsCountCompare() is a very complicated and
bug prone approach to compare items in a tree structure. There are
even crashes in that function which are hard to fix with the current
design.

That's why I recently worked on simplifying all that:

https://git.reviewboard.kde.org/r/108766/

It's not in master yet - I'm currently away for a couple of days, but
I'll push it when I'm at home. I haven't looked at your analysis of
the two bugs in detail yet, but I think that the new comparison
approach might make it easier to resolve these issues.

I'll be happy to look into this in more detail with you next week.

Best regards,
Frank




More information about the kfm-devel mailing list