4.8.0 "Easy Jobs"
Aaron J. Seigo
aseigo at kde.org
Tue Dec 13 21:53:20 UTC 2011
On Tuesday, December 13, 2011 21:05:29 Martin Klapetek wrote:
> On Tue, Dec 13, 2011 at 13:36, Martin Gräßlin <mgraesslin at kde.org> wrote:
> > Am 13.12.2011 12:54, schrieb Aaron J. Seigo:
> > On Tuesday, December 13, 2011 10:19:30 Martin
> > =?ISO-8859-1?Q?Gr=E4=DFlin?=
> >
> >> wrote:
> >>> Am 13.12.2011 09:51, schrieb Aaron J. Seigo:
> >>> > http://bugs.kde.org/287027 - update favorites when ksycoca changes
> >>>
> >>> due to the rather strong changes I already have in the models I would
> >>> appreciate if nobody touches that code. It has been broken forever,
> >>> let's fix it with a bunch of other things after my rework in 4.9.
> >>
> >> actually.. would it be cool with you if someone wanted to fix it up right
> >> in
> >> your kickoff-qml branch?
> >
> > Yes of course, less work for me :-)
>
> I was looking into this today and it's not that trivial. The favorites are
> saved in config as a list of .desktop files located in /usr... . I had only
> quick look at how the apps list is loaded and it uses some KServiceGroup
> magic (which I don't understand yet). So basically it means that the
> Favorites loading would have to be changed to use the KServiceGroup as well
> instead of loading directly the .desktop files, which are actually never
> changed (those in /usr).
Favourites should be stored using the storageId() of the related KService. on
change of apps in KSycoca, it should be enough to do something like:
foreach (const QString &favorite, favoritesList) {
KService::Ptr service = KService::serviceByStorageId(favorite);
if (service.isNull()) {
... remove favorite: it no longer exists! ...
} else {
... update details of favorite (name, icon, etc.) based on the
service it may not have changed, but we already have the service
and these assignments are relatively cheap, so just refresh it ...
}
}
--
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 Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20111213/7df1c236/attachment-0001.sig>
More information about the Plasma-devel
mailing list