From 4c6f8d69e2d1501837affb472c4eb8fec4462240 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/kdepim@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kaddressbook/xxport/csv_xxport.cpp | 2 +- kaddressbook/xxport/csvimportdialog.cpp | 2 +- kaddressbook/xxport/eudora_xxport.cpp | 20 ++++++++--------- kaddressbook/xxport/eudora_xxport.h | 2 +- kaddressbook/xxport/gnokii_xxport.cpp | 38 ++++++++++++++++----------------- kaddressbook/xxport/opera_xxport.cpp | 6 +++--- kaddressbook/xxport/vcard_xxport.cpp | 2 +- 7 files changed, 36 insertions(+), 36 deletions(-) (limited to 'kaddressbook/xxport') diff --git a/kaddressbook/xxport/csv_xxport.cpp b/kaddressbook/xxport/csv_xxport.cpp index 03962d3a0..aa2d76539 100644 --- a/kaddressbook/xxport/csv_xxport.cpp +++ b/kaddressbook/xxport/csv_xxport.cpp @@ -123,7 +123,7 @@ void CSVXXPort::doExport( TQFile *fp, const KABC::AddresseeList &list ) if ( !first ) t << ","; - t << "\"" << (*fieldIter)->value( addr ).tqreplace( "\n", "\\n" ) << "\""; + t << "\"" << (*fieldIter)->value( addr ).replace( "\n", "\\n" ) << "\""; first = false; } diff --git a/kaddressbook/xxport/csvimportdialog.cpp b/kaddressbook/xxport/csvimportdialog.cpp index 1120e4f06..9e2b8d6f6 100644 --- a/kaddressbook/xxport/csvimportdialog.cpp +++ b/kaddressbook/xxport/csvimportdialog.cpp @@ -854,7 +854,7 @@ void CSVImportDialog::saveTemplate() if ( fileName.isEmpty() ) return; - if ( !fileName.tqcontains( ".desktop" ) ) + if ( !fileName.contains( ".desktop" ) ) fileName += ".desktop"; if( TQFileInfo(fileName).exists() ) { diff --git a/kaddressbook/xxport/eudora_xxport.cpp b/kaddressbook/xxport/eudora_xxport.cpp index 9844b5507..bed374339 100644 --- a/kaddressbook/xxport/eudora_xxport.cpp +++ b/kaddressbook/xxport/eudora_xxport.cpp @@ -124,22 +124,22 @@ TQString EudoraXXPort::key( const TQString& line) const { int e; TQString result; - int b = line.tqfind( '\"', 0 ); + int b = line.find( '\"', 0 ); if ( b == -1 ) { - b = line.tqfind( ' ' ); + b = line.find( ' ' ); if ( b == -1 ) return result; b++; - e = line.tqfind( ' ', b ); + e = line.find( ' ', b ); result = line.mid( b, e - b ); return result; } b++; - e = line.tqfind( '\"', b ); + e = line.find( '\"', b ); if ( e == -1 ) return result; @@ -152,9 +152,9 @@ TQString EudoraXXPort::email( const TQString& line ) const { int b; TQString result; - b = line.tqfindRev( '\"' ); + b = line.findRev( '\"' ); if ( b == -1 ) { - b = line.tqfindRev( ' ' ); + b = line.findRev( ' ' ); if ( b == -1 ) return result; } @@ -168,9 +168,9 @@ TQString EudoraXXPort::comment( const TQString& line ) const int b; TQString result; uint i; - b = line.tqfindRev( '>' ); + b = line.findRev( '>' ); if ( b == -1 ) { - b = line.tqfindRev( '\"' ); + b = line.findRev( '\"' ); if ( b == -1 ) return result; } @@ -191,12 +191,12 @@ TQString EudoraXXPort::get( const TQString& line, const TQString& key ) const uint i; // Find formatted key, return on error - b = line.tqfind( fd ); + b = line.find( fd ); if ( b == -1 ) return TQString(); b += fd.length(); - e = line.tqfind( '>', b ); + e = line.find( '>', b ); if ( e == -1 ) return TQString(); diff --git a/kaddressbook/xxport/eudora_xxport.h b/kaddressbook/xxport/eudora_xxport.h index e8dcf939a..de2b47845 100644 --- a/kaddressbook/xxport/eudora_xxport.h +++ b/kaddressbook/xxport/eudora_xxport.h @@ -44,7 +44,7 @@ class EudoraXXPort : public KAB::XXPort TQString comment( const TQString& line ) const; TQString email( const TQString& line ) const; TQString key( const TQString& line ) const; - int tqfind( const TQString& key ) const; + int find( const TQString& key ) const; }; #endif diff --git a/kaddressbook/xxport/gnokii_xxport.cpp b/kaddressbook/xxport/gnokii_xxport.cpp index 564fcf5fb..2d18cef7c 100644 --- a/kaddressbook/xxport/gnokii_xxport.cpp +++ b/kaddressbook/xxport/gnokii_xxport.cpp @@ -94,7 +94,7 @@ static TQString makeValidPhone( const TQString &number ) TQString num = number.simplifyWhiteSpace(); TQString allowed("0123456789*+#pw"); for (unsigned int i=num.length(); i>=1; i--) - if (allowed.tqfind(num[i-1])==-1) + if (allowed.find(num[i-1])==-1) num.remove(i-1,1); if (num.isEmpty()) num = "0"; @@ -242,7 +242,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty // try to split Name into FamilyName and GivenName s = GN_FROM(name).simplifyWhiteSpace(); a->setFormattedName(s); // set formatted name as in Phone - if (s.tqfind(',') == -1) { + if (s.find(',') == -1) { // assumed format: "givenname [... familyname]" addrlist = TQStringList::split(' ', s); if (addrlist.count() == 1) { @@ -482,13 +482,13 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem TQStringList a; TQChar sem(';'); TQString sem_repl(TQString::tqfromLatin1(",")); - a.append( Addr->postOfficeBox().tqreplace( sem, sem_repl ) ); - a.append( Addr->extended() .tqreplace( sem, sem_repl ) ); - a.append( Addr->street() .tqreplace( sem, sem_repl ) ); - a.append( Addr->locality() .tqreplace( sem, sem_repl ) ); - a.append( Addr->region() .tqreplace( sem, sem_repl ) ); - a.append( Addr->postalCode() .tqreplace( sem, sem_repl ) ); - a.append( Addr->country() .tqreplace( sem, sem_repl ) ); + a.append( Addr->postOfficeBox().replace( sem, sem_repl ) ); + a.append( Addr->extended() .replace( sem, sem_repl ) ); + a.append( Addr->street() .replace( sem, sem_repl ) ); + a.append( Addr->locality() .replace( sem, sem_repl ) ); + a.append( Addr->region() .replace( sem, sem_repl ) ); + a.append( Addr->postalCode() .replace( sem, sem_repl ) ); + a.append( Addr->country() .replace( sem, sem_repl ) ); s = a.join(sem); gn_lib_set_pb_subentry(state, -1 /* index to append entry */, GN_PHONEBOOK_ENTRY_Postal, GN_PHONEBOOK_NUMBER_General, GN_TO(s)); @@ -639,7 +639,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri if (memstat.free >= (int) list.count()) { if (KMessageBox::No == KMessageBox::questionYesNo(parentWidget(), i18n("Do you want the selected contacts to be appended to " - "the current mobile phonebook or should they tqreplace all " + "the current mobile phonebook or should they replace all " "currently existing phonebook entries ?

" "Please note, that in case you choose to replace the phonebook " "entries, every contact in your phone will be deleted and only " @@ -1015,7 +1015,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty // try to split Name into FamilyName and GivenName s = GN_FROM(entry.name).simplifyWhiteSpace(); a->setFormattedName(s); // set formatted name as in Phone - if (s.tqfind(',') == -1) { + if (s.find(',') == -1) { // assumed format: "givenname [... familyname]" addrlist = TQStringList::split(' ', s); if (addrlist.count() == 1) { @@ -1264,13 +1264,13 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem TQStringList a; TQChar sem(';'); TQString sem_repl(TQString::tqfromLatin1(",")); - a.append( Addr->postOfficeBox().tqreplace( sem, sem_repl ) ); - a.append( Addr->extended() .tqreplace( sem, sem_repl ) ); - a.append( Addr->street() .tqreplace( sem, sem_repl ) ); - a.append( Addr->locality() .tqreplace( sem, sem_repl ) ); - a.append( Addr->region() .tqreplace( sem, sem_repl ) ); - a.append( Addr->postalCode() .tqreplace( sem, sem_repl ) ); - a.append( Addr->country() .tqreplace( sem, sem_repl ) ); + a.append( Addr->postOfficeBox().replace( sem, sem_repl ) ); + a.append( Addr->extended() .replace( sem, sem_repl ) ); + a.append( Addr->street() .replace( sem, sem_repl ) ); + a.append( Addr->locality() .replace( sem, sem_repl ) ); + a.append( Addr->region() .replace( sem, sem_repl ) ); + a.append( Addr->postalCode() .replace( sem, sem_repl ) ); + a.append( Addr->country() .replace( sem, sem_repl ) ); s = a.join(sem); strncpy(subentry->data.number, GN_TO(s), sizeof(subentry->data.number)-1); entry.subentries_count++; @@ -1430,7 +1430,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQStri if (memstat.free >= (int) list.count()) { if (KMessageBox::No == KMessageBox::questionYesNo(parentWidget(), i18n("Do you want the selected contacts to be appended to " - "the current mobile phonebook or should they tqreplace all " + "the current mobile phonebook or should they replace all " "currently existing phonebook entries ?

" "Please note, that in case you choose to replace the phonebook " "entries, every contact in your phone will be deleted and only " diff --git a/kaddressbook/xxport/opera_xxport.cpp b/kaddressbook/xxport/opera_xxport.cpp index 59fd52eaa..593960e83 100644 --- a/kaddressbook/xxport/opera_xxport.cpp +++ b/kaddressbook/xxport/opera_xxport.cpp @@ -84,7 +84,7 @@ KABC::AddresseeList OperaXXPort::importContacts( const TQString& ) const } if ( parseContact == true ) { - int sep = line.tqfind( '=' ); + int sep = line.find( '=' ); key = line.left( sep ).lower(); value = line.mid( sep + 1 ); if ( key == TQString::tqfromLatin1( "name" ) ) @@ -105,10 +105,10 @@ KABC::AddresseeList OperaXXPort::importContacts( const TQString& ) const KABC::PhoneNumber::Fax | KABC::PhoneNumber::Home ) ); else if ( key == TQString::tqfromLatin1( "postaladdress" ) ) { KABC::Address address( KABC::Address::Home ); - address.setLabel( value.tqreplace( separator, "\n" ) ); + address.setLabel( value.replace( separator, "\n" ) ); addr.insertAddress( address ); } else if ( key == TQString::tqfromLatin1( "description" ) ) - addr.setNote( value.tqreplace( separator, "\n" ) ); + addr.setNote( value.replace( separator, "\n" ) ); else if ( key == TQString::tqfromLatin1( "url" ) ) addr.setUrl( KURL( value ) ); else if ( key == TQString::tqfromLatin1( "pictureurl" ) ) { diff --git a/kaddressbook/xxport/vcard_xxport.cpp b/kaddressbook/xxport/vcard_xxport.cpp index d917292f7..9dedae791 100644 --- a/kaddressbook/xxport/vcard_xxport.cpp +++ b/kaddressbook/xxport/vcard_xxport.cpp @@ -239,7 +239,7 @@ KABC::AddresseeList VCardXXPort::importContacts( const TQString& ) const // With version 3.0, vCards are encoded with UTF-8 by default. Otherwise, use tqfromLatin1() // and hope that are fields are encoded correctly. - if ( TQString::tqfromLatin1( rawData ).lower().tqcontains( "version:3.0" ) ) { + if ( TQString::tqfromLatin1( rawData ).lower().contains( "version:3.0" ) ) { vCardText = TQString::fromUtf8( rawData ); } else { vCardText = TQString::tqfromLatin1( rawData ); -- cgit v1.2.1