In general, Gwenview sorts directories first, then groups all archives
behind those and finally displays images. While the separation of images
worked fine when sorting by Date, directories and archives were
mistakenly mixed within a single group for that sorting order.
This is because the special handling for KDirModel::ModifiedTime in
SortedDirModel::lessThan does not take into account
KDirSortFilterProxyModel::sortFoldersFirst(). As directories cannot
come with a shooting date, we can delegate sorting to
KDirSortFilterProxyModel::lessThan which handles the separation of
directories just fine.
For SemanticInfoDirModel::RatingRole the problem could not be
observed, because Gwenview did not pass on the rating of directories,
so both directories being compared had a zero rating and we fell back to
KDirSortFilterProxyModel::lessThan. Nevertheless, for clarity we make
the fallback for sorting by rating explicit too.
Depends on D13727