Use QList instead of QVector
Task-number: QTBUG-84469 Change-Id: Ia365c958e3b2d0c8210f5d693d907bb2012887c2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
b1f8ca8032
commit
89ecbf0978
@ -214,11 +214,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, "QVector<QVariant>") \
|
||||
F(QVariantList, -1, QVariantList, "QList<QVariant>") \
|
||||
F(QVariantMap, -1, QVariantMap, "QMap<QString,QVariant>") \
|
||||
F(QVariantHash, -1, QVariantHash, "QHash<QString,QVariant>") \
|
||||
F(QByteArrayList, -1, QByteArrayList, "QVector<QByteArray>") \
|
||||
F(QByteArrayList, -1, QByteArrayList, "QList<QByteArray>") \
|
||||
|
||||
#define QT_FOR_EACH_STATIC_TYPE(F)\
|
||||
QT_FOR_EACH_STATIC_PRIMITIVE_TYPE(F)\
|
||||
@ -928,8 +927,8 @@ struct ContainerAPI : CapabilitiesImpl<T>
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct ContainerAPI<QVector<T> > : CapabilitiesImpl<QVector<T> >
|
||||
{ static int size(const QVector<T> *t) { return t->size(); } };
|
||||
struct ContainerAPI<QList<T>> : CapabilitiesImpl<QList<T>>
|
||||
{ static int size(const QList<T> *t) { return t->size(); } };
|
||||
|
||||
template<typename T>
|
||||
struct ContainerAPI<std::vector<T> > : CapabilitiesImpl<std::vector<T> >
|
||||
|
@ -181,8 +181,8 @@ int qDBusParametersForMethod(const QList<QByteArray> ¶meterTypes, QList<int>
|
||||
return -1; // not allowed
|
||||
}
|
||||
|
||||
if (type.startsWith("QList<"))
|
||||
type = "QVector<" + type.mid(sizeof("QList<") - 1);
|
||||
if (type.startsWith("QVector<"))
|
||||
type = "QList<" + type.mid(sizeof("QVector<") - 1);
|
||||
|
||||
int id = QMetaType::type(type);
|
||||
#ifdef QT_BOOTSTRAPPED
|
||||
|
Loading…
Reference in New Issue
Block a user