Stop using QVariant < operator

It will be removed in Qt 6 without porting strategy:
f43cb31ba0

We know that that variants will be either ints (for `count`) or longs (for `size`),
so just convert them to longs (to avoid overflows) and compare those.
This commit is contained in:
Elvis Angelaccio 2020-10-15 00:07:12 +02:00
parent d9956c620e
commit 1ded75ce44

View file

@ -1771,7 +1771,7 @@ int KFileItemModel::sortRoleCompare(const ItemData* a, const ItemData* b, const
} else if (valueB.isNull()) {
result = +1;
} else {
if (valueA < valueB) {
if (valueA.toLongLong() < valueB.toLongLong()) {
return -1;
} else {
return +1;