[PATCH] ported kurlcompletion.cpp!DirectoryListThread::run() to use Qt APIs

Michael O'Shea michael.a.oshea at gmail.com
Thu Apr 24 00:13:23 BST 2008


Hi people.

The patch I'm submitting doesn't relate to any specific bug #. It's just an
item of work in the general porting effort that is going on over in
kde-windows. Jaroslaw Staniek recommended that I submit it here. It's also
my first-ever patch submission to an OSS project.

The patch replaces all directory and file information function calls
(readdir_r,  KDE_stat, etc) with Qt functions in method void
DirectoryListThread::run() in kdelibs\kio\kio\kurlcompletion.cpp

Please note (and read my comments on these points further down):
1) that this patch only concerns method void DirectoryListThread::run() and
does not represent a full port of the complete module to exclusive use of Qt
functions.
2) line 56 of the patch (becomes line 228 in the final source file) is a
commented-out line of code followed by another comment : "// This would be
the better way but isHidden() doesn't regard ".[filename]" as hidden on all
OSes". This is meant to potentially replace the line of code that follows
immediately but is up for discussion (see below).

Regarding point #1 : If people approve of this patch and would like me to
port the rest of the file, please say so, I'd love to do that.
Regarding point #2 : I'd like people's opinion on this. I'd prefer to use
QFileInfo::isHidden() but this causes inconsistencies with other parts of
some applications that believe that ".[filename]" should be construed as a
hidden file regardless of what the host OS thinks. If the opinion here is
that isHidden() should be used, I'll correct and resubmit the patch and go
and promote this idea with the maintainers of the other apps that they
should align their design with this decision.

Cheers,

Michael O'Shea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080424/09b0e4fb/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kurlcompletion.patch
Type: application/octet-stream
Size: 3619 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080424/09b0e4fb/attachment.obj>


More information about the kde-core-devel mailing list