Review Request 111911: Port kioslave/ftp/ftp.cpp away from kde_file.h

Vishesh Handa me at vhanda.in
Tue Aug 6 16:11:29 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111911/
-----------------------------------------------------------

Review request for KDE Frameworks.


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
-----

  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/20130806/a0a35eff/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list