Bookmarks for Accretion

Frank Reininghaus frank78ac at googlemail.com
Tue Feb 11 14:54:12 GMT 2014


Hi,

2014-02-11 14:11 GMT+01:00 Mark Gaiser:
[...]
> Just to be sure. How does the places implementation actually work in Dolphin?
> I've looked a bit through the code and it looks like dolphin has it's
> own model for this (PlacesItemModel). But i can't find any
> KFilePlacesModel use there. It does say it's compatible with it and
> that class is based on it, but how does it load the data from
> KFilePlacesModel? Is it doing that directly via the KBookmarks class
> since i do see it loading (and using) that one.

PlacesItemModel does not use KFilePlacesModel - it is mostly a copy of
KFilePlacesModel. The main differences are that it's not based on
QAbstractItemModel, and that it adds some "Places" for Baloo searches.

"Compatible" means here that both use the same file to store the
"Places", and that they access it in the same way (namely, via
KBookmarkManager) such that the file format is the same. This ensures
that any modification made with one of the models can be picked up by
the other one.

> Also, the PlacesItemModel in dolphin has devices support. I'd really
> like to have that as well. Is there a separate model (like
> KFilePlacesModel) for that somewhere?

Devices support is provided by either of the two models implicitly.
This support is provided by Solid, which the models access internally.
The code that KFilePlacesModel and PlacesItemModel use to access Solid
and be informed about any added/removed devices should be mostly the
same.

Cheers,
Frank




More information about the kfm-devel mailing list