[Development] QString behavior change

Shaw Andy andy.shaw at theqtcompany.com
Wed Aug 12 10:22:15 CEST 2015


> > > What are the chances that such a change can be accepted ? (i mean, i can
> > > submit such a patch, but that would mean breaking a *lot* of code).
> >
> > QOptional does not exist yet and for very good reasons.
> >
> > QVariant is already in use, so I don't think you'd be sending a patch to use
> > QVariant.
> >
> > What are you proposing to send?
> 
> Changing QtSql so that :
> - null QString are binded to SQL '' (same as empty string)
> - to bind to NULL you thus require a null QVariant (same as for null
> int), that require no change
> 
> I don’t expect such a change to be accepted before at least Qt6, but i’d
> be happy to hear i’m wrong.

Speaking from my perspective as I have done a fair bit with QtSql in the past, I highly doubt that this change could be done before Qt 6, there is a risk that it will break existing applications and silently so too therefore it would be a risk whenever it would be done. Ergo it would be best that it is done in Qt 6 IMO. Though I am not the maintainer of the module so naturally it is not my call.

Andy


More information about the Development mailing list