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

Marc Mutz marc.mutz at kdab.com
Fri Oct 16 15:47:23 CEST 2015


On Friday 16 October 2015 09:53:56 Smith Martin wrote:
> Then after we add QStringView, we will have QString for containing a string
> and QStringView for passing its contents out of Qt?

Yes, except for "out of Qt". We already have - within Qt - lots of equivalent 
ways to provide a QChar-based string - and QString is only one (QStringRef and 
QVarLengthArray<QChar> are others, as is QChar[]).

As I said before, this is very similar to Q(Persistent)ModelIndex - QMI is the 
interface type, and it's transparent to the compiler and thus efficient to work 
with. QPMI is the storage type, intransparent to the compiler and very slow to 
work with.

HTH,
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