Regarding commit b9014d21caea4d8fe98c94c1fe6158b65db5db53 by Milian (use IDocument for mimetype query when available)
David Nolden
zwabel at googlemail.com
Fri Jun 10 15:29:16 UTC 2011
commit b9014d21caea4d8fe98c94c1fe6158b65db5db53
Author: Milian Wolff <mail at milianw.de>
Date: Fri Jun 10 15:09:11 2011 +0200
use IDocument for mimetype query when available in language controller
this way we get proper language support when opening files without extension
like e.g. <memory> or similar system headers. Furthermore there
are scripting
languages that use the shebang instead of the extension to
advertise their mimetype
The idea is good, but it is not thread-safe to call documentForUrl,
while languageForUrl can be called from any thread. This patch can
thus lead to random crashes I think..
A better solution would be: When opening a document, force the
language-controller to cache its type, or something like that.
More information about the KDevelop-devel
mailing list