~ubuntu-branches/debian/experimental/kopete/experimental

« back to all changes in this revision

Viewing changes to protocols/oscar/icq/icqcontact.cpp

  • Committer: Package Import Robot
  • Author(s): Maximiliano Curia
  • Date: 2015-02-24 11:32:57 UTC
  • mfrom: (1.1.41 vivid)
  • Revision ID: package-import@ubuntu.com-20150224113257-gnupg4v7lzz18ij0
Tags: 4:14.12.2-1
* New upstream release (14.12.2).
* Bump Standards-Version to 3.9.6, no changes needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
264
264
        if ( m_ssiItem.waitingAuth() )
265
265
                setOnlineStatus( mProtocol->statusManager()->waitingForAuth() );
266
266
 
267
 
        if ( ( ( hasProperty( Kopete::Global::Properties::self()->nickName().key() ) && nickName() == contactId() )
268
 
                    || !hasProperty( Kopete::Global::Properties::self()->nickName().key() ) )
269
 
             && m_ssiItem.alias().isEmpty() )
270
 
        {
271
 
                requestShortInfoDelayed();
272
 
        }
273
 
 
 
267
        requestShortInfoDelayed();
274
268
}
275
269
 
276
270
void ICQContact::slotRequestAuth()
287
281
        kDebug(OSCAR_ICQ_DEBUG) << "Sending auth reply";
288
282
        QPointer <ICQAuthReplyDialog> replyDialog = new ICQAuthReplyDialog( 0, false );
289
283
 
290
 
        replyDialog->setUser( property( Kopete::Global::Properties::self()->nickName() ).value().toString() );
 
284
        replyDialog->setUser( displayName() );
291
285
        if ( replyDialog->exec() && replyDialog )
292
286
                mAccount->engine()->sendAuth( contactId(), replyDialog->reason(), replyDialog->grantAuth() );
293
287
        delete replyDialog;
306
300
        if( granted )
307
301
        {
308
302
                message = i18n( "User %1 has granted your authorization request.\nReason: %2" ,
309
 
                          property( Kopete::Global::Properties::self()->nickName() ).value().toString() ,
 
303
                          displayName() ,
310
304
                          reason );
311
305
 
312
306
                // remove the unknown status
315
309
        else
316
310
        {
317
311
                message = i18n( "User %1 has rejected the authorization request.\nReason: %2" ,
318
 
                          property( Kopete::Global::Properties::self()->nickName() ).value().toString() ,
 
312
                          displayName() ,
319
313
                          reason );
320
314
        }
321
315
        KNotification::event( QString::fromLatin1("icq_authorization"), message );
343
337
 
344
338
        setProperty( mProtocol->firstName, codec->toUnicode( shortInfo.firstName ) );
345
339
        setProperty( mProtocol->lastName, codec->toUnicode( shortInfo.lastName ) );
346
 
 
347
 
        if ( m_ssiItem.alias().isEmpty() && !shortInfo.nickname.isEmpty() )
348
 
        {
349
 
                kDebug(OSCAR_ICQ_DEBUG) << "setting new displayname for former UIN-only Contact";
350
 
                setProperty( Kopete::Global::Properties::self()->nickName(), codec->toUnicode( shortInfo.nickname ) );
351
 
        }
 
340
        setNickName( codec->toUnicode( shortInfo.nickname ) );
352
341
}
353
342
 
354
343
void ICQContact::receivedLongInfo( const QString& contact )
365
354
        kDebug(OSCAR_ICQ_DEBUG) << "received long info from engine";
366
355
 
367
356
        ICQGeneralUserInfo genInfo = mAccount->engine()->getGeneralInfo( contact );
368
 
        if ( m_ssiItem.alias().isEmpty() && !genInfo.nickName.get().isEmpty() )
369
 
                setNickName( codec->toUnicode( genInfo.nickName.get() ) );
370
357
 
371
358
        setProperty( mProtocol->firstName, codec->toUnicode( genInfo.firstName.get() ) );
372
359
        setProperty( mProtocol->lastName, codec->toUnicode( genInfo.lastName.get() ) );
 
360
        setNickName( codec->toUnicode( genInfo.nickName.get() ) );
373
361
 
374
362
        emit haveBasicInfo( genInfo );
375
363
 
412
400
 
413
401
        setProperty( mProtocol->firstName, QString::fromUtf8( info.firstName.get() ) );
414
402
        setProperty( mProtocol->lastName, QString::fromUtf8( info.lastName.get() ) );
415
 
 
416
 
        if ( m_ssiItem.alias().isEmpty() && !info.nickName.get().isEmpty() )
417
 
                setNickName( QString::fromUtf8( info.nickName.get() ) );
 
403
        setNickName( QString::fromUtf8( info.nickName.get() ) );
418
404
}
419
405
 
420
406
void ICQContact::requestShortInfoDelayed( int minDelay )
771
757
                removeProperty("privMobileNum");
772
758
        */
773
759
 
774
 
        if(contactName() == displayName() && !generalInfo.nickName.isEmpty())
775
 
        {
776
 
                kDebug(14153) << "setting new displayname for former UIN-only Contact";
777
 
                setDisplayName(generalInfo.nickName);
778
 
        }
 
760
        setDisplayName(generalInfo.nickName);
779
761
 
780
762
        incUserInfoCounter();
781
763
}