[Development] QVariant comparison in Qt6
Bernhard Lindner
private at bernhard-lindner.de
Fri Sep 18 22:22:39 CEST 2020
> > Has anything changed for Qt6 (especially regarding comparison of equal
> > and/or convertible types)? Is the complete deprecation still the latest
> > decision?
>
> Yes, it's changed; no, it's not deprecation.
>
> What's been removed is the conversion. Aside from the numeric types, comparing
> two variants of different types will always result in false. If you want to
> compare across types, convert one to the other's type or to a common third
> type. You know what data you put in there and you should know what conversions
> can be lossy or not.
That would be much better than deprecation.
What about Qt 5.15? If I understood correctly, Qt 5.15 should prepare developers for
changes/deprecations/removals in Qt6. So I guess things that will remain part of Qt 6
should also be part of Qt 5.15. Still Qt 5.15 gives me warnings about deprecation of
operator < for QVariant.
--
Best Regards,
Bernhard Lindner
More information about the Development
mailing list