[Development] RFC: QVariant changes in Qt6

Thiago Macieira thiago.macieira at intel.com
Mon Nov 25 22:15:28 CET 2019


On Sunday, 24 November 2019 09:57:56 PST Olivier Goffart wrote:
> Adding a cast<T> function does not sound like a bad idea? But should it be
> done in Qt5.15 or Qt6. And should it return T or optional<T> (in case the
> conversion did not work)  or have a bool*ok=nullptr  parameter?

The problem with std::optional in Qt 5 is that you can't require it. So either 
you add an API behind #if (which is ok) or you have to wait for Qt 6.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products





More information about the Development mailing list