summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Soliverez <alvaro.soliverez@collabora.co.uk>2011-08-04 12:23:47 -0700
committerAlvaro Soliverez <alvaro.soliverez@collabora.co.uk>2011-08-04 12:23:47 -0700
commit26bfae9b7991e1b10eea4b5c95c562d74f85eb51 (patch)
treee3b86919057f54ce6ad1afa5c6b00aed590a04a5
parentbaa286833c5558a7385bf8fe445fb9211fca50e3 (diff)
When setting status and statusMessage on Tpy::AccountsModelItem do not clear the presence type
-rw-r--r--NEWS1
-rw-r--r--TelepathyQt4Yell/Models/accounts-model-item.cpp8
2 files changed, 5 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 897638c..3b6460f 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ Fixes:
* Revert returning UTF-8 for the contact alias and status messages strings
* WARNING: optimization of flat model proxy, dataChanged signal is not hierarchical anymore after we found out it was quite expensive. You need to do explicit hierarchical changes.
* Added hierarchicalDataChanged signal to Tpy::AccountsModel for explicit signalling of changes in account data affecting contacts data (expensive)
+ * When setting status and statusMessage on Tpy::AccountsModelItem do not clear the presence type
telepathy-qt4-yell 0.1.6 (2011-06-06)
======================================
diff --git a/TelepathyQt4Yell/Models/accounts-model-item.cpp b/TelepathyQt4Yell/Models/accounts-model-item.cpp
index 4e423a3..8a02c8d 100644
--- a/TelepathyQt4Yell/Models/accounts-model-item.cpp
+++ b/TelepathyQt4Yell/Models/accounts-model-item.cpp
@@ -48,15 +48,15 @@ struct TELEPATHY_QT4_YELL_MODELS_NO_EXPORT AccountsModelItem::Private
void AccountsModelItem::Private::setStatus(const QString &value)
{
- Tp::Presence presence = mAccount->currentPresence().barePresence();
- presence.setStatus(Tp::ConnectionPresenceTypeUnset, value, QString());
+ Tp::Presence presence = mAccount->currentPresence();
+ presence.setStatus(presence.type(), value, presence.statusMessage());
mAccount->setRequestedPresence(presence);
}
void AccountsModelItem::Private::setStatusMessage(const QString &value)
{
- Tp::Presence presence = mAccount->currentPresence().barePresence();
- presence.setStatus(Tp::ConnectionPresenceTypeUnset, QString(), value);
+ Tp::Presence presence = mAccount->currentPresence();
+ presence.setStatus(presence.type(), presence.status(), value);
mAccount->setRequestedPresence(presence);
}