diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 937b2991d8e78166eea904c80ad04d34607017a4 (patch) | |
tree | 2accb8161eab09df5d7a5484ea9ea080ad123168 /kopete/protocols/msn/msnaccount.cpp | |
parent | dba26cb985af370c33d1767037851705cc561726 (diff) | |
download | tdenetwork-937b2991d8e78166eea904c80ad04d34607017a4.tar.gz tdenetwork-937b2991d8e78166eea904c80ad04d34607017a4.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/msn/msnaccount.cpp')
-rw-r--r-- | kopete/protocols/msn/msnaccount.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
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) ); |