qt5base-lts/tests/auto/widgets/dialogs/qfilesystemmodel
Giuseppe D'Angelo e6e4456de0 QFileSystemModel: fix sorting
When sorting a model recursively, the children of a QFileSystemNode
are extracted from their parent in a QHash order; then filtered,
then sorted (using a stable sort) depending on the sorting column.

This means that the order of the children comparing to equal for
the chosen sort are shown in the order they were picked from the
iteration on the QHash, which isn't reliable at all.

Moreover, the criteria used in QFileSystemModelSorter for sorting
are too loose: when sorting by any column but the name, if the result
is "equality", then the file names should be used to determine
the sort order.

This patch removes the stable sort in favour of a full sort,
and fixes the criteria of soring inside QFileSystemModelSorter.

Change-Id: Idd9aece22f2ebbe77ec40d372b43cde4c200ff38
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-07 19:45:39 +02:00
..
.gitignore Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
qfilesystemmodel.pro QFileSystemModel autotest fixes 2012-02-29 20:10:21 +01:00
tst_qfilesystemmodel.cpp QFileSystemModel: fix sorting 2012-04-07 19:45:39 +02:00