From 522d68ab0be3187e6afacc741e7b2d947ecaad78 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Sun, 21 Jul 2013 22:11:57 +0300 Subject: [PATCH] Sort invalid dates regardless of sorting order. --- src/transferlistsortmodel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transferlistsortmodel.h b/src/transferlistsortmodel.h index bc50fc6de..ee73e1c3a 100644 --- a/src/transferlistsortmodel.h +++ b/src/transferlistsortmodel.h @@ -62,8 +62,8 @@ protected: QDateTime vR = sourceModel()->data(right).toDateTime(); //not valid dates should be sorted at the bottom. - if (!vL.isValid()) return !(sortOrder() == Qt::AscendingOrder); - if (!vR.isValid()) return (sortOrder() == Qt::AscendingOrder); + if (!vL.isValid()) return false; + if (!vR.isValid()) return true; return vL < vR; }