Review Request 110988: Port kio-file to QFile
Martin Klapetek
martin.klapetek at gmail.com
Thu Jun 13 13:04:26 UTC 2013
> On June 13, 2013, 11:06 a.m., David Faure wrote:
> > Good work, not an easy task.
> >
> > In addition to the issues I found, could you ensure that the unittests still pass? In particular jobtest in kio, looks appropriate. Plus the one that calls chmod().
Will do.
> On June 13, 2013, 11:06 a.m., David Faure wrote:
> > kioslave/file/file.cpp, line 191
> > <http://git.reviewboard.kde.org/r/110988/diff/1/?file=149805#file149805line191>
> >
> > You cannot cast from mode_t to QFileDevice::Permissions. They are different enums with different values.
> >
> > SlaveBase::chmod() has to be ported to QFileDevice::Permissions - and all kioslaves, or this will have to stay being a mode_t.
> >
> > One issue with QFileDevice::Permissions is that it doesn't have support for SUID and SGID, but only root can set that anyway, so one could say it's out of scope for KDE - or at best, can be handled locally in kpropertiesdialog.cpp.
> >
> > So I'm OK with a port to QFileDevice::Permissions -- but the signature of chmod() should change to avoid any ambiguity between mode_t and Permissions, and obviously the calling code in libkio has to be adjusted too. All this should probably be a different patch, so I'd leave this one with mode_t and ::chmod() for now.
Ok, will revert for now and do a separate patch.
> On June 13, 2013, 11:06 a.m., David Faure wrote:
> > kioslave/file/file.cpp, line 453
> > <http://git.reviewboard.kde.org/r/110988/diff/1/?file=149805#file149805line453>
> >
> > Bug in the original code? Should be ..._FOR_WRITING if mode & QIODevice::WriteOnly?
Would
if (mode & QIODevice::ReadOnly) {
error(KIO::ERR_CANNOT_OPEN_FOR_READING, openPath);
} else {
error(KIO::ERR_CANNOT_OPEN_FOR_WRITING, openPath);
}
work? As the rest of the modes (WriteOnly, ReadWrite, Append, Truncate) assumes writing
- Martin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110988/#review34280
-----------------------------------------------------------
On June 13, 2013, 10:40 a.m., Martin Klapetek wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110988/
> -----------------------------------------------------------
>
> (Updated June 13, 2013, 10:40 a.m.)
>
>
> Review request for KDE Frameworks.
>
>
> Description
> -------
>
> Ports away kioslave/file from unix/kde specific calls to QFile calls
>
>
> Diffs
> -----
>
> kioslave/file/file.h 93aeef4
> kioslave/file/file.cpp d57517b
> kioslave/file/file_unix.cpp 8b92e06
>
> Diff: http://git.reviewboard.kde.org/r/110988/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Martin Klapetek
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130613/2728e603/attachment.html>
More information about the Kde-frameworks-devel
mailing list