From 937b2991d8e78166eea904c80ad04d34607017a4 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: 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 --- kopete/protocols/msn/msnnotifysocket.cpp | 40 ++++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'kopete/protocols/msn/msnnotifysocket.cpp') 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 "\n" "
\n" "\n" - "\n" + "\n" "\n" "\n" "\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: 301142409600204800 // 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 & - notificationDOMAsString.tqreplace(rx, "&"); + notificationDOMAsString.replace(rx, "&"); TQDomDocument alertDOM; alertDOM.setContent(notificationDOMAsString); @@ -1008,7 +1008,7 @@ TQString MSNNotifySocket::processCurrentMedia( const TQString &mediaXmlElement ) currentMedia = format; for(uint i=0; i