Unexpected behavior in KIO::KMimeTypeFinderJob
Stefano Crocco
stefano.crocco at alice.it
Wed Aug 7 07:26:50 BST 2024
On mercoledì 7 agosto 2024 00:53:12 CEST Albert Astals Cid wrote:
> El dimarts, 6 d’agost del 2024, a les 10:25:12 (CEST), Stefano Crocco va
>
> escriure:
> > Hello to everyone,
> > while investigating a bug in Konqueror, I just found what in my opinion is
> > an unexpected behavior of KIO::MimeTypeFinderJob. If I'm reading the code
> > correctly, when it uses KIO::get() to determine the mimetype [1], it lets
> > the TransferJob go on even after it detected the mimetype.
> >
> > The documentation for KIO::get() states:
> > "Special case: if you want to determine the MIME type of the file first,
> > and then read it with the appropriate component, you can still use a
> > KIO::get() directly. When that job emits the mimeType signal, (which is
> > guaranteed to happen before it emits any data), put the job on hold".
> > Since the task of MimeTypeFinderJob is finding the mimetype of the URL, I
> > expected it would put the job on hold as soon as it has determined the
> > mimetype, coherently with the KIO::get() documentation.
> >
> > Does anyone know whether the current behavior is expected and, if so, why?
>
> You probably want to ask the kde-frameworks-devel list where frameworks
> devels live (and maybe even CC dfaure since he's the author of the code and
> he is taking well deserved holidays from KDE development)
>
> On a very quick look I agree with you.
>
> Cheers,
> Albert
Thanks, I'll do so.
Stefano
More information about the kde-devel
mailing list