diff options
Diffstat (limited to 'Swiften/Client/NickManagerImpl.cpp')
-rw-r--r-- | Swiften/Client/NickManagerImpl.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Swiften/Client/NickManagerImpl.cpp b/Swiften/Client/NickManagerImpl.cpp index f755424..f8fef39 100644 --- a/Swiften/Client/NickManagerImpl.cpp +++ b/Swiften/Client/NickManagerImpl.cpp @@ -13,38 +13,38 @@ namespace Swift { NickManagerImpl::NickManagerImpl(const JID& ownJID, VCardManager* vcardManager) : ownJID(ownJID), vcardManager(vcardManager) { - vcardManager->onVCardChanged.connect(boost::bind(&NickManagerImpl::handleVCardReceived, this, _1, _2)); + vcardManager->onVCardChanged.connect(boost::bind(&NickManagerImpl::handleVCardReceived, this, _1, _2)); - updateOwnNickFromVCard(vcardManager->getVCard(ownJID.toBare())); + updateOwnNickFromVCard(vcardManager->getVCard(ownJID.toBare())); } NickManagerImpl::~NickManagerImpl() { - vcardManager->onVCardChanged.disconnect(boost::bind(&NickManagerImpl::handleVCardReceived, this, _1, _2)); + vcardManager->onVCardChanged.disconnect(boost::bind(&NickManagerImpl::handleVCardReceived, this, _1, _2)); } std::string NickManagerImpl::getOwnNick() const { - return ownNick; + return ownNick; } void NickManagerImpl::setOwnNick(const std::string&) { } void NickManagerImpl::handleVCardReceived(const JID& jid, VCard::ref vcard) { - if (!jid.equals(ownJID, JID::WithoutResource)) { - return; - } - updateOwnNickFromVCard(vcard); + if (!jid.equals(ownJID, JID::WithoutResource)) { + return; + } + updateOwnNickFromVCard(vcard); } void NickManagerImpl::updateOwnNickFromVCard(VCard::ref vcard) { - std::string nick; - if (vcard && !vcard->getNickname().empty()) { - nick = vcard->getNickname(); - } - if (ownNick != nick) { - ownNick = nick; - onOwnNickChanged(ownNick); - } + std::string nick; + if (vcard && !vcard->getNickname().empty()) { + nick = vcard->getNickname(); + } + if (ownNick != nick) { + ownNick = nick; + onOwnNickChanged(ownNick); + } } } |