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

Thiago Macieira thiago.macieira at intel.com
Sun Oct 18 22:55:23 CEST 2015


On Sunday 18 October 2015 21:27:31 Giuseppe D'Angelo wrote:
> 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...

Return values must always be QString, never QStringView. Returning a view is 
like returning a reference and goes against Qt's library code policy.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list