[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KIO patch
From:       Bernd Gehrmann <bernd () physik ! hu-berlin ! de>
Date:       2001-10-06 10:00:55
[Download RAW message or body]

On Fri, 5 Oct 2001, David Faure wrote:
> On Vendredi 5 Octobre 2001 21:16, Bernd Gehrmann wrote:
> > What about adding the two methods findByContent() and
> > findByFileNameContent() to KMimeType, and marking
> > KMimeMagic and KMimeMagicResult as deprecated? This
> > would make a much simpler and more consistent API
> > IMO.
> 
> Good idea, except that I wouldn't mark KMimeMagic* as deprecated,
> it still gives more info than the KMimeType wrappers (for instance the
> accuracy of the result, which maybe some apps might want to check.
> This is just in case. I can't give examples of apps using it).

This could be accomodated by an additional argument int *accuracy=0,
such that *accuracy is set on return when accuracy is not a null pointer.
 
> Also I'd name it findByFileContent instead of findByFileNameContent
> (it's not the contents of the name we're going to look at ;)

Makes sense :-)

> > Similarly, what is KServiceOffer::allowAsDefault()
> > good for. Since keditfiletype always writes AllowAsDefault=true
> > to profilerc, KServiceOffer::allowAsDefault() seems to
> > be always equal to KServiceOffer::service()->allowAsDefault().
> Well, yes, sure ;) A service offer is only the description of a service,
> nothing more. IIRC the bool being copied is only a speed up issue
> (used for sorting the offers).

Well, not exactly, that's why I'm asking :-) AFAICT, the allowAsDefault
in KServiceOffer is an AND between the value in the .desktop file and
the value in profilerc. But the latter is always TRUE...
Another strange behaviour of keditfiletype is that it appends 
"Application" to the list of mime types when it copies a .desktop file
into ~/.kde2.

> > (currently trying to write some documentation about the
> > whole MIME stuff...)
> 
> For kdelibs' docu or for e.g. a book, if I may ask ? ;)

See mime.html in the kde2arch section on developer.kde.org. Would be
nice if someone would proofread this and services.html, when it's
finished.

Bernd.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic