path: root/src/dbus/qdbusabstractadaptor.cpp
diff options
authorKent Hansen <>2012-02-18 23:16:24 +0100
committerQt by Nokia <>2012-02-29 12:50:14 +0100
commit96f2365cf4cebc074c3171878dcd25ce19ee7486 (patch)
tree188bde357226f7c86adf11618bbaac8e53020f97 /src/dbus/qdbusabstractadaptor.cpp
parent3f7a222414fc9d3e9f2e2cfdd05f33740c5afb7e (diff)
Rename QMetaMethod::signature() to methodSignature()
In Qt5 the meta-data format will be changed to not store the method signature string explicitly; the signature will be reconstructed on demand from the method name and parameter type information. The QMetaMethod::signature() method returns a const char pointer. Changing the return type to QByteArray can lead to silent bugs due to the implicit conversion to char *. Even though it's a source- incompatible change, it's therefore better to introduce a new function, methodSignature(), and remove the old signature(). Task-number: QTBUG-24154 Change-Id: Ib3579dedd27a3c7c8914d5f1b231947be2cf4027 Reviewed-by: Olivier Goffart <> Reviewed-by: Lars Knoll <> Reviewed-by: Thiago Macieira <> Reviewed-by: João Abecasis <>
Diffstat (limited to 'src/dbus/qdbusabstractadaptor.cpp')
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dbus/qdbusabstractadaptor.cpp b/src/dbus/qdbusabstractadaptor.cpp
index 3ba8acca82..bacf93bac8 100644
--- a/src/dbus/qdbusabstractadaptor.cpp
+++ b/src/dbus/qdbusabstractadaptor.cpp
@@ -181,7 +181,7 @@ void QDBusAbstractAdaptor::setAutoRelaySignals(bool enable)
// try to connect/disconnect to a signal on the parent that has the same method signature
- QByteArray sig = QMetaObject::normalizedSignature(mm.signature());
+ QByteArray sig = QMetaObject::normalizedSignature(mm.methodSignature().constData());
if (them->indexOfSignal(sig) == -1)
sig.prepend(QSIGNAL_CODE + '0');
@@ -307,7 +307,7 @@ void QDBusAdaptorConnector::relay(QObject *senderObj, int lastSignalIdx, void **
// invalid signal signature
// qDBusParametersForMethod has not yet complained about this one
qWarning("QDBusAbstractAdaptor: Cannot relay signal %s::%s",
- senderMetaObject->className(), mm.signature());
+ senderMetaObject->className(), mm.methodSignature().constData());