[Telepathy-commits] [telepathy-qt4/master] Replace Account::removed() signal with DBusProxy::invalidated()
Simon McVittie
simon.mcvittie at collabora.co.uk
Wed Jan 21 08:11:23 PST 2009
---
TelepathyQt4/Client/account.cpp | 8 +++++++-
TelepathyQt4/Client/account.h | 1 -
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/TelepathyQt4/Client/account.cpp b/TelepathyQt4/Client/account.cpp
index b2ca198..e013540 100644
--- a/TelepathyQt4/Client/account.cpp
+++ b/TelepathyQt4/Client/account.cpp
@@ -151,6 +151,10 @@ Account::Private::~Private()
* \headerfile TelepathyQt4/Client/account.h> <TelepathyQt4/Client/Account>
*
* Object representing a Telepathy account.
+ *
+ * If the Telepathy account is deleted from the AccountManager, this object
+ * will not be deleted automatically; however, it will emit invalidated()
+ * and will cease to be useful.
*/
/**
@@ -1012,7 +1016,9 @@ void Account::onRemoved()
mPriv->ready = false;
mPriv->valid = false;
mPriv->enabled = false;
- Q_EMIT removed();
+ // This is the closest error we have at the moment
+ invalidate(QLatin1String(TELEPATHY_ERROR_CANCELLED),
+ QLatin1String("Account removed from AccountManager"));
}
void Account::continueIntrospection()
diff --git a/TelepathyQt4/Client/account.h b/TelepathyQt4/Client/account.h
index dc441c7..e6bc301 100644
--- a/TelepathyQt4/Client/account.h
+++ b/TelepathyQt4/Client/account.h
@@ -167,7 +167,6 @@ public:
}
Q_SIGNALS:
- void removed();
void displayNameChanged(const QString &);
void iconChanged(const QString &);
void nicknameChanged(const QString &);
--
1.5.6.5
More information about the Telepathy-commits
mailing list