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

Stop using QVariant < operator

It will be removed in Qt 6 without porting strategy:
https://github.com/qt/qtbase/commit/f43cb31ba00a431c6d0a0b17750483a72ae03bb0

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;
......
Markdown is supported
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