[Development] RFC: QVariant changes in Qt6

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Mon Nov 25 15:35:53 CET 2019


Il 24/11/19 18:57, Olivier Goffart ha scritto:
> The issue is that there is lots of use of these (esp. the most common ones like
> toString and toInt.) Removing all uses be a huge work for no obvious reasons.
> (And i was told they are now recommended by clazy)

The reason was avoiding the template bloat of the instantiations of 
value<T> in client code, while such instantiations exist already in 
QtCore under a "different form" -- if T is int, QString, etc. then 
there's toInt(), toString() and so on. (I'm not sure of the overall 
impact, though.)

If we can use extern templates for the same purpose, then we could drop 
the clazy warning for Qt 6, keep the toFoo() as porting aids and just 
make them inline calls to value<Foo>().

My 2 c,
-- 
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/20191125/fb06002b/attachment.bin>


More information about the Development mailing list