KImageIO::typeForMime()
Tim Jansen
tim at tjansen.de
Wed Sep 4 01:25:29 BST 2002
Hi...
I would like to add a new method to KImageIO:
/**
* Returns the type of a mime type.
*/
static QString typeForMime(const QString& mimeType);
Right now I can not see any other clean way to get the type of a mime type.
This is needed for a KIconEdit bugfix: When the user saves an icon and does
not specify a file type, the file should be saved in the selected filter
format. The filter list is initialized using
KImageIO::mimeTypes(KImageIO::Writing), so KFileDialog::currentFilter()
returns only the mime type (and not the image type). But the image type of
the mime type is needed in order to get the file type's suffix that must be
appended to the file. Thus the extra method.
You can find the patch here:
http://www.tjansen.de/kimageio.patch
and the KIconEdit patch (mostly written by SadEagle) at
http://www.tjansen.de/kiconedit.patch
bye...
More information about the kde-core-devel
mailing list