Fix sorting of ETA column when having infinite values (closes #583347)

This commit is contained in:
Christophe Dumez 2010-05-21 11:46:12 +00:00
parent 982390f074
commit 29e79dc54d
3 changed files with 8 additions and 6 deletions

View file

@ -519,7 +519,7 @@ QString misc::expandPath(QString path) {
// Take a number of seconds and return an user-friendly
// time duration like "1d 2h 10m".
QString misc::userFriendlyDuration(qlonglong seconds) {
if(seconds < 0) {
if(seconds < 0 || seconds >= MAX_ETA) {
return QString::fromUtf8("");
}
if(seconds == 0) {