diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 1555b26d99a..09c3eee6ea2 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -2265,7 +2265,7 @@ int spaceShip(Numeric lhs, Numeric rhs) { smaller = std::less()(lhs, rhs); // can't use less all the time because of bool else smaller = lhs < rhs; - if (lhs < rhs) + if (smaller) return -1; else if (lhs == rhs) return 0;