> 20. mar. 2017 kl. 17.14 skrev Mark Gaiser <[email protected]>:
> On Sat, Mar 18, 2017 at 10:51 AM, Marc Mutz <[email protected] 
> <mailto:[email protected]>> wrote:
>> 6. Kill QList or keep it as a deprecated class.
>> Thanks,
>> Marc
> Hi Marc,
> I'm fine with replacing QList usages with QVector in codebases i
> maintain, but even with the latest Qt version, that isn't always
> possible or convenient.
> For instance, at this very moment i want a QVector with all keys from
> a given map (QMap<QDate, QString>) but Qt itself doesn't provide a
> direct way of doing that.


I would probably use QDateTime(date).toMSecsSinceEpoch() or something similar 
as a key in such a map. It’s very hard to provide good default behavior for 
code that is inefficient at its core. In this case, QList and QVector would 
perform fairly similarly for both cases I /think/. Meaning for an integer key 
which is behaviourally equivalent but vastly more efficient, QList and QVector 
would store them the same way.

Andreas

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to