[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.4/kdenetwork/kopete/protocols/groupwise
From:       Will Stephenson <lists () stevello ! free-online ! co ! uk>
Date:       2005-07-19 12:47:05
Message-ID: 1121777225.220050.15671.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 436268 by wstephens:

Backport fix for adding contacts to your list who have messaged you.


 M  +13 -9     gwaccount.cpp  


--- branches/KDE/3.4/kdenetwork/kopete/protocols/groupwise/gwaccount.cpp \
#436267:436268 @@ -452,7 +452,6 @@
 
 void GroupWiseAccount::slotLoggedIn()
 {
-	kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl;
 	reconcileOfflineChanges();
 	
 	myself()->setOnlineStatus( protocol()->groupwiseAvailable );
@@ -463,6 +462,7 @@
 
 void GroupWiseAccount::reconcileOfflineChanges()
 {
+	kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl;
 	m_dontSync = true;
 	//sanity check the server side model vs our contact list.
 	//Contacts might have been removed from some groups or entirely on the server.  
@@ -1505,20 +1505,24 @@
 			candidateGrp = grpIt;
 			++grpIt;
 			GWFolder * destinationFolder = m_serverListModel->findFolderByName( ( ( \
                *candidateGrp )->displayName() ) );
-			Q_ASSERT( destinationFolder ); // might not exist on the server yet
-			kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "  - add a contact instance for group '" << \
                destinationFolder->displayName << "'" << endl;
-
 			CreateContactInstanceTask * ccit = new CreateContactInstanceTask( \
                client()->rootTask() );
-			QObject::connect( ccit, SIGNAL( gotContactDeleted( const ContactItem & ) ), SLOT( \
receiveContactDeleted( const ContactItem & ) ) );  
+			contact->setNickName( contact->metaContact()->displayName() );
 			// does this group exist on the server?  Create the contact appropriately
-			int parentId = destinationFolder->id;
-			if ( true )
+			if ( destinationFolder )
+			{
+				int parentId = destinationFolder->id;
 				ccit->contactFromUserId( contact->dn(), contact->metaContact()->displayName(), \
parentId ); +			}
 			else
 			{
-				// discover the next free sequence number and add the group using that
-				ccit->contactFromUserIdAndFolder( contact->dn(), \
contact->metaContact()->displayName(), nextFreeSequence++, ( *candidateGrp \
)->displayName() ); +				if ( ( *candidateGrp ) == Kopete::Group::topLevel() )
+					ccit->contactFromUserId( contact->dn(), contact->metaContact()->displayName(),
+							m_serverListModel->rootFolder->id );
+				else
+					// discover the next free sequence number and add the group using that
+					ccit->contactFromUserIdAndFolder( contact->dn(), \
contact->metaContact()->displayName(), +							nextFreeSequence++, ( *candidateGrp \
)->displayName() );  }
 			ccit->go( true );
 			groupList.remove( candidateGrp );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic