From kde-i18n Thu Feb 18 12:38:32 1999 From: Teodor Romeo Mihai Date: Thu, 18 Feb 1999 12:38:32 +0000 To: kde-i18n Subject: Re: kfm and mimetypes X-MARC-Message: https://marc.info/?l=kde-i18n&m=91934104111060 David Faure wrote: > > On Thu, Feb 18, 1999 at 12:19:26PM +0000, Teodor Romeo Mihai wrote: > > David Faure wrote: > > > > > > Ok, I had another look at the KRegistry class. > > > > > > The right thing to do seems to be > > > > > > Includes : > > > #include > > > #include > > > > > > At startup : > > > registry = new KRegistry; > > > registry->addFactory( new KMimeTypeFactory ); > > > registry->load( ); > > > KMimeMagic::initStatic(); > > > > > > Then you can use the KMimetype::find... methods. > > > > > > KRegistry::load is not implemented (just returns FALSE). > Wrong. > void KRegistry::load( const char *_dbfile ) > .. > kregistry.cc line 205 Nope. My KRegistry::load looks like that: bool KRegistry::load() { return false; } I probably have an older version than you. > > > KMimeType::find methods are useful only for determining a mimetype, and > > not for finding applications associated with a mimetype - and this is > > what I want. > Ah, right, you need a KServiceFactory as well. > > > However, I will look deeper into > > KRegistry/KMimeTypeFactory, and if I can find any method for finding > > applications I'll let you know. > Also look at KService and KServiceFactory > > (Service == app. kdelnk) > I will, even if I hate reading source code for lack of documentation ;)