Use natural comparison also for the file types
If we want to sort according to file types, we're also sorting user visible strings. For that we can also use the natural comparison collator, as file types should be case insensitive, and won't contain numbers. And even if they do a natual sorting will make it easier for the end user to find what they are looking for. Change-Id: Ie1d7d0af041a08be0f0d1a4eeb2eae9be885ffc7 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
197da3d220
commit
ca14600965
@ -1024,7 +1024,7 @@ public:
|
|||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
int compare = QString::localeAwareCompare(l->type(), r->type());
|
int compare = naturalCompare.compare(l->type(), r->type());
|
||||||
if (compare == 0)
|
if (compare == 0)
|
||||||
return naturalCompare.compare(l->fileName, r->fileName) < 0;
|
return naturalCompare.compare(l->fileName, r->fileName) < 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user