[Development] QVariant comparison in Qt6

Thiago Macieira thiago.macieira at intel.com
Fri Sep 18 17:14:20 CEST 2020


On Friday, 18 September 2020 01:44:36 PDT Giuseppe D'Angelo via Development 
wrote:
> Il 18/09/20 02:54, Thiago Macieira ha scritto:
> > 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.
> 
> In other words even mixed comparisons between strings, string views,
> byte array, etc. are unsupported now?

Between byte arrays and strings, they should be unsupported, since they are 
different types. We can argue that the views and non-view containers should be 
comparable.

But neither QStringView nor QByteArrayView have meta types.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering





More information about the Development mailing list