https://bugs.kde.org/show_bug.cgi?id=452729

--- Comment #15 from Méven Car <[email protected]> ---
Doc in slavebase.h states:

```
    /**
     * get, aka read.
     * @param url the full url for this request. Host, port and user of the URL
     *        can be assumed to be the same as in the last setHost() call.
     *
     * The slave should first "emit" the MIME type by calling mimeType(),
     * and then "emit" the data using the data() method.
     *
     * The reason why we need get() to emit the MIME type is:
     * when pasting a URL in krunner, or konqueror's location bar,
     * we have to find out what is the MIME type of that URL.
     * Rather than doing it with a call to mimetype(), then the app or part
     * would have to do a second request to the same server, this is done
     * like this: get() is called, and when it emits the MIME type, the job
     * is put on hold and the right app or part is launched. When that app
     * or part calls get(), the slave is magically reused, and the download
     * can now happen. All with a single call to get() in the slave.
     * This mechanism is also described in KIO::get().
     */
    virtual void get(const QUrl &url);
```

So get() will emit mimetype then data() but if the client does not do anything
with it, it will stay opened as you found out debugging.

> This seems flawed on a fundamental level though: we basically block the 
> worker on waiting for something that never happens. We may as well abort it 
> and start from scratch.

I think so.
For the MimeTypeFinderJob job we explicitly want only the mimetype so killing
the job should be expected, this is a different usecase than regular get().

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to