From kfm-devel Fri Aug 27 17:08:16 1999 From: David Faure Date: Fri, 27 Aug 1999 17:08:16 +0000 To: kfm-devel Subject: RE: http://lists.kde.org/?l=kde-devel&m=93518510319562&w=2 X-MARC-Message: https://marc.info/?l=kfm-devel&m=93577379305378 > > Well, all this could be replaced by : > > > > if ( strncmp( mime->getMimeType(), "image/", 6 ) == 0 ) > > > > couldn't it ? That would solve all those problems at once ! ;) > > It could, but do we support all known image formats ? What > happens if we encounter some unknown/unsupported image format ? If it's unknown, meaning it's not one of our mimetypes in mimetypes/image/, then its mimetype won't be starting with "image". It will be application/octet-stream I think... So if you look at the image mimetypes that have a kdelnk, you'll see that most of them are very well known and supported (by Qt, FWIW). The only ones that we might have problems with are fax-g3 and cgm. Does anyone has one of those kind of images, in order to test the strncmp solution ? Anyway I think that if one has for instance a cgm file and if Qt can't handle it, then he will simply not have thumbnails for them, that's all... > In this case the first explicit patch seems to be the way to go ... > Should I apply this ? I think we (i.e. you, I still don't have CVS access) should do the following : * add x-bmp.kdelnk (see http://lists.kde.org/?l=kde-devel&m=93518510319562&w=2) * change the code to the strncmp line above * if possible, test it with all image/* mimetypes -- David Faure faure@kde.org - KDE developer david@mandrakesoft.com - Mandrake david.faure@cramer.co.uk - Cramer Systems