From kde-core-devel Tue Sep 05 19:08:38 2000 From: Waldo Bastian Date: Tue, 05 Sep 2000 19:08:38 +0000 To: kde-core-devel Subject: Re: kio&kcontrol patch against hardcoded subdir paths X-MARC-Message: https://marc.info/?l=kde-core-devel&m=96818111903906 On Tue, 05 Sep 2000, David Faure wrote: > >The other thing that I don't like about it is that you do a linear search > > for these items. If you add an index for "basegroups" you can find them > > much faster. > > Thought about that too, but I'm lost in the new ksycoca design ;-) > Where would I do that ? You can add a KSycocaDict to kservicegroupfactory. Just like e.g. m_nameDict in kservicefactory. In kbuildservicegroupfactory ::addEntry() you add the entries that you want to put in this dictionairy (e.g. those with a non-empty basegroup). In ::saveHeader() you must save the offset of this dictionairy and in ::save() you save the dictionairy itself. In kservicegroup you can then add a lookup function like KServiceFactory::findServiceByDesktopName. Cheers, Waldo -- KDE/Linux, Leading the Desktop Revolution.