summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlli Salli <ollisal@gmail.com>2010-12-31 14:48:20 +0200
committerOlli Salli <ollisal@gmail.com>2010-12-31 16:35:01 +0200
commite5bc23796aa76fd087cb3f015263c0146418f350 (patch)
treefc1ab38e7cb5ea7cec0c88f911ec6d29abf5505e
parent8ed37c6b0da009155aeb740dc03f1363ea47f3a2 (diff)
Make checking a channel's self remove info after it's closed not warn
-rw-r--r--TelepathyQt4/channel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/TelepathyQt4/channel.cpp b/TelepathyQt4/channel.cpp
index 268be324..b80401bc 100644
--- a/TelepathyQt4/channel.cpp
+++ b/TelepathyQt4/channel.cpp
@@ -2191,8 +2191,10 @@ Channel::GroupMemberChangeDetails Channel::groupLocalPendingContactChangeInfo(
*/
Channel::GroupMemberChangeDetails Channel::groupSelfContactRemoveInfo() const
{
- if (!isReady()) {
- warning() << "Channel::groupSelfContactRemoveInfo() used channel not ready";
+ // Oftentimes, the channel will be closed as a result from being left - so checking a channel's
+ // self remove info when it has been closed and hence invalidated is valid
+ if (isValid() && !isReady(Channel::FeatureCore)) {
+ warning() << "Channel::groupSelfContactRemoveInfo() used before Channel::FeatureCore is ready";
} else if (!interfaces().contains(QLatin1String(TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP))) {
warning() << "Channel::groupSelfContactRemoveInfo() used with "
"no group interface";