On Monday, 17 de October de 2011 14:46:12 Oswald Buddenhagen wrote:
> On Sun, Oct 16, 2011 at 04:30:39PM +0200, ext Thiago Macieira wrote:
> > When I talked to João this week, he expressed the desire to unify the
> > header code of QVector, QByteArray and QString.
>
> whether deriving from qvector makes sense i don't know, but i'm very
> much in favor of implementing QString and QByteArray as
> QStringBase<QChar> and QStringBase<QByte>. for compatibility, data()
> would have to continue to return QChar* resp. uchar*, but more unified
> access could be granted via array() (or wrappedData()) (returning QChar*
> resp. QByte*) and optionally podArray() (or podData()) (returning
> ushort* resp. uchar*).

Hi Ossi

I don't see the benefit of doing this, but I do see a lot more work to do.

The implementation of the functions dealing with the data-as-a-string are
completely different from the two classes. QString also has Unicode methods,
which QByteArray doesn't.

Converting from QString to QByteArray and vice-versa is completely different;
QString has methods to deal with Latin 1 strings whereas QByteArray does not.

Unless you're suggesting we make it possible to use UTF-8 QStrings...

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to