On Monday, 17 de October de 2011 22:03:10 Oswald Buddenhagen wrote:
> > The good reason is that it's not a string. It's a sequence of arbitrary
> > bytes  which are not a string.
> 
> uhm, no. in qt 4, qbytearray was turned into a fully-fledged string
> class, to replace QCString.

It's still a glorified container for arbitrary bytes. However, unlike 
QVector<char>, QByteArray has some support for treating its contents as 
strings.

The presence of methods like toUpper and toLower is problematic. Since it uses 
the C library's ctype, it's locale-dependent. It should be fixed into ASCII (7-
bit) only.

>From my point of view, the API in QVector should be in both QString and 
QByteArray, as they are all three just arrays of a given type. Then QByteArray 
can have a bit of convenience. But the really useful, Unicode methods are only 
in QString.

In any case, common derivation has never been a problem for us. I point you to 
QQ13, the part about "static polymorphism".

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