diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/oscar/icq/icqcontact.cpp | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/oscar/icq/icqcontact.cpp')
-rw-r--r-- | kopete/protocols/oscar/icq/icqcontact.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/kopete/protocols/oscar/icq/icqcontact.cpp b/kopete/protocols/oscar/icq/icqcontact.cpp index 90204bdf..9b13ab64 100644 --- a/kopete/protocols/oscar/icq/icqcontact.cpp +++ b/kopete/protocols/oscar/icq/icqcontact.cpp @@ -51,9 +51,9 @@ #include "oscarencodingselectiondialog.h" #include "ssimanager.h" -ICQContact::ICQContact( ICQAccount *account, const TQString &name, Kopete::MetaContact *parent, +ICQContact::ICQContact( ICQAccount *account, const TQString &name, Kopete::MetaContact *tqparent, const TQString& icon, const Oscar::SSI& ssiItem ) -: OscarContact( account, name, parent, icon, ssiItem ) +: OscarContact( account, name, tqparent, icon, ssiItem ) { mProtocol = static_cast<ICQProtocol *>(protocol()); m_infoWidget = 0L; @@ -103,7 +103,7 @@ void ICQContact::updateSSIItem() setOnlineStatus( mProtocol->statusManager()->waitingForAuth() ); if ( m_ssiItem.type() != 0xFFFF && m_ssiItem.waitingAuth() == false && - onlineStatus() == Kopete::OnlineStatus::Unknown ) + onlinetqStatus() == Kopete::OnlineStatus::Unknown ) { //make sure they're offline setOnlineStatus( ICQ::Presence( ICQ::Presence::Offline, ICQ::Presence::Visible ).toOnlineStatus() ); @@ -117,12 +117,12 @@ void ICQContact::userInfoUpdated( const TQString& contact, const UserDetails& de if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; - // invalidate old away message if user was offline + // tqinvalidate old away message if user was offline if ( !isOnline() ) removeProperty( mProtocol->awayMessage ); - kdDebug( OSCAR_ICQ_DEBUG ) << k_funcinfo << "extendedStatus is " << details.extendedStatus() << endl; - ICQ::Presence presence = ICQ::Presence::fromOscarStatus( details.extendedStatus() & 0xffff ); + kdDebug( OSCAR_ICQ_DEBUG ) << k_funcinfo << "extendedtqStatus is " << details.extendedtqStatus() << endl; + ICQ::Presence presence = ICQ::Presence::fromOscartqStatus( details.extendedtqStatus() & 0xffff ); setOnlineStatus( presence.toOnlineStatus() ); // ICQ does not support status messages for state Online @@ -133,7 +133,7 @@ void ICQContact::userInfoUpdated( const TQString& contact, const UserDetails& de } else { - if ( ICQ::Presence::fromOnlineStatus( account()->myself()->onlineStatus() ).visibility() == ICQ::Presence::Visible ) + if ( ICQ::Presence::fromOnlineStatus( account()->myself()->onlinetqStatus() ).visibility() == ICQ::Presence::Visible ) { switch ( presence.type() ) { @@ -276,8 +276,8 @@ void ICQContact::slotGotAuthReply( const TQString& contact, const TQString& reas if( granted ) { message = i18n( "User %1 has granted your authorization request.\nReason: %2" ) - .arg( property( Kopete::Global::Properties::self()->nickName() ).value().toString() ) - .arg( reason ); + .tqarg( property( Kopete::Global::Properties::self()->nickName() ).value().toString() ) + .tqarg( reason ); // remove the unknown status setOnlineStatus( ICQ::Presence( ICQ::Presence::Offline, ICQ::Presence::Visible ).toOnlineStatus() ); @@ -285,8 +285,8 @@ void ICQContact::slotGotAuthReply( const TQString& contact, const TQString& reas else { message = i18n( "User %1 has rejected the authorization request.\nReason: %2" ) - .arg( property( Kopete::Global::Properties::self()->nickName() ).value().toString() ) - .arg( reason ); + .tqarg( property( Kopete::Global::Properties::self()->nickName() ).value().toString() ) + .tqarg( reason ); } KNotifyClient::event( Kopete::UI::Global::sysTrayWId(), "icq_authorization", message ); } @@ -483,7 +483,7 @@ void ICQContact::haveIcon( const TQString& user, TQByteArray icon ) iconFile.writeBlock( icon ); iconFile.close(); - setProperty( Kopete::Global::Properties::self()->photo(), TQString::null ); + setProperty( Kopete::Global::Properties::self()->photo(), TQString() ); setProperty( Kopete::Global::Properties::self()->photo(), iconLocation ); m_buddyIconDirty = false; } @@ -503,14 +503,14 @@ bool ICQContact::cachedBuddyIcon( TQByteArray hash ) return false; KMD5 buddyIconHash; - buddyIconHash.update( iconFile ); + buddyIconHash.update( *TQT_TQIODEVICE(&iconFile) ); iconFile.close(); if ( memcmp( buddyIconHash.rawDigest(), hash.data(), 16 ) == 0 ) { kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "Updating icon for " << contactId() << " from local cache" << endl; - setProperty( Kopete::Global::Properties::self()->photo(), TQString::null ); + setProperty( Kopete::Global::Properties::self()->photo(), TQString() ); setProperty( Kopete::Global::Properties::self()->photo(), iconLocation ); m_buddyIconDirty = false; return true; @@ -539,7 +539,7 @@ void ICQContact::slotContactChanged(const UserInfo &u) if (!mInfo.clientVersion.isEmpty()) { capList << i18n("Translators: client-name client-version", - "%1 %2").arg(mInfo.clientName, mInfo.clientVersion); + "%1 %2").tqarg(mInfo.clientName, mInfo.clientVersion); } else { @@ -561,27 +561,27 @@ void ICQContact::slotContactChanged(const UserInfo &u) else removeProperty(mProtocol->clientFeatures); - unsigned int newStatus = 0; + unsigned int newtqStatus = 0; mInvisible = (mInfo.icqextstatus & ICQ_STATUS_IS_INVIS); if (mInfo.icqextstatus & ICQ_STATUS_IS_FFC) - newStatus = OSCAR_FFC; + newtqStatus = OSCAR_FFC; else if (mInfo.icqextstatus & ICQ_STATUS_IS_DND) - newStatus = OSCAR_DND; + newtqStatus = OSCAR_DND; else if (mInfo.icqextstatus & ICQ_STATUS_IS_OCC) - newStatus = OSCAR_OCC; + newtqStatus = OSCAR_OCC; else if (mInfo.icqextstatus & ICQ_STATUS_IS_NA) - newStatus = OSCAR_NA; + newtqStatus = OSCAR_NA; else if (mInfo.icqextstatus & ICQ_STATUS_IS_AWAY) - newStatus = OSCAR_AWAY; + newtqStatus = OSCAR_AWAY; else - newStatus = OSCAR_ONLINE; + newtqStatus = OSCAR_ONLINE; if (this != account()->myself()) { - if(newStatus != onlineStatus().internalStatus()) + if(newtqStatus != onlinetqStatus().internalStatus()) { - if(newStatus != OSCAR_ONLINE) // if user changed to some state other than online + if(newtqStatus != OSCAR_ONLINE) // if user changed to some state other than online { mAccount->engine()->requestAwayMessage(this); } @@ -592,7 +592,7 @@ void ICQContact::slotContactChanged(const UserInfo &u) } } - setStatus(newStatus); + settqStatus(newtqStatus); } void ICQContact::slotOffgoingBuddy(TQString sender) @@ -655,7 +655,7 @@ TQPtrList<KAction> *ICQContact::customContextMenuActions() /* TQString awTxt; TQString awIcn; - unsigned int status = onlineStatus().internalStatus(); + unsigned int status = onlinetqStatus().internalStatus(); if (status >= 15) status -= 15; // get rid of invis addon switch(status) @@ -936,4 +936,4 @@ void ICQContact::slotVisibleTo() } #endif #include "icqcontact.moc" -//kate: indent-mode csands; tab-width 4; replace-tabs off; space-indent off; +//kate: indent-mode csands; tab-width 4; tqreplace-tabs off; space-indent off; |