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

Thiago Macieira thiago.macieira at intel.com
Tue Oct 20 18:11:37 CEST 2015


On Tuesday 20 October 2015 08:49:17 André Somers wrote:
> Op 19-10-2015 om 17:54 schreef Thiago Macieira:
> > First of all, QStringRef keeps a pointer to the original QString, so it
> > isn't as fragile as QStringView. In fact, during the development of the
> > XML stream classes, there was a QSubString class that did more or less
> > what QStringView would do. It got replaced for a reason.
> 
> Would you mind expanding on that a bit? I would think that the XML
> stream classes would be a natural example to use a string view, but it
> seems that such a thing was tried and dragons were uncovered... Perhaps
> it would be good to share a war story here so we won't run into those
> same dragons again?

Wish that I could. I wasn't around that time. I know this happened because I 
used to pull the daily snapshots and commit to an svk repository (yes, svk!) 
to see the differences. That's how I spotted the QSubString class being added, 
then removed, then QStringRef showed up.

Is there anyone still around who worked with Matthias on this back in 
2006/2007?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list