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 <thiago.macieira@intel.com>
This commit is contained in:
Andy Shaw 2015-03-13 10:33:35 +01:00
parent b6c14bca65
commit ba287c55ef

View File

@ -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: