From e22a6108fda7cac78f5597247ce7b0628b6ba3e2 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 16 Nov 2011 14:47:11 -0200 Subject: Use QVector instead of QList for storing metatypes in QtDBus Change I00020eed fixed a bug present in 64-bit machines because it tried to access QList's internal array data, assuming it was a vector of ints. That worked in 32-bit, but not 64-bit. The fix involves a conversion between QList and QVector. Now fix it properly by changing everything to be QVector. The benefit is that on 64-bit, they are real vectors, not the 50%-overhead pointer array that QList is. Change-Id: I989ad279d0d8b2c9ab262a1eed413ab2365b5461 Reviewed-by: Stephen Kelly --- src/dbus/qdbusintegrator_p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/dbus/qdbusintegrator_p.h') diff --git a/src/dbus/qdbusintegrator_p.h b/src/dbus/qdbusintegrator_p.h index c9a2efc57d..f910d2d009 100644 --- a/src/dbus/qdbusintegrator_p.h +++ b/src/dbus/qdbusintegrator_p.h @@ -84,7 +84,7 @@ struct QDBusSlotCache { int flags; int slotIdx; - QList metaTypes; + QVector metaTypes; }; typedef QMultiHash Hash; Hash hash; @@ -94,7 +94,7 @@ class QDBusCallDeliveryEvent: public QMetaCallEvent { public: QDBusCallDeliveryEvent(const QDBusConnection &c, int id, QObject *sender, - const QDBusMessage &msg, const QList &types, int f = 0) + const QDBusMessage &msg, const QVector &types, int f = 0) : QMetaCallEvent(0, id, 0, sender, -1), connection(c), message(msg), metaTypes(types), flags(f) { } @@ -106,7 +106,7 @@ public: private: QDBusConnection connection; // just for refcounting QDBusMessage message; - QList metaTypes; + QVector metaTypes; int flags; }; -- cgit v1.2.3