On Thursday 04 September 2008, David Edmundson wrote: > Hey all, > > This krunner adds all the bookmarks and devices that you would expect to > find in the dolphin Places panel, or the "computer" tab in the application > launcher to the krunner list. See code attached. > > I had some pointers from Sebastian Kűgler, so I should thank him in this > email. > > It's my first time submitting anything plasma related, so I've probably > missed out some parts of your coding standard. Feel free to point out > mistakes or fix it :-)
m_filePlaces = new KFilePlacesModel();
this gets leaked; you probably want to do:
m_filePlaces = new KFilePlacesModel(this);
so that it gets automatically deleted when the runner does.
the object name doesn't actually need to be translated anymore, so this:
setObjectName(i18n("Places"));
becomes just:
setObjectName("Places");
and you can get rid of:
KGlobal::locale()->insertCatalog("krunner_placesrunner");
as there are no more translated strings left =)
it would be good to show an error, perhaps via KMessageBox, when setup fails
in setupComplete; silent failures suck for the user.
otherwise it looks good.
if you'd like to add this to kdeplasma-addons you may; if you (or someone else
suggests) that we add this to kdebase, then we'll want to clean up the
whitespace in places (kdeplasma-addons is more relaxed; in kdebase we stick to
the coding style guide as much as humanly possible).
personally i think this belongs in kdebase given how key the places model has
become (file dialog, dolphin, kickoff, gwenview, etc)
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Trolltech
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/plasma-devel
