From 5357231c0a10eef558cc6aebfd172048dc010a96 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 24 May 2019 14:27:48 +0200 Subject: Make QList an alias to QVector This is almost 100% source compatible with Qt 5. Exceptions are * Stability of references for large or non movable types * taking a PMF for types that are now overloaded with r-value references in QVector * The missing prepend optimization in QVector (that is still planned to come for Qt 6) Change-Id: I96d44553304dd623def9c70d6fea8fa2fb0373b0 Reviewed-by: Simon Hausmann --- src/corelib/kernel/qmetatype.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/corelib/kernel/qmetatype.h') diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 8b621f0161..7b985be9fd 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -207,10 +207,10 @@ inline Q_DECL_CONSTEXPR int qMetaTypeId(); F(UInt, -1, uint, "quint32") \ F(LongLong, -1, qlonglong, "qint64") \ F(ULongLong, -1, qulonglong, "quint64") \ - F(QVariantList, -1, QVariantList, "QList") \ + F(QVariantList, -1, QVariantList, "QVector") \ F(QVariantMap, -1, QVariantMap, "QMap") \ F(QVariantHash, -1, QVariantHash, "QHash") \ - F(QByteArrayList, -1, QByteArrayList, "QList") \ + F(QByteArrayList, -1, QByteArrayList, "QVector") \ #define QT_FOR_EACH_STATIC_TYPE(F)\ QT_FOR_EACH_STATIC_PRIMITIVE_TYPE(F)\ @@ -225,7 +225,6 @@ inline Q_DECL_CONSTEXPR int qMetaTypeId(); TypeName = Id, #define QT_FOR_EACH_AUTOMATIC_TEMPLATE_1ARG(F) \ - F(QList) \ F(QVector) \ F(QQueue) \ F(QStack) \ @@ -1003,10 +1002,6 @@ struct ContainerAPI : CapabilitiesImpl static int size(const T *t) { return int(std::distance(t->begin(), t->end())); } }; -template -struct ContainerAPI > : CapabilitiesImpl > -{ static int size(const QList *t) { return t->size(); } }; - template struct ContainerAPI > : CapabilitiesImpl > { static int size(const QVector *t) { return t->size(); } }; -- cgit v1.2.3