diff options
Diffstat (limited to 'kopete/libkopete/kopetechatsession.cpp')
-rw-r--r-- | kopete/libkopete/kopetechatsession.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/kopete/libkopete/kopetechatsession.cpp b/kopete/libkopete/kopetechatsession.cpp index 91866cce..f396a659 100644 --- a/kopete/libkopete/kopetechatsession.cpp +++ b/kopete/libkopete/kopetechatsession.cpp @@ -49,7 +49,7 @@ class KMMPrivate public: Kopete::ContactPtrList mContactList; const Kopete::Contact *mUser; - TQMap<const Kopete::Contact *, Kopete::OnlineStatus> contactStatus; + TQMap<const Kopete::Contact *, Kopete::OnlineStatus> contacttqStatus; Kopete::Protocol *mProtocol; bool isEmpty; bool mCanBeDeleted; @@ -101,27 +101,27 @@ Kopete::ChatSession::~ChatSession() delete d; } -void Kopete::ChatSession::slotOnlineStatusChanged( Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldStatus ) +void Kopete::ChatSession::slotOnlineStatusChanged( Kopete::Contact *c, const Kopete::OnlineStatus &status, const Kopete::OnlineStatus &oldtqStatus ) { slotUpdateDisplayName(); - emit onlineStatusChanged((Kopete::Contact*)c, status, oldStatus); + emit onlineStatusChanged((Kopete::Contact*)c, status, oldtqStatus); } void Kopete::ChatSession::setContactOnlineStatus( const Kopete::Contact *contact, const Kopete::OnlineStatus &status ) { - Kopete::OnlineStatus oldStatus = d->contactStatus[ contact ]; - d->contactStatus[ contact ] = status; + Kopete::OnlineStatus oldtqStatus = d->contacttqStatus[ contact ]; + d->contacttqStatus[ contact ] = status; disconnect( contact, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), this, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); - emit onlineStatusChanged( (Kopete::Contact*)contact, status, oldStatus ); + emit onlineStatusChanged( (Kopete::Contact*)contact, status, oldtqStatus ); } const Kopete::OnlineStatus Kopete::ChatSession::contactOnlineStatus( const Kopete::Contact *contact ) const { - if ( d->contactStatus.contains( contact ) ) - return d->contactStatus[ contact ]; + if ( d->contacttqStatus.tqcontains( contact ) ) + return d->contacttqStatus[ contact ]; - return contact->onlineStatus(); + return contact->onlinetqStatus(); } const TQString Kopete::ChatSession::displayName() @@ -152,11 +152,11 @@ void Kopete::ChatSession::slotUpdateDisplayName() if ( !c ) return; - d->displayName=TQString::null; + d->displayName=TQString(); do { if(! d->displayName.isNull() ) - d->displayName.append( TQString::fromLatin1( ", " ) ) ; + d->displayName.append( TQString::tqfromLatin1( ", " ) ) ; if ( c->metaContact() ) d->displayName.append( c->metaContact()->displayName() ); @@ -171,7 +171,7 @@ void Kopete::ChatSession::slotUpdateDisplayName() //If we have only 1 contact, add the status of him if ( d->mContactList.count() == 1 ) { - d->displayName.append( TQString::fromLatin1( " (%1)" ).arg( d->mContactList.first()->onlineStatus().description() ) ); + d->displayName.append( TQString::tqfromLatin1( " (%1)" ).tqarg( d->mContactList.first()->onlinetqStatus().description() ) ); } emit displayNameChanged(); @@ -248,7 +248,7 @@ void Kopete::ChatSession::sendMessage( Kopete::Message &message ) emit messageSent( sentMessage, this ); if ( !account()->isAway() || KopetePrefs::prefs()->soundIfAway() ) { - KNotification::event(TQString::fromLatin1( "kopete_outgoing" ), i18n( "Outgoing Message Sent" ) ); + KNotification::event(TQString::tqfromLatin1( "kopete_outgoing" ), i18n( "Outgoing Message Sent" ) ); } } else @@ -264,7 +264,7 @@ void Kopete::ChatSession::messageSucceeded() void Kopete::ChatSession::emitNudgeNotification() { - KNotification::event( TQString::fromLatin1("buzz_nudge"), i18n("A contact sent you a buzz/nudge.") ); + KNotification::event( TQString::tqfromLatin1("buzz_nudge"), i18n("A contact sent you a buzz/nudge.") ); } void Kopete::ChatSession::appendMessage( Kopete::Message &msg ) @@ -275,7 +275,7 @@ void Kopete::ChatSession::appendMessage( Kopete::Message &msg ) { TQString nick=myself()->property(Kopete::Global::Properties::self()->nickName()).value().toString(); if ( KopetePrefs::prefs()->highlightEnabled() && !nick.isEmpty() && - msg.plainBody().contains( TQRegExp( TQString::fromLatin1( "\\b(%1)\\b" ).arg( nick ), false ) ) ) + msg.plainBody().tqcontains( TQRegExp( TQString::tqfromLatin1( "\\b(%1)\\b" ).tqarg( nick ), false ) ) ) { msg.setImportance( Kopete::Message::Highlight ); } @@ -294,17 +294,17 @@ void Kopete::ChatSession::appendMessage( Kopete::Message &msg ) // emit messageAppended( msg, this ); } -void Kopete::ChatSession::addContact( const Kopete::Contact *c, const Kopete::OnlineStatus &initialStatus, bool suppress ) +void Kopete::ChatSession::addContact( const Kopete::Contact *c, const Kopete::OnlineStatus &initialtqStatus, bool suppress ) { - if( !d->contactStatus.contains(c) ) - d->contactStatus[ c ] = initialStatus; + if( !d->contacttqStatus.tqcontains(c) ) + d->contacttqStatus[ c ] = initialtqStatus; addContact( c, suppress ); } void Kopete::ChatSession::addContact( const Kopete::Contact *c, bool suppress ) { //kdDebug( 14010 ) << k_funcinfo << endl; - if ( d->mContactList.contains( c ) ) + if ( d->mContactList.tqcontains( c ) ) { kdDebug( 14010 ) << k_funcinfo << "Contact already exists" <<endl; emit contactAdded( c, suppress ); @@ -331,7 +331,7 @@ void Kopete::ChatSession::addContact( const Kopete::Contact *c, bool suppress ) else disconnect( old, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); emit contactAdded( c, suppress ); - emit contactRemoved( old, TQString::null ); + emit contactRemoved( old, TQString() ); } else { @@ -359,7 +359,7 @@ void Kopete::ChatSession::addContact( const Kopete::Contact *c, bool suppress ) void Kopete::ChatSession::removeContact( const Kopete::Contact *c, const TQString& reason, Kopete::Message::MessageFormat format, bool suppressNotification ) { kdDebug( 14010 ) << k_funcinfo << endl; - if ( !c || !d->mContactList.contains( c ) ) + if ( !c || !d->mContactList.tqcontains( c ) ) return; if ( d->mContactList.count() == 1 ) @@ -386,7 +386,7 @@ void Kopete::ChatSession::removeContact( const Kopete::Contact *c, const TQStrin slotUpdateDisplayName(); } - d->contactStatus.remove( c ); + d->contacttqStatus.remove( c ); emit contactRemoved( c, reason, format, suppressNotification ); } @@ -472,14 +472,14 @@ void Kopete::ChatSession::slotContactDestroyed( Kopete::Contact *contact ) if(contact == myself()) deleteLater(); - if( !contact || !d->mContactList.contains( contact ) ) + if( !contact || !d->mContactList.tqcontains( contact ) ) return; //This is a workaround to prevent crash if the contact get deleted. // in the best case, we should ask the protocol to recreate a temporary contact. // (remember: the contact may be deleted when the users removes it from the contactlist, or when closing kopete ) d->mContactList.remove( contact ); - emit contactRemoved( contact, TQString::null ); + emit contactRemoved( contact, TQString() ); if ( d->mContactList.isEmpty() ) deleteLater(); |