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

Marc Mutz marc.mutz at kdab.com
Fri Oct 16 15:52:54 CEST 2015


On Friday 16 October 2015 13:28:57 Иван Комиссаров wrote:
> Back to the topic.
> Marc, what usecases of QStringView are not covered with QString { ushort*
> data; int size; QStringData *refcount; }
> Not sure i understand that "interface" terminology. Would it be possible to
> pass QStringView to other (non-qt) APIs?

See my mail to Martin today.

While not the first reason to create a QStringView, yes, a (ushort*, ushort*) 
can allow zero-copy string transfer between at least C, C++ and Java, possibly 
also JavaScript. So it may have a direct benefit for QML, though I don't know 
that code at all.

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 Experts



More information about the Development mailing list