Dataengine for browser bookmarks

Ivan Čukić ivan.cukic at kde.org
Sat Feb 5 18:46:49 CET 2011


> I'm not sure how to make this into classes properly. I tried to understand
> the way the weather dataengine uses but I didn't get it.

For starters, you can just create classes like KonquerorBookmarks,
Firefox3Bookmarks etc. with some common abstract interface like
   getFolders(const QString path)
   getBookmarks(const QString path)
   ...
(or similar)

then just create a
   QList < QString > pluginNames;
   QHash < QString, GenericBookmarkReader * > readers;
 which you'd fill when a user requests some bookmarks.

Apropos Marco's question about the default browser's bookmarks. If you
don't want to have only one browser in the engine, it would be rather
nifty to have a 'default:/path' provider which would use one of the
ff/konq/opera/... bookmark readers.

So, for example, you'd have
firefox:/adsdasdasd
konqueror:/blahblah
opera:/poipoi
default:/blahblah (the same as konqueror:/blahblah)

BTW, maybe it would be better to name it kde or kdebookmarks instead
of konqueror, since rekonq (IIRC) uses the same.



Cheerio and welcome to Plasma :)
Ivan

--
While you were hanging yourself on someone else's words
Dying to believe in what you heard
I was staring straight into the shining sun


More information about the Plasma-devel mailing list