summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/msn
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/msn')
-rw-r--r--kopete/protocols/msn/dispatcher.cpp12
-rw-r--r--kopete/protocols/msn/msnaccount.cpp68
-rw-r--r--kopete/protocols/msn/msnchatsession.cpp14
-rw-r--r--kopete/protocols/msn/msncontact.cpp14
-rw-r--r--kopete/protocols/msn/msnfiletransfersocket.cpp6
-rw-r--r--kopete/protocols/msn/msnnotifysocket.cpp40
-rw-r--r--kopete/protocols/msn/msnprotocol.cpp8
-rw-r--r--kopete/protocols/msn/msnsecureloginhandler.cpp4
-rw-r--r--kopete/protocols/msn/msnsocket.cpp32
-rw-r--r--kopete/protocols/msn/msnswitchboardsocket.cpp64
-rw-r--r--kopete/protocols/msn/transport.cpp2
-rw-r--r--kopete/protocols/msn/ui/msneditaccountwidget.cpp4
-rw-r--r--kopete/protocols/msn/webcam.cpp8
13 files changed, 138 insertions, 138 deletions
diff --git a/kopete/protocols/msn/dispatcher.cpp b/kopete/protocols/msn/dispatcher.cpp
index 91f3361a..acf9c8db 100644
--- a/kopete/protocols/msn/dispatcher.cpp
+++ b/kopete/protocols/msn/dispatcher.cpp
@@ -94,7 +94,7 @@ void Dispatcher::requestDisplayIcon(const TQString& from, const TQString& msnObj
TQString context = TQString::fromUtf8(KCodecs::base64Encode(msnObject.utf8()));
// NOTE remove the \0 character automatically
// appended to a TQCString.
- context.tqreplace("=", TQString());
+ context.replace("=", TQString());
TQString content =
"EUF-GUID: {A4268EEC-FEC5-49E5-95C3-F126696BDBF6}\r\n"
"SessionID: " + TQString::number(sessionId) + "\r\n"
@@ -247,7 +247,7 @@ void Dispatcher::slotReadMessage(const TQString &from, const TQByteArray& stream
return;
}
- if(m_messageBuffer.tqcontains(receivedMessage.header.identifier))
+ if(m_messageBuffer.contains(receivedMessage.header.identifier))
{
kdDebug(14140) << k_funcinfo
<< TQString("retrieving buffered messsage, %1").tqarg(receivedMessage.header.identifier)
@@ -282,7 +282,7 @@ void Dispatcher::dispatch(const P2P::Message& message)
if(message.header.sessionId > 0)
{
- if(m_sessions.tqcontains(message.header.sessionId)){
+ if(m_sessions.contains(message.header.sessionId)){
messageHandler = m_sessions[message.header.sessionId];
}
}
@@ -294,7 +294,7 @@ void Dispatcher::dispatch(const P2P::Message& message)
if(regex.search(body) > 0)
{
TQ_UINT32 sessionId = regex.cap(1).toUInt();
- if(m_sessions.tqcontains(sessionId)){
+ if(m_sessions.contains(sessionId)){
// Retrieve the message handler associated with the specified session Id.
messageHandler = m_sessions[sessionId];
}
@@ -303,7 +303,7 @@ void Dispatcher::dispatch(const P2P::Message& message)
{
// Otherwise, try to retrieve the message handler
// based on the acknowlegded unique identifier.
- if(m_sessions.tqcontains(message.header.ackUniqueIdentifier)){
+ if(m_sessions.contains(message.header.ackUniqueIdentifier)){
messageHandler =
m_sessions[message.header.ackUniqueIdentifier];
}
@@ -407,7 +407,7 @@ void Dispatcher::dispatch(const P2P::Message& message)
m_sessions.insert(sessionId.toUInt(), current);
// Determine the display icon being requested.
- TQString fileName = objectList.tqcontains(msnobj)
+ TQString fileName = objectList.contains(msnobj)
? objectList[msnobj]
: m_pictureUrl;
TQFile *source = new TQFile(fileName);
diff --git a/kopete/protocols/msn/msnaccount.cpp b/kopete/protocols/msn/msnaccount.cpp
index 567ff91e..f99117bc 100644
--- a/kopete/protocols/msn/msnaccount.cpp
+++ b/kopete/protocols/msn/msnaccount.cpp
@@ -92,7 +92,7 @@ MSNAccount::MSNAccount( MSNProtocol *tqparent, const TQString& AccountID, const
m_reverseList = config->readListEntry( "reverseList" ) ;
// Load the avatar
- m_pictureFilename = locateLocal( "appdata", "msnpicture-"+ accountId().lower().tqreplace(TQRegExp("[./~]"),"-") +".png" );
+ m_pictureFilename = locateLocal( "appdata", "msnpicture-"+ accountId().lower().replace(TQRegExp("[./~]"),"-") +".png" );
resetPictureObject(true);
static_cast<MSNContact *>( myself() )->setInfo( "PHH", config->readEntry("PHH") );
@@ -288,7 +288,7 @@ void MSNAccount::setOnlineStatus( const Kopete::OnlineStatus &status , const TQS
kdDebug( 14140 ) << k_funcinfo << status.description() << endl;
// HACK: When changing song, do don't anything while connected
- if( reason.tqcontains("[Music]") && ( status == MSNProtocol::protocol()->UNK || status == MSNProtocol::protocol()->CNT ) )
+ if( reason.contains("[Music]") && ( status == MSNProtocol::protocol()->UNK || status == MSNProtocol::protocol()->CNT ) )
return;
// Only send personal message when logged.
@@ -296,7 +296,7 @@ void MSNAccount::setOnlineStatus( const Kopete::OnlineStatus &status , const TQS
{
// Only update the personal/status message, don't change the online status
// since it's the same.
- if( reason.tqcontains("[Music]") )
+ if( reason.contains("[Music]") )
{
TQString personalMessage = reason.section("[Music]", 1);
setPersonalMessage( MSNProtocol::PersonalMessageMusic, personalMessage );
@@ -359,7 +359,7 @@ void MSNAccount::slotDebugRawCommand()
if ( result == TQDialog::Accepted && m_notifySocket )
{
m_notifySocket->sendCommand( dlg->command(), dlg->params(),
- dlg->addId(), dlg->msg().tqreplace( "\n", "\r\n" ).utf8() );
+ dlg->addId(), dlg->msg().replace( "\n", "\r\n" ).utf8() );
}
delete dlg;
#endif
@@ -503,7 +503,7 @@ void MSNAccount::setPersonalMessage( MSNProtocol::PersonalMessageType type, cons
void MSNAccount::slotGroupAdded( const TQString& groupName, const TQString &groupGuid )
{
- if ( m_groupList.tqcontains( groupGuid ) )
+ if ( m_groupList.contains( groupGuid ) )
{
// Group can already be in the list since the idle timer does a 'List Groups'
// command. Simply return, don't issue a warning.
@@ -587,7 +587,7 @@ void MSNAccount::slotGroupAdded( const TQString& groupName, const TQString &grou
m_groupList.insert( groupGuid, fallBack );
// We have pending groups that we need add a contact to
- if ( tmp_addToNewGroup.tqcontains(groupName) )
+ if ( tmp_addToNewGroup.contains(groupName) )
{
TQStringList list=tmp_addToNewGroup[groupName];
for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
@@ -601,7 +601,7 @@ void MSNAccount::slotGroupAdded( const TQString& groupName, const TQString &grou
{
// If we get to here, we're currently adding a new contact, add the groupGUID to the groupList
// to add when contact will be added to contactlist.
- if( tmp_addNewContactToGroup.tqcontains( contactId ) )
+ if( tmp_addNewContactToGroup.contains( contactId ) )
tmp_addNewContactToGroup[contactId].append(groupGuid);
else
tmp_addNewContactToGroup.insert(contactId, TQStringList(groupGuid) );
@@ -613,7 +613,7 @@ void MSNAccount::slotGroupAdded( const TQString& groupName, const TQString &grou
void MSNAccount::slotGroupRenamed( const TQString &groupGuid, const TQString& groupName )
{
- if ( m_groupList.tqcontains( groupGuid ) )
+ if ( m_groupList.contains( groupGuid ) )
{
m_groupList[ groupGuid ]->setPluginData( protocol(), accountId() + " id", groupGuid );
m_groupList[ groupGuid ]->setPluginData( protocol(), accountId() + " displayName", groupName );
@@ -627,7 +627,7 @@ void MSNAccount::slotGroupRenamed( const TQString &groupGuid, const TQString& gr
void MSNAccount::slotGroupRemoved( const TQString& groupGuid )
{
- if ( m_groupList.tqcontains( groupGuid ) )
+ if ( m_groupList.contains( groupGuid ) )
{
m_groupList[ groupGuid ]->setPluginData( protocol(), TQMap<TQString,TQString>() );
m_groupList.remove( groupGuid );
@@ -638,7 +638,7 @@ void MSNAccount::addGroup( const TQString &groupName, const TQString& contactToA
{
if ( !contactToAdd.isNull() )
{
- if( tmp_addToNewGroup.tqcontains(groupName) )
+ if( tmp_addToNewGroup.contains(groupName) )
{
tmp_addToNewGroup[groupName].append(contactToAdd);
//A group with the same name is about to be added,
@@ -664,7 +664,7 @@ void MSNAccount::slotKopeteGroupRenamed( Kopete::Group *g )
{
if ( !g->pluginData( protocol(), accountId() + " id" ).isEmpty() &&
g->displayName() != g->pluginData( protocol(), accountId() + " displayName" ) &&
- m_groupList.tqcontains( g->pluginData( protocol(), accountId() + " id" ) ) )
+ m_groupList.contains( g->pluginData( protocol(), accountId() + " id" ) ) )
{
notifySocket()->renameGroup( g->displayName(), g->pluginData( protocol(), accountId() + " id" ) );
}
@@ -683,7 +683,7 @@ void MSNAccount::slotKopeteGroupRemoved( Kopete::Group *g )
if ( !g->pluginData( protocol(), accountId() + " id" ).isEmpty() )
{
TQString groupGuid = g->pluginData( protocol(), accountId() + " id" );
- if ( !m_groupList.tqcontains( groupGuid ) )
+ if ( !m_groupList.contains( groupGuid ) )
{
// the group is maybe already removed in the server
slotGroupRemoved( groupGuid );
@@ -716,7 +716,7 @@ void MSNAccount::slotKopeteGroupRemoved( Kopete::Group *g )
for ( ; it.current(); ++it )
{
MSNContact *c = static_cast<MSNContact *>( it.current() );
- if ( c && c->serverGroups().tqcontains( groupGuid ) )
+ if ( c && c->serverGroups().contains( groupGuid ) )
{
/** don't do that becasue theses may already have been sent
m_notifySocket->removeContact( c->contactId(), groupNumber, MSNProtocol::FL );
@@ -804,11 +804,11 @@ void MSNAccount::slotContactListed( const TQString& handle, const TQString& publ
for ( TQStringList::ConstIterator it = contactGroups.begin(); it != contactGroups.end(); ++it )
{
TQString newServerGroupID = *it;
- if(m_groupList.tqcontains(newServerGroupID))
+ if(m_groupList.contains(newServerGroupID))
{
Kopete::Group *newServerGroup=m_groupList[ newServerGroupID ] ;
c->contactAddedToGroup( newServerGroupID, newServerGroup );
- if( !c->metaContact()->groups().tqcontains(newServerGroup) )
+ if( !c->metaContact()->groups().contains(newServerGroup) )
{
// The contact has been added in a group by another client
c->metaContact()->addToGroup( newServerGroup );
@@ -822,7 +822,7 @@ void MSNAccount::slotContactListed( const TQString& handle, const TQString& publ
if(old_group)
{
TQString oldnewID=old_group->pluginData(protocol() , accountId() +" id");
- if ( !oldnewID.isEmpty() && contactGroups.tqcontains( oldnewID ) )
+ if ( !oldnewID.isEmpty() && contactGroups.contains( oldnewID ) )
continue; //ok, it's correctn no need to do anything.
c->metaContact()->removeFromGroup( old_group );
@@ -851,7 +851,7 @@ void MSNAccount::slotContactListed( const TQString& handle, const TQString& publ
it != contactGroups.end(); ++it )
{
TQString groupGuid = *it;
- if(m_groupList.tqcontains(groupGuid))
+ if(m_groupList.contains(groupGuid))
{
c->contactAddedToGroup( groupGuid, m_groupList[ groupGuid ] );
metaContact->addToGroup( m_groupList[ groupGuid ] );
@@ -910,7 +910,7 @@ void MSNAccount::slotContactAdded( const TQString& handle, const TQString& list,
c->removeProperty( Kopete::Global::Properties::self()->nickName() );
c->setProperty( MSNProtocol::protocol()->propGuid, contactGuid );
// Add the new contact to the group he belongs.
- if ( tmp_addNewContactToGroup.tqcontains(handle) )
+ if ( tmp_addNewContactToGroup.contains(handle) )
{
TQStringList list = tmp_addNewContactToGroup[handle];
for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
@@ -919,7 +919,7 @@ void MSNAccount::slotContactAdded( const TQString& handle, const TQString& list,
// If the group didn't exist yet (yay for async operations), don't add the contact to the group
// Let slotGroupAdded do it.
- if( m_groupList.tqcontains(groupGuid) )
+ if( m_groupList.contains(groupGuid) )
{
kdDebug( 14140 ) << k_funcinfo << "Adding " << handle << " to group: " << groupGuid << endl;
notifySocket()->addContact( handle, MSNProtocol::FL, TQString(), contactGuid, groupGuid );
@@ -955,10 +955,10 @@ void MSNAccount::slotContactAdded( const TQString& handle, const TQString& list,
c->setOnlineStatus( MSNProtocol::protocol()->FLN );
if ( c->metaContact() && c->metaContact()->isTemporary() )
- c->metaContact()->setTemporary( false, m_groupList.tqcontains( groupGuid ) ? m_groupList[ groupGuid ] : 0L );
+ c->metaContact()->setTemporary( false, m_groupList.contains( groupGuid ) ? m_groupList[ groupGuid ] : 0L );
else
{
- if(m_groupList.tqcontains(groupGuid))
+ if(m_groupList.contains(groupGuid))
{
if( c->metaContact() )
c->metaContact()->addToGroup( m_groupList[groupGuid] );
@@ -968,7 +968,7 @@ void MSNAccount::slotContactAdded( const TQString& handle, const TQString& list,
}
}
- if ( !handle.isEmpty() && !m_allowList.tqcontains( handle ) && !m_blockList.tqcontains( handle ) )
+ if ( !handle.isEmpty() && !m_allowList.contains( handle ) && !m_blockList.contains( handle ) )
{
kdDebug(14140) << k_funcinfo << "Trying to add contact to AL. " << endl;
notifySocket()->addContact(handle, MSNProtocol::AL, TQString(), TQString(), TQString() );
@@ -978,7 +978,7 @@ void MSNAccount::slotContactAdded( const TQString& handle, const TQString& list,
{
if ( contacts()[ handle ] )
static_cast<MSNContact *>( contacts()[ handle ] )->setBlocked( true );
- if ( !m_blockList.tqcontains( handle ) )
+ if ( !m_blockList.contains( handle ) )
{
m_blockList.append( handle );
configGroup()->writeEntry( "blockList" , m_blockList ) ;
@@ -988,7 +988,7 @@ void MSNAccount::slotContactAdded( const TQString& handle, const TQString& list,
{
if ( contacts()[ handle ] )
static_cast<MSNContact *>( contacts()[ handle ] )->setAllowed( true );
- if ( !m_allowList.tqcontains( handle ) )
+ if ( !m_allowList.contains( handle ) )
{
m_allowList.append( handle );
configGroup()->writeEntry( "allowList" , m_allowList ) ;
@@ -1004,7 +1004,7 @@ void MSNAccount::slotContactAdded( const TQString& handle, const TQString& list,
// 'new user' dialog, which makes it impossible to add those here.
// Not necessarily bad, but the usability effects need more thought
// before I declare it good :- )
- if ( !m_allowList.tqcontains( handle ) && !m_blockList.tqcontains( handle ) )
+ if ( !m_allowList.contains( handle ) && !m_blockList.contains( handle ) )
{
TQString nick; //in most case, the public name is not know
if(publicName!=handle) // so we don't whos it if it is not know
@@ -1034,7 +1034,7 @@ void MSNAccount::slotContactRemoved( const TQString& handle, const TQString& lis
{
m_blockList.remove( handle );
configGroup()->writeEntry( "blockList" , m_blockList ) ;
- if ( !m_allowList.tqcontains( handle ) )
+ if ( !m_allowList.contains( handle ) )
notifySocket()->addContact( handle, MSNProtocol::AL, TQString(), TQString(), TQString() );
if(c)
@@ -1044,7 +1044,7 @@ void MSNAccount::slotContactRemoved( const TQString& handle, const TQString& lis
{
m_allowList.remove( handle );
configGroup()->writeEntry( "allowList" , m_allowList ) ;
- if ( !m_blockList.tqcontains( handle ) )
+ if ( !m_blockList.contains( handle ) )
notifySocket()->addContact( handle, MSNProtocol::BL, TQString(), TQString(), TQString() );
if(c)
@@ -1118,7 +1118,7 @@ void MSNAccount::slotContactRemoved( const TQString& handle, const TQString& lis
for ( ; it.current(); ++it )
{
MSNContact *c2 = static_cast<MSNContact *>( it.current() );
- if ( c2->serverGroups().tqcontains( *stringIt ) )
+ if ( c2->serverGroups().contains( *stringIt ) )
{
still_have_contact=true;
break;
@@ -1241,16 +1241,16 @@ void MSNAccount::slotContactAddedNotifyDialogClosed(const TQString& handle)
if ( !dialog->authorized() )
{
- if ( m_allowList.tqcontains( handle ) )
+ if ( m_allowList.contains( handle ) )
m_notifySocket->removeContact( handle, MSNProtocol::AL, TQString(), TQString() );
- else if ( !m_blockList.tqcontains( handle ) )
+ else if ( !m_blockList.contains( handle ) )
m_notifySocket->addContact( handle, MSNProtocol::BL, TQString(), TQString(), TQString() );
}
else
{
- if ( m_blockList.tqcontains( handle ) )
+ if ( m_blockList.contains( handle ) )
m_notifySocket->removeContact( handle, MSNProtocol::BL, TQString(), TQString() );
- else if ( !m_allowList.tqcontains( handle ) )
+ else if ( !m_allowList.contains( handle ) )
m_notifySocket->addContact( handle, MSNProtocol::AL, TQString(), TQString(), TQString() );
}
@@ -1351,7 +1351,7 @@ void MSNAccount::addContactServerside(const TQString &contactId, TQPtrList<Kopet
if( !groupId.isEmpty() )
{
// Something got corrupted on contactlist.xml
- if( !m_groupList.tqcontains(groupId) )
+ if( !m_groupList.contains(groupId) )
{
// Clear the group plugin data.
group->setPluginData( protocol() , accountId() + " id" , TQString());
@@ -1365,7 +1365,7 @@ void MSNAccount::addContactServerside(const TQString &contactId, TQPtrList<Kopet
else
{
// Add the group that the contact belong to add it when we will receive the contact GUID.
- if( tmp_addNewContactToGroup.tqcontains( contactId ) )
+ if( tmp_addNewContactToGroup.contains( contactId ) )
tmp_addNewContactToGroup[contactId].append(groupId);
else
tmp_addNewContactToGroup.insert(contactId, TQStringList(groupId) );
diff --git a/kopete/protocols/msn/msnchatsession.cpp b/kopete/protocols/msn/msnchatsession.cpp
index 6e0bc03e..74c2bd63 100644
--- a/kopete/protocols/msn/msnchatsession.cpp
+++ b/kopete/protocols/msn/msnchatsession.cpp
@@ -316,7 +316,7 @@ void MSNChatSession::slotActionInviteAboutToShow()
TQDictIterator<Kopete::Contact> it( account()->contacts() );
for( ; it.current(); ++it )
{
- if( !members().tqcontains( it.current() ) && it.current()->isOnline() && it.current() != myself() )
+ if( !members().contains( it.current() ) && it.current()->isOnline() && it.current() != myself() )
{
KAction *a=new KopeteContactAction( it.current(), this,
TQT_SLOT( slotInviteContact( Kopete::Contact * ) ), m_actionInvite );
@@ -359,7 +359,7 @@ void MSNChatSession::slotInviteOtherContact()
if( !ok )
return;
- if( handle.tqcontains('@') != 1 || handle.tqcontains('.') <1)
+ if( handle.contains('@') != 1 || handle.contains('.') <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.tqcontains( id ) )
+ if ( !m_messagesSent.contains( id ) )
{
// This is maybe a ACK/NAK for a non-messaging message
return;
@@ -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.tqcontains(cookie))
+ if(m_invitations.contains(cookie))
{
MSNInvitation *msnI=m_invitations[cookie];
msnI->parseInvitation(msg);
}
- else if( msg.tqcontains("Invitation-Command: INVITE") )
+ else if( msg.contains("Invitation-Command: INVITE") )
{
- if( msg.tqcontains(MSNFileTransferSocket::applicationID()) )
+ if( msg.contains(MSNFileTransferSocket::applicationID()) )
{
MSNFileTransferSocket *MFTS=new MSNFileTransferSocket(myself()->account()->accountId(),c,true,this);
connect(MFTS, TQT_SIGNAL( done(MSNInvitation*) ) , this , TQT_SLOT( invitationDone(MSNInvitation*) ));
@@ -603,7 +603,7 @@ void MSNChatSession::slotDebugRawCommand()
if( result == TQDialog::Accepted && m_chatService )
{
m_chatService->sendCommand( dlg->command(), dlg->params(),
- dlg->addId(), dlg->msg().tqreplace("\n","\r\n").utf8() );
+ dlg->addId(), dlg->msg().replace("\n","\r\n").utf8() );
}
delete dlg;
#endif
diff --git a/kopete/protocols/msn/msncontact.cpp b/kopete/protocols/msn/msncontact.cpp
index 8e7742f0..cb4bfaa6 100644
--- a/kopete/protocols/msn/msncontact.cpp
+++ b/kopete/protocols/msn/msncontact.cpp
@@ -317,7 +317,7 @@ void MSNContact::setClientFlags( uint flags )
setProperty( MSNProtocol::protocol()->propClient , i18n("Windows Mobile") );
else if( flags & MSNProtocol::MSNMobileDevice)
setProperty( MSNProtocol::protocol()->propClient , i18n("MSN Mobile") );
- else if( m_obj.tqcontains("kopete") )
+ else if( m_obj.contains("kopete") )
setProperty( MSNProtocol::protocol()->propClient , i18n("Kopete") );
}
@@ -458,7 +458,7 @@ void MSNContact::sync( unsigned int changed )
if( !group->pluginData( protocol() , account()->accountId() + " id" ).isEmpty() )
{
TQString Gid=group->pluginData( protocol(), account()->accountId() + " id" );
- if( !static_cast<MSNAccount*>( account() )->m_groupList.tqcontains(Gid) )
+ if( !static_cast<MSNAccount*>( account() )->m_groupList.contains(Gid) )
{ // ohoh! something is corrupted on the contactlist.xml
// anyway, we never should add a contact to an unexisting group on the server.
// This shouln't be possible anymore 2004-06-10 -Olivier
@@ -476,7 +476,7 @@ void MSNContact::sync( unsigned int changed )
m_moving=true;
}
}
- else if( !m_serverGroups.tqcontains(Gid) )
+ else if( !m_serverGroups.contains(Gid) )
{
//Add the contact to the group on the server
notify->addContact( contactId(), MSNProtocol::FL, TQString(), guid(), Gid );
@@ -506,7 +506,7 @@ void MSNContact::sync( unsigned int changed )
for( TQMap<TQString, Kopete::Group*>::Iterator it = m_serverGroups.begin();(count > 1 && it != m_serverGroups.end()); ++it )
{
- if( !static_cast<MSNAccount*>( account() )->m_groupList.tqcontains(it.key()) )
+ if( !static_cast<MSNAccount*>( account() )->m_groupList.contains(it.key()) )
{ // ohoh! something is corrupted on the contactlist.xml
// anyway, we never should add a contact to an unexisting group on the server.
@@ -523,7 +523,7 @@ void MSNContact::sync( unsigned int changed )
Kopete::Group *group=it.data();
if(!group) //we can't trust the data of it() see in MSNProtocol::deserializeContact why
group=static_cast<MSNAccount*>( account() )->m_groupList[it.key()];
- if( !metaContact()->groups().tqcontains(group) )
+ if( !metaContact()->groups().contains(group) )
{
m_moving=true;
notify->removeContact( contactId(), MSNProtocol::FL, guid(), it.key() );
@@ -672,7 +672,7 @@ void MSNContact::setDisplayPicture(KTempFile *f)
//copy the temp file somewere else.
// in a better world, the file could be dirrectly wrote at the correct location.
// but the custom emoticon code is to deeply merged in the display picture code while it could be separated.
- TQString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().tqreplace(TQRegExp("[./~]"),"-") +".png" ) ;
+ TQString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ;
KIO::Job *j=KIO::file_move( KURL::fromPathOrURL( f->name() ) , KURL::fromPathOrURL( newlocation ) , -1, true /*overwrite*/ , false /*resume*/ , false /*showProgressInfo*/ );
@@ -685,7 +685,7 @@ void MSNContact::setDisplayPicture(KTempFile *f)
void MSNContact::slotEmitDisplayPictureChanged()
{
- TQString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().tqreplace(TQRegExp("[./~]"),"-") +".png" ) ;
+ TQString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ;
setProperty( Kopete::Global::Properties::self()->photo() , newlocation );
emit displayPictureChanged();
}
diff --git a/kopete/protocols/msn/msnfiletransfersocket.cpp b/kopete/protocols/msn/msnfiletransfersocket.cpp
index c08bd3eb..31d16aeb 100644
--- a/kopete/protocols/msn/msnfiletransfersocket.cpp
+++ b/kopete/protocols/msn/msnfiletransfersocket.cpp
@@ -331,7 +331,7 @@ TQString MSNFileTransferSocket::invitationHead()
TQTimer::singleShot( 10 * 60000, this, TQT_SLOT(slotTimer()) ); //the user has 10 mins to accept or refuse or initiate the transfer
return TQString( MSNInvitation::invitationHead()+
- "Application-File: "+ m_fileName.right( m_fileName.length() - m_fileName.tqfindRev( '/' ) - 1 ) +"\r\n"
+ "Application-File: "+ m_fileName.right( m_fileName.length() - m_fileName.findRev( '/' ) - 1 ) +"\r\n"
"Application-FileSize: "+ TQString::number(size()) +"\r\n\r\n").utf8();
}
@@ -340,7 +340,7 @@ void MSNFileTransferSocket::parseInvitation(const TQString& msg)
TQRegExp rx("Invitation-Command: ([A-Z]*)");
rx.search(msg);
TQString command=rx.cap(1);
- if( msg.tqcontains("Invitation-Command: INVITE") )
+ if( msg.contains("Invitation-Command: INVITE") )
{
rx=TQRegExp("Application-File: ([^\\r\\n]*)");
rx.search(msg);
@@ -357,7 +357,7 @@ void MSNFileTransferSocket::parseInvitation(const TQString& msg)
TQObject::connect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( refused( const Kopete::FileTransferInfo & ) ), this, TQT_SLOT( slotFileTransferRefused( const Kopete::FileTransferInfo & ) ) );
}
- else if( msg.tqcontains("Invitation-Command: ACCEPT") )
+ else if( msg.contains("Invitation-Command: ACCEPT") )
{
if(incoming())
{
diff --git a/kopete/protocols/msn/msnnotifysocket.cpp b/kopete/protocols/msn/msnnotifysocket.cpp
index 7db79dd1..41d2d834 100644
--- a/kopete/protocols/msn/msnnotifysocket.cpp
+++ b/kopete/protocols/msn/msnnotifysocket.cpp
@@ -108,7 +108,7 @@ void MSNNotifySocket::handleError( uint code, uint id )
kdDebug(14140) << k_funcinfo << endl;
TQString handle;
- if(m_tmpHandles.tqcontains(id))
+ if(m_tmpHandles.contains(id))
handle=m_tmpHandles[id];
TQString msg;
@@ -465,12 +465,12 @@ void MSNNotifySocket::parseCommand( const TQString &cmd, uint id, const TQString
if( list == "FL" )
{
// Removing a contact
- if( data.tqcontains( ' ' ) < 2 )
+ if( data.contains( ' ' ) < 2 )
{
contactGuid = data.section( ' ', 1, 1 );
}
// Removing a contact from a group
- else if( data.tqcontains( ' ' ) < 3 )
+ else if( data.contains( ' ' ) < 3 )
{
contactGuid = data.section( ' ', 1, 1 );
groupGuid = data.section( ' ', 2, 2 );
@@ -633,7 +633,7 @@ void MSNNotifySocket::parseCommand( const TQString &cmd, uint id, const TQString
"<body onload=\"document.pform.submit(); \">\n"
"<form name=\"pform\" action=\"" + from_action_url + "\" method=\"POST\">\n"
"<input type=\"hidden\" name=\"mode\" value=\"ttl\">\n"
- "<input type=\"hidden\" name=\"login\" value=\"" + UserID.left( UserID.tqfind('@') ) + "\">\n"
+ "<input type=\"hidden\" name=\"login\" value=\"" + UserID.left( UserID.find('@') ) + "\">\n"
"<input type=\"hidden\" name=\"username\" value=\"" + UserID + "\">\n"
"<input type=\"hidden\" name=\"sid\" value=\"" + m_sid + "\">\n"
"<input type=\"hidden\" name=\"kv\" value=\"" + m_kv + "\">\n"
@@ -735,7 +735,7 @@ void MSNNotifySocket::slotReadMessage( const TQByteArray &bytes )
{
TQString msg = TQString::fromUtf8(bytes, bytes.size());
- if(msg.tqcontains("text/x-msmsgsinitialmdatanotification"))
+ if(msg.contains("text/x-msmsgsinitialmdatanotification"))
{
//Mail-Data: <MD><E><I>301</I><IU>1</IU><O>4</O><OU>2</OU></E><Q><TQTM>409600</TQTM><TQNM>204800</TQNM></Q></MD>
// MD - Mail Data
@@ -758,14 +758,14 @@ void MSNNotifySocket::slotReadMessage( const TQByteArray &bytes )
TQT_SIGNAL(activated(unsigned int ) ) , this, TQT_SLOT( slotOpenInbox() ) );
}
}
- else if(msg.tqcontains("text/x-msmsgsactivemailnotification"))
+ else if(msg.contains("text/x-msmsgsactivemailnotification"))
{
//this sends the server if mails are deleted
- TQString m = msg.right(msg.length() - msg.tqfind("Message-Delta:") );
- m = m.left(msg.tqfind("\r\n"));
- mailCount = mailCount - m.right(m.length() -m.tqfind(" ")-1).toUInt();
+ TQString m = msg.right(msg.length() - msg.find("Message-Delta:") );
+ m = m.left(msg.find("\r\n"));
+ mailCount = mailCount - m.right(m.length() -m.find(" ")-1).toUInt();
}
- else if(msg.tqcontains("text/x-msmsgsemailnotification"))
+ else if(msg.contains("text/x-msmsgsemailnotification"))
{
//this sends the server if a new mail has arrived
TQRegExp rx("From-Addr: ([A-Za-z0-9@._\\-]*)");
@@ -779,28 +779,28 @@ void MSNNotifySocket::slotReadMessage( const TQByteArray &bytes )
0 , 0 , i18n( "Open Inbox..." ) ),
TQT_SIGNAL(activated(unsigned int ) ) , this, TQT_SLOT( slotOpenInbox() ) );
}
- else if(msg.tqcontains("text/x-msmsgsprofile"))
+ else if(msg.contains("text/x-msmsgsprofile"))
{
//Hotmail profile
- if(msg.tqcontains("MSPAuth:"))
+ if(msg.contains("MSPAuth:"))
{
TQRegExp rx("MSPAuth: ([A-Za-z0-9$!*]*)");
rx.search(msg);
m_MSPAuth=rx.cap(1);
}
- if(msg.tqcontains("sid:"))
+ if(msg.contains("sid:"))
{
TQRegExp rx("sid: ([0-9]*)");
rx.search(msg);
m_sid=rx.cap(1);
}
- if(msg.tqcontains("kv:"))
+ if(msg.contains("kv:"))
{
TQRegExp rx("kv: ([0-9]*)");
rx.search(msg);
m_kv=rx.cap(1);
}
- if(msg.tqcontains("LoginTime:"))
+ if(msg.contains("LoginTime:"))
{
TQRegExp rx("LoginTime: ([0-9]*)");
rx.search(msg);
@@ -812,14 +812,14 @@ void MSNNotifySocket::slotReadMessage( const TQByteArray &bytes )
time(&actualTime);
m_loginTime=TQString::number((unsigned long)actualTime);
}
- if(msg.tqcontains("EmailEnabled:"))
+ if(msg.contains("EmailEnabled:"))
{
TQRegExp rx("EmailEnabled: ([0-9]*)");
rx.search(msg);
m_isHotmailAccount = (rx.cap(1).toUInt() == 1);
emit hotmailSeted(m_isHotmailAccount);
}
- if(msg.tqcontains("ClientIP:"))
+ if(msg.contains("ClientIP:"))
{
TQRegExp rx("ClientIP: ([0-9.]*)");
rx.search(msg);
@@ -829,7 +829,7 @@ void MSNNotifySocket::slotReadMessage( const TQByteArray &bytes )
// We are logged when we receive the initial profile from Hotmail.
m_isLogged = true;
}
- else if (msg.tqcontains("NOTIFICATION"))
+ else if (msg.contains("NOTIFICATION"))
{
// MSN alert (i.e. NOTIFICATION) [for docs see http://www.hypothetic.org/docs/msn/client/notification.php]
// format of msg is as follows:
@@ -849,7 +849,7 @@ void MSNNotifySocket::slotReadMessage( const TQByteArray &bytes )
TQString notificationDOMAsString(msg);
TQRegExp rx( "&(?!amp;)" ); // match ampersands but not &amp;
- notificationDOMAsString.tqreplace(rx, "&amp;");
+ notificationDOMAsString.replace(rx, "&amp;");
TQDomDocument alertDOM;
alertDOM.setContent(notificationDOMAsString);
@@ -1008,7 +1008,7 @@ TQString MSNNotifySocket::processCurrentMedia( const TQString &mediaXmlElement )
currentMedia = format;
for(uint i=0; i<formatterStrings.size(); i++)
{
- currentMedia = currentMedia.tqreplace(TQString("{%1}").tqarg(i), formatterStrings[i]);
+ currentMedia = currentMedia.replace(TQString("{%1}").tqarg(i), formatterStrings[i]);
}
if( type == TQString::fromUtf8("Music") )
diff --git a/kopete/protocols/msn/msnprotocol.cpp b/kopete/protocols/msn/msnprotocol.cpp
index 587826ad..4337e9b2 100644
--- a/kopete/protocols/msn/msnprotocol.cpp
+++ b/kopete/protocols/msn/msnprotocol.cpp
@@ -104,9 +104,9 @@ Kopete::Contact *MSNProtocol::deserializeContact( Kopete::MetaContact *metaConta
c->setInfo( "PHM" , serializedData[ "PHM" ] );
c->setProperty( propGuid, contactGuid );
- c->setBlocked( (bool)(lists.tqcontains('B')) );
- c->setAllowed( (bool)(lists.tqcontains('A')) );
- c->setReversed( (bool)(lists.tqcontains('R')) );
+ c->setBlocked( (bool)(lists.contains('B')) );
+ c->setAllowed( (bool)(lists.contains('A')) );
+ c->setReversed( (bool)(lists.contains('R')) );
return c;
}
@@ -154,7 +154,7 @@ MSNProtocol* MSNProtocol::protocol()
bool MSNProtocol::validContactId(const TQString& userid)
{
- return ( userid.tqcontains('@') ==1 && userid.tqcontains('.') >=1 && userid.tqcontains(' ') == 0);
+ return ( userid.contains('@') ==1 && userid.contains('.') >=1 && userid.contains(' ') == 0);
}
TQImage MSNProtocol::scalePicture(const TQImage &picture)
diff --git a/kopete/protocols/msn/msnsecureloginhandler.cpp b/kopete/protocols/msn/msnsecureloginhandler.cpp
index 681ce8d4..9e28beb2 100644
--- a/kopete/protocols/msn/msnsecureloginhandler.cpp
+++ b/kopete/protocols/msn/msnsecureloginhandler.cpp
@@ -74,7 +74,7 @@ void MSNSecureLoginHandler::slotLoginServerReceived(KIO::Job *loginJob)
"OrgVerb=GET,"
"OrgURL=http%3A%2F%2Fmessenger%2Emsn%2Ecom,"
"sign-in=" + KURL::encode_string(m_accountId) +
- ",pwd=" + KURL::encode_string( m_password ).tqreplace(',',"%2C") +
+ ",pwd=" + KURL::encode_string( m_password ).replace(',',"%2C") +
"," + m_authentification + "\r\n";
// warning, this debug contains the password
@@ -105,7 +105,7 @@ void MSNSecureLoginHandler::slotTweenerReceived(KIO::Job *authJob)
// kdDebug(14140) << k_funcinfo << "HTTP headers: " << httpHeaders << endl;
// Check if we get "401 Unauthorized", thats means it's a bad password.
- if(httpHeaders.tqcontains(TQString::fromUtf8("401 Unauthorized")))
+ if(httpHeaders.contains(TQString::fromUtf8("401 Unauthorized")))
{
// kdDebug(14140) << k_funcinfo << "MSN Login Bad password." << endl;
emit loginBadPassword();
diff --git a/kopete/protocols/msn/msnsocket.cpp b/kopete/protocols/msn/msnsocket.cpp
index 3e5d84fd..6dc8fa94 100644
--- a/kopete/protocols/msn/msnsocket.cpp
+++ b/kopete/protocols/msn/msnsocket.cpp
@@ -249,12 +249,12 @@ void MSNSocket::slotDataReceived()
// Check if all data has arrived.
rawData = TQString(TQCString(buffer, avail + 1));
- bool headers = (rawData.tqfind(TQRegExp("HTTP/\\d\\.\\d (\\d+) ([^\r\n]+)")) != -1);
+ bool headers = (rawData.find(TQRegExp("HTTP/\\d\\.\\d (\\d+) ([^\r\n]+)")) != -1);
if(headers)
{
// The http header packet arrived.
- int endOfHeaders = rawData.tqfind("\r\n\r\n");
+ int endOfHeaders = rawData.find("\r\n\r\n");
if((endOfHeaders + 4) == avail)
{
// Only the response headers data is included.
@@ -314,17 +314,17 @@ void MSNSocket::slotDataReceived()
// Retrieve the X-MSN-Messenger header.
TQString header = response.getHeaders()->getValue("X-MSN-Messenger");
- TQStringList parts = TQStringList::split(";", header.tqreplace(" ", ""));
+ TQStringList parts = TQStringList::split(";", header.replace(" ", ""));
if(!header.isNull() && (parts.count() >= 2))
{
- if(parts[0].tqfind("SessionID", 0) != -1)
+ if(parts[0].find("SessionID", 0) != -1)
{
// Assign the session id.
m_sessionId = parts[0].section("=", 1, 1);
}else
error = true;
- if(parts[1].tqfind("GW-IP", 0) != -1)
+ if(parts[1].find("GW-IP", 0) != -1)
{
// Assign the gateway IP address.
m_gwip = parts[1].section("=", 1, 1);
@@ -333,7 +333,7 @@ void MSNSocket::slotDataReceived()
if(parts.count() > 2)
- if((parts[2].tqfind("Session", 0) != -1) && (parts[2].section("=", 1, 1) == "close"))
+ if((parts[2].find("Session", 0) != -1) && (parts[2].section("=", 1, 1) == "close"))
{
// The http session has been closed by the server, disconnect.
kdDebug(14140) << k_funcinfo << "Session closed." << endl;
@@ -390,7 +390,7 @@ void MSNSocket::slotDataReceived()
// all MSN commands start with one or more uppercase characters.
// For now just check the first three chars, let's see how accurate it is.
// Additionally, if we receive an MSN-P2P packet, strip off anything after the P2P header.
- rawData = TQString( TQCString( buffer, ((!m_useHttp)? avail : ret) + 1 ) ).stripWhiteSpace().tqreplace(
+ rawData = TQString( TQCString( buffer, ((!m_useHttp)? avail : ret) + 1 ) ).stripWhiteSpace().replace(
TQRegExp( "(P2P-Dest:.[a-zA-Z@.]*).*" ), "\\1\n\n(Stripped binary data)" );
bool isBinary = false;
@@ -446,7 +446,7 @@ void MSNSocket::slotReadLine()
if ( index != -1 )
{
TQString command = TQString::fromUtf8( m_buffer.take( index + 2 ), index );
- command.tqreplace( "\r\n", "" );
+ command.replace( "\r\n", "" );
//kdDebug( 14141 ) << k_funcinfo << command << endl;
// Don't block the GUI while parsing data, only do a single line!
@@ -502,7 +502,7 @@ bool MSNSocket::pollReadBlock()
void MSNSocket::parseLine( const TQString &str )
{
TQString cmd = str.section( ' ', 0, 0 );
- TQString data = str.section( ' ', 2 ).tqreplace( "\r\n" , "" );
+ TQString data = str.section( ' ', 2 ).replace( "\r\n" , "" );
bool isNum;
uint id = str.section( ' ', 1, 1 ).toUInt( &isNum );
@@ -517,7 +517,7 @@ void MSNSocket::parseLine( const TQString &str )
//kdDebug( 14140 ) << k_funcinfo << "Parsing command " << cmd << " (ID " << id << "): '" << data << "'" << endl;
- data.tqreplace( "\r\n", "" );
+ data.replace( "\r\n", "" );
bool isError;
uint errorCode = cmd.toUInt( &isError );
if ( isError )
@@ -725,7 +725,7 @@ void MSNSocket::slotReadyWrite()
// Simple check to avoid dumping the binary data from the icons and emoticons to kdDebug:
// When sending an MSN-P2P packet, strip off anything after the P2P header.
- TQString debugData = TQString( *it ).stripWhiteSpace().tqreplace(
+ TQString debugData = TQString( *it ).stripWhiteSpace().replace(
TQRegExp( "(P2P-Dest:.[a-zA-Z@.]*).*" ), "\\1\n\n(Stripped binary data)" );
kdDebug( 14141 ) << k_funcinfo << "Sending command: " << debugData << endl;
@@ -790,10 +790,10 @@ TQString MSNSocket::unescape( const TQString &str )
{
TQString str2 = KURL::decode_string( str, 106 );
//remove msn+ colors code
- str2 = str2.tqreplace( TQRegExp("[\\x1-\\x8]"), "" ); // old msn+ colors
+ str2 = str2.replace( TQRegExp("[\\x1-\\x8]"), "" ); // old msn+ colors
// added by kaoul <erwin.kwolek at gmail.com>
- str2 = str2.tqreplace( TQRegExp("\\xB7[&@\'#0]"),""); // dot ...
- str2 = str2.tqreplace( TQRegExp("\\xB7\\$,?\\d{1,2}"),""); // dot dollar (comma)? 0-99
+ str2 = str2.replace( TQRegExp("\\xB7[&@\'#0]"),""); // dot ...
+ str2 = str2.replace( TQRegExp("\\xB7\\$,?\\d{1,2}"),""); // dot dollar (comma)? 0-99
return str2;
}
@@ -1031,7 +1031,7 @@ MSNSocket::WebResponse::WebResponse(const TQByteArray& bytes)
// Parse the HTTP status header
TQRegExp re("HTTP/\\d\\.\\d (\\d+) ([^\r\n]+)");
- headerEnd = data.tqfind("\r\n");
+ headerEnd = data.find("\r\n");
header = data.left( (headerEnd == -1) ? 20 : headerEnd );
re.search(header);
@@ -1039,7 +1039,7 @@ MSNSocket::WebResponse::WebResponse(const TQByteArray& bytes)
m_statusDescription = re.cap(2);
// Remove the web response status header.
- data = data.mid(headerEnd + 2, (data.tqfind("\r\n\r\n") + 2) - (headerEnd + 2));
+ data = data.mid(headerEnd + 2, (data.find("\r\n\r\n") + 2) - (headerEnd + 2));
// Create a MimeMessage, removing the HTTP status header
m_headers = new MimeMessage(data);
diff --git a/kopete/protocols/msn/msnswitchboardsocket.cpp b/kopete/protocols/msn/msnswitchboardsocket.cpp
index b0052552..f5cc890a 100644
--- a/kopete/protocols/msn/msnswitchboardsocket.cpp
+++ b/kopete/protocols/msn/msnswitchboardsocket.cpp
@@ -93,8 +93,8 @@ void MSNSwitchBoardSocket::connectToSwitchBoard(TQString ID, TQString address, T
m_ID = ID;
m_auth = auth;
- TQString server = address.left( address.tqfind( ":" ) );
- uint port = address.right( address.length() - address.tqfindRev( ":" ) - 1 ).toUInt();
+ TQString server = address.left( address.find( ":" ) );
+ uint port = address.right( address.length() - address.findRev( ":" ) - 1 ).toUInt();
TQObject::connect( this, TQT_SIGNAL( blockRead( const TQByteArray & ) ),
this, TQT_SLOT(slotReadMessage( const TQByteArray & ) ) );
@@ -191,7 +191,7 @@ void MSNSwitchBoardSocket::parseCommand( const TQString &cmd, uint id ,
// new user joins the chat, update user in chat list
TQString handle = data.section( ' ', 0, 0 );
TQString screenname = unescape(data.section( ' ', 1, 1 ));
- if( !m_chatMembers.tqcontains( handle ) )
+ if( !m_chatMembers.contains( handle ) )
m_chatMembers.append( handle );
emit userJoined( handle, screenname, false );
}
@@ -199,7 +199,7 @@ void MSNSwitchBoardSocket::parseCommand( const TQString &cmd, uint id ,
{
// we have joined a multi chat session- this are the users in this chat
TQString handle = data.section( ' ', 2, 2 );
- if( !m_chatMembers.tqcontains( handle ) )
+ if( !m_chatMembers.contains( handle ) )
m_chatMembers.append( handle );
TQString screenname = unescape(data.section( ' ', 3, 3));
@@ -214,7 +214,7 @@ void MSNSwitchBoardSocket::parseCommand( const TQString &cmd, uint id ,
// some has disconnect from chat, update user in chat list
cleanQueue(); //in case some message are waiting their emoticons, never mind, send them
- TQString handle = data.section( ' ', 0, 0 ).tqreplace( "\r\n" , "" );
+ TQString handle = data.section( ' ', 0, 0 ).replace( "\r\n" , "" );
userLeftChat( handle, (data.section( ' ', 1, 1 ) == "1" ) ? i18n("timeout") : TQString() );
}
else if( cmd == "MSG" )
@@ -265,13 +265,13 @@ void MSNSwitchBoardSocket::slotReadMessage( const TQByteArray &bytes )
else if( type== "text/x-msmsgscontrol" )
{
TQString message;
- message = msg.right( msg.length() - msg.tqfindRev( " " ) - 1 );
- message = message.tqreplace( "\r\n" ,"" );
+ message = msg.right( msg.length() - msg.findRev( " " ) - 1 );
+ message = message.replace( "\r\n" ,"" );
emit receivedTypingMsg( message.lower(), true );
}
else if(type == "text/x-msnmsgr-datacast")
{
- if(msg.tqcontains("ID:"))
+ if(msg.contains("ID:"))
{
TQRegExp rx("ID: ([0-9]*)");
rx.search(msg);
@@ -293,7 +293,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const TQByteArray &bytes )
TQColor fontColor;
TQFont font;
- if ( msg.tqcontains( "X-MMS-IM-Format" ) )
+ if ( msg.contains( "X-MMS-IM-Format" ) )
{
TQString fontName;
TQString fontInfo;
@@ -329,7 +329,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const TQByteArray &bytes )
}
}
- fontName = parseFontAttr(fontInfo, "FN").tqreplace( "%20" , " " );
+ fontName = parseFontAttr(fontInfo, "FN").replace( "%20" , " " );
// Some clients like Trillian and Kopete itself send a font
// name of 'MS Serif' since MS changed the server to
@@ -343,10 +343,10 @@ void MSNSwitchBoardSocket::slotReadMessage( const TQByteArray &bytes )
font = TQFont( fontName,
parseFontAttr( fontInfo, "PF" ).toInt(), // font size
- ef.tqcontains( 'B' ) ? TQFont::Bold : TQFont::Normal,
- ef.tqcontains( 'I' ) );
- font.setUnderline(ef.tqcontains( 'U' ));
- font.setStrikeOut(ef.tqcontains( 'S' ));
+ ef.contains( 'B' ) ? TQFont::Bold : TQFont::Normal,
+ ef.contains( 'I' ) );
+ font.setUnderline(ef.contains( 'U' ));
+ font.setStrikeOut(ef.contains( 'S' ));
}
}
@@ -359,17 +359,17 @@ void MSNSwitchBoardSocket::slotReadMessage( const TQByteArray &bytes )
others.append( m_account->contacts()[ *it2 ] );
}
- TQString message=msg.right( msg.length() - msg.tqfind("\r\n\r\n") - 4 );
+ TQString message=msg.right( msg.length() - msg.find("\r\n\r\n") - 4 );
//Stupid MSN PLUS colors code. message with incorrect charactere are not showed correctly in the chatwindow.
//TODO: parse theses one to show the color too in Kopete
- message.tqreplace("\3","").tqreplace("\4","").tqreplace("\2","").tqreplace("\5","").tqreplace("\6","").tqreplace("\7","");
+ message.replace("\3","").replace("\4","").replace("\2","").replace("\5","").replace("\6","").replace("\7","");
if(!m_account->contacts()[m_msgHandle])
{
//this may happens if the contact has been deleted.
kdDebug(14140) << k_funcinfo <<"WARNING: contact is null, adding it" <<endl;
- if( !m_chatMembers.tqcontains( m_msgHandle ) )
+ if( !m_chatMembers.contains( m_msgHandle ) )
m_chatMembers.append( m_msgHandle );
emit userJoined( m_msgHandle , m_msgHandle , false);
}
@@ -432,7 +432,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const TQByteArray &bytes )
TQString txt=rx.cap(1);
kdDebug(14140) << k_funcinfo << "emoticon: " << txt << " msnobj: " << msnobj<< endl;
- if( !m_emoticons.tqcontains(msnobj) || !m_emoticons[msnobj].second )
+ if( !m_emoticons.contains(msnobj) || !m_emoticons[msnobj].second )
{
m_emoticons.insert(msnobj, tqMakePair(txt,(KTempFile*)0L));
MSNContact *c=static_cast<MSNContact*>(m_account->contacts()[m_msgHandle]);
@@ -493,7 +493,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const TQByteArray &bytes )
}
- else if(type == "image/gif" || msg.tqcontains("Message-ID:"))
+ else if(type == "image/gif" || msg.contains("Message-ID:"))
{
// Incoming inkformatgif.
TQRegExp regex("Message-ID: \\{([0-9A-F\\-]*)\\}");
@@ -536,7 +536,7 @@ void MSNSwitchBoardSocket::slotReadMessage( const TQByteArray &bytes )
if(!messageId.isNull())
{
- if(m_inkMessageBuffer.tqcontains(messageId))
+ if(m_inkMessageBuffer.contains(messageId))
{
if(chunks.isNull())
{
@@ -660,7 +660,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
}
#if 0 //this is to test webcam
- if(msg.plainBody().tqcontains("/webcam"))
+ if(msg.plainBody().contains("/webcam"))
{
PeerDispatcher()->startWebcam( m_myHandle , m_msgHandle);
return -3;
@@ -678,7 +678,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
{
for ( TQStringList::const_iterator itr2 = itr.data().constBegin(); itr2 != itr.data().constEnd(); ++itr2 )
{
- if ( msg.plainBody().tqcontains( *itr2 ) )
+ if ( msg.plainBody().contains( *itr2 ) )
sendCustomEmoticon( *itr2, itr.key() );
}
}
@@ -748,7 +748,7 @@ int MSNSwitchBoardSocket::sendMsg( const Kopete::Message &msg )
head += "; RL=1";
head += "\r\n";
- TQString message= msg.plainBody().tqreplace( "\n" , "\r\n" );
+ TQString message= msg.plainBody().replace( "\n" , "\r\n" );
//-- Check if the message isn't too big, TODO: do that at the libkopete level.
int len_H=head.utf8().length(); // != head.length() because i need the size in butes and
@@ -888,7 +888,7 @@ void MSNSwitchBoardSocket::userLeftChat(const TQString& handle , const TQString
{
emit userLeft( handle, reason );
- if( m_chatMembers.tqcontains( handle ) )
+ if( m_chatMembers.contains( handle ) )
m_chatMembers.remove( handle );
if(m_chatMembers.isEmpty())
@@ -907,7 +907,7 @@ void MSNSwitchBoardSocket::slotEmoticonReceived( KTempFile *file, const TQStrin
{
kdDebug(14141) << k_funcinfo << msnObj << endl;
- if(m_emoticons.tqcontains(msnObj))
+ if(m_emoticons.contains(msnObj))
{ //it's an emoticon
m_emoticons[msnObj].second=file;
@@ -941,7 +941,7 @@ void MSNSwitchBoardSocket::slotEmoticonReceived( KTempFile *file, const TQStrin
{
//this may happens if the contact has been deleted.
kdDebug(14140) << k_funcinfo <<"WARNING: contact is null, adding it" <<endl;
- if( !m_chatMembers.tqcontains( m_msgHandle ) )
+ if( !m_chatMembers.contains( m_msgHandle ) )
m_chatMembers.append( m_msgHandle );
emit userJoined( m_msgHandle , m_msgHandle , false);
}
@@ -976,7 +976,7 @@ void MSNSwitchBoardSocket::slotIncomingFileTransfer(const TQString& from, const
{
//this may happens if the contact has been deleted.
kdDebug(14140) << k_funcinfo <<"WARNING: contact is null, adding it" <<endl;
- if( !m_chatMembers.tqcontains( m_msgHandle ) )
+ if( !m_chatMembers.contains( m_msgHandle ) )
m_chatMembers.append( m_msgHandle );
emit userJoined( m_msgHandle , m_msgHandle , false);
}
@@ -1013,7 +1013,7 @@ Kopete::Message &MSNSwitchBoardSocket::parseCustomEmoticons(Kopete::Message &kms
{
TQString es=TQStyleSheet::escape(it.data().first);
KTempFile *f=it.data().second;
- if(message.tqcontains(es) && f)
+ if(message.contains(es) && f)
{
TQString imgPath = f->name();
TQImage iconImage(imgPath);
@@ -1021,11 +1021,11 @@ Kopete::Message &MSNSwitchBoardSocket::parseCustomEmoticons(Kopete::Message &kms
* emoticons like that. So, in that case, we show like the MSN client */
#if 0
TQString em = TQRegExp::escape( es );
- message.tqreplace( TQRegExp(TQString::tqfromLatin1( "(^|[\\W\\s]|%1)(%2)(?!\\w)" ).tqarg(em).tqarg(em)),
+ message.replace( TQRegExp(TQString::tqfromLatin1( "(^|[\\W\\s]|%1)(%2)(?!\\w)" ).tqarg(em).tqarg(em)),
TQString::tqfromLatin1("\\1<img align=\"center\" width=\"") +
#endif
//match any occurence which is not in a html tag.
- message.tqreplace( TQRegExp(TQString::tqfromLatin1("%1(?![^><]*>)").tqarg(TQRegExp::escape(es))),
+ message.replace( TQRegExp(TQString::tqfromLatin1("%1(?![^><]*>)").tqarg(TQRegExp::escape(es))),
TQString::tqfromLatin1("<img align=\"center\" width=\"") +
TQString::number(iconImage.width()) +
TQString::tqfromLatin1("\" height=\"") +
@@ -1060,12 +1060,12 @@ TQString MSNSwitchBoardSocket::parseFontAttr(TQString str, TQString attr)
TQString tmp;
int pos1=0, pos2=0;
- pos1 = str.tqfind(attr + "=");
+ pos1 = str.find(attr + "=");
if (pos1 == -1)
return "";
- pos2 = str.tqfind(";", pos1+3);
+ pos2 = str.find(";", pos1+3);
if (pos2 == -1)
tmp = str.mid(pos1+3, str.length() - pos1 - 3);
diff --git a/kopete/protocols/msn/transport.cpp b/kopete/protocols/msn/transport.cpp
index 6b913816..593cfc74 100644
--- a/kopete/protocols/msn/transport.cpp
+++ b/kopete/protocols/msn/transport.cpp
@@ -51,7 +51,7 @@ TransportBridge* Transport::getBridge (const TQString& to, TQ_UINT16 port, Trans
{
TransportBridge *bridge = 0l;
KInetSocketAddress address;
- if (mAddresses.tqcontains(to))
+ if (mAddresses.contains(to))
{
address = mAddresses[to];
}
diff --git a/kopete/protocols/msn/ui/msneditaccountwidget.cpp b/kopete/protocols/msn/ui/msneditaccountwidget.cpp
index b165c9f4..aa16e07e 100644
--- a/kopete/protocols/msn/ui/msneditaccountwidget.cpp
+++ b/kopete/protocols/msn/ui/msneditaccountwidget.cpp
@@ -159,7 +159,7 @@ MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account
d->ui->m_blp->setChecked( config->readEntry( "BLP" ) == "BL" );
d->pictureUrl = locateLocal( "appdata", "msnpicture-" +
- account->accountId().lower().tqreplace( TQRegExp("[./~]" ), "-" ) + ".png" );
+ account->accountId().lower().replace( TQRegExp("[./~]" ), "-" ) + ".png" );
d->ui->m_displayPicture->setPixmap( d->pictureUrl );
d->ui->m_useDisplayPicture->setChecked( config->readBoolEntry( "exportCustomPicture" ));
@@ -227,7 +227,7 @@ Kopete::Account * MSNEditAccountWidget::apply()
if( d->ui->m_useDisplayPicture->isChecked() && !d->pictureData.isNull() )
{
d->pictureUrl = locateLocal( "appdata", "msnpicture-" +
- account()->accountId().lower().tqreplace( TQRegExp("[./~]" ), "-" ) + ".png" );
+ account()->accountId().lower().replace( TQRegExp("[./~]" ), "-" ) + ".png" );
if ( d->pictureData.save( d->pictureUrl, "PNG" ) )
{
static_cast<MSNAccount *>( account() )->setPictureUrl( d->pictureUrl );
diff --git a/kopete/protocols/msn/webcam.cpp b/kopete/protocols/msn/webcam.cpp
index 2c2023c2..584ae803 100644
--- a/kopete/protocols/msn/webcam.cpp
+++ b/kopete/protocols/msn/webcam.cpp
@@ -312,13 +312,13 @@ void Webcam::processMessage(const Message& message)
makeSIPMessage(producerxml);
}
}
- else if(m_content.tqcontains("<producer>") || m_content.tqcontains("<viewer>"))
+ else if(m_content.contains("<producer>") || m_content.contains("<viewer>"))
{
TQRegExp rx("<rid>([0-9]*)</rid>.*<session>([0-9]*)</session>");
rx.search(m_content);
TQString rid=rx.cap(1);
TQString sess=rx.cap(2);
- if(m_content.tqcontains("<producer>"))
+ if(m_content.contains("<producer>"))
{
TQString viewerxml=xml(sess.toUInt() , rid.toUInt());
@@ -370,7 +370,7 @@ void Webcam::processMessage(const Message& message)
while(true)
{
an++;
- if(!m_content.tqcontains( TQString("<tcpipaddress%1>").tqarg(an) ))
+ if(!m_content.contains( TQString("<tcpipaddress%1>").tqarg(an) ))
break;
rx=TQRegExp(TQString("<tcpipaddress%1>([^<]*)</tcpipaddress%2>").tqarg(an).tqarg(an));
rx.search(m_content);
@@ -416,7 +416,7 @@ void Webcam::processMessage(const Message& message)
kdDebug(14140) << k_funcinfo << "connect to " << sock << " - "<< sock->peerAddress().toString() << " ; " << sock->localAddress().toString() << endl;
}
}
- else if(m_content.tqcontains("receivedViewerData"))
+ else if(m_content.contains("receivedViewerData"))
{
//I'm happy you received the xml i sent, really.
}