path: root/src/dbus/qdbusabstractadaptor.cpp
diff options
authorKent Hansen <>2012-05-31 21:27:47 +0200
committerQt by Nokia <>2012-06-01 12:03:39 +0200
commitb60f6447d0efc622792113bc4896c0dc176e8df3 (patch)
tree4626b2b0cf0249ae988289b55563e6e2d26a9fc4 /src/dbus/qdbusabstractadaptor.cpp
parentcd95bcd7dbc5a4df8950bbc4bec3a6a02c71f00b (diff)
Avoid accessing QObjectPrivate::currentSender directly from QtDBus
In particular, currentSender->signal is about to be changed from the method index range to the signal index range (i.e., excluding non-signal methods). The public senderSignalIndex() function will still return the index in the method range, so QtDBus will then continue to work without change. If necessary, QtDBus can afterwards be ported back to using the internal API again (including the new QMetaObjectPrivate API for working with methods in the signal range). Change-Id: I58212e859560a8e241adee99dd2da9ef009d4e5b Reviewed-by: Thiago Macieira <> Reviewed-by: Olivier Goffart <>
Diffstat (limited to 'src/dbus/qdbusabstractadaptor.cpp')
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dbus/qdbusabstractadaptor.cpp b/src/dbus/qdbusabstractadaptor.cpp
index 39584c436c..0d0c09a168 100644
--- a/src/dbus/qdbusabstractadaptor.cpp
+++ b/src/dbus/qdbusabstractadaptor.cpp
@@ -277,8 +277,7 @@ void QDBusAdaptorConnector::polish()
void QDBusAdaptorConnector::relaySlot(void **argv)
- QObjectPrivate *d = static_cast<QObjectPrivate *>(;
- relay(d->currentSender->sender, d->currentSender->signal, argv);
+ relay(sender(), senderSignalIndex(), argv);
void QDBusAdaptorConnector::relay(QObject *senderObj, int lastSignalIdx, void **argv)