On 19/04/2020 08.23, André Pönitz wrote:
QVariant(TypeA) and QVariant(TypeB) can be ordered for different TypeA and
TypeB based e.g. on alphabetical order of their .typeName().

If wanted, this can be refined to make e.g. all integral types comparable.

No:

  int{5} <=> JsonObject{...} => lesser
  int{5} <=> long{3} => greater
  long{3} <=> JsonObject{...} => greater

...oops.

You'd have to make all integral types sort before (or after) all other types, but then you're back to not having a reliable ordering by type name.

It makes *much* more sense that some comparisons just come back "incomparable".

--
Matthew
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to