Review Request 111911: Port kioslave/ftp/ftp.cpp away from kde_file.h
Vishesh Handa
me at vhanda.in
Mon Aug 12 10:16:57 UTC 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111911/
-----------------------------------------------------------
(Updated Aug. 12, 2013, 10:16 a.m.)
Review request for KDE Frameworks.
Changes
-------
Use QFileInfo
Description
-------
A couple of issues -
1. KDE::open/stat/etc take a QString and convert it to a char* via QFile::encodeName(str).constData(). Qt obviously does not have methods to do so. Instead of me doing it manually for each call to QT_OPEN/QT_STAT/etc, would be it okay for me to declare local functions called KDE::stat/open?
Something along the lines of -
namespace KDE {
int open(const QString& filePath, ...) {
return QT_OPEN(QFile::encodeName(filePath).constData()), ...);
}
}
2. The kioslave uses KDE::utime to set the utime of file. I've used ::utime, but that obviously won't work on non-unix platforms. What is the correct solution?
One option is to add utime in qplatformdefs.h, but that is non trivial since Qt seems to support about 104 different qplatformdefs and therefore all of them will have to be updated.
Diffs (updated)
-----
kioslave/ftp/ftp.cpp a0da54b
Diff: http://git.reviewboard.kde.org/r/111911/diff/
Testing
-------
Doesn't even compile right now. With (1) it will start to compile.
Thanks,
Vishesh Handa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130812/be814a21/attachment.html>
More information about the Kde-frameworks-devel
mailing list