[Development] QVariant comparison in Qt6

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Fri Sep 18 11:06:58 CEST 2020


Il 18/09/20 10:22, Lars Knoll ha scritto:
> 
> Sorting and equality are two different things. QVariant has never 
> supported a lessThan operator.

That's not accurate. Q5Variant has operator<, and Q5MetaType allowed to 
register comparators (op== and op<) for a user type. I don't know how 
much software relied on this magic for user defined types, certainly 
reimplementing it in one's code is going to be slightly annoying but 
doable. The big problem is the logic for builtin types which is now 
broken without much of a replacement...

-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200918/27e7821c/attachment.bin>


More information about the Development mailing list