[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/kopete/protocols/groupwise
From: Will Stephenson <wstephenson () kde ! org>
Date: 2008-05-11 8:05:48
Message-ID: 1210493148.024884.30656.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 806364 by wstephens:
Use the contact's real name as display name, not that of the metacontact, since in \
kde 4 that is derived from the contact.
M +4 -2 gwaccount.cpp
M +3 -5 ui/gwaddcontactpage.cpp
--- trunk/KDE/kdenetwork/kopete/protocols/groupwise/gwaccount.cpp #806363:806364
@@ -1204,7 +1204,7 @@
displayAs = dt.givenName + ' ' + dt.surname;
else
displayAs = dt.fullName;
-
+ Q_ASSERT( !displayAs.isEmpty() );
gc->setNickName( displayAs );
// If the CreateContactTask finishes with an error, we have to
// delete the contact we just created, in receiveContactCreated :/
@@ -1217,7 +1217,7 @@
// get the contact's full name to use as the display name of the created contact
CreateContactTask * cct = new CreateContactTask( client()->rootTask() );
- cct->contactFromUserId( contactId, parentContact->displayName(), \
highestFreeSequence, folders, topLevel ); + cct->contactFromUserId( contactId, \
displayAs, highestFreeSequence, folders, topLevel ); QObject::connect( cct, SIGNAL( \
finished() ), SLOT( receiveContactCreated() ) ); cct->go( true );
return true;
@@ -1235,6 +1235,8 @@
{
ContactDetails dt = client()->userDetailsManager()->details( cct->dn() );
GroupWiseContact * c = contactForDN( cct->dn() );
+
+ Q_ASSERT(c);
c->setOnlineStatus( protocol()->gwStatusToKOS( dt.status ) );
c->setNickName( dt.fullName );
c->updateDetails( dt );
--- trunk/KDE/kdenetwork/kopete/protocols/groupwise/ui/gwaddcontactpage.cpp \
#806363:806364 @@ -85,20 +85,18 @@
if ( validateData() )
{
QString contactId;
- QString displayName;
+ ContactDetails dt;
QList< ContactDetails > selected = m_searchUI->selectedResults();
if ( selected.count() == 1 )
{
- ContactDetails dt = selected.first();
+ dt = selected.first();
m_account->client()->userDetailsManager()->addDetails( dt );
- contactId = GroupWiseProtocol::dnToDotted(dt.dn);
- displayName = dt.givenName + ' ' + dt.surname;
}
else
return false;
- return ( account->addContact ( contactId, parentContact, \
Kopete::Account::ChangeKABC ) ); + return ( account->addContact ( dt.dn, \
parentContact, Kopete::Account::ChangeKABC ) ); }
else
return false;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic