diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2011-02-21 19:15:31 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2011-04-13 12:56:29 (GMT) |
commit | 08cecc882bf23253b3e447cde037e10529f56cdf (patch) | |
tree | 9fefb851ed6a2a72c2c7feac2f0d223f2c8cb337 /src | |
parent | b53a80ff1e1a1a5e8c66eaa20076be2745ffb88f (diff) | |
download | Qt-08cecc882bf23253b3e447cde037e10529f56cdf.zip Qt-08cecc882bf23253b3e447cde037e10529f56cdf.tar.gz Qt-08cecc882bf23253b3e447cde037e10529f56cdf.tar.bz2 |
Use the Qt code for validating types in QtDBus
Diffstat (limited to 'src')
-rw-r--r-- | src/dbus/qdbus_symbols_p.h | 12 | ||||
-rw-r--r-- | src/dbus/qdbusmarshaller.cpp | 6 |
2 files changed, 3 insertions, 15 deletions
diff --git a/src/dbus/qdbus_symbols_p.h b/src/dbus/qdbus_symbols_p.h index d0a4b3e..039657e 100644 --- a/src/dbus/qdbus_symbols_p.h +++ b/src/dbus/qdbus_symbols_p.h @@ -358,18 +358,6 @@ DEFINEFUNC(dbus_bool_t , dbus_server_set_watch_functions, (DBusServer DEFINEFUNC(void , dbus_server_unref, (DBusServer *server), (server), ) -/* dbus-signature.h */ -DEFINEFUNC(dbus_bool_t , dbus_signature_validate, (const char *signature, - DBusError *error), - (signature, error), return) -DEFINEFUNC(dbus_bool_t , dbus_signature_validate_single, (const char *signature, - DBusError *error), - (signature, error), return) -DEFINEFUNC(dbus_bool_t , dbus_type_is_basic, (int typecode), - (typecode), return) -DEFINEFUNC(dbus_bool_t , dbus_type_is_fixed, (int typecode), - (typecode), return) - /* dbus-thread.h */ DEFINEFUNC(dbus_bool_t , dbus_threads_init_default, (), (), return) diff --git a/src/dbus/qdbusmarshaller.cpp b/src/dbus/qdbusmarshaller.cpp index edf743e..6dec359 100644 --- a/src/dbus/qdbusmarshaller.cpp +++ b/src/dbus/qdbusmarshaller.cpp @@ -254,7 +254,7 @@ inline QDBusMarshaller *QDBusMarshaller::beginMap(int kid, int vid) .arg(QLatin1String(QVariant::typeToName(QVariant::Type(kid))))); return this; } - if (ksignature[1] != 0 || !q_dbus_type_is_basic(*ksignature)) { + if (ksignature[1] != 0 || !QDBusUtil::isValidBasicType(*ksignature)) { qWarning("QDBusMarshaller: type '%s' (%d) cannot be used as the key type in a D-BUS map.", QVariant::typeToName( QVariant::Type(kid) ), kid); error(QString::fromLatin1("Type %1 passed in arguments cannot be used as a key in a map") @@ -511,7 +511,7 @@ bool QDBusMarshaller::appendRegisteredType(const QVariant &arg) bool QDBusMarshaller::appendCrossMarshalling(QDBusDemarshaller *demarshaller) { int code = q_dbus_message_iter_get_arg_type(&demarshaller->iterator); - if (q_dbus_type_is_basic(code)) { + if (QDBusUtil::isValidBasicType(code)) { // easy: just append // do exactly like the D-BUS docs suggest // (see apidocs for q_dbus_message_iter_get_basic) @@ -525,7 +525,7 @@ bool QDBusMarshaller::appendCrossMarshalling(QDBusDemarshaller *demarshaller) if (code == DBUS_TYPE_ARRAY) { int element = q_dbus_message_iter_get_element_type(&demarshaller->iterator); - if (q_dbus_type_is_fixed(element) && element != DBUS_TYPE_UNIX_FD) { + if (QDBusUtil::isValidFixedType(element) && element != DBUS_TYPE_UNIX_FD) { // another optimization: fixed size arrays // code is exactly like QDBusDemarshaller::toByteArray DBusMessageIter sub; |