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:
parent
b6c14bca65
commit
ba287c55ef
@ -235,7 +235,7 @@ bool QDirSortItemComparator::operator()(const QDirSortItem &n1, const QDirSortIt
|
|||||||
firstModified.setTimeSpec(Qt::UTC);
|
firstModified.setTimeSpec(Qt::UTC);
|
||||||
secondModified.setTimeSpec(Qt::UTC);
|
secondModified.setTimeSpec(Qt::UTC);
|
||||||
|
|
||||||
r = firstModified.secsTo(secondModified);
|
r = firstModified.msecsTo(secondModified);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case QDir::Size:
|
case QDir::Size:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user