[PATCH] KFilePlacesModel : separate storage for custom items and standard items
nf2
nf2 at scheinwelt.at
Sat Mar 15 00:39:08 GMT 2008
nf2 wrote:
> Kevin Ottens wrote:
>> Le Sunday 09 March 2008, nf2 a écrit :
>>
>
>>> This patch depends on my previous KBookmarks patch (to enable KDirWatch
>>> monitoring for external bookmarks).
>>>
>>
>> OK, I applied your patches, and it totally blows the unit tests for
>> the class, so please rework your patch and ensure it at least passes
>> the tests.
>>
>>
>>> I still have a little problem that <IsHidden> is not always written to
>>> the files correctly, but i can't figure out where the bug is.
>>>
>>
>> Well, there's also a few more issues (actually catched by the tests).
>> For instance I can't reorder my places anymore,
>
> This might be because my KDirWatch based bookmark-manager mode reveals
> a bug in KFilePlacesModel (as it triggers file-reloads more often):
> The KBookmark member in class KFilePlacesItem pointing to a "detached"
> QDomDocument after a file reload (because a new QDomDocument is
> created in KBookmarkManager::parse()). Therefore you can't delete or
> move those items anymore. You can easily reproduce this problem by
> working with Dolphin and the file-dialog simultaneously (even without
> my patch).
>
> I guess this can only be fixed by just keeping the bookmark-id*) in
> the KFilePlacesItem instead of the KBookmark. Or by re-assigning all
> the KBookmark's in _k_reloadBookmarks().
>
As Kevin Ottens suggested, i have written a unit test to demonstrate
this bug: Removing items from KFilePlacesModel doesn't work after
triggering a re-parse.
Regards,
Norbert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kfileplaces_reparse_test.patch
Type: text/x-patch
Size: 1690 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080315/e9d3140b/attachment.bin>
More information about the kde-core-devel
mailing list