[Development] QList

Marc Mutz marc.mutz at kdab.com
Tue Mar 28 06:48:21 CEST 2017


On Monday 27 March 2017 23:53:05 Giuseppe D'Angelo wrote:
> Why would
> I want to return QStrings for this use case and super-pessimize it?

You wouldn't. You can return QStringViews just as well as you can take an 
iterator into a collection.

Whether a give QStringRef return is safe to be replaced with QStringView is 
another matter, one that needs to be evaluated case-by-case. A blanket 
statement is not possible, since QStringRef has stronger stability guarantees 
(probably undocumented, though).

Thanks,
Marc

-- 
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts



More information about the Development mailing list