summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbuspendingcall.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2011-11-16 14:47:11 -0200
committerQt by Nokia <qt-info@nokia.com>2012-03-24 17:07:52 +0100
commite22a6108fda7cac78f5597247ce7b0628b6ba3e2 (patch)
tree49858a35bf398e8137c853bbd258b826adbe8974 /src/dbus/qdbuspendingcall.cpp
parent387ec9c2a35b2b181e2b2ca29079ecb44eac87e9 (diff)
Use QVector<int> instead of QList<int> for storing metatypes in QtDBus
Change I00020eed fixed a bug present in 64-bit machines because it tried to access QList<int>'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 <stephen.kelly@kdab.com>
Diffstat (limited to 'src/dbus/qdbuspendingcall.cpp')
-rw-r--r--src/dbus/qdbuspendingcall.cpp7
1 files changed, 1 insertions, 6 deletions
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<int> types = QVector<int>::fromList(metaTypes);
- setMetaTypes(count, types.constData() + 1);
- }
+ setMetaTypes(count, count ? metaTypes.constData() + 1 : 0);
return true;
}