[Development] RFC: Proposal for a semi-radical change in Qt APIs taking strings

Smith Martin Martin.Smith at theqtcompany.com
Sun Oct 18 21:36:24 CEST 2015


>If that doesn't look like a radical change to you...

But that's way down the line. 

We can add QStringView and overloads that take QStringView without removing the overloads that take QString. 

Then we can deprecate the overloads that take QString.

________________________________________
From: development-bounces+martin.smith=theqtcompany.com at qt-project.org <development-bounces+martin.smith=theqtcompany.com at qt-project.org> on behalf of Giuseppe D'Angelo <giuseppe.dangelo at kdab.com>
Sent: Sunday, October 18, 2015 9:27 PM
To: development at qt-project.org
Subject: Re: [Development] RFC: Proposal for a semi-radical change in Qt APIs taking strings

Il 18/10/2015 20:30, Smith Martin ha scritto:
> After watching the video on string_view, it seems clear we have to offer a QStringView, so I don't see what is "semi-radical" about your proposal.

That the proposal is that every single function currently taking a
QString should instead be changed to take a QStringView instead, unless
a few exceptional cases (for instance the function is used to store the
string somehow, plus other cases under discussion). Similar case for
return values. If that doesn't look like a radical change to you...

Cheers,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Software Engineer
KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
KDAB - The Qt Experts




More information about the Development mailing list