Review Request: Improved Text Thumbnailer

Christoph Feck christoph at
Mon Jun 29 22:14:20 BST 2009

This is an automatically generated e-mail. To reply, visit:

(Updated 2009-06-29 14:14:20.297649)

Review request for Dolphin and kdelibs.


Now using KEncodingProber instead of KEncodingDetector, it seems to have a better fallback to UTF-8 (instead of Latin-1).

Dario, could you test if this fixes the problem with your Spanish text files? If not, I really need someone who knows about encoding detection :)


I originally posted this to k-c-d, but I did not get any feedback. I fixed the "fixed pitch" issue compared to the initial patch.

Here is the original description:

Looking at bug 169381 "Text files preview does not support international 
symbols" I wondered, if it wouldn't be better to just let Qt render the text, 
instead of hardcoding a primitive bitmap font.

What I present here is an initial patch to fix that bug, but I have a few 
questions/issues, so please give feedback.

* Not sure if KEncodingDetector should be used here, and if I used it 
correctly. The idea was that the text thumbnailer should handle any text, but 
I do not know what types of files (UTF-16?) trigger that thumbnailer.

* I added code to use standard Base/Text colors, but as all mime icons are 
white, I commented out that, and used the old hardcoded colors.

* The font size is set to 7 pixels, but grows up to 10 pixels for larger 
icons. People that prefer pixel sharp fonts will probably have antialiasing 
disabled, so please try it with your font setup, if it is actually readable.

* Not sure if that is a bug fix, or a new feature (4.3 or 4.4 ... )

This addresses bug 169381.

Diffs (updated)

  /trunk/KDE/kdebase/runtime/kioslave/thumbnail/CMakeLists.txt 989284 
  /trunk/KDE/kdebase/runtime/kioslave/thumbnail/textcreator.h 989284 
  /trunk/KDE/kdebase/runtime/kioslave/thumbnail/textcreator.cpp 989284 



Compiles against trunk, works okay for the text files I have. You may need to delete .thumbnails cache to see the effect.



More information about the kde-core-devel mailing list