Manual fallback/workaround a kdelibs bug?

David Nolden david.nolden.kdevelop at art-master.de
Sun Jul 5 22:26:23 UTC 2009


Am Sonntag 05 Juli 2009 23:13:53 schrieb Andreas Pakulat:
> Hi,
>
> please have a short look at:
> https://bugs.kde.org/show_bug.cgi?id=198477
>
> I'd like to know wether we should do a workaround inside
> documentcontroller for this. Basically doing:
>
> KMimeType::Ptr mime = KMimeType::findByUrl();
> if( !isTextType(mime) && url.isLocalFile() ) {
>     // Try harder to workaround https://bugs.kde.org/show_bug.cgi?id=198477
>     mime = KMimeType::findByFileContent( url.toLocalFile() );
> }
>
> Opinions?

This doesn't look too hacky. Actually it's probably the right way to go. The 
name "findByUrl" after all suggests that it only looks at the URL.

The question is, would this also solve the syntax highlighting issue? Does 
kate get the mimetype to use from KDevelop?

Greetings, David





More information about the KDevelop-devel mailing list