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

List:       kde-commits
Subject:    koffice/lib/kofficecore
From:       Nicolas Goutte <nicolasg () snafu ! de>
Date:       2004-07-31 22:47:39
Message-ID: 20040731224739.CDEF39A00 () office ! kde ! org
[Download RAW message or body]

CVS commit by goutte: 

Use KMimeType::findByPath to avoid an implicit conversion from QString to \
KURL (Not sure if it coud be backported to KOffice 1.3.x, as I do not know \
if KDE 3.1.x had already that member function.)


  M +3 -1      koPictureImage.cc   1.21


--- koffice/lib/kofficecore/koPictureImage.cc  #1.20:1.21
@@ -168,5 +168,7 @@ QString KoPictureImage::getMimeType(cons
     QString fileName("/tmp/temp.");
     fileName+=extension;
-    QString mimetype=KMimeType::findByURL(fileName,0,true,true)->name();
+    // Find the mimetype only by the extension, not by file content (as \
the file is empty!) +    const QString mimetype( KMimeType::findByPath( \
fileName, 0 ,true )->name() ); +    // ### TODO: use \
KMimeType::findByContent (but then the mimetype probably need to be cached) \
kdDebug(30003) << "Image is mime type: " << mimetype << endl;  return \
mimetype;


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

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