KIO::mimetype sync call in DocumentController::openDocumentInternal hazardous

David Nolden zwabel at googlemail.com
Wed Sep 29 05:51:21 UTC 2010


This is required whenever you cannot guess the type from the extension,
which is basically true for all remote (fish, http, whatever) text-files on
linux, as those seldomly have a .txt extension.

I guess the problem here are queued events that are sitting in the
event-queue when openDocument(..) is called. Maybe we can block those events
from being processed until the function finishes..

Am 28.09.2010 20:20 schrieb "Milian Wolff" <mail at milianw.de>:

Milian Wolff, 26.09.2010:

> Heyho,
>
> anyone ever got this and went mad:
>
> ASSERT: "!documents.contains(url) || documents...
I just spoke to David Faure, he said that this code should _not_ be
required.
KIO::mimetype should only be required for KIO slaves like HTTP where one
cannot rely on the file extension to guess a mimetype.

$ kmimetypefinder sftp://bla/something/read.php
application/x-php
(accuracy 100)

It does not even connect to the host, it just looks at the URL and its
extension.

So, david - why did you add this code? I'm tempted to remove it again.

What is left to be done is testing this:
https://bugs.kde.org/show_bug.cgi?id=234644 in a 4.1 build - can someone do
this for me? Otherwise I'll try it tomorrow.


Bye

-- 
Milian Wolff
mail at milianw.de
http://milianw.de

--
KDevelop-devel mailing list
KDevelop-devel at kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100929/f301386e/attachment.html>


More information about the KDevelop-devel mailing list