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

List:       kde-commits
Subject:    kdenetwork/kpf/src
From:       Waldo Bastian <bastian () kde ! org>
Date:       2004-03-26 13:37:03
Message-ID: 20040326133703.9A48A9959 () office ! kde ! org
[Download RAW message or body]

CVS commit by waba: 

KMimeType::findByPath does everything we need already


  M +1 -20     Resource.cpp   1.10


--- kdenetwork/kpf/src/Resource.cpp  #1.9:1.10
@@ -326,24 +326,5 @@ namespace KPF
     if (d->fileInfo.isDir())
       return "text/html; charset=utf-8";
-    QString serviceType = KMimeType::findByPath( d->root + d->path )->name();
-
-   /* 
-     Look at magic numbers only if findByPath couldn't come up with something
-     reasonable. 
-    */
-    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;
+    return KMimeType::findByPath( d->root + d->path )->name();
   }
 


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

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