Problems with mimetype recognition

David Faure dfaure at klaralvdalens-datakonsult.se
Wed Oct 1 21:18:50 BST 2003


On Wednesday 01 October 2003 22:04, Andras Mantia wrote:
> I use findByURL() in my code, but it returns application/x-php and from this I
> can't figure out that it's a text file or not (well, I can if I have a list
> of text mimetypes...) This was the reason why the [X-KDE-Text] and
> findFormatByFileContent() was introduced. And this findFormatByFileContent()
> fails, because it doesn't use findByURL(). I think I will add the findByURL()
> call also there altough in this case findFormatByFileContent() doesn't look
> for format by content in every case. ;-)

I'm not following. findByURL returns a KMimeType::Ptr, which you can query
for the X-KDE-Text property.

-- 
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions




More information about the kde-core-devel mailing list