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/msn/msnchatsession.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/msn/msnchatsession.cpp')
-rw-r--r-- | kopete/protocols/msn/msnchatsession.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/kopete/protocols/msn/msnchatsession.cpp b/kopete/protocols/msn/msnchatsession.cpp index f799edc1..6e0bc03e 100644 --- a/kopete/protocols/msn/msnchatsession.cpp +++ b/kopete/protocols/msn/msnchatsession.cpp @@ -128,7 +128,7 @@ MSNChatSession::~MSNChatSession() { delete m_image; //force to disconnect the switchboard - //not needed since the m_chatService has us as parent + //not needed since the m_chatService has us as tqparent // if(m_chatService) // delete m_chatService; @@ -202,7 +202,7 @@ void MSNChatSession::slotUserJoined( const TQString &handle, const TQString &pub m_timeoutTimer=0L; if( !account()->contacts()[ handle ] ) - account()->addContact( handle, TQString::null, 0L, Kopete::Account::Temporary); + account()->addContact( handle, TQString(), 0L, Kopete::Account::Temporary); MSNContact *c = static_cast<MSNContact*>( account()->contacts()[ handle ] ); @@ -316,7 +316,7 @@ void MSNChatSession::slotActionInviteAboutToShow() TQDictIterator<Kopete::Contact> it( account()->contacts() ); for( ; it.current(); ++it ) { - if( !members().contains( it.current() ) && it.current()->isOnline() && it.current() != myself() ) + if( !members().tqcontains( it.current() ) && it.current()->isOnline() && it.current() != myself() ) { KAction *a=new KopeteContactAction( it.current(), this, TQT_SLOT( slotInviteContact( Kopete::Contact * ) ), m_actionInvite ); @@ -355,11 +355,11 @@ void MSNChatSession::slotInviteOtherContact() bool ok; TQString handle = KInputDialog::getText(i18n( "MSN Plugin" ), i18n( "Please enter the email address of the person you want to invite:" ), - TQString::null, &ok ); + TQString(), &ok ); if( !ok ) return; - if( handle.contains('@') != 1 || handle.contains('.') <1) + if( handle.tqcontains('@') != 1 || handle.tqcontains('.') <1) { KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, i18n("<qt>You must enter a valid email address.</qt>"), i18n("MSN Plugin")); @@ -399,7 +399,7 @@ void MSNChatSession::sendMessageQueue() void MSNChatSession::slotAcknowledgement(unsigned int id, bool ack) { - if ( !m_messagesSent.contains( id ) ) + if ( !m_messagesSent.tqcontains( id ) ) { // This is maybe a ACK/NAK for a non-messaging message return; @@ -408,7 +408,7 @@ void MSNChatSession::slotAcknowledgement(unsigned int id, bool ack) if ( !ack ) { Kopete::Message m = m_messagesSent[ id ]; - TQString body = i18n( "The following message has not been sent correctly:\n%1" ).arg( m.plainBody() ); + TQString body = i18n( "The following message has not been sent correctly:\n%1" ).tqarg( m.plainBody() ); Kopete::Message msg = Kopete::Message( m.to().first(), members(), body, Kopete::Message::Internal, Kopete::Message::PlainText ); appendMessage( msg ); //stop the stupid animation @@ -433,14 +433,14 @@ void MSNChatSession::slotInvitation(const TQString &handle, const TQString &msg) rx.search(msg); long unsigned int cookie=rx.cap(1).toUInt(); - if(m_invitations.contains(cookie)) + if(m_invitations.tqcontains(cookie)) { MSNInvitation *msnI=m_invitations[cookie]; msnI->parseInvitation(msg); } - else if( msg.contains("Invitation-Command: INVITE") ) + else if( msg.tqcontains("Invitation-Command: INVITE") ) { - if( msg.contains(MSNFileTransferSocket::applicationID()) ) + if( msg.tqcontains(MSNFileTransferSocket::applicationID()) ) { MSNFileTransferSocket *MFTS=new MSNFileTransferSocket(myself()->account()->accountId(),c,true,this); connect(MFTS, TQT_SIGNAL( done(MSNInvitation*) ) , this , TQT_SLOT( invitationDone(MSNInvitation*) )); @@ -467,7 +467,7 @@ void MSNChatSession::slotInvitation(const TQString &handle, const TQString &msg) TQString body = i18n( "%1 has sent an unimplemented invitation, the invitation was rejected.\n" "The invitation was: %2" ) - .arg( c->property( Kopete::Global::Properties::self()->nickName()).value().toString(), inviteName ); + .tqarg( c->property( Kopete::Global::Properties::self()->nickName()).value().toString(), inviteName ); Kopete::Message tmpMsg = Kopete::Message( c , members() , body , Kopete::Message::Internal, Kopete::Message::PlainText); appendMessage(tmpMsg); @@ -493,7 +493,7 @@ void MSNChatSession::sendFile(const TQString &fileLocation, const TQString &/*fi // TODO create a switchboard to send the file is one is not available. if(m_chatService && members().getFirst()) { - m_chatService->PeerDispatcher()->sendFile(fileLocation, (Q_INT64)fileSize, members().getFirst()->contactId()); + m_chatService->PeerDispatcher()->sendFile(fileLocation, (TQ_INT64)fileSize, members().getFirst()->contactId()); } } @@ -527,7 +527,7 @@ void MSNChatSession::slotRequestPicture() if( !c->object().isEmpty() ) m_chatService->requestDisplayPicture(); } - else if(myself()->onlineStatus().isDefinitelyOnline() && myself()->onlineStatus().status() != Kopete::OnlineStatus::Invisible ) + else if(myself()->onlinetqStatus().isDefinitelyOnline() && myself()->onlinetqStatus().status() != Kopete::OnlineStatus::Invisible ) startChatSession(); } else @@ -548,7 +548,7 @@ void MSNChatSession::slotDisplayPictureChanged() int sz=22; // get the size of the toolbar were the aciton is plugged. // if you know a better way to get the toolbar, let me know - KMainWindow *w= view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->topLevelWidget() ) : 0L; + KMainWindow *w= view(false) ? dynamic_cast<KMainWindow*>( view(false)->mainWidget()->tqtopLevelWidget() ) : 0L; if(w) { //We connected that in the constructor. we don't need to keep this slot active. @@ -603,7 +603,7 @@ void MSNChatSession::slotDebugRawCommand() if( result == TQDialog::Accepted && m_chatService ) { m_chatService->sendCommand( dlg->command(), dlg->params(), - dlg->addId(), dlg->msg().replace("\n","\r\n").utf8() ); + dlg->addId(), dlg->msg().tqreplace("\n","\r\n").utf8() ); } delete dlg; #endif @@ -621,7 +621,7 @@ void MSNChatSession::receivedTypingMsg( const TQString &contactId, bool b ) if ( notifyNewChat ) { // this internal message should open the window if they not exist - TQString body = i18n( "%1 has started a chat with you" ).arg( c->metaContact()->displayName() ); + TQString body = i18n( "%1 has started a chat with you" ).tqarg( c->metaContact()->displayName() ); Kopete::Message tmpMsg = Kopete::Message( c, members(), body, Kopete::Message::Internal, Kopete::Message::PlainText ); appendMessage( tmpMsg ); } @@ -715,14 +715,14 @@ void MSNChatSession::cleanMessageQueue( const TQString & reason ) else m=m_messagesSent.begin().data(); - TQString body=i18n("The following message has not been sent correctly (%1): \n%2").arg(reason, m.plainBody()); + TQString body=i18n("The following message has not been sent correctly (%1): \n%2").tqarg(reason, m.plainBody()); Kopete::Message msg = Kopete::Message(m.to().first() , members() , body , Kopete::Message::Internal, Kopete::Message::PlainText); appendMessage(msg); } else { Kopete::Message m; - TQString body=i18n("These messages have not been sent correctly (%1): <br /><ul>").arg(reason); + TQString body=i18n("These messages have not been sent correctly (%1): <br /><ul>").tqarg(reason); for ( TQMap<unsigned int , Kopete::Message>::iterator it = m_messagesSent.begin(); it!=m_messagesSent.end(); it = m_messagesSent.begin() ) { m=it.data(); |