From kde-devel Mon Apr 24 21:10:50 2000 From: David Faure Date: Mon, 24 Apr 2000 21:10:50 +0000 To: kde-devel Subject: Re: get all MIME types X-MARC-Message: https://marc.info/?l=kde-devel&m=95661092729351 On Mon, Apr 24, 2000 at 10:55:47PM +0200, Daniel Naber wrote: > Hi, > > I need a list of all mime types but I don't want to parse a file. The API > documentation says KMimeType::allMimeTypes() is very memory consuming. ... compared to only getting one. This comment is there to prevent people from using allMimeTypes and _then_ filtering the list. There are methods for this. > Actually I only need the strings like "text/plain", not the KMimeTypes > objects. Any idea what's the right way to get this? If you want them all, then it's find to use allMimeTypes, and to store the names in a QStringList. The memory used by the mimetypes themselves will be freed automatically (since KMimeType::Ptr is a KSharedPtr) Out of interest, why do you want all mimetypes ? -- David FAURE, david@mandrakesoft.com, faure@kde.org http://home.clara.net/faure/ KDE, Making The Future of Computing Available Today See http://www.kde.org/kde1-and-kde2.html for how to set up KDE 2