summaryrefslogtreecommitdiffstats
path: root/kabc
diff options
context:
space:
mode:
Diffstat (limited to 'kabc')
-rw-r--r--kabc/address.cpp16
-rw-r--r--kabc/addresseedialog.cpp4
-rw-r--r--kabc/addresslineedit.cpp32
-rw-r--r--kabc/distributionlist.cpp2
-rw-r--r--kabc/kab2kabc.cpp10
-rw-r--r--kabc/ldapclient.cpp6
-rw-r--r--kabc/ldapurl.cpp4
-rw-r--r--kabc/ldif.cpp2
-rw-r--r--kabc/ldifconverter.cpp8
-rw-r--r--kabc/plugins/dir/resourcedirconfig.cpp2
-rw-r--r--kabc/plugins/file/resourcefileconfig.cpp2
-rw-r--r--kabc/plugins/ldapkio/resourceldapkio.cpp42
-rw-r--r--kabc/plugins/ldapkio/resourceldapkioconfig.cpp2
-rw-r--r--kabc/plugins/net/resourcenetconfig.cpp2
-rw-r--r--kabc/plugins/sql/resourcesql.cpp4
-rw-r--r--kabc/resource.cpp2
-rw-r--r--kabc/scripts/addressee.src.cpp20
-rw-r--r--kabc/vcard/AdrParam.cpp2
-rw-r--r--kabc/vcard/ContentLine.cpp12
-rw-r--r--kabc/vcard/DateValue.cpp10
-rw-r--r--kabc/vcard/GeoValue.cpp2
-rw-r--r--kabc/vcard/SourceParam.cpp2
-rw-r--r--kabc/vcard/URIValue.cpp2
-rw-r--r--kabc/vcard/UTCValue.cpp2
-rw-r--r--kabc/vcard/VCard.cpp8
-rw-r--r--kabc/vcard/VCardEntity.cpp4
-rw-r--r--kabc/vcard21parser.cpp104
-rw-r--r--kabc/vcardformatimpl.cpp6
-rw-r--r--kabc/vcardparser/vcard.cpp6
-rw-r--r--kabc/vcardparser/vcardline.cpp6
-rw-r--r--kabc/vcardparser/vcardparser.cpp10
-rw-r--r--kabc/vcardtool.cpp38
32 files changed, 187 insertions, 187 deletions
diff --git a/kabc/address.cpp b/kabc/address.cpp
index b653d168f..714dd571e 100644
--- a/kabc/address.cpp
+++ b/kabc/address.cpp
@@ -399,7 +399,7 @@ bool Address::parseAddressTemplateSection( const TQString &tsection,
bool ret = false;
// first check for brackets that have to be evaluated first
- int fpos = result.tqfind( KABC_FMTTAG_purgeempty, stpos );
+ int fpos = result.find( KABC_FMTTAG_purgeempty, stpos );
while ( -1 != fpos ) {
int bpos1 = fpos + KABC_FMTTAG_purgeempty.length();
int bpos2;
@@ -430,7 +430,7 @@ bool Address::parseAddressTemplateSection( const TQString &tsection,
stpos = bpos1;
}
}
- fpos = result.tqfind( KABC_FMTTAG_purgeempty, stpos );
+ fpos = result.find( KABC_FMTTAG_purgeempty, stpos );
}
// after sorting out all purge tags, we just search'n'replace the rest,
@@ -438,7 +438,7 @@ bool Address::parseAddressTemplateSection( const TQString &tsection,
// The following macro needs TQString for R_FIELD
// It substitutes !_P_! for empty fields so conditional tags work later
#define REPLTAG(R_TAG,R_FIELD) \
- if ( result.tqfind(R_TAG, false) != -1 ) { \
+ if ( result.find(R_TAG, false) != -1 ) { \
TQString rpl = R_FIELD.isEmpty() ? TQString("!_P_!") : R_FIELD; \
result.replace( R_TAG, rpl ); \
if ( !R_FIELD.isEmpty() ) { \
@@ -461,7 +461,7 @@ bool Address::parseAddressTemplateSection( const TQString &tsection,
#undef REPLTAG
// conditional comma
- fpos = result.tqfind( KABC_FMTTAG_condcomma, 0 );
+ fpos = result.find( KABC_FMTTAG_condcomma, 0 );
while ( -1 != fpos ) {
TQString str1 = result.mid( fpos - 5, 5 );
TQString str2 = result.mid( fpos + 2, 5 );
@@ -470,10 +470,10 @@ bool Address::parseAddressTemplateSection( const TQString &tsection,
} else {
result.remove( fpos, 2 );
}
- fpos = result.tqfind( KABC_FMTTAG_condcomma, fpos );
+ fpos = result.find( KABC_FMTTAG_condcomma, fpos );
}
// conditional whitespace
- fpos = result.tqfind( KABC_FMTTAG_condwhite, 0 );
+ fpos = result.find( KABC_FMTTAG_condwhite, 0 );
while ( -1 != fpos ) {
TQString str1 = result.mid( fpos - 5, 5 );
TQString str2 = result.mid( fpos + 2, 5 );
@@ -482,7 +482,7 @@ bool Address::parseAddressTemplateSection( const TQString &tsection,
} else {
result.remove( fpos, 2 );
}
- fpos = result.tqfind( KABC_FMTTAG_condwhite, fpos );
+ fpos = result.find( KABC_FMTTAG_condwhite, fpos );
}
// remove purged:
@@ -560,7 +560,7 @@ TQString Address::ISOtoCountry( const TQString &ISOname )
TQString strbuf = s.readLine();
int pos;
while ( !strbuf.isEmpty() ) {
- if ( (pos = strbuf.tqfind( searchStr )) != -1 ) {
+ if ( (pos = strbuf.find( searchStr )) != -1 ) {
file.close();
return i18n( strbuf.left( pos ).utf8() );
}
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp
index b1d3e4137..ec8e7be05 100644
--- a/kabc/addresseedialog.cpp
+++ b/kabc/addresseedialog.cpp
@@ -152,7 +152,7 @@ void AddresseeDialog::selectItem( const TQString &str )
{
if ( str.isEmpty() ) return;
- TQListViewItem *item = mItemDict.tqfind( str );
+ TQListViewItem *item = mItemDict.find( str );
if ( item ) {
mAddresseeList->blockSignals( true );
mAddresseeList->setSelected( item, true );
@@ -174,7 +174,7 @@ void AddresseeDialog::addSelected( TQListViewItem *item )
Addressee a = addrItem->addressee();
- TQListViewItem *selectedItem = mSelectedDict.tqfind( a.uid() );
+ TQListViewItem *selectedItem = mSelectedDict.find( a.uid() );
if ( !selectedItem ) {
selectedItem = new AddresseeItem( mSelectedList, a );
mSelectedDict.insert( a.uid(), selectedItem );
diff --git a/kabc/addresslineedit.cpp b/kabc/addresslineedit.cpp
index 8ac43081d..fe9d1f602 100644
--- a/kabc/addresslineedit.cpp
+++ b/kabc/addresslineedit.cpp
@@ -219,13 +219,13 @@ void AddressLineEdit::insert(const TQString &t)
KURL u(newText);
newText = u.path();
}
- else if (newText.tqfind(" at ") != -1)
+ else if (newText.find(" at ") != -1)
{
// Anti-spam stuff
newText.replace( " at ", "@" );
newText.replace( " dot ", "." );
}
- else if (newText.tqfind("(at)") != -1)
+ else if (newText.find("(at)") != -1)
{
newText.replace( TQRegExp("\\s*\\(at\\)\\s*"), "@" );
}
@@ -293,7 +293,7 @@ void AddressLineEdit::doCompletion(bool ctrlT)
TQString prevAddr;
TQString s(text());
- int n = s.tqfindRev(',');
+ int n = s.findRev(',');
if (n >= 0)
{
@@ -343,7 +343,7 @@ void AddressLineEdit::doCompletion(bool ctrlT)
items += s_completion->substringCompletion( '<' + s );
uint beforeDollarCompletionCount = items.count();
- if( s.tqfind( ' ' ) == -1 ) // one word, possibly given name
+ if( s.find( ' ' ) == -1 ) // one word, possibly given name
items += s_completion->allMatches( "$$" + s );
if ( !items.isEmpty() )
@@ -355,7 +355,7 @@ void AddressLineEdit::doCompletion(bool ctrlT)
it != items.end();
++it )
{
- int pos = (*it).tqfind( '$', 2 );
+ int pos = (*it).find( '$', 2 );
if( pos < 0 ) // ???
continue;
(*it)=(*it).mid( pos + 1 );
@@ -373,7 +373,7 @@ void AddressLineEdit::doCompletion(bool ctrlT)
if (!autoSuggest)
{
- int index = items.first().tqfind( s );
+ int index = items.first().find( s );
TQString newText = prevAddr + items.first().mid( index );
//kdDebug() << "OLD TEXT: " << text() << endl;
//kdDebug() << "NEW TEXT: " << newText << endl;
@@ -437,11 +437,11 @@ void AddressLineEdit::loadAddresses()
void AddressLineEdit::addAddress( const TQString& adr )
{
s_completion->addItem( adr );
- int pos = adr.tqfind( '<' );
+ int pos = adr.find( '<' );
if( pos >= 0 )
{
++pos;
- int pos2 = adr.tqfind( pos, '>' );
+ int pos2 = adr.find( pos, '>' );
if( pos2 >= 0 )
s_completion->addItem( adr.mid( pos, pos2 - pos ));
}
@@ -465,7 +465,7 @@ void AddressLineEdit::startLoadingLDAPEntries()
TQString s( *s_LDAPText );
// TODO cache last?
TQString prevAddr;
- int n = s.tqfindRev(',');
+ int n = s.findRev(',');
if (n>= 0)
{
prevAddr = s.left(n+1) + ' ';
@@ -484,8 +484,8 @@ void AddressLineEdit::slotLDAPSearchData( const TQStringList& adrs )
return;
for( TQStringList::ConstIterator it = adrs.begin(); it != adrs.end(); ++it ) {
TQString name(*it);
- int pos = name.tqfind( " <" );
- int pos_comma = name.tqfind( ',' );
+ int pos = name.find( " <" );
+ int pos_comma = name.find( ',' );
// put name in quotes, if we have a comma in the name
if (pos>0 && pos_comma>0 && pos_comma<pos) {
name.insert(pos, '\"');
@@ -577,18 +577,18 @@ TQStringList AddressLineEdit::addresses()
for ( mit = emails.begin(); mit != emails.end(); ++mit ) {
email = *mit;
if (!email.isEmpty()) {
- if (n.isEmpty() || (email.tqfind( '<' ) != -1))
+ if (n.isEmpty() || (email.find( '<' ) != -1))
addr = TQString::null;
else { /* do we really need quotes around this name ? */
- if (n.tqfind(needQuotes) != -1)
+ if (n.find(needQuotes) != -1)
addr = '"' + n + endQuote;
else
addr = n + space;
}
- if (!addr.isEmpty() && (email.tqfind( '<' ) == -1)
- && (email.tqfind( '>' ) == -1)
- && (email.tqfind( ',' ) == -1))
+ if (!addr.isEmpty() && (email.find( '<' ) == -1)
+ && (email.find( '>' ) == -1)
+ && (email.find( ',' ) == -1))
addr += '<' + email + '>';
else
addr += email;
diff --git a/kabc/distributionlist.cpp b/kabc/distributionlist.cpp
index 1802cb0a1..bb89b6d00 100644
--- a/kabc/distributionlist.cpp
+++ b/kabc/distributionlist.cpp
@@ -250,7 +250,7 @@ bool DistributionListManager::save()
value.append( (*it).email );
}
- if ( d->mMissingEntries.tqfind( list->name() ) != d->mMissingEntries.end() ) {
+ if ( d->mMissingEntries.find( list->name() ) != d->mMissingEntries.end() ) {
const MissingEntryList missList = d->mMissingEntries[ list->name() ];
MissingEntryList::ConstIterator missIt;
for ( missIt = missList.begin(); missIt != missList.end(); ++missIt ) {
diff --git a/kabc/kab2kabc.cpp b/kabc/kab2kabc.cpp
index 26adeea56..2a3683597 100644
--- a/kabc/kab2kabc.cpp
+++ b/kabc/kab2kabc.cpp
@@ -58,7 +58,7 @@ void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab )
TQString comment;
if ( entry.tqat( entry.length() -1 ) == ')' ) {
- int br = entry.tqfindRev( '(' );
+ int br = entry.findRev( '(' );
if ( br >= 0 ) {
comment = entry.mid( br + 1, entry.length() - br - 2 );
entry.truncate( br );
@@ -68,7 +68,7 @@ void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab )
}
}
- int posSpace = entry.tqfindRev( ' ' );
+ int posSpace = entry.findRev( ' ' );
if ( posSpace < 0 ) {
email = entry;
if ( !comment.isEmpty() ) {
@@ -91,7 +91,7 @@ void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab )
}
if ( name.tqat( name.length() -1 ) == ')' ) {
- int br = name.tqfindRev( '(' );
+ int br = name.findRev( '(' );
if ( br >= 0 ) {
comment = name.mid( br + 1, name.length() - br - 2 ) + " " + comment;
name.truncate( br );
@@ -180,7 +180,7 @@ void readKAddressBookEntries( const TQString &dataString, Addressee &a )
TQStringList::ConstIterator it;
for ( it = entries.begin(); it != entries.end(); ++it ) {
- int pos = (*it).tqfind( "\n" );
+ int pos = (*it).find( "\n" );
TQString fieldName = (*it).left( pos );
TQString fieldValue = (*it).mid( pos + 2 );
@@ -325,7 +325,7 @@ void importKab( KABC::AddressBook *ab, bool override, bool quiet )
TQStringList::ConstIterator customIt;
for ( customIt = entry.custom.begin(); customIt != entry.custom.end(); ++customIt ) {
if ( (*customIt).startsWith( "X-KABC-UID:" ) ) {
- a.setUid( (*customIt).mid( (*customIt).tqfind( ":" ) + 1 ) );
+ a.setUid( (*customIt).mid( (*customIt).find( ":" ) + 1 ) );
idFound = true;
} else if ( (*customIt).startsWith( "KMail:1.0\n" ) ) {
readKAddressBookEntries( *customIt, a );
diff --git a/kabc/ldapclient.cpp b/kabc/ldapclient.cpp
index 637d77da6..6ce467a46 100644
--- a/kabc/ldapclient.cpp
+++ b/kabc/ldapclient.cpp
@@ -306,11 +306,11 @@ void LdapSearch::startSearch( const TQString& txt )
cancelSearch();
- int pos = txt.tqfind( '\"' );
+ int pos = txt.find( '\"' );
if( pos >= 0 )
{
++pos;
- int pos2 = txt.tqfind( '\"', pos );
+ int pos2 = txt.find( '\"', pos );
if( pos2 >= 0 )
mSearchText = txt.mid( pos , pos2 - pos );
else
@@ -408,7 +408,7 @@ void LdapSearch::makeSearchData( TQStringList& ret, LdapResultList& resList )
}
LdapResult sr;
- sr.clientNumber = mClients.tqfindIndex( (*it1).client );
+ sr.clientNumber = mClients.findIndex( (*it1).client );
sr.name = name;
sr.email = mail;
resList.append( sr );
diff --git a/kabc/ldapurl.cpp b/kabc/ldapurl.cpp
index 6bca31b39..9032c16d3 100644
--- a/kabc/ldapurl.cpp
+++ b/kabc/ldapurl.cpp
@@ -58,14 +58,14 @@ void LDAPUrl::setDn( const TQString &dn)
bool LDAPUrl::hasExtension( const TQString &key ) const
{
- return m_extensions.tqcontains( key );
+ return m_extensions.contains( key );
}
LDAPUrl::Extension LDAPUrl::extension( const TQString &key ) const
{
TQMap<TQString, Extension>::const_iterator it;
- it = m_extensions.tqfind( key );
+ it = m_extensions.find( key );
if ( it != m_extensions.constEnd() )
return (*it);
else {
diff --git a/kabc/ldif.cpp b/kabc/ldif.cpp
index 3be20c48a..9d007b7ff 100644
--- a/kabc/ldif.cpp
+++ b/kabc/ldif.cpp
@@ -112,7 +112,7 @@ bool LDIF::splitLine( const TQCString &line, TQString &fieldname, TQByteArray &v
// kdDebug(5700) << "splitLine line: " << TQString::fromUtf8(line) << endl;
- position = line.tqfind( ":" );
+ position = line.find( ":" );
if ( position == -1 ) {
// strange: we did not find a fieldname
fieldname = "";
diff --git a/kabc/ldifconverter.cpp b/kabc/ldifconverter.cpp
index ee242b332..d4c7b22df 100644
--- a/kabc/ldifconverter.cpp
+++ b/kabc/ldifconverter.cpp
@@ -271,7 +271,7 @@ bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr,
}
if ( fieldname == TQString::tqfromLatin1( "mail" ) ||
fieldname == TQString::tqfromLatin1( "mozillasecondemail" ) ) { // mozilla
- if ( a.emails().tqfindIndex( value ) == -1 )
+ if ( a.emails().findIndex( value ) == -1 )
a.insertEmail( value );
return true;
}
@@ -528,7 +528,7 @@ TQString LDIFConverter::makeLDIFfieldString( TQString formatStr, TQString value,
return TQString();
// append format if not given
- if (formatStr.tqfind(':') == -1)
+ if (formatStr.find(':') == -1)
formatStr.append(": %1\n");
// check if base64-encoding is needed
@@ -543,12 +543,12 @@ TQString LDIFConverter::makeLDIFfieldString( TQString formatStr, TQString value,
}
if (printable) // always encode if we find special chars...
- printable = (value.tqfind('\n') == -1);
+ printable = (value.find('\n') == -1);
if (!printable && allowEncode) {
// encode to base64
value = KCodecs::base64Encode( value.utf8() );
- int p = formatStr.tqfind(':');
+ int p = formatStr.find(':');
if (p>=0)
formatStr.insert(p, ':');
}
diff --git a/kabc/plugins/dir/resourcedirconfig.cpp b/kabc/plugins/dir/resourcedirconfig.cpp
index 41774b593..819d75d96 100644
--- a/kabc/plugins/dir/resourcedirconfig.cpp
+++ b/kabc/plugins/dir/resourcedirconfig.cpp
@@ -82,7 +82,7 @@ void ResourceDirConfig::loadSettings( KRES::Resource *res )
return;
}
- mFormatBox->setCurrentItem( mFormatTypes.tqfindIndex( resource->format() ) );
+ mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) );
mFileNameEdit->setURL( resource->path() );
if ( mFileNameEdit->url().isEmpty() )
diff --git a/kabc/plugins/file/resourcefileconfig.cpp b/kabc/plugins/file/resourcefileconfig.cpp
index 51cfdcfcf..92b07594f 100644
--- a/kabc/plugins/file/resourcefileconfig.cpp
+++ b/kabc/plugins/file/resourcefileconfig.cpp
@@ -86,7 +86,7 @@ void ResourceFileConfig::loadSettings( KRES::Resource *res )
return;
}
- mFormatBox->setCurrentItem( mFormatTypes.tqfindIndex( resource->format() ) );
+ mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) );
mFileNameEdit->setURL( resource->fileName() );
if ( mFileNameEdit->url().isEmpty() )
diff --git a/kabc/plugins/ldapkio/resourceldapkio.cpp b/kabc/plugins/ldapkio/resourceldapkio.cpp
index 893a4a90f..0385f541c 100644
--- a/kabc/plugins/ldapkio/resourceldapkio.cpp
+++ b/kabc/plugins/ldapkio/resourceldapkio.cpp
@@ -330,49 +330,49 @@ void ResourceLDAPKIO::init()
handle them in the load() method below.
These are the default values
*/
- if ( !mAttributes.tqcontains("objectClass") )
+ if ( !mAttributes.contains("objectClass") )
mAttributes.insert( "objectClass", "inetOrgPerson" );
- if ( !mAttributes.tqcontains("commonName") )
+ if ( !mAttributes.contains("commonName") )
mAttributes.insert( "commonName", "cn" );
- if ( !mAttributes.tqcontains("formattedName") )
+ if ( !mAttributes.contains("formattedName") )
mAttributes.insert( "formattedName", "displayName" );
- if ( !mAttributes.tqcontains("familyName") )
+ if ( !mAttributes.contains("familyName") )
mAttributes.insert( "familyName", "sn" );
- if ( !mAttributes.tqcontains("givenName") )
+ if ( !mAttributes.contains("givenName") )
mAttributes.insert( "givenName", "givenName" );
- if ( !mAttributes.tqcontains("mail") )
+ if ( !mAttributes.contains("mail") )
mAttributes.insert( "mail", "mail" );
- if ( !mAttributes.tqcontains("mailAlias") )
+ if ( !mAttributes.contains("mailAlias") )
mAttributes.insert( "mailAlias", "" );
- if ( !mAttributes.tqcontains("phoneNumber") )
+ if ( !mAttributes.contains("phoneNumber") )
mAttributes.insert( "phoneNumber", "homePhone" );
- if ( !mAttributes.tqcontains("telephoneNumber") )
+ if ( !mAttributes.contains("telephoneNumber") )
mAttributes.insert( "telephoneNumber", "telephoneNumber" );
- if ( !mAttributes.tqcontains("facsimileTelephoneNumber") )
+ if ( !mAttributes.contains("facsimileTelephoneNumber") )
mAttributes.insert( "facsimileTelephoneNumber", "facsimileTelephoneNumber" );
- if ( !mAttributes.tqcontains("mobile") )
+ if ( !mAttributes.contains("mobile") )
mAttributes.insert( "mobile", "mobile" );
- if ( !mAttributes.tqcontains("pager") )
+ if ( !mAttributes.contains("pager") )
mAttributes.insert( "pager", "pager" );
- if ( !mAttributes.tqcontains("description") )
+ if ( !mAttributes.contains("description") )
mAttributes.insert( "description", "description" );
- if ( !mAttributes.tqcontains("title") )
+ if ( !mAttributes.contains("title") )
mAttributes.insert( "title", "title" );
- if ( !mAttributes.tqcontains("street") )
+ if ( !mAttributes.contains("street") )
mAttributes.insert( "street", "street" );
- if ( !mAttributes.tqcontains("state") )
+ if ( !mAttributes.contains("state") )
mAttributes.insert( "state", "st" );
- if ( !mAttributes.tqcontains("city") )
+ if ( !mAttributes.contains("city") )
mAttributes.insert( "city", "l" );
- if ( !mAttributes.tqcontains("organization") )
+ if ( !mAttributes.contains("organization") )
mAttributes.insert( "organization", "o" );
- if ( !mAttributes.tqcontains("postalcode") )
+ if ( !mAttributes.contains("postalcode") )
mAttributes.insert( "postalcode", "postalCode" );
- if ( !mAttributes.tqcontains("uid") )
+ if ( !mAttributes.contains("uid") )
mAttributes.insert( "uid", "uid" );
- if ( !mAttributes.tqcontains("jpegPhoto") )
+ if ( !mAttributes.contains("jpegPhoto") )
mAttributes.insert( "jpegPhoto", "jpegPhoto" );
d->mLDAPUrl = KURL();
diff --git a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp
index c23bd22da..271328525 100644
--- a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp
+++ b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp
@@ -281,7 +281,7 @@ AttributesDialog::AttributesDialog( const TQMap<TQString, TQString> &attributes,
for ( i = 1; i < mMapCombo->count(); i++ ) {
TQDictIterator<KLineEdit> it2( mLineEditDict );
for ( ; it2.current(); ++it2 ) {
- if ( mMapList[ i ].tqcontains( it2.currentKey() ) ) {
+ if ( mMapList[ i ].contains( it2.currentKey() ) ) {
if ( mMapList[ i ][ it2.currentKey() ] != it2.current()->text() ) break;
} else {
if ( mDefaultMap[ it2.currentKey() ] != it2.current()->text() ) break;
diff --git a/kabc/plugins/net/resourcenetconfig.cpp b/kabc/plugins/net/resourcenetconfig.cpp
index 325d99377..b441fbd98 100644
--- a/kabc/plugins/net/resourcenetconfig.cpp
+++ b/kabc/plugins/net/resourcenetconfig.cpp
@@ -79,7 +79,7 @@ void ResourceNetConfig::loadSettings( KRES::Resource *res )
return;
}
- mFormatBox->setCurrentItem( mFormatTypes.tqfindIndex( resource->format() ) );
+ mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) );
mUrlEdit->setURL( resource->url().url() );
}
diff --git a/kabc/plugins/sql/resourcesql.cpp b/kabc/plugins/sql/resourcesql.cpp
index 7dae03d22..55f02bae7 100644
--- a/kabc/plugins/sql/resourcesql.cpp
+++ b/kabc/plugins/sql/resourcesql.cpp
@@ -317,8 +317,8 @@ bool ResourceSql::save( Ticket * )
TQStringList list = (*it).customs();
TQStringList::ConstIterator it;
for( it = list.begin(); it != list.end(); ++it ) {
- int dashPos = (*it).tqfind( '-' );
- int colonPos = (*it).tqfind( ':' );
+ int dashPos = (*it).find( '-' );
+ int colonPos = (*it).find( ':' );
TQString app = (*it).left( dashPos );
TQString name = (*it).mid( dashPos + 1, colonPos - dashPos - 1 );
TQString value = (*it).right( (*it).length() - colonPos - 1 );
diff --git a/kabc/resource.cpp b/kabc/resource.cpp
index 9807d53a3..d43c68320 100644
--- a/kabc/resource.cpp
+++ b/kabc/resource.cpp
@@ -268,7 +268,7 @@ void Resource::removeAddressee( const Addressee &addr )
Addressee Resource::findByUid( const TQString &uid )
{
- Addressee::Map::ConstIterator it = mAddrMap.tqfind( uid );
+ Addressee::Map::ConstIterator it = mAddrMap.find( uid );
if ( it != mAddrMap.end() )
return it.data();
diff --git a/kabc/scripts/addressee.src.cpp b/kabc/scripts/addressee.src.cpp
index 9be85b22b..db956bc14 100644
--- a/kabc/scripts/addressee.src.cpp
+++ b/kabc/scripts/addressee.src.cpp
@@ -225,7 +225,7 @@ void Addressee::setNameFromString( const TQString &s )
TQString emptyStr = "";
AddresseeHelper *helper = AddresseeHelper::self();
- int i = str.tqfind( ',' );
+ int i = str.find( ',' );
if( i < 0 ) {
TQStringList parts = TQStringList::split( spaceStr, str );
int leftOffset = 0;
@@ -398,7 +398,7 @@ TQString Addressee::fullEmail( const TQString &email ) const
text = e;
else {
TQRegExp needQuotes( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" );
- if ( realName().tqfind( needQuotes ) != -1 ) {
+ if ( realName().find( needQuotes ) != -1 ) {
TQString name = realName();
name.replace( "\"", "\\\"" );
text = "\"" + name + "\" <" + e + ">";
@@ -417,7 +417,7 @@ void Addressee::insertEmail( const TQString &email, bool preferred )
detach();
mData->empty = false;
- TQStringList::Iterator it = mData->emails.tqfind( email );
+ TQStringList::Iterator it = mData->emails.find( email );
if ( it != mData->emails.end() ) {
if ( !preferred || it == mData->emails.begin() ) return;
@@ -436,7 +436,7 @@ void Addressee::removeEmail( const TQString &email )
{
detach();
- TQStringList::Iterator it = mData->emails.tqfind( email );
+ TQStringList::Iterator it = mData->emails.find( email );
if ( it == mData->emails.end() ) return;
mData->emails.remove( it );
@@ -755,7 +755,7 @@ void Addressee::insertCategory( const TQString &c )
detach();
mData->empty = false;
- if ( mData->categories.tqfindIndex( c ) != -1 ) return;
+ if ( mData->categories.findIndex( c ) != -1 ) return;
mData->categories.append( c );
}
@@ -764,7 +764,7 @@ void Addressee::removeCategory( const TQString &c )
{
detach();
- TQStringList::Iterator it = mData->categories.tqfind( c );
+ TQStringList::Iterator it = mData->categories.find( c );
if ( it == mData->categories.end() ) return;
mData->categories.remove( it );
@@ -772,7 +772,7 @@ void Addressee::removeCategory( const TQString &c )
bool Addressee::hasCategory( const TQString &c ) const
{
- return ( mData->categories.tqfindIndex( c ) != -1 );
+ return ( mData->categories.findIndex( c ) != -1 );
}
void Addressee::setCategories( const TQStringList &c )
@@ -832,7 +832,7 @@ TQString Addressee::custom( const TQString &app, const TQString &name ) const
TQStringList::ConstIterator it;
for( it = mData->custom.constBegin(); it != mData->custom.constEnd(); ++it ) {
if ( (*it).startsWith( qualifiedName ) ) {
- value = (*it).mid( (*it).tqfind( ":" ) + 1 );
+ value = (*it).mid( (*it).find( ":" ) + 1 );
break;
}
}
@@ -1104,7 +1104,7 @@ bool listEquals( const TQValueList<L> &list, const TQValueList<L> &pattern )
return false;
for ( uint i = 0; i < list.count(); ++i )
- if ( pattern.tqfind( list[ i ] ) == pattern.end() )
+ if ( pattern.find( list[ i ] ) == pattern.end() )
return false;
return true;
@@ -1120,7 +1120,7 @@ bool emailsEquals( const TQStringList &list, const TQStringList &pattern )
TQStringList::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it )
- if ( pattern.tqfind( *it ) == pattern.end() )
+ if ( pattern.find( *it ) == pattern.end() )
return false;
return true;
diff --git a/kabc/vcard/AdrParam.cpp b/kabc/vcard/AdrParam.cpp
index 899912553..5ad56f4fb 100644
--- a/kabc/vcard/AdrParam.cpp
+++ b/kabc/vcard/AdrParam.cpp
@@ -80,7 +80,7 @@ AdrParam::operator == (AdrParam & x)
TQStrListIterator it(x.adrTypeList_);
for (; it.current(); ++it)
- if (!adrTypeList_.tqfind(it.current()))
+ if (!adrTypeList_.find(it.current()))
return false;
return true;
diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp
index 8babc9292..034cb1d32 100644
--- a/kabc/vcard/ContentLine.cpp
+++ b/kabc/vcard/ContentLine.cpp
@@ -122,7 +122,7 @@ ContentLine::operator == (ContentLine & x)
TQPtrListIterator<Param> it(x.paramList());
- if (!paramList_.tqfind(it.current()))
+ if (!paramList_.find(it.current()))
return false;
return true;
@@ -140,9 +140,9 @@ ContentLine::_parse()
vDebug("parse");
// Unqote newlines
- strRep_ = strRep_.tqreplace( TQRegExp( "\\\\n" ), "\n" );
+ strRep_ = strRep_.replace( TQRegExp( "\\\\n" ), "\n" );
- int split = strRep_.tqfind(':');
+ int split = strRep_.find(':');
if (split == -1) { // invalid content line
vDebug("No ':'");
@@ -152,7 +152,7 @@ ContentLine::_parse()
TQCString firstPart(strRep_.left(split));
TQCString valuePart(strRep_.mid(split + 1));
- split = firstPart.tqfind('.');
+ split = firstPart.find('.');
if (split != -1) {
group_ = firstPart.left(split);
@@ -193,7 +193,7 @@ ContentLine::_parse()
TQCString str = *it;
- split = str.tqfind("=");
+ split = str.find("=");
if (split < 0 ) {
vDebug("No '=' in parameter.");
continue;
@@ -275,7 +275,7 @@ ContentLine::_assemble()
}
// Quote newlines
- line = line.tqreplace( TQRegExp( "\n" ), "\\n" );
+ line = line.replace( TQRegExp( "\n" ), "\\n" );
// Fold lines longer than 72 chars
const int maxLen = 72;
diff --git a/kabc/vcard/DateValue.cpp b/kabc/vcard/DateValue.cpp
index 6828380fc..9f578a158 100644
--- a/kabc/vcard/DateValue.cpp
+++ b/kabc/vcard/DateValue.cpp
@@ -152,7 +152,7 @@ DateValue::_parse()
// time = time-hour [":"] time-minute [":"] time-second [":"]
// [time-secfrac] [time-zone]
- int timeSep = strRep_.tqfind('T');
+ int timeSep = strRep_.find('T');
TQCString dateStr;
TQCString timeStr;
@@ -173,7 +173,7 @@ DateValue::_parse()
/////////////////////////////////////////////////////////////// DATE
- dateStr.tqreplace(TQRegExp("-"), "");
+ dateStr.replace(TQRegExp("-"), "");
kdDebug(5710) << "dateStr: " << dateStr << endl;
@@ -192,7 +192,7 @@ DateValue::_parse()
/////////////////////////////////////////////////////////////// ZONE
- int zoneSep = timeStr.tqfind('Z');
+ int zoneSep = timeStr.find('Z');
if (zoneSep != -1 && timeStr.length() - zoneSep > 3) {
@@ -208,7 +208,7 @@ DateValue::_parse()
//////////////////////////////////////////////////// SECOND FRACTION
- int secFracSep = timeStr.tqfindRev(',');
+ int secFracSep = timeStr.findRev(',');
if (secFracSep != -1 && zoneSep != -1) { // zoneSep checked to avoid errors.
TQCString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep);
@@ -217,7 +217,7 @@ DateValue::_parse()
/////////////////////////////////////////////////////////////// HMS
- timeStr.tqreplace(TQRegExp(":"), "");
+ timeStr.replace(TQRegExp(":"), "");
hour_ = timeStr.left(2).toInt();
minute_ = timeStr.mid(2, 2).toInt();
diff --git a/kabc/vcard/GeoValue.cpp b/kabc/vcard/GeoValue.cpp
index 3021bbdb1..2bac28c1e 100644
--- a/kabc/vcard/GeoValue.cpp
+++ b/kabc/vcard/GeoValue.cpp
@@ -84,7 +84,7 @@ GeoValue::clone()
void
GeoValue::_parse()
{
- int semiColon = strRep_.tqfind( ";" );
+ int semiColon = strRep_.find( ";" );
if ( semiColon == -1 ) // invalid
return;
diff --git a/kabc/vcard/SourceParam.cpp b/kabc/vcard/SourceParam.cpp
index 7041acd9e..d66d87498 100644
--- a/kabc/vcard/SourceParam.cpp
+++ b/kabc/vcard/SourceParam.cpp
@@ -80,7 +80,7 @@ SourceParam::~SourceParam()
void
SourceParam::_parse()
{
- int i = strRep_.tqfind('=');
+ int i = strRep_.find('=');
if (i == -1) // Invalid
return;
diff --git a/kabc/vcard/URIValue.cpp b/kabc/vcard/URIValue.cpp
index 9b13119d3..bba8db0fa 100644
--- a/kabc/vcard/URIValue.cpp
+++ b/kabc/vcard/URIValue.cpp
@@ -89,7 +89,7 @@ URIValue::~URIValue()
void
URIValue::_parse()
{
- int split = strRep_.tqfind(':');
+ int split = strRep_.find(':');
if (split == -1)
return;
diff --git a/kabc/vcard/UTCValue.cpp b/kabc/vcard/UTCValue.cpp
index 445af4fd7..30473661f 100644
--- a/kabc/vcard/UTCValue.cpp
+++ b/kabc/vcard/UTCValue.cpp
@@ -93,7 +93,7 @@ UTCValue::_parse()
positive_ = ( strRep_[0] == '+' );
- int colon = strRep_.tqfind( ':' );
+ int colon = strRep_.find( ':' );
if ( colon == -1 ) // Not valid.
return;
diff --git a/kabc/vcard/VCard.cpp b/kabc/vcard/VCard.cpp
index 25d3a7a2d..a1a9d1ba1 100644
--- a/kabc/vcard/VCard.cpp
+++ b/kabc/vcard/VCard.cpp
@@ -113,7 +113,7 @@ VCard::_parse()
///////////////////////////////////////////////////////////////
// FIRST LINE
- int split = beginLine.tqfind(':');
+ int split = beginLine.find(':');
if (split == -1) { // invalid, no BEGIN
vDebug("No split");
@@ -123,7 +123,7 @@ VCard::_parse()
TQCString firstPart(beginLine.left(split));
TQCString valuePart(beginLine.mid(split + 1));
- split = firstPart.tqfind('.');
+ split = firstPart.find('.');
if (split != -1) {
group_ = firstPart.left(split);
@@ -188,7 +188,7 @@ VCard::_parse()
///////////////////////////////////////////////////////////////
// LAST LINE
- split = endLine.tqfind(':');
+ split = endLine.find(':');
if (split == -1) // invalid, no END
return;
@@ -196,7 +196,7 @@ VCard::_parse()
firstPart = endLine.left(split);
valuePart = endLine.right(firstPart.length() - split - 1);
- split = firstPart.tqfind('.');
+ split = firstPart.find('.');
if (split != -1) {
group_ = firstPart.left(split);
diff --git a/kabc/vcard/VCardEntity.cpp b/kabc/vcard/VCardEntity.cpp
index 4c987bffe..1f8cea5b1 100644
--- a/kabc/vcard/VCardEntity.cpp
+++ b/kabc/vcard/VCardEntity.cpp
@@ -76,11 +76,11 @@ VCardEntity::_parse()
vDebug("parse");
TQCString s(strRep_);
- int i = s.tqfind(TQRegExp("BEGIN:VCARD", false));
+ int i = s.find(TQRegExp("BEGIN:VCARD", false));
while (i != -1) {
- i = s.tqfind(TQRegExp("BEGIN:VCARD", false), 11);
+ i = s.find(TQRegExp("BEGIN:VCARD", false), 11);
TQCString cardStr(s.left(i));
diff --git a/kabc/vcard21parser.cpp b/kabc/vcard21parser.cpp
index 64696003a..566553261 100644
--- a/kabc/vcard21parser.cpp
+++ b/kabc/vcard21parser.cpp
@@ -41,12 +41,12 @@ bool VCardLineX::isValid() const
switch( name[0] ) {
case 'a':
if ( name == VCARD_ADR && qualified &&
- (qualifiers.tqcontains(VCARD_ADR_DOM) ||
- qualifiers.tqcontains(VCARD_ADR_INTL) ||
- qualifiers.tqcontains(VCARD_ADR_POSTAL) ||
- qualifiers.tqcontains(VCARD_ADR_HOME) ||
- qualifiers.tqcontains(VCARD_ADR_WORK) ||
- qualifiers.tqcontains(VCARD_ADR_PREF)
+ (qualifiers.contains(VCARD_ADR_DOM) ||
+ qualifiers.contains(VCARD_ADR_INTL) ||
+ qualifiers.contains(VCARD_ADR_POSTAL) ||
+ qualifiers.contains(VCARD_ADR_HOME) ||
+ qualifiers.contains(VCARD_ADR_WORK) ||
+ qualifiers.contains(VCARD_ADR_PREF)
) )
return true;
@@ -63,18 +63,18 @@ bool VCardLineX::isValid() const
if ( name == VCARD_CATEGORIES )
return true;
if ( name == VCARD_CLASS && qualified &&
- (qualifiers.tqcontains(VCARD_CLASS_PUBLIC) ||
- qualifiers.tqcontains(VCARD_CLASS_PRIVATE) ||
- qualifiers.tqcontains(VCARD_CLASS_CONFIDENTIAL)
+ (qualifiers.contains(VCARD_CLASS_PUBLIC) ||
+ qualifiers.contains(VCARD_CLASS_PRIVATE) ||
+ qualifiers.contains(VCARD_CLASS_CONFIDENTIAL)
) )
return true;
break;
case 'e':
if ( name == VCARD_EMAIL && qualified &&
- (qualifiers.tqcontains(VCARD_EMAIL_INTERNET) ||
- qualifiers.tqcontains(VCARD_EMAIL_PREF) ||
- qualifiers.tqcontains(VCARD_EMAIL_X400)
+ (qualifiers.contains(VCARD_EMAIL_INTERNET) ||
+ qualifiers.contains(VCARD_EMAIL_PREF) ||
+ qualifiers.contains(VCARD_EMAIL_X400)
) )
return true;
break;
@@ -91,8 +91,8 @@ bool VCardLineX::isValid() const
case 'k':
if ( name == VCARD_KEY && qualified &&
- (qualifiers.tqcontains(VCARD_KEY_X509) ||
- qualifiers.tqcontains(VCARD_KEY_PGP)
+ (qualifiers.contains(VCARD_KEY_X509) ||
+ qualifiers.contains(VCARD_KEY_PGP)
) )
return true;
break;
@@ -150,20 +150,20 @@ bool VCardLineX::isValid() const
case 't':
if ( name == VCARD_TEL && qualified &&
- (qualifiers.tqcontains(VCARD_TEL_HOME) ||
- qualifiers.tqcontains(VCARD_TEL_WORK) ||
- qualifiers.tqcontains(VCARD_TEL_PREF) ||
- qualifiers.tqcontains(VCARD_TEL_VOICE) ||
- qualifiers.tqcontains(VCARD_TEL_FAX) ||
- qualifiers.tqcontains(VCARD_TEL_MSG) ||
- qualifiers.tqcontains(VCARD_TEL_CELL) ||
- qualifiers.tqcontains(VCARD_TEL_PAGER) ||
- qualifiers.tqcontains(VCARD_TEL_BBS) ||
- qualifiers.tqcontains(VCARD_TEL_MODEM) ||
- qualifiers.tqcontains(VCARD_TEL_CAR) ||
- qualifiers.tqcontains(VCARD_TEL_ISDN) ||
- qualifiers.tqcontains(VCARD_TEL_VIDEO) ||
- qualifiers.tqcontains(VCARD_TEL_PCS)
+ (qualifiers.contains(VCARD_TEL_HOME) ||
+ qualifiers.contains(VCARD_TEL_WORK) ||
+ qualifiers.contains(VCARD_TEL_PREF) ||
+ qualifiers.contains(VCARD_TEL_VOICE) ||
+ qualifiers.contains(VCARD_TEL_FAX) ||
+ qualifiers.contains(VCARD_TEL_MSG) ||
+ qualifiers.contains(VCARD_TEL_CELL) ||
+ qualifiers.contains(VCARD_TEL_PAGER) ||
+ qualifiers.contains(VCARD_TEL_BBS) ||
+ qualifiers.contains(VCARD_TEL_MODEM) ||
+ qualifiers.contains(VCARD_TEL_CAR) ||
+ qualifiers.contains(VCARD_TEL_ISDN) ||
+ qualifiers.contains(VCARD_TEL_VIDEO) ||
+ qualifiers.contains(VCARD_TEL_PCS)
) )
return true;
if ( name == VCARD_TZ )
@@ -266,33 +266,33 @@ KABC::Addressee VCard21Parser::readFromString( const TQString &data)
if ( (*i).name == VCARD_TEL ) {
int type = 0;
if ( (*i).qualified ) {
- if ( (*i).qualifiers.tqcontains( VCARD_TEL_HOME ) )
+ if ( (*i).qualifiers.contains( VCARD_TEL_HOME ) )
type |= PhoneNumber::Home;
- if ( (*i).qualifiers.tqcontains( VCARD_TEL_WORK ) )
+ if ( (*i).qualifiers.contains( VCARD_TEL_WORK ) )
type |= PhoneNumber::Work;
- if ( (*i).qualifiers.tqcontains( VCARD_TEL_PREF ) )
+ if ( (*i).qualifiers.contains( VCARD_TEL_PREF ) )
type |= PhoneNumber::Pref;
- // if ( (*i).qualifiers.tqcontains( VCARD_TEL_VOICE ) )
+ // if ( (*i).qualifiers.contains( VCARD_TEL_VOICE ) )
// type |= PhoneNumber::Voice;
- if ( (*i).qualifiers.tqcontains( VCARD_TEL_FAX ) )
+ if ( (*i).qualifiers.contains( VCARD_TEL_FAX ) )
type |= PhoneNumber::Fax;
- if ( (*i).qualifiers.tqcontains( VCARD_TEL_MSG ) )
+ if ( (*i).qualifiers.contains( VCARD_TEL_MSG ) )
type |= PhoneNumber::Msg;
- if ( (*i).qualifiers.tqcontains( VCARD_TEL_CELL ) )
+ if ( (*i).qualifiers.contains( VCARD_TEL_CELL ) )
type |= PhoneNumber::Cell;
- if ( (*i).qualifiers.tqcontains( VCARD_TEL_PAGER ) )
+ if ( (*i).qualifiers.contains( VCARD_TEL_PAGER ) )
type |= PhoneNumber::Pager;
- if ( (*i).qualifiers.tqcontains( VCARD_TEL_BBS ) )
+ if ( (*i).qualifiers.contains( VCARD_TEL_BBS ) )
type |= PhoneNumber::Bbs;
- if ( (*i).qualifiers.tqcontains( VCARD_TEL_MODEM ) )
+ if ( (*i).qualifiers.contains( VCARD_TEL_MODEM ) )
type |= PhoneNumber::Modem;
- if ( (*i).qualifiers.tqcontains( VCARD_TEL_CAR ) )
+ if ( (*i).qualifiers.contains( VCARD_TEL_CAR ) )
type |= PhoneNumber::Car;
- if ( (*i).qualifiers.tqcontains( VCARD_TEL_ISDN ) )
+ if ( (*i).qualifiers.contains( VCARD_TEL_ISDN ) )
type |= PhoneNumber::Isdn;
- if ( (*i).qualifiers.tqcontains( VCARD_TEL_VIDEO ) )
+ if ( (*i).qualifiers.contains( VCARD_TEL_VIDEO ) )
type |= PhoneNumber::Video;
- if ( (*i).qualifiers.tqcontains( VCARD_TEL_PCS ) )
+ if ( (*i).qualifiers.contains( VCARD_TEL_PCS ) )
type |= PhoneNumber::Pcs;
}
addressee.insertPhoneNumber( PhoneNumber( (*i).parameters[ 0 ], type ) );
@@ -304,19 +304,19 @@ KABC::Addressee VCard21Parser::readFromString( const TQString &data)
if ( (*i).name == VCARD_ADR ) {
int type = 0;
if ( (*i).qualified ) {
- if ( (*i).qualifiers.tqcontains( VCARD_ADR_DOM ) )
+ if ( (*i).qualifiers.contains( VCARD_ADR_DOM ) )
type |= Address::Dom;
- if ( (*i).qualifiers.tqcontains( VCARD_ADR_INTL ) )
+ if ( (*i).qualifiers.contains( VCARD_ADR_INTL ) )
type |= Address::Intl;
- if ( (*i).qualifiers.tqcontains( VCARD_ADR_POSTAL ) )
+ if ( (*i).qualifiers.contains( VCARD_ADR_POSTAL ) )
type |= Address::Postal;
- if ( (*i).qualifiers.tqcontains( VCARD_ADR_PARCEL ) )
+ if ( (*i).qualifiers.contains( VCARD_ADR_PARCEL ) )
type |= Address::Parcel;
- if ( (*i).qualifiers.tqcontains( VCARD_ADR_HOME ) )
+ if ( (*i).qualifiers.contains( VCARD_ADR_HOME ) )
type |= Address::Home;
- if ( (*i).qualifiers.tqcontains( VCARD_ADR_WORK ) )
+ if ( (*i).qualifiers.contains( VCARD_ADR_WORK ) )
type |= Address::Work;
- if ( (*i).qualifiers.tqcontains( VCARD_ADR_PREF ) )
+ if ( (*i).qualifiers.contains( VCARD_ADR_PREF ) )
type |= Address::Pref;
}
addressee.insertAddress( readAddressFromQStringList( (*i).parameters, type ) );
@@ -430,7 +430,7 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const TQString& vc, int *err )
}
// split into two tokens
- int colon = (*j).tqfind( ':' );
+ int colon = (*j).find( ':' );
if ( colon < 0 ) {
_err = VC_ERR_INVALID_LINE;
break;
@@ -556,7 +556,7 @@ TQString VCard21ParserImpl::getValue(const TQString& name, const TQString& quali
const TQString lowqualifier = qualifier.lower();
for (TQValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
- if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.tqcontains(lowqualifier)) {
+ if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) {
if ((*i).parameters.count() > 0)
return (*i).parameters[0];
else return failed;
@@ -598,7 +598,7 @@ TQStringList VCard21ParserImpl::getValues(const TQString& name, const TQString&
const TQString lowname = name.lower();
const TQString lowqualifier = qualifier.lower();
for (TQValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
- if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.tqcontains(lowqualifier))
+ if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier))
return (*i).parameters;
}
// failed.
diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp
index 8c0b551e5..ebaf337b0 100644
--- a/kabc/vcardformatimpl.cpp
+++ b/kabc/vcardformatimpl.cpp
@@ -123,7 +123,7 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCARD::VCard &v )
TQCString n = cl->name();
if ( n.left( 2 ) == "X-" ) {
n = n.mid( 2 );
- int posDash = n.tqfind( "-" );
+ int posDash = n.find( "-" );
addressee.insertCustom( TQString::fromUtf8( n.left( posDash ) ),
TQString::fromUtf8( n.mid( posDash + 1 ) ),
TQString::fromUtf8( cl->value()->asString() ) );
@@ -351,8 +351,8 @@ void VCardFormatImpl::addCustomValue( VCARD::VCard *v, const TQString &txt )
if ( txt.isEmpty() ) return;
ContentLine cl;
- cl.setName( "X-" + txt.left( txt.tqfind( ":" ) ).utf8() );
- TQString value = txt.mid( txt.tqfind( ":" ) + 1 );
+ cl.setName( "X-" + txt.left( txt.find( ":" ) ).utf8() );
+ TQString value = txt.mid( txt.find( ":" ) + 1 );
if ( value.isEmpty() )
return;
cl.setValue( new TextValue( value.utf8() ) );
diff --git a/kabc/vcardparser/vcard.cpp b/kabc/vcardparser/vcard.cpp
index 8b6c9570a..30a8e1c49 100644
--- a/kabc/vcardparser/vcard.cpp
+++ b/kabc/vcardparser/vcard.cpp
@@ -62,7 +62,7 @@ void VCard::addLine( const VCardLine& line )
VCardLine::List VCard::lines( const TQString& identifier ) const
{
- LineMap::ConstIterator it = mLineMap.tqfind( identifier );
+ LineMap::ConstIterator it = mLineMap.find( identifier );
if ( it == mLineMap.end() )
return VCardLine::List();
@@ -71,7 +71,7 @@ VCardLine::List VCard::lines( const TQString& identifier ) const
VCardLine VCard::line( const TQString& identifier ) const
{
- LineMap::ConstIterator it = mLineMap.tqfind( identifier );
+ LineMap::ConstIterator it = mLineMap.find( identifier );
if ( it == mLineMap.end() )
return VCardLine();
@@ -97,7 +97,7 @@ void VCard::setVersion( Version version )
VCard::Version VCard::version() const
{
- LineMap::ConstIterator versionEntry = mLineMap.tqfind( "VERSION" );
+ LineMap::ConstIterator versionEntry = mLineMap.find( "VERSION" );
if ( versionEntry == mLineMap.end() )
return v3_0;
diff --git a/kabc/vcardparser/vcardline.cpp b/kabc/vcardparser/vcardline.cpp
index 50e9fa53e..6680cf7d0 100644
--- a/kabc/vcardparser/vcardline.cpp
+++ b/kabc/vcardparser/vcardline.cpp
@@ -124,13 +124,13 @@ TQStringList VCardLine::parameterList() const
void VCardLine::addParameter( const TQString& param, const TQString& value )
{
TQStringList &list = mParamMap[ param ];
- if ( list.tqfindIndex( value ) == -1 ) // not included yet
+ if ( list.findIndex( value ) == -1 ) // not included yet
list.append( value );
}
TQStringList VCardLine::parameters( const TQString& param ) const
{
- ParamMap::ConstIterator it = mParamMap.tqfind( param );
+ ParamMap::ConstIterator it = mParamMap.find( param );
if ( it == mParamMap.end() )
return TQStringList();
else
@@ -139,7 +139,7 @@ TQStringList VCardLine::parameters( const TQString& param ) const
TQString VCardLine::parameter( const TQString& param ) const
{
- ParamMap::ConstIterator it = mParamMap.tqfind( param );
+ ParamMap::ConstIterator it = mParamMap.find( param );
if ( it == mParamMap.end() )
return TQString::null;
else {
diff --git a/kabc/vcardparser/vcardparser.cpp b/kabc/vcardparser/vcardparser.cpp
index b92f341a0..82ab96714 100644
--- a/kabc/vcardparser/vcardparser.cpp
+++ b/kabc/vcardparser/vcardparser.cpp
@@ -81,7 +81,7 @@ VCard::List VCardParser::parseVCards( const TQString& text )
continue;
} else {
if ( inVCard && !currentLine.isEmpty() ) { // now parse the line
- int colon = currentLine.tqfind( ':' );
+ int colon = currentLine.find( ':' );
if ( colon == -1 ) { // invalid line
currentLine = (*it);
continue;
@@ -94,7 +94,7 @@ VCard::List VCardParser::parseVCards( const TQString& text )
TQStringList params = TQStringList::split( ';', key );
// check for group
- if ( params[0].tqfind( '.' ) != -1 ) {
+ if ( params[0].find( '.' ) != -1 ) {
const TQStringList groupList = TQStringList::split( '.', params[0] );
vCardLine.setGroup( groupList[0] );
vCardLine.setIdentifier( groupList[1] );
@@ -118,7 +118,7 @@ VCard::List VCardParser::parseVCards( const TQString& text )
}
}
// This is pretty much a faster pair[1].contains( ',' )...
- if ( pair[1].tqfind( ',' ) != -1 ) { // parameter in type=x,y,z format
+ if ( pair[1].find( ',' ) != -1 ) { // parameter in type=x,y,z format
const TQStringList args = TQStringList::split( ',', pair[ 1 ] );
TQStringList::ConstIterator argIt;
for ( argIt = args.begin(); argIt != args.end(); ++argIt )
@@ -134,7 +134,7 @@ VCard::List VCardParser::parseVCards( const TQString& text )
bool wasBase64Encoded = false;
params = vCardLine.parameterList();
- if ( params.tqfindIndex( "encoding" ) != -1 ) { // have to decode the data
+ if ( params.findIndex( "encoding" ) != -1 ) { // have to decode the data
TQByteArray input;
input = TQCString(value.latin1());
if ( vCardLine.parameter( "encoding" ).lower() == "b" ||
@@ -155,7 +155,7 @@ VCard::List VCardParser::parseVCards( const TQString& text )
output = TQCString(value.latin1());
}
- if ( params.tqfindIndex( "charset" ) != -1 ) { // have to convert the data
+ if ( params.findIndex( "charset" ) != -1 ) { // have to convert the data
TQTextCodec *codec =
TQTextCodec::codecForName( vCardLine.parameter( "charset" ).latin1() );
if ( codec ) {
diff --git a/kabc/vcardtool.cpp b/kabc/vcardtool.cpp
index 44d3f1464..08bcf93e4 100644
--- a/kabc/vcardtool.cpp
+++ b/kabc/vcardtool.cpp
@@ -335,8 +335,8 @@ TQString VCardTool::createVCards( Addressee::List list, VCard::Version version )
// X-
const TQStringList customs = (*addrIt).customs();
for ( strIt = customs.begin(); strIt != customs.end(); ++strIt ) {
- TQString identifier = "X-" + (*strIt).left( (*strIt).tqfind( ":" ) );
- TQString value = (*strIt).mid( (*strIt).tqfind( ":" ) + 1 );
+ TQString identifier = "X-" + (*strIt).left( (*strIt).find( ":" ) );
+ TQString value = (*strIt).mid( (*strIt).find( ":" ) + 1 );
if ( value.isEmpty() )
continue;
@@ -428,7 +428,7 @@ Addressee::List VCardTool::parseVCards( const TQString& vcard )
// EMAIL
else if ( identifier == "email" ) {
const TQStringList types = (*lineIt).parameters( "type" );
- addr.insertEmail( (*lineIt).value().asString(), types.tqfindIndex( "PREF" ) != -1 );
+ addr.insertEmail( (*lineIt).value().asString(), types.findIndex( "PREF" ) != -1 );
}
// FN
@@ -594,7 +594,7 @@ Addressee::List VCardTool::parseVCards( const TQString& vcard )
// X-
else if ( identifier.startsWith( "x-" ) ) {
const TQString key = (*lineIt).identifier().mid( 2 );
- int dash = key.tqfind( "-" );
+ int dash = key.find( "-" );
addr.insertCustom( key.left( dash ), key.mid( dash + 1 ), (*lineIt).value().asString() );
}
}
@@ -610,11 +610,11 @@ TQDateTime VCardTool::parseDateTime( const TQString &str )
{
TQDateTime dateTime;
- if ( str.tqfind( '-' ) == -1 ) { // is base format (yyyymmdd)
+ if ( str.find( '-' ) == -1 ) { // is base format (yyyymmdd)
dateTime.setDate( TQDate( str.left( 4 ).toInt(), str.mid( 4, 2 ).toInt(),
str.mid( 6, 2 ).toInt() ) );
- if ( str.tqfind( 'T' ) ) // has time information yyyymmddThh:mm:ss
+ if ( str.find( 'T' ) ) // has time information yyyymmddThh:mm:ss
dateTime.setTime( TQTime( str.mid( 11, 2 ).toInt(), str.mid( 14, 2 ).toInt(),
str.mid( 17, 2 ).toInt() ) );
@@ -622,7 +622,7 @@ TQDateTime VCardTool::parseDateTime( const TQString &str )
dateTime.setDate( TQDate( str.left( 4 ).toInt(), str.mid( 5, 2 ).toInt(),
str.mid( 8, 2 ).toInt() ) );
- if ( str.tqfind( 'T' ) ) // has time information yyyy-mm-ddThh:mm:ss
+ if ( str.find( 'T' ) ) // has time information yyyy-mm-ddThh:mm:ss
dateTime.setTime( TQTime( str.mid( 11, 2 ).toInt(), str.mid( 14, 2 ).toInt(),
str.mid( 17, 2 ).toInt() ) );
}
@@ -653,16 +653,16 @@ Picture VCardTool::parsePicture( const VCardLine &line )
Picture pic;
const TQStringList params = line.parameterList();
- if ( params.tqfindIndex( "encoding" ) != -1 ) {
+ if ( params.findIndex( "encoding" ) != -1 ) {
TQImage img;
img.loadFromData( line.value().asByteArray() );
pic.setData( img );
- } else if ( params.tqfindIndex( "value" ) != -1 ) {
+ } else if ( params.findIndex( "value" ) != -1 ) {
if ( line.parameter( "value" ).lower() == "uri" )
pic.setUrl( line.value().asString() );
}
- if ( params.tqfindIndex( "type" ) != -1 )
+ if ( params.findIndex( "type" ) != -1 )
pic.setType( line.parameter( "type" ) );
return pic;
@@ -700,9 +700,9 @@ Sound VCardTool::parseSound( const VCardLine &line )
Sound snd;
const TQStringList params = line.parameterList();
- if ( params.tqfindIndex( "encoding" ) != -1 )
+ if ( params.findIndex( "encoding" ) != -1 )
snd.setData( line.value().asByteArray() );
- else if ( params.tqfindIndex( "value" ) != -1 ) {
+ else if ( params.findIndex( "value" ) != -1 ) {
if ( line.parameter( "value" ).lower() == "uri" )
snd.setUrl( line.value().asString() );
}
@@ -738,12 +738,12 @@ Key VCardTool::parseKey( const VCardLine &line )
Key key;
const TQStringList params = line.parameterList();
- if ( params.tqfindIndex( "encoding" ) != -1 )
+ if ( params.findIndex( "encoding" ) != -1 )
key.setBinaryData( line.value().asByteArray() );
else
key.setTextData( line.value().asString() );
- if ( params.tqfindIndex( "type" ) != -1 ) {
+ if ( params.findIndex( "type" ) != -1 ) {
if ( line.parameter( "type" ).lower() == "x509" )
key.setType( Key::X509 );
else if ( line.parameter( "type" ).lower() == "pgp" )
@@ -814,7 +814,7 @@ Agent VCardTool::parseAgent( const VCardLine &line )
Agent agent;
const TQStringList params = line.parameterList();
- if ( params.tqfindIndex( "value" ) != -1 ) {
+ if ( params.findIndex( "value" ) != -1 ) {
if ( line.parameter( "value" ).lower() == "uri" )
agent.setUrl( line.value().asString() );
} else {
@@ -866,7 +866,7 @@ TQStringList VCardTool::splitString( const TQChar &sep, const TQString &str )
TQString value( str );
int start = 0;
- int pos = value.tqfind( sep, start );
+ int pos = value.find( sep, start );
while ( pos != -1 ) {
if ( value[ pos - 1 ] != '\\' ) {
@@ -876,13 +876,13 @@ TQStringList VCardTool::splitString( const TQChar &sep, const TQString &str )
list << TQString::null;
start = pos + 1;
- pos = value.tqfind( sep, start );
+ pos = value.find( sep, start );
} else {
if ( pos != 0 ) {
value.replace( pos - 1, 2, sep );
- pos = value.tqfind( sep, pos );
+ pos = value.find( sep, pos );
} else
- pos = value.tqfind( sep, pos + 1 );
+ pos = value.find( sep, pos + 1 );
}
}