[patch] kfilemediaplugin and filesize

Martin Koller m.koller at surfeu.at
Thu Nov 2 22:21:11 GMT 2006


looking at
I found that the implementation for the filesize in mentioned plugin uses 
unsigned long
Probably it's safer to use KIO::filesize_t

I changed that. Also, it's not clear for me why it uses the KDiskFreeSp class
as this needs an external program to get the data, which is a lot overhead.

I changed the kfile-plugin to directly call statvfs()
The man page says, statvfs() is conforming to POSIX. Can I safely assume this 
is available on all supported platforms ?
(it seems that KDiskFreeSp relied on the fact that there is a "df" program 

If I don't miss something, I'd suggest that KDiskFreeSp shall be removed in 
Wasn't there a URL where I can check which other KDE files use that class  
(cross reference) ?

Do you think this is OK to commit ?

(The patch is against KDE-3.5.5, but if OK I'd change it in KDE-4, too)
Best regards/Schöne Grüße

Martin    ()  ascii ribbon campaign - against html mail 
          /\                        - against microsoft attachments

Computers and Internet gave you freedom.
TCPA would TAKE your FREEDOM!  http://www.againsttcpa.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filesize.patch
Type: text/x-diff
Size: 5648 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20061102/0ad2e6a9/attachment.patch>

More information about the kde-core-devel mailing list