summaryrefslogtreecommitdiffstats
path: root/qt/qdbusinterface.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago@kde.org>2006-04-29 12:44:31 +0000
committerThiago Macieira <thiago@kde.org>2006-04-29 12:44:31 +0000
commit7cabddaa4237b7e0ce1c6b9781d115b9831e77f2 (patch)
tree982dc3f62b4356ee5d78d94767cb44d8f0d98973 /qt/qdbusinterface.cpp
parent47999a1c43302e9e80884b4018c416327fe675d2 (diff)
* qt/qdbusinterface.h: Rename QDBusRef to QDBusInterfacePtr
and disable the copy operators. (r533772, r534746) * qt/qdbuserror.h: Remove the automatic cast to bool. (r533929) * qt/qdbusabstractinterface.cpp: * qt/qdbusabstractinterface.h: Change the default call mode to not use the event loop. Add convenience call() methods that take a CallMode parameter. (r534042) * qt/qdbusconnection.h: Change the default call mode to not use the event loop. (r534042) * qt/qdbusinterface.cpp: * qt/qdbusinterface.h: Add a method to tell us if the interface is valid (since we don't return a null pointer anymore) (r534099) * qt/qdbusinterface_p.h: Don't crash if metaObject is 0 (r534101) * qt/qdbusinternalfilters.cpp: Decouple the introspection function in two so taht we get the chance to introspect without having a QDBusMessage (r534102) * qt/qdbusbus.h: * qt/qdbusconnection.cpp: * qt/qdbusconnection_p.h: * qt/qdbusintegrator.cpp: Keep a list of our own names to avoid a round-trip to the server when attempting to introspect one of our own objects. Also make sure the filter functions match the empty interface as well. (r534108) Don't keep the connection names. Instead, trust the unique connection name (r534111) Remove event loop usage (r534112)
Diffstat (limited to 'qt/qdbusinterface.cpp')
-rw-r--r--qt/qdbusinterface.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/qt/qdbusinterface.cpp b/qt/qdbusinterface.cpp
index ff8fdc95..48b1011c 100644
--- a/qt/qdbusinterface.cpp
+++ b/qt/qdbusinterface.cpp
@@ -58,6 +58,19 @@ QDBusInterface::~QDBusInterface()
}
/*!
+ Returns true if this is a valid reference to a remote object. It returns false if
+ there was an error during the creation of this interface (for instance, if the remote
+ application does not exist).
+
+ Note: when dealing with remote objects, it is not always possible to determine if it
+ exists when creating a QDBusInterface or QDBusInterfacePtr object.
+*/
+bool QDBusInterface::isValid() const
+{
+ return d_func()->isValid;
+}
+
+/*!
\internal
Overrides QObject::metaObject to return our own copy.
*/
@@ -238,13 +251,13 @@ int QDBusInterfacePrivate::metacall(QMetaObject::Call c, int id, void **argv)
return id;
}
-QDBusRef::QDBusRef(QDBusConnection &conn, const QString &service, const QString &path,
+QDBusInterfacePtr::QDBusInterfacePtr(QDBusConnection &conn, const QString &service, const QString &path,
const QString &interface)
: d(conn.findInterface(service, path, interface))
{
}
-QDBusRef::QDBusRef(const QString &service, const QString &path, const QString &interface)
+QDBusInterfacePtr::QDBusInterfacePtr(const QString &service, const QString &path, const QString &interface)
: d(QDBus::sessionBus().findInterface(service, path, interface))
{
}