Thiago Macieira wrote:
>> And add stuff like:
>> - can be generate at compile time and put in the .rodata (like we did for
>> QString)
>
> That implies having no pointers, which is why QString has that qptrdiff
> offset
> in the first place. QVectorData and QListData today already don't have any
> pointers.
This is something I want to support more generally: mmap'able data structures,
not necessarily compile time generated. At the minimum I'd like to get an array
(QVector) and a dictionary (QHash/QMap), in particular dictionaries where the
key is QString/QByteArray. We'd have to be creative and directly abuse
QStringData/QByteArrayData (or a unified QArrayData) for this to happen.
That's in addition to the existing support for QByteArray and QString.
Another variation of the array classes I've wondered about is one with a
detached reference count, say:
QStringRef
{
QAtomicInt *ref;
int size;
int alloc;
qptrdiff offset;
};
Provided we can specify how data is deleted when the reference count goes to
zero (if at all), something along those lines would allow allocation-less
manipulation of array data coming from external sources.
Cheers,
João
_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback