[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: [patch] kio remaining time
From: David Faure <faure () kde ! org>
Date: 2005-01-30 18:05:04
Message-ID: 200501301905.05041.faure () kde ! org
[Download RAW message or body]
On Sunday 30 January 2005 16:50, Martin Koller wrote:
> Addressing http://bugs.kde.org/show_bug.cgi?id=14567
> (showing more than 1 day for remaining time)
> I want to know if the following is ok to commit.
Thanks for having looked into this.
Since filesize_t isn't really related to "number of seconds" it reads a bit
funny to use that type. Why not just use "unsigned long long int"?
kmountpoint.h does that so it looks portable.
One problem with KIO::convertSeconds() is that it doesn't allow localization,
i.e. using another format than hh:mm:ss in some languages. How about using
QTime at that point? E.g. like this:
const QTime time(hours, mins, secs);
const QString timeStr( KGlobal::locale()->formatTime(time, true /*with seconds*/, true /*duration*/) );
if ( days > 0 )
return i18n("1 day %1", "%n days %1", days).arg(timeStr);
else
return timeStr;
--
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic