[Interest] QMetaType in Qt5.2.0 - assertion on missing comparator registration?

Bernhard private at bernhard-lindner.de
Wed Nov 20 10:47:15 CET 2013


I just played around with the new QMetaType::registerComparators() in
Qt5.2.0. Very useful.

But I currently wonder why the internal function QMetaType::compare() simply
returns false in case no comparator functions for the given type have been
I think silently returning false here can lead to nasty bugs if one forgets
to register a type's operators (actually I just experienced this).

Why is there no assertion? Or maybe a warning? Is there any sense in
comparing QVariants that can not be compared? 

Kind Regards
Dipl. Ing. (FH) Bernhard Lindner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 1762 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20131120/34ac6938/attachment.bin>

More information about the Interest mailing list