If the sort order is descending and directories and files are
shown on the same hierarchy level, the sorting was partly wrong.
const QString subPathB = subPath(b->item, pathB, index, &isDirB);
if (isDirA && !isDirB) {
const QString subPathB = subPath(b->item, pathB, index, &isDirB);
if (isDirA && !isDirB) {
+ return (sortOrder() == Qt::AscendingOrder) ? -1 : +1;
} else if (!isDirA && isDirB) {
} else if (!isDirA && isDirB) {
+ return (sortOrder() == Qt::AscendingOrder) ? +1 : -1;
}
// Compare the items of the parents that represent the first
}
// Compare the items of the parents that represent the first