Comparing KFileItems
Frank Reininghaus
frank78ac at googlemail.com
Mon Oct 22 19:10:23 BST 2012
Hi David,
2012/10/21 David Faure:
> On Thursday 18 October 2012 13:54:09 Frank Reininghaus wrote:
>> Obviously, KFileItems are only considered equal if their d pointers
>> are the same.
>
> Yes, i.e. created from the same place.
>
> But I agree, let's compare URLs too, since they are "unique identifiers" for
> resources.
Sounds good.
>> There is a Dolphin bug where this plays a role and leads to constant
>> high CPU usage:
>>
>> https://bugs.kde.org/show_bug.cgi?id=304986
>
> Tricky one, well done with the investigation!
Thanks :-)
> A KFileItem is basically "a URL with extra info associated". I suppose we use
> KFileItem and not QUrl as the key in KFileItemModelRolesUpdater simply in
> order to have this extra info available? But the QUrl is really the key, the
> rest is associated data.
Well, the class gets the KFileItems from KFileItemModel, and the
PreviewJob wants a KFileItemList, so it seems natural to use KFileItems
in KFileItemModelRolesUpdater as well, rather than converting to KUrls
and back.
Is the attached patch OK for 4.9 from your point of view?
Best regards,
Frank
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KFileItem.diff
Type: text/x-patch
Size: 1641 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20121022/840a510f/attachment.bin>
More information about the kde-core-devel
mailing list