Dolphin, KFileItemModel

Frank Reininghaus frank78ac at googlemail.com
Tue Feb 12 11:37:51 GMT 2013


Hi Emmanuel,

2013/2/9 Frank Reininghaus:
> 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/

This has been pushed to master. I hope that this resolves at least
some of the problems that you were seing. If not, we can try to find
ways to fix them. I'll be happy to help if you show us your patch.

Best regards,
Frank




More information about the kfm-devel mailing list