mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
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:
parent
d9956c620e
commit
1ded75ce44
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue