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/qdbuspendingcall.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/dbus/qdbuspendingcall.cpp') diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp index 65d4b5533b..8e74ecbdde 100644 --- a/src/dbus/qdbuspendingcall.cpp +++ b/src/dbus/qdbuspendingcall.cpp @@ -180,12 +180,7 @@ bool QDBusPendingCallPrivate::setReplyCallback(QObject *target, const char *memb if (metaTypes.at(count) == QDBusMetaTypeId::message) --count; - if (count == 0) { - setMetaTypes(count, 0); - } else { - QVector types = QVector::fromList(metaTypes); - setMetaTypes(count, types.constData() + 1); - } + setMetaTypes(count, count ? metaTypes.constData() + 1 : 0); return true; } -- cgit v1.2.3