Commit 1ded75ce authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

Stop using QVariant < operator

It will be removed in Qt 6 without porting strategy:

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.
parent d9956c62
......@@ -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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment