summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qt4/TelepathyQt4/stream-tube-client.cpp7
-rw-r--r--qt4/TelepathyQt4/stream-tube-client.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/qt4/TelepathyQt4/stream-tube-client.cpp b/qt4/TelepathyQt4/stream-tube-client.cpp
index 64e41cc9e..78eb86164 100644
--- a/qt4/TelepathyQt4/stream-tube-client.cpp
+++ b/qt4/TelepathyQt4/stream-tube-client.cpp
@@ -255,7 +255,7 @@ StreamTubeClient::StreamTubeClient(
*/
StreamTubeClient::~StreamTubeClient()
{
- if (!clientName().isNull()) {
+ if (isRegistered()) {
mPriv->registrar->unregisterClient(mPriv->handler);
}
@@ -274,6 +274,11 @@ QString StreamTubeClient::clientName() const
return mPriv->clientName;
}
+bool StreamTubeClient::isRegistered() const
+{
+ return mPriv->isRegistered;
+}
+
bool StreamTubeClient::monitorsConnections() const
{
return mPriv->handler->monitorsConnections();
diff --git a/qt4/TelepathyQt4/stream-tube-client.h b/qt4/TelepathyQt4/stream-tube-client.h
index 04aa18105..1f77c3456 100644
--- a/qt4/TelepathyQt4/stream-tube-client.h
+++ b/qt4/TelepathyQt4/stream-tube-client.h
@@ -116,6 +116,7 @@ public:
ClientRegistrarPtr registrar() const;
QString clientName() const;
+ bool isRegistered() const;
bool monitorsConnections() const;
bool acceptsAsTcp() const; // if setToAcceptAsTCP has been used last