[Development] RFC: QVariant changes in Qt6
Thiago Macieira
thiago.macieira at intel.com
Mon Nov 25 22:14:20 CET 2019
On Monday, 25 November 2019 06:35:53 PST Giuseppe D'Angelo via Development
wrote:
> 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>().
Those functions are really small and not worth the trouble of deduplicating.
They'll likely be inlined anyway.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel System Software Products
More information about the Development
mailing list