Review Request: [PATCH] Make the FTP ioslave emit mime-type of the content before actually reading it
David Faure
faure at kde.org
Mon Apr 18 13:43:35 BST 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101149/#review2723
-----------------------------------------------------------
Ship it!
Thanks.
kioslave/ftp/ftp.cpp
<http://git.reviewboard.kde.org/r/101149/#comment2391>
Maybe this should be "while we haven't read 1024 bytes", but of course the file could be smaller than that so it would have to check for that too.
What I mean is: I assume peek() doesn't wait, so if the first packet we get is 48 bytes, we have only 48 bytes. Don't know if this is a real problem in practice though, feel free to ignore this comment.
- David
On April 18, 2011, 2:12 a.m., Dawit Alemayehu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101149/
> -----------------------------------------------------------
>
> (Updated April 18, 2011, 2:12 a.m.)
>
>
> Review request for kdelibs and David Faure.
>
>
> Summary
> -------
>
> The attached patch changes the ftpGet function such that it emits the mime-type of the content it is about to read, before starting to read it. That way kio_ftp will work correctly if and when it is put on hold to be reused from another application. Note that the patch uses QIODevice::peek to achieve this goal.
>
>
> Diffs
> -----
>
> kioslave/ftp/ftp.cpp 64f43d8
>
> Diff: http://git.reviewboard.kde.org/r/101149/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> Dawit
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20110418/2da50da8/attachment.htm>
More information about the kde-core-devel
mailing list