[Development] Container benchmark was HEADS UP: Don't use QList, use Q_DECLARE_TYPEINFO
Andre Somers
andre at familiesomers.nl
Sun Jul 12 20:04:09 CEST 2015
On 12-7-2015 19:56, Smith Martin wrote:
>> If it doesn't, then why not choose QVector?
> My intent in getting the information from Marc is to change the documentation of QList to say that.
>
> But QList is easy to use.
How is it easier to use than QVector?
I will grand you two: QList is two characters less to type than QVector,
so QList has the definite advantage there. Other than that, now that the
API is basicaly synchronized, I don't see much benefit in QList over
QVector. And 2) that Qt's own API often returns a QList and not a
QVector... Perhaps QList needs to implicitly convert to a QVector so it
become easier to make the transition in user code? Then, if Qt itself
changes its API in Qt 6 to use QVector instead of QList, the users' code
will just work :-)
André
More information about the Development
mailing list