From ba287c55ef179b073482453298f513992b54c11e Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 13 Mar 2015 10:33:35 +0100 Subject: Sort the entries in QDir by using the QDateTime::msecsTo() By using the QDateTime::msecsTo to do the sorting it means that if there is support for a precise time on the file system then this ensures it sorts correctly. Change-Id: I00528596908bba7b586aeffe5b0aa81019ff5722 Reviewed-by: Thiago Macieira --- src/corelib/io/qdir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib') diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index c9c6704423..7fa53bd850 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -235,7 +235,7 @@ bool QDirSortItemComparator::operator()(const QDirSortItem &n1, const QDirSortIt firstModified.setTimeSpec(Qt::UTC); secondModified.setTimeSpec(Qt::UTC); - r = firstModified.secsTo(secondModified); + r = firstModified.msecsTo(secondModified); break; } case QDir::Size: -- cgit v1.2.3