Am 25.07.2011 10:59, schrieb Aaron J. Seigo: > On Sunday, July 24, 2011 12:35:05 Matthias Fuchs wrote: >> Both have to do with KServiceTypeTrader > > it's probably kbuildsycoca and kded, not KSTT.
Yes indeed. > when a comic is installed or removed, kbuildsycoca4 must be run; this will > automatically happen after some delay as kded4 watches the contents. a run of > it can be triggered manually by calling recreate() on the /kbuildsycoca DBus > object of org.kde.kded. > > the KSycoca class (a singletone) provides a signal that lets you know when > things have changed in the database: void databaseChanged(const QStringList& > changedResources); (where changedResources would contain "services" in the > case of comics possibly changing) In a local git branch I connect to that signal though it did not work there. The signal was emitted but the changes were not present then. Probably because I was not calling recreate manually then. > > this assumes, of course, that the comics files appear in one of the services > directories prior to kbuildsycoca being run. I fear that that sometimes is not the case at least that would explain why it is not always reproduceable here. Not sure if plasmapkg -u has some asynchronous elements. Just a thought -- do not have the time right now to test -- but could changing the InstallationCommand in the knsrc file help? From plasmapkg -t comic -u %f to plasmapkg -t comic -u %f && kbuildsycoca4 > > iif kbuildsycoca is being run and working properly and still KSTT is not > returning the correct values then the mmap'd file is getting fouled somehow. > >> Now I wonder how I should fix that. Do you have any ideas? >> The worst case "solution" would be not relying on KServiceTypeTrader at all >> though I want to avoid that. > > that would make very little sense since you'd end up having to do essentially > the same thing ksycoca does; duplication of code rarely leads to actual > improvements :) Definitely and I doubt that it would do it without my share of bugs. ;) _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel