summaryrefslogtreecommitdiffstats
path: root/qt/src/qdbusabstractinterface.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago@kde.org>2006-06-05 18:13:07 +0000
committerThiago Macieira <thiago@kde.org>2006-06-05 18:13:07 +0000
commit517b8c2446029901e9062e858b723906cf20d7ef (patch)
tree61a02acb1f4769993c985d7a0aa91fab9c2694c7 /qt/src/qdbusabstractinterface.cpp
parent54b762aa4c692596f70892f7fb3d7e495bd8268a (diff)
* 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.
Diffstat (limited to 'qt/src/qdbusabstractinterface.cpp')
-rw-r--r--qt/src/qdbusabstractinterface.cpp9
1 files changed, 6 insertions, 3 deletions
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<QVariant>& args,
CallMode mode)