diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2011-11-16 14:47:11 -0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-24 17:07:52 +0100 |
commit | e22a6108fda7cac78f5597247ce7b0628b6ba3e2 (patch) | |
tree | 49858a35bf398e8137c853bbd258b826adbe8974 /src/dbus/qdbusconnection_p.h | |
parent | 387ec9c2a35b2b181e2b2ca29079ecb44eac87e9 (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/qdbusconnection_p.h')
-rw-r--r-- | src/dbus/qdbusconnection_p.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h index 41a1341e40..5f58b2cf68 100644 --- a/src/dbus/qdbusconnection_p.h +++ b/src/dbus/qdbusconnection_p.h @@ -124,7 +124,7 @@ public: QString service, path, signature; QObject* obj; int midx; - QList<int> params; + QVector<int> params; QStringList argumentMatch; QByteArray matchRule; }; @@ -241,7 +241,7 @@ private: void sendError(const QDBusMessage &msg, QDBusError::ErrorType code); void deliverCall(QObject *object, int flags, const QDBusMessage &msg, - const QList<int> &metaTypes, int slotIdx); + const QVector<int> &metaTypes, int slotIdx); bool isServiceRegisteredByThread(const QString &serviceName) const; @@ -309,7 +309,7 @@ public: public: // static methods - static int findSlot(QObject *obj, const QByteArray &normalizedName, QList<int>& params); + static int findSlot(QObject *obj, const QByteArray &normalizedName, QVector<int> ¶ms); static bool prepareHook(QDBusConnectionPrivate::SignalHook &hook, QString &key, const QString &service, const QString &path, const QString &interface, const QString &name, @@ -321,7 +321,7 @@ public: int idx, const QList<int> &metaTypes, const QDBusMessage &msg); static QDBusCallDeliveryEvent *prepareReply(QDBusConnectionPrivate *target, QObject *object, - int idx, const QList<int> &metaTypes, + int idx, const QVector<int> &metaTypes, const QDBusMessage &msg); static void processFinishedCall(QDBusPendingCallPrivate *call); @@ -335,7 +335,7 @@ public: }; // in qdbusmisc.cpp -extern int qDBusParametersForMethod(const QMetaMethod &mm, QList<int>& metaTypes); +extern int qDBusParametersForMethod(const QMetaMethod &mm, QVector<int> &metaTypes); extern bool qDBusCheckAsyncTag(const char *tag); extern bool qDBusInterfaceInObject(QObject *obj, const QString &interface_name); extern QString qDBusInterfaceFromMetaObject(const QMetaObject *mo); |