summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusmisc.cpp
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-02-18 23:16:24 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-29 12:50:14 +0100
commit96f2365cf4cebc074c3171878dcd25ce19ee7486 (patch)
tree188bde357226f7c86adf11618bbaac8e53020f97 /src/dbus/qdbusmisc.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 <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Diffstat (limited to 'src/dbus/qdbusmisc.cpp')
-rw-r--r--src/dbus/qdbusmisc.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dbus/qdbusmisc.cpp b/src/dbus/qdbusmisc.cpp
index 7d68bf1185..0a5da604f2 100644
--- a/src/dbus/qdbusmisc.cpp
+++ b/src/dbus/qdbusmisc.cpp
@@ -141,7 +141,7 @@ int qDBusParametersForMethod(const QMetaMethod &mm, QList<int>& metaTypes)
for ( ; it != end; ++it) {
const QByteArray &type = *it;
if (type.endsWith('*')) {
- //qWarning("Could not parse the method '%s'", mm.signature());
+ //qWarning("Could not parse the method '%s'", mm.methodSignature().constData());
// pointer?
return -1;
}
@@ -152,7 +152,7 @@ int qDBusParametersForMethod(const QMetaMethod &mm, QList<int>& metaTypes)
int id = QMetaType::type(basictype);
if (id == 0) {
- //qWarning("Could not parse the method '%s'", mm.signature());
+ //qWarning("Could not parse the method '%s'", mm.methodSignature().constData());
// invalid type in method parameter list
return -1;
} else if (QDBusMetaType::typeToSignature(id) == 0)
@@ -164,14 +164,14 @@ int qDBusParametersForMethod(const QMetaMethod &mm, QList<int>& metaTypes)
}
if (seenMessage) { // && !type.endsWith('&')
- //qWarning("Could not parse the method '%s'", mm.signature());
+ //qWarning("Could not parse the method '%s'", mm.methodSignature().constData());
// non-output parameters after message or after output params
return -1; // not allowed
}
int id = QMetaType::type(type);
if (id == 0) {
- //qWarning("Could not parse the method '%s'", mm.signature());
+ //qWarning("Could not parse the method '%s'", mm.methodSignature().constData());
// invalid type in method parameter list
return -1;
}