[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenetwork/kopete/protocols/msn
From: Olivier Goffart <ogoffart () tiscalinet ! be>
Date: 2004-02-29 21:05:49
Message-ID: 20040229210549.86B35995A () office ! kde ! org
[Download RAW message or body]
CVS commit by ogoffart:
Small optimisation.
This might also fix a crash
M +6 -6 msnaccount.cpp 1.67
--- kdenetwork/kopete/protocols/msn/msnaccount.cpp #1.66:1.67
@@ -722,10 +722,10 @@ void MSNAccount::slotContactListed( cons
{
QStringList contactGroups = QStringList::split( ",", group, false );
- KopeteMetaContact *metaContact = \
KopeteContactList::contactList()->findContact( protocol()->pluginId(), accountId(), \
handle );
- if ( metaContact )
+ KopeteContact *ct= contacts()[handle];
+ if ( ct )
{
// Contact exists, update data.
// Merging difference between server contact list and \
KopeteContact's contact list into MetaContact's contact-list
- MSNContact *c = static_cast<MSNContact *>( \
metaContact->findContact( protocol()->pluginId(), accountId(), handle ) ); + \
MSNContact *c = static_cast<MSNContact *>( ct);
c->setOnlineStatus( MSNProtocol::protocol()->FLN );
c->setDisplayName( publicName );
@@ -740,5 +740,5 @@ void MSNAccount::slotContactListed( cons
c->contactAddedToGroup( serverGroup, \
m_groupList[ serverGroup ] );
c->setDontSync( true ); // prevent the \
moving of the metacontact change the server
- metaContact->addToGroup( m_groupList[ \
serverGroup ] ); + \
c->metaContact()->addToGroup( m_groupList[ serverGroup ] ); }
}
@@ -751,5 +751,5 @@ void MSNAccount::slotContactListed( cons
c->contactRemovedFromGroup( it.key() );
c->setDontSync( true ); // prevent the \
moving of the metacontact change the server
- metaContact->removeFromGroup( m_groupList[ \
it.key() ] ); + \
c->metaContact()->removeFromGroup( m_groupList[ it.key() ] ); }
}
@@ -761,5 +761,5 @@ void MSNAccount::slotContactListed( cons
else
{
- metaContact = new KopeteMetaContact();
+ KopeteMetaContact *metaContact = new KopeteMetaContact();
MSNContact *msnContact = new MSNContact( this, handle, \
publicName, metaContact );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic