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

List:       kde-commits
Subject:    Re: kdenetwork/kpf/src
From:       David Faure <faure () kde ! org>
Date:       2004-03-26 12:38:23
Message-ID: 200403261338.23726.faure () kde ! org
[Download RAW message or body]

On Friday 26 March 2004 13:34, Waldo Bastian wrote:
> +    QString serviceType = KMimeType::findByPath( d->root + d->path )->name();
> +   /* 
> +     Look at magic numbers only if findByPath couldn't come up with something
> +     reasonable. 
> +    */

Hmm, doesn't findByPath do this already?

> +    if (serviceType == KMimeType::defaultMimeType())
> +    {
> +        int accuracy;
> +        QString contentServiceType = KMimeType::findByFileContent( d->root + \
> d->path,&accuracy)->name(); +        /*
> +          Use reliable information ( from magic number ) only. Ignore any exotic
> +          matches and leave as defaultMimeType for any such hard-to-identify \
> documents. +        */
> +        if (accuracy == 100)
> +        {
> +            serviceType = contentServiceType;
> +        }
> +    }
> +    return serviceType;

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


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

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