Hi,

Before this gets any more traction: Aye! for QUtf8String, nay for the implementation.

On 2019-07-08 09:46, Arnaud Clere wrote:
//! Explicitely utf8 encoded byte array
class QUtf8String : public QByteArray
{
public:
    using QByteArray::QByteArray;
    QUtf8String(const QByteArray& o) : QByteArray(o) {}
    QUtf8String() : QByteArray() {}
};

Whenever we have publicly derived one value type from another, we've created a mess. QPolygon : QVector (qvector_msvc.h), QStringList : QList (QListSpecialMethods), QItemSelection : QList (qHash(QItemselectionRange)), QMutex : QBasicMutex (invalid casts in QMutexLocker), ...

So no, no more inheriting of value classes from each other. QUtf8String, if it comes, will have to be a separate type, not a subclass of QByteArray.

Thanks,
Marc
_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to