[Development] Feature Freeze Exception: QStringView

Marc Mutz marc.mutz at kdab.com
Wed Feb 1 15:22:22 CET 2017


On Wednesday 01 February 2017 15:20:02 Marc Mutz wrote:
> On Wednesday 01 February 2017 10:53:45 Alexander Volkov wrote:
> >          found.append(QString(line.constData(), line.size())); // deep
> >          copy
> 
> Ummm..
> 
>   found.append(line.constData(), line.size());
> 
> Problem solved?

Ah, nevermind, 'found' is a QString_List_.

I'm curious how a non-implicitly-shared string type would help you there, 
though. You can always clear() (or, in case of QVector<QString>, std::move()) 
the string, and capacity is left with the sole owner in the container.

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