There are two problems when sorting images by Date:
Since 05f7e069c858 Gwenview sorts images by shooting date. However, in
case two images have the same date or when there is no shooting date
available for a file, no appropriate secondary sorting criterion is
provided, leading to unexpected sorting results.
8f1283065235 enabled sorting in Descending order, but toggling the
option does not invert the sorting order for images with the same
shooting date.
Both problems can be fixed by falling back to a secondary sorting
criterion in case of equal shooting dates. For
KDirSortFilterProxyModel::lessThan, this means sorting by
KDirModel::ModifiedTime and finally by KDirModel::Name.