From 517b8c2446029901e9062e858b723906cf20d7ef Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 5 Jun 2006 18:13:07 +0000 Subject: * qt/dbus: Add directory. I had forgotten to add this yesterday after the move... * qt/examples/Makefile.am: * qt/examples/dbus.cpp: Moved to qt/tools/dbus.cpp. * qt/tools/Makefile.am: * qt/tools/dbus.cpp: Moved from qt/examples/dbus.cpp. Added feature to get and set properties. Added validation of service, object path and interface names. * qt/tools/dbusidl2cpp.cpp: Two new features: 1) Allow specifying both the header and the source file names, by separating them with a colon. 2) Don't write an interface output if the -p switch wasn't given, but the -a was. * qt/src/*: Fix usage of Iterators and ConstIterators. Fix shadowing of variables by other variables (-Wshadow). Fix keyword-cleanliness in headers. Fix ASCII-cast (QLatin1String, QLatin1Char). Fix validation of member names. Add extra checking of introspection data during XML parsing. Various bug fixes. --- qt/src/qdbusabstractinterface.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'qt/src/qdbusabstractinterface.cpp') diff --git a/qt/src/qdbusabstractinterface.cpp b/qt/src/qdbusabstractinterface.cpp index 2a6bcf04..ffe5d67e 100644 --- a/qt/src/qdbusabstractinterface.cpp +++ b/qt/src/qdbusabstractinterface.cpp @@ -31,7 +31,8 @@ QVariant QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp) const { // try to read this property - QDBusMessage msg = QDBusMessage::methodCall(service, path, DBUS_INTERFACE_PROPERTIES, + QDBusMessage msg = QDBusMessage::methodCall(service, path, + QLatin1String(DBUS_INTERFACE_PROPERTIES), QLatin1String("Get")); msg << interface << QString::fromUtf8(mp.name()); QDBusMessage reply = connp->sendWithReply(msg, QDBusConnection::NoUseEventLoop); @@ -72,7 +73,8 @@ QVariant QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp) const void QDBusAbstractInterfacePrivate::setProperty(const QMetaProperty &mp, const QVariant &value) { // send the value - QDBusMessage msg = QDBusMessage::methodCall(service, path, DBUS_INTERFACE_PROPERTIES, + QDBusMessage msg = QDBusMessage::methodCall(service, path, + QLatin1String(DBUS_INTERFACE_PROPERTIES), QLatin1String("Set")); msg.setSignature(QLatin1String("ssv")); msg << interface << QString::fromUtf8(mp.name()) << value; @@ -185,7 +187,6 @@ QDBusError QDBusAbstractInterface::lastError() const } /*! - \threadsafe Places a call to the remote method specified by \a method on this interface, using \a args as arguments. This function returns the message that was received as a reply, which can be a normal QDBusMessage::ReplyMessage (indicating success) or QDBusMessage::ErrorMessage (if the call @@ -199,6 +200,8 @@ QDBusError QDBusAbstractInterface::lastError() const \warning If you use \c UseEventLoop, your code must be prepared to deal with any reentrancy: other method calls and signals may be delivered before this function returns, as well as other Qt queued signals and events. + + \threadsafe */ QDBusMessage QDBusAbstractInterface::callWithArgs(const QString& method, const QList& args, CallMode mode) -- cgit