[Telepathy-commits] [telepathy-qt4/master] StatefulDBusProxy: raise NameHasNoOwner if the service dies

Simon McVittie simon.mcvittie at collabora.co.uk
Mon Jan 12 07:32:01 PST 2009


---
 TelepathyQt4/Client/dbus-proxy.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/TelepathyQt4/Client/dbus-proxy.cpp b/TelepathyQt4/Client/dbus-proxy.cpp
index 20d4a62..8ba8a3d 100644
--- a/TelepathyQt4/Client/dbus-proxy.cpp
+++ b/TelepathyQt4/Client/dbus-proxy.cpp
@@ -25,6 +25,8 @@
 
 #include "TelepathyQt4/debug-internal.h"
 
+#include <TelepathyQt4/Constants>
+
 #include <QtCore/QTimer>
 #include <QtDBus/QDBusConnectionInterface>
 
@@ -162,8 +164,8 @@ void StatefulDBusProxy::onServiceOwnerChanged(const QString &name, const QString
     // We only want to invalidate this object if it is not already invalidated,
     // and it's (not any other object's) name owner changed signal is emitted.
     if (isValid() && (name == busName())) {
-        // FIXME: where do the error texts come from? the spec?
-        invalidate("NAME_OWNER_CHANGED", "NameOwnerChanged() received for this object.");
+        invalidate(TELEPATHY_DBUS_ERROR_NAME_HAS_NO_OWNER,
+            "Name owner lost (service crashed?)");
     }
 }
 
-- 
1.5.6.5




More information about the Telepathy-commits mailing list