Browse Source

Simplify comparison

From https://doc.qt.io/qt-5/qdatetime.html#operator-eq-eq:
>Since 5.14, all invalid datetimes are equal to one another and differ from all other datetimes.
adaptive-webui-19844
Chocobo1 3 years ago
parent
commit
e96f2d7be0
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 4
      src/gui/transferlistsortmodel.cpp

4
src/gui/transferlistsortmodel.cpp

@ -51,10 +51,8 @@ namespace @@ -51,10 +51,8 @@ namespace
const bool isLeftValid = left.isValid();
const bool isRightValid = right.isValid();
if (isLeftValid && isRightValid)
if (isLeftValid == isRightValid)
return threeWayCompare(left, right);
if (!isLeftValid && !isRightValid)
return 0;
return isLeftValid ? -1 : 1;
}

Loading…
Cancel
Save