From 7cabddaa4237b7e0ce1c6b9781d115b9831e77f2 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 29 Apr 2006 12:44:31 +0000 Subject: * 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) --- qt/qdbusinterface.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'qt/qdbusinterface.cpp') diff --git a/qt/qdbusinterface.cpp b/qt/qdbusinterface.cpp index ff8fdc95..48b1011c 100644 --- a/qt/qdbusinterface.cpp +++ b/qt/qdbusinterface.cpp @@ -57,6 +57,19 @@ QDBusInterface::~QDBusInterface() // resources are freed in QDBusInterfacePrivate::~QDBusInterfacePrivate() } +/*! + 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)) { } -- cgit