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

Olivier Goffart olivier at woboq.com
Wed Oct 14 09:38:51 CEST 2015


On Tuesday 13. October 2015 22:46:36 Marc Mutz wrote:
> I would therefore like to propose to abandon QString for new API (and over
> time phase it out of existing API), and only provide (const QChar*, size_t)
> as the most general form. I would propose to package the two into a class,
> called - you guessed it - QStringView.

+1

I think we indeed need QStringView, QByteArrayView and even QVectorView<T>.

And functions that take strings without taking ownership of them (i.e: not 
setters) should use that.

-- 
Olivier 

Woboq - Qt services and support - http://woboq.com - http://code.woboq.org



More information about the Development mailing list