[Digikam-devel] [Bug 152877] thumbnails: URI does not follow Thumbnail Managing Standard

Arnd Baecker arnd.baecker at web.de
Mon Nov 26 07:44:29 GMT 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=152877         
arnd.baecker web de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|NOR                         |HI



------- Additional Comments From arnd.baecker web de  2007-11-26 08:44 -------
Hi Heiko,

thanks for the report, I set the priority to high.
The places I found, where the actual path to the thumbnails is constructed, are

I think that this is an important issue.digikam/pixmapmanager.cpp:    
  uri = md5.hexDigest();
kioslave/digikamthumbnail.cpp:   
   thumbPath += QFile::encodeName( md5.hexDigest() ) + ".png";
libs/thumbbar/thumbbar.cpp:        
   uri = md5.hexDigest();
utilities/batch/batchthumbsgenerator.cpp:        
   uri = md5.hexDigest();
Are these all?

The code usually looks like
    QString uri = "file://" + QDir::cleanDirPath(url.path());
    KMD5 md5(QFile::encodeName(uri));
    uri = md5.hexDigest();

    QString smallThumbPath = d->thumbCacheDir + "normal/" + uri + ".png";

So the encodeName should be replaced, but I am not familiar with the hex
encoding. One way might be something like
  QString hex;
  hex.sprintf("%%%02X", uri);
(I am not sure about the first argument of sprintf ...)
Heiko, do you maybe have the pointer to the source code which konquerer uses?



More information about the Digikam-devel mailing list