diff options
Diffstat (limited to 'kabc')
81 files changed, 477 insertions, 477 deletions
diff --git a/kabc/HOWTO b/kabc/HOWTO index 00fd3b474..37f7ccefe 100644 --- a/kabc/HOWTO +++ b/kabc/HOWTO @@ -55,7 +55,7 @@ and provides 2 kinds of access methods. With search functions you can search for contacts with special attributes such as "all contacts with the name 'Harald'" -The class KABC::Addressee represents a single contact and tqcontains all data +The class KABC::Addressee represents a single contact and contains all data a vCard could store (as specified in RFC 2426). The Storage Layer @@ -276,7 +276,7 @@ A contact can also contain custom entries, which are not specified in the API, so you can add custom values with insertCustom() as shown in line 69. The first argument of this function should be the name of the application, so 2 applications which use the same custom entry accidentally, do not overwrite -the data for each other. The second argument tqcontains the name of the +the data for each other. The second argument contains the name of the custom entry and the third argument the value in string representation. In line 71 we finally insert the KABC::Addressee object into the @@ -357,7 +357,7 @@ following actions on it: In line 12 we query all email addresses of every resource and print them out. -<kabc/distributionlist.h> tqcontains also the declaration for the class +<kabc/distributionlist.h> contains also the declaration for the class KABC::DistributionListWatcher. This class exists only once per application and its only job is to emit a signal as soon as the distribution list file has changed. So to make your application aware of changes use the following code: diff --git a/kabc/README b/kabc/README index 1020ebf77..4aa9a063e 100644 --- a/kabc/README +++ b/kabc/README @@ -4,7 +4,7 @@ PURPOSE: libkabc provides an API for address book data. This can be used by all KDE application using data of this type, e.g. KAddressBook, KMail, KOrganizer, -KPilot etc. It is meant as tqreplacement for libkab (in kdebase/kab). +KPilot etc. It is meant as replacement for libkab (in kdebase/kab). FEATURES: diff --git a/kabc/README.AddressFormat b/kabc/README.AddressFormat index d3d75f5ce..8079e4914 100644 --- a/kabc/README.AddressFormat +++ b/kabc/README.AddressFormat @@ -15,10 +15,10 @@ format in a field "AddressFormat". Note that for most countries one field however, in some countries (eg. Hungary) business addresses differ in their structure. In this case you have the possibility of adding another field "BusinessAddressFormat" which will be preferred for formatting of business -addresses; if libkabc can't tqfind such a field, it will fall back to +addresses; if libkabc can't find such a field, it will fall back to "AddressFormat". (Please use BusinessAddressFormat ONLY if you really need to) -The format consists mainly of tags that will be tqreplaced by address fields. +The format consists mainly of tags that will be replaced by address fields. The list of tags may grow in the future, the format *might* change in the near future, but I hope not. diff --git a/kabc/address.cpp b/kabc/address.cpp index 63225a3be..0787bcc4e 100644 --- a/kabc/address.cpp +++ b/kabc/address.cpp @@ -390,8 +390,8 @@ bool Address::parseAddressTemplateSection( const TQString &tsection, TQString &result, const TQString &realName, const TQString &orgaName ) const { // This method first parses and substitutes any bracketed sections and - // after that tqreplaces any tags with their values. If a bracketed section - // or a tag evaluate to zero, they are not just removed but tqreplaced + // after that replaces any tags with their values. If a bracketed section + // or a tag evaluate to zero, they are not just removed but replaced // with a placeholder. This is because in the last step conditionals are // resolved which depend on information about zero-evaluations. result = tsection; @@ -399,14 +399,14 @@ 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; - // expect opening bracket and tqfind next balanced closing bracket. If + // expect opening bracket and find next balanced closing bracket. If // next char is no opening bracket, continue parsing (no valid tag) if ( '(' == result[bpos1] ) { - bpos2 = tqfindBalancedBracket( result, bpos1 ); + bpos2 = findBalancedBracket( result, bpos1 ); if ( -1 != bpos2 ) { // we have balanced brackets, recursively parse: TQString rplstr; @@ -415,12 +415,12 @@ bool Address::parseAddressTemplateSection( const TQString &tsection, realName, orgaName ); if ( purge ) { // purge -> remove all - // tqreplace with !_P_!, so conditional tags work later - result.tqreplace( fpos, bpos2 - fpos + 1, "!_P_!" ); + // replace with !_P_!, so conditional tags work later + result.replace( fpos, bpos2 - fpos + 1, "!_P_!" ); // leave stpos as it is } else { - // no purge -> tqreplace with recursively parsed string - result.tqreplace( fpos, bpos2 - fpos + 1, rplstr ); + // no purge -> replace with recursively parsed string + result.replace( fpos, bpos2 - fpos + 1, rplstr ); ret = true; stpos = fpos + rplstr.length(); } @@ -430,17 +430,17 @@ 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'tqreplace the rest, + // after sorting out all purge tags, we just search'n'replace the rest, // keeping track of whether at least one tag evaluates to something. // 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.tqreplace( R_TAG, rpl ); \ + result.replace( R_TAG, rpl ); \ if ( !R_FIELD.isEmpty() ) { \ ret = true; \ } \ @@ -457,32 +457,32 @@ bool Address::parseAddressTemplateSection( const TQString &tsection, REPLTAG( KABC_FMTTAG_LOCATION, locality().upper() ); REPLTAG( KABC_FMTTAG_region, region() ); REPLTAG( KABC_FMTTAG_REGION, region().upper() ); - result.tqreplace( KABC_FMTTAG_newline, "\n" ); + result.replace( KABC_FMTTAG_newline, "\n" ); #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 ); if ( str1 != "!_P_!" && str2 != "!_P_!" ) { - result.tqreplace( fpos, 2, ", " ); + result.replace( fpos, 2, ", " ); } 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 ); if ( str1 != "!_P_!" && str2 != "!_P_!" ) { - result.tqreplace( fpos, 2, " " ); + result.replace( fpos, 2, " " ); } else { result.remove( fpos, 2 ); } - fpos = result.tqfind( KABC_FMTTAG_condwhite, fpos ); + fpos = result.find( KABC_FMTTAG_condwhite, fpos ); } // remove purged: @@ -491,7 +491,7 @@ bool Address::parseAddressTemplateSection( const TQString &tsection, return ret; } -int Address::tqfindBalancedBracket( const TQString &tsection, int pos ) const +int Address::findBalancedBracket( const TQString &tsection, int pos ) const { int balancecounter = 0; for( unsigned int i = pos + 1; i < tsection.length(); i++ ) { @@ -516,12 +516,12 @@ TQString Address::countryToISO( const TQString &cname ) isoMapDeleter.setObject( mISOMap, new TQMap<TQString, TQString>() ); TQMap<TQString, TQString>::ConstIterator it; - it = mISOMap->tqfind( cname ); + it = mISOMap->find( cname ); if ( it != mISOMap->end() ) return it.data(); TQString mapfile = KGlobal::dirs()->findResource( "data", - TQString::tqfromLatin1( "kabc/countrytransl.map" ) ); + TQString::fromLatin1( "kabc/countrytransl.map" ) ); TQFile file( mapfile ); if ( file.open( IO_ReadOnly ) ) { @@ -551,7 +551,7 @@ TQString Address::ISOtoCountry( const TQString &ISOname ) return TQString::null; TQString mapfile = KGlobal::dirs()->findResource( "data", - TQString::tqfromLatin1( "kabc/countrytransl.map" ) ); + TQString::fromLatin1( "kabc/countrytransl.map" ) ); TQFile file( mapfile ); if ( file.open( IO_ReadOnly ) ) { @@ -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/address.h b/kabc/address.h index 94af6f1ad..a7c597a40 100644 --- a/kabc/address.h +++ b/kabc/address.h @@ -281,7 +281,7 @@ class KABC_EXPORT Address /** Returns ISO code for a localized country name. Only localized country - names will be understood. This might be tqreplaced by a KLocale method in + names will be understood. This might be replaced by a KLocale method in the future. @param cname name of the country @return two digit ISO code @@ -290,7 +290,7 @@ class KABC_EXPORT Address /** Returns a localized country name for a ISO code. - This might be tqreplaced by a KLocale method in the future. + This might be replaced by a KLocale method in the future. @param ISOname two digit ISO code @return localized name of the country @since 3.2 @@ -314,7 +314,7 @@ class KABC_EXPORT Address pos in tsection. @return position of closing bracket, -1 for unbalanced brackets */ - int tqfindBalancedBracket( const TQString &tsection, int pos ) const; + int findBalancedBracket( const TQString &tsection, int pos ) const; bool mEmpty; diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index ce0da18a5..bf6d0d17a 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -522,12 +522,12 @@ void AddressBook::insertAddressee( const Addressee &a ) resource = standardResource(); Resource::Iterator it; - Addressee fAddr = resource->tqfindByUid( a.uid() ); + Addressee fAddr = resource->findByUid( a.uid() ); Addressee addr( a ); if ( !fAddr.isEmpty() ) { if ( fAddr != a ) - addr.setRevision( TQDateTime::tqcurrentDateTime() ); + addr.setRevision( TQDateTime::currentDateTime() ); else { if ( fAddr.resource() == 0 ) { fAddr.setResource( resource ); @@ -555,7 +555,7 @@ void AddressBook::removeAddressee( const Iterator &it ) (*it).resource()->removeAddressee( *it ); } -AddressBook::Iterator AddressBook::tqfind( const Addressee &a ) +AddressBook::Iterator AddressBook::find( const Addressee &a ) { Iterator it; for ( it = begin(); it != end(); ++it ) { @@ -566,11 +566,11 @@ AddressBook::Iterator AddressBook::tqfind( const Addressee &a ) return end(); } -Addressee AddressBook::tqfindByUid( const TQString &uid ) +Addressee AddressBook::findByUid( const TQString &uid ) { KRES::Manager<Resource>::ActiveIterator it; for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) { - Addressee addr = (*it)->tqfindByUid( uid ); + Addressee addr = (*it)->findByUid( uid ); if ( !addr.isEmpty() ) return addr; } @@ -589,35 +589,35 @@ Addressee::List AddressBook::allAddressees() return list; } -Addressee::List AddressBook::tqfindByName( const TQString &name ) +Addressee::List AddressBook::findByName( const TQString &name ) { Addressee::List results; KRES::Manager<Resource>::ActiveIterator it; for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) - results += (*it)->tqfindByName( name ); + results += (*it)->findByName( name ); return results; } -Addressee::List AddressBook::tqfindByEmail( const TQString &email ) +Addressee::List AddressBook::findByEmail( const TQString &email ) { Addressee::List results; KRES::Manager<Resource>::ActiveIterator it; for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) - results += (*it)->tqfindByEmail( email ); + results += (*it)->findByEmail( email ); return results; } -Addressee::List AddressBook::tqfindByCategory( const TQString &category ) +Addressee::List AddressBook::findByCategory( const TQString &category ) { Addressee::List results; KRES::Manager<Resource>::ActiveIterator it; for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) - results += (*it)->tqfindByCategory( category ); + results += (*it)->findByCategory( category ); return results; } diff --git a/kabc/addressbook.h b/kabc/addressbook.h index 3a51736ed..0da25b30e 100644 --- a/kabc/addressbook.h +++ b/kabc/addressbook.h @@ -40,7 +40,7 @@ class Ticket; This class provides access to a collection of address book entries. */ -class KABC_EXPORT AddressBook : public TQObject +class KABC_EXPORT AddressBook : public QObject { Q_OBJECT @@ -113,7 +113,7 @@ class KABC_EXPORT AddressBook : public TQObject Constructs an address book object. The resources are loaded automatically. - @param config The config file which tqcontains the resource settings. + @param config The config file which contains the resource settings. */ AddressBook( const TQString &config ); @@ -207,7 +207,7 @@ class KABC_EXPORT AddressBook : public TQObject /** Insert an addressee into the address book. If an addressee with the same - unique id already exists, it is tqreplaced by the new one, otherwise it is + unique id already exists, it is replaced by the new one, otherwise it is appended. @param addr The addressee which shall be insert. @@ -235,7 +235,7 @@ class KABC_EXPORT AddressBook : public TQObject @param addr The addresee you are looking for. */ - Iterator tqfind( const Addressee &addr ); // KDE4: const + Iterator find( const Addressee &addr ); // KDE4: const /** Searches an addressee with the specified unique identifier. @@ -244,7 +244,7 @@ class KABC_EXPORT AddressBook : public TQObject @return The addressee with the specified unique identifier or an empty addressee. */ - Addressee tqfindByUid( const TQString &uid ); // KDE4: const + Addressee findByUid( const TQString &uid ); // KDE4: const /** Returns a list of all addressees in the address book. @@ -257,7 +257,7 @@ class KABC_EXPORT AddressBook : public TQObject @param name The name you are looking for. @return A list of all matching addressees. */ - Addressee::List tqfindByName( const TQString &name ); // KDE4: const + Addressee::List findByName( const TQString &name ); // KDE4: const /** Searches all addressees which match the specified email address. @@ -265,7 +265,7 @@ class KABC_EXPORT AddressBook : public TQObject @param email The email address you are looking for. @return A list of all matching addressees. */ - Addressee::List tqfindByEmail( const TQString &email ); // KDE4: const + Addressee::List findByEmail( const TQString &email ); // KDE4: const /** Searches all addressees which belongs to the specified category. @@ -273,7 +273,7 @@ class KABC_EXPORT AddressBook : public TQObject @param category The category you are looking for. @return A list of all matching addressees. */ - Addressee::List tqfindByCategory( const TQString &category ); // KDE4: const + Addressee::List findByCategory( const TQString &category ); // KDE4: const /** Returns a string identifying this addressbook. The identifier is diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp index fa15f4317..829664179 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/addresseehelper.cpp b/kabc/addresseehelper.cpp index ae60390da..df4085a02 100644 --- a/kabc/addresseehelper.cpp +++ b/kabc/addresseehelper.cpp @@ -38,7 +38,7 @@ AddresseeHelper *AddresseeHelper::self() } AddresseeHelper::AddresseeHelper() - : TQObject( tqApp ), + : TQObject( qApp ), DCOPObject( "KABC::AddresseeHelper" ) { initSettings(); @@ -90,19 +90,19 @@ void AddresseeHelper::initSettings() mTradeAsFamilyName = config.readBoolEntry( "TradeAsFamilyName", true ); } -bool AddresseeHelper::tqcontainsTitle( const TQString& title ) const +bool AddresseeHelper::containsTitle( const TQString& title ) const { - return mTitles.tqfind( title ) != mTitles.end(); + return mTitles.find( title ) != mTitles.end(); } -bool AddresseeHelper::tqcontainsPrefix( const TQString& prefix ) const +bool AddresseeHelper::containsPrefix( const TQString& prefix ) const { - return mPrefixes.tqfind( prefix ) != mPrefixes.end(); + return mPrefixes.find( prefix ) != mPrefixes.end(); } -bool AddresseeHelper::tqcontainsSuffix( const TQString& suffix ) const +bool AddresseeHelper::containsSuffix( const TQString& suffix ) const { - return mSuffixes.tqfind( suffix ) != mSuffixes.end(); + return mSuffixes.find( suffix ) != mSuffixes.end(); } bool AddresseeHelper::tradeAsFamilyName() const diff --git a/kabc/addresseehelper.h b/kabc/addresseehelper.h index 6eea08db8..5280e6b2d 100644 --- a/kabc/addresseehelper.h +++ b/kabc/addresseehelper.h @@ -40,9 +40,9 @@ class KABC_EXPORT AddresseeHelper : public TQObject, public DCOPObject public: static AddresseeHelper *self(); - bool tqcontainsTitle( const TQString& title ) const; - bool tqcontainsPrefix( const TQString& prefix ) const; - bool tqcontainsSuffix( const TQString& suffix ) const; + bool containsTitle( const TQString& title ) const; + bool containsPrefix( const TQString& prefix ) const; + bool containsSuffix( const TQString& suffix ) const; bool tradeAsFamilyName() const; k_dcop: diff --git a/kabc/addresseelist.cpp b/kabc/addresseelist.cpp index 47324001c..cb9446927 100644 --- a/kabc/addresseelist.cpp +++ b/kabc/addresseelist.cpp @@ -208,7 +208,7 @@ void AddresseeList::sortByTrait() while( j1 != i2 ) { if ( !mReverseSorting && Trait::lt( *j2, *j1 ) || mReverseSorting && Trait::lt( *j1, *j2 ) ) { - tqSwap( *j1, *j2 ); + qSwap( *j1, *j2 ); } ++j1; ++j2; diff --git a/kabc/addresseelist.h b/kabc/addresseelist.h index e5cfed09d..7c9df0275 100644 --- a/kabc/addresseelist.h +++ b/kabc/addresseelist.h @@ -191,7 +191,7 @@ class KABC_EXPORT AddresseeList : public TQValueList<Addressee> * sorting of the last <tt>sortByTrait</tt> action. * * Right now this method uses the bubble sort algorithm. This should be - * tqreplaced for a better one when I have time. + * replaced for a better one when I have time. */ template<class Trait> void sortByTrait(); diff --git a/kabc/addresslineedit.cpp b/kabc/addresslineedit.cpp index 07c6d76a5..b048d9f96 100644 --- a/kabc/addresslineedit.cpp +++ b/kabc/addresslineedit.cpp @@ -156,12 +156,12 @@ void AddressLineEdit::keyPressEvent(TQKeyEvent *e) { bool accept = false; - if (KStdAccel::shortcut(KStdAccel::SubstringCompletion).tqcontains(KKey(e))) + if (KStdAccel::shortcut(KStdAccel::SubstringCompletion).contains(KKey(e))) { doCompletion(true); accept = true; } - else if (KStdAccel::shortcut(KStdAccel::TextCompletion).tqcontains(KKey(e))) + else if (KStdAccel::shortcut(KStdAccel::TextCompletion).contains(KKey(e))) { int len = text().length(); @@ -213,21 +213,21 @@ void AddressLineEdit::insert(const TQString &t) // remove newlines in the to-be-pasted string as well as an eventual // mailto: protocol - newText.tqreplace( TQRegExp("\r?\n"), ", " ); + newText.replace( TQRegExp("\r?\n"), ", " ); if ( newText.startsWith( "mailto:" ) ) { KURL u(newText); newText = u.path(); } - else if (newText.tqfind(" at ") != -1) + else if (newText.find(" at ") != -1) { // Anti-spam stuff - newText.tqreplace( " at ", "@" ); - newText.tqreplace( " dot ", "." ); + newText.replace( " at ", "@" ); + newText.replace( " dot ", "." ); } - else if (newText.tqfind("(at)") != -1) + else if (newText.find("(at)") != -1) { - newText.tqreplace( TQRegExp("\\s*\\(at\\)\\s*"), "@" ); + newText.replace( TQRegExp("\\s*\\(at\\)\\s*"), "@" ); } TQString contents = text(); @@ -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/addresslineedit.h b/kabc/addresslineedit.h index ed045bd54..093acf97b 100644 --- a/kabc/addresslineedit.h +++ b/kabc/addresslineedit.h @@ -40,7 +40,7 @@ class LdapSearch; * A lineedit with LDAP and kabc completion * * This lineedit is supposed to be used wherever the user types email addresses - * and might want a completion. You can simply use it as a tqreplacement for + * and might want a completion. You can simply use it as a replacement for * KLineEdit or TQLineEdit. * * You can enable or disable the lineedit at any time. diff --git a/kabc/agent.cpp b/kabc/agent.cpp index 571b7803e..d21fa2998 100644 --- a/kabc/agent.cpp +++ b/kabc/agent.cpp @@ -124,7 +124,7 @@ TQString Agent::asString() const TQDataStream &KABC::operator<<( TQDataStream &s, const Agent &agent ) { - TQ_UINT32 hasAddressee = ( agent.mAddressee != 0 ); + Q_UINT32 hasAddressee = ( agent.mAddressee != 0 ); s << agent.mIntern << agent.mUrl << hasAddressee; if ( hasAddressee ) @@ -135,7 +135,7 @@ TQDataStream &KABC::operator<<( TQDataStream &s, const Agent &agent ) TQDataStream &KABC::operator>>( TQDataStream &s, Agent &agent ) { - TQ_UINT32 hasAddressee; + Q_UINT32 hasAddressee; s >> agent.mIntern >> agent.mUrl >> hasAddressee; diff --git a/kabc/countrytransl.map b/kabc/countrytransl.map index e999f576b..1459f0942 100644 --- a/kabc/countrytransl.map +++ b/kabc/countrytransl.map @@ -1901,32 +1901,32 @@ Kokos (Keeling) Utrawları cc Iyes Cocos cc 科科斯群岛 cc 可可斯群島 cc -Congo, The Detqmocratic Republic of the cd +Congo, The Democratic Republic of the cd Kongo, Demokratiese republiek van die cd Дэмакратычная Рэспубліка Конга cd ДР Конго cd কঙ্গোর গণতান্ত্রিক প্রজাতন্ত্র cd Kongo, Demokratska republika cd -Congo, República Detqmocràtica del cd +Congo, República Democràtica del cd Kongo cd -Congo, Gweriniaeth Detqmocrataidd y cd +Congo, Gweriniaeth Democrataidd y cd Congo, den demokratiske republik cd Kongo, Republik cd Κονγκό, Δημοκρατία του cd Kongo, la Demokratia Respubliko de la cd -Congo, República detqmocrática del cd +Congo, República democrática del cd Kongo (DV) cd Kongoko Errepublika Demokratikoa cd Kongon demokraattinen tasavalta cd -République Détqmocratique du Congo cd -Kongo, de detqmocratische republyk van de cd +République Démocratique du Congo cd +Kongo, de democratische republyk van de cd Poblacht Dhaonlathach an Chongó cd -Congo, República Detqmocrática do cd +Congo, República Democrática do cd קונגו, הרפובליקה הדמוקרטית של cd डेमोक्रेटिक रिपब्लिक ऑफ कॉगो cd Kongói Demokratikus Köztársaság cd Kongó, Austur cd -Congo, Repubblica Detqmocratica del cd +Congo, Repubblica Democratica del cd コンゴ,民主共和国 cd សាធារណរដ្ឋប្រជាធិបតេយ្យកុងហ្គោ cd Kongo demokratinė respublika cd @@ -1935,13 +1935,13 @@ Kongo demokrātiskā republika cd Kongo (RD) cd Kongo cd Kongo (De demokraatsche Republiek) cd -Congo, Detqmocratische republiek cd +Congo, Democratische republiek cd Kongo cd ਕਾਂਗੋ, ਲੋਕਤੰਤਰੀ ਗਣਰਾਜ cd Republika Demokratyczna Kongo cd -Congo, República Detqmocrática do cd -República Detqmocrática do Congo cd -Congo, Republica Detqmocrată cd +Congo, República Democrática do cd +República Democrática do Congo cd +Congo, Republica Democrată cd Демократическая Республика Конго cd Kongo, Repubulika Iharanira Demokarasi ya cd Kongo cd @@ -1957,7 +1957,7 @@ Demokratik Kongo Cumhuriyeti cd Kongo, Demokrat Cömhüriäte cd Конго, демократична республіка cd Конго Демократик Республикаси cd -Congo, republike detqmocratike cd +Congo, republike democratike cd 刚果民主共和国 cd 剛果民主共和國 cd Central African Republic cf @@ -3679,7 +3679,7 @@ Finlandiya fi Finska fi Finlàndia fi Finsko fi -Y Ftqfindir fi +Y Ffindir fi Finnland fi Φινλανδία fi Finnlando fi diff --git a/kabc/distributionlist.cpp b/kabc/distributionlist.cpp index 2fa089bd3..ee2f2e30a 100644 --- a/kabc/distributionlist.cpp +++ b/kabc/distributionlist.cpp @@ -60,7 +60,7 @@ void DistributionList::insertEntry( const Addressee &a, const TQString &email ) for( it = mEntries.begin(); it != mEntries.end(); ++it ) { if ( (*it).addressee.uid() == a.uid() ) { /** - We have to check if both email addresses tqcontains no data, + We have to check if both email addresses contains no data, a simple 'email1 == email2' wont work here */ if ( ( (*it).email.isNull() && email.isEmpty() ) || @@ -211,7 +211,7 @@ bool DistributionListManager::load() kdDebug(5700) << "----- Entry " << id << endl; - Addressee a = d->mAddressBook->tqfindByUid( id ); + Addressee a = d->mAddressBook->findByUid( id ); if ( !a.isEmpty() ) { list->insertEntry( a, email ); } else { @@ -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 ) { @@ -270,7 +270,7 @@ bool DistributionListManager::save() DistributionListWatcher* DistributionListWatcher::mSelf = 0; DistributionListWatcher::DistributionListWatcher() - : TQObject( tqApp, "DistributionListWatcher" ) + : TQObject( qApp, "DistributionListWatcher" ) { mDirWatch = new KDirWatch; mDirWatch->addFile( locateLocal( "data", "kabc/distlists" ) ); @@ -287,7 +287,7 @@ DistributionListWatcher::~DistributionListWatcher() DistributionListWatcher *DistributionListWatcher::self() { - kdWarning( !tqApp ) << "No TQApplication object available, you'll get a memleak!" << endl; + kdWarning( !qApp ) << "No TQApplication object available, you'll get a memleak!" << endl; if ( !mSelf ) mSelf = new DistributionListWatcher(); diff --git a/kabc/distributionlist.h b/kabc/distributionlist.h index 78d182467..7ad8dff81 100644 --- a/kabc/distributionlist.h +++ b/kabc/distributionlist.h @@ -186,7 +186,7 @@ class KABC_EXPORT DistributionListManager \endcode */ -class KABC_EXPORT DistributionListWatcher : public TQObject +class KABC_EXPORT DistributionListWatcher : public QObject { Q_OBJECT diff --git a/kabc/errorhandler.cpp b/kabc/errorhandler.cpp index d8ab650c7..55b0f459d 100644 --- a/kabc/errorhandler.cpp +++ b/kabc/errorhandler.cpp @@ -50,6 +50,6 @@ GuiErrorHandler::GuiErrorHandler( TQWidget *parent ) void GuiErrorHandler::error( const TQString &msg ) { - if (tqApp) + if (qApp) KMessageBox::error( mParent, msg ); } diff --git a/kabc/formatplugin.h b/kabc/formatplugin.h index 643a7021e..33f4beea0 100644 --- a/kabc/formatplugin.h +++ b/kabc/formatplugin.h @@ -64,7 +64,7 @@ public: virtual void saveAll( AddressBook *, Resource *, TQFile *file ) = 0; /** - * Checks if given file tqcontains the right format + * Checks if given file contains the right format */ virtual bool checkFormat( TQFile *file ) const = 0; }; diff --git a/kabc/formats/Makefile.am b/kabc/formats/Makefile.am index 2443cef24..0b5978b20 100644 --- a/kabc/formats/Makefile.am +++ b/kabc/formats/Makefile.am @@ -11,7 +11,7 @@ kabcformat_binary_la_COMPILE_FIRST = $(top_builddir)/kabc/addressee.h # these are the headers for your project noinst_HEADERS = binaryformat.h -# let autotqmoc handle all of the meta source files (tqmoc) +# let automoc handle all of the meta source files (moc) METASOURCES = AUTO messages: rc.cpp diff --git a/kabc/formats/binaryformat.cpp b/kabc/formats/binaryformat.cpp index d09be306b..d5e3cf499 100644 --- a/kabc/formats/binaryformat.cpp +++ b/kabc/formats/binaryformat.cpp @@ -66,7 +66,7 @@ bool BinaryFormat::loadAll( AddressBook*, Resource *resource, TQFile *file ) if ( !checkHeader( stream ) ) return false; - TQ_UINT32 entries; + Q_UINT32 entries; stream >> entries; @@ -89,7 +89,7 @@ void BinaryFormat::save( const Addressee &addressee, TQFile *file ) writeHeader( stream ); - TQ_UINT32 entries = 1; + Q_UINT32 entries = 1; stream << entries; saveAddressee( addressee, stream ); } @@ -98,7 +98,7 @@ void BinaryFormat::saveAll( AddressBook*, Resource *resource, TQFile *file ) { kdDebug(5700) << "BinaryFormat::saveAll()" << endl; - TQ_UINT32 counter = 0; + Q_UINT32 counter = 0; TQDataStream stream( file ); writeHeader( stream ); @@ -113,7 +113,7 @@ void BinaryFormat::saveAll( AddressBook*, Resource *resource, TQFile *file ) } // set real number of entries - stream.device()->at( 2 * sizeof( TQ_UINT32 ) ); + stream.device()->at( 2 * sizeof( Q_UINT32 ) ); stream << counter; } @@ -128,7 +128,7 @@ bool BinaryFormat::checkFormat( TQFile *file ) const bool BinaryFormat::checkHeader( TQDataStream &stream ) const { - TQ_UINT32 magic, version; + Q_UINT32 magic, version; stream >> magic >> version; @@ -154,7 +154,7 @@ bool BinaryFormat::checkHeader( TQDataStream &stream ) const void BinaryFormat::writeHeader( TQDataStream &stream ) { - TQ_UINT32 magic, version; + Q_UINT32 magic, version; magic = 0x2e93e; version = BINARY_FORMAT_VERSION; diff --git a/kabc/geo.h b/kabc/geo.h index 0da70899e..019e18199 100644 --- a/kabc/geo.h +++ b/kabc/geo.h @@ -72,7 +72,7 @@ class KABC_EXPORT Geo float longitude() const; /** - Returns, if this object tqcontains a valid geographical position. + Returns, if this object contains a valid geographical position. */ bool isValid() const; diff --git a/kabc/kab2kabc.cpp b/kabc/kab2kabc.cpp index e78847b91..9d8ea75ee 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.at( 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.at( 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 ); @@ -105,7 +105,7 @@ void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) kdDebug() << " NAME : " << name << endl; kdDebug() << " COMMENT : " << comment << endl; - KABC::Addressee::List al = ab->tqfindByEmail( email ); + KABC::Addressee::List al = ab->findByEmail( email ); if ( al.isEmpty() ) { KABC::Addressee a; a.setNameFromString( name ); @@ -128,7 +128,7 @@ void importKMailAddressBook( KABC::AddressBook *ab ) fileName = cfg.readPathEntry( "default", fileName ); } if ( !KStandardDirs::exists( fileName ) ) { - kdDebug(5700) << "Couldn't tqfind KMail addressbook." << endl; + kdDebug(5700) << "Couldn't find KMail addressbook." << endl; return; } @@ -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/key.h b/kabc/key.h index 714a07745..ecc4492d8 100644 --- a/kabc/key.h +++ b/kabc/key.h @@ -99,7 +99,7 @@ public: TQString textData() const; /** - * Returns whether the key tqcontains binary or text data. + * Returns whether the key contains binary or text data. */ bool isBinary() const; diff --git a/kabc/ldapclient.cpp b/kabc/ldapclient.cpp index 637d77da6..724f039ec 100644 --- a/kabc/ldapclient.cpp +++ b/kabc/ldapclient.cpp @@ -50,7 +50,7 @@ public: TQString LdapObject::toString() const { - TQString result = TQString::tqfromLatin1( "\ndn: %1\n" ).arg( dn ); + TQString result = TQString::fromLatin1( "\ndn: %1\n" ).arg( dn ); for ( LdapAttrMap::ConstIterator it = attrs.begin(); it != attrs.end(); ++it ) { TQString attr = it.key(); for ( LdapAttrValue::ConstIterator it2 = (*it).begin(); it2 != (*it).end(); ++it2 ) { @@ -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/ldapclient.h b/kabc/ldapclient.h index 2054b1302..b4ee9d749 100644 --- a/kabc/ldapclient.h +++ b/kabc/ldapclient.h @@ -82,7 +82,7 @@ class KABC_EXPORT LdapObject * We mean it! * */ -class KABC_EXPORT LdapClient : public TQObject +class KABC_EXPORT LdapClient : public QObject { Q_OBJECT @@ -204,7 +204,7 @@ typedef TQValueList<LdapResult> LdapResultList; * We mean it! * */ -class KABC_EXPORT LdapSearch : public TQObject +class KABC_EXPORT LdapSearch : public QObject { Q_OBJECT diff --git a/kabc/ldapconfigwidget.cpp b/kabc/ldapconfigwidget.cpp index 671cac98f..a4b7fc571 100644 --- a/kabc/ldapconfigwidget.cpp +++ b/kabc/ldapconfigwidget.cpp @@ -129,7 +129,7 @@ void LdapConfigWidget::initWidget() if ( mFlags & W_PORT ) { label = new TQLabel( i18n( "Port:" ), this ); mPort = new TQSpinBox( 0, 65535, 1, this, "kcfg_ldapport" ); - mPort->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); + mPort->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); mPort->setValue( 389 ); mainLayout->addWidget( label, row, col ); @@ -140,7 +140,7 @@ void LdapConfigWidget::initWidget() if ( mFlags & W_VER ) { label = new TQLabel( i18n( "LDAP version:" ), this ); mVer = new TQSpinBox( 2, 3, 1, this, "kcfg_ldapver" ); - mVer->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); + mVer->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); mVer->setValue( 3 ); mainLayout->addWidget( label, row, col ); mainLayout->addWidget( mVer, row, col+1 ); @@ -151,7 +151,7 @@ void LdapConfigWidget::initWidget() if ( mFlags & W_SIZELIMIT ) { label = new TQLabel( i18n( "Size limit:" ), this ); mSizeLimit = new TQSpinBox( 0, 9999999, 1, this, "kcfg_ldapsizelimit" ); - mSizeLimit->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); + mSizeLimit->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); mSizeLimit->setValue( 0 ); mSizeLimit->setSpecialValueText( i18n("Default") ); mainLayout->addWidget( label, row, col ); @@ -162,7 +162,7 @@ void LdapConfigWidget::initWidget() if ( mFlags & W_TIMELIMIT ) { label = new TQLabel( i18n( "Time limit:" ), this ); mTimeLimit = new TQSpinBox( 0, 9999999, 1, this, "kcfg_ldaptimelimit" ); - mTimeLimit->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); + mTimeLimit->setSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ) ); mTimeLimit->setValue( 0 ); mTimeLimit->setSuffix( i18n(" sec") ); mTimeLimit->setSpecialValueText( i18n("Default") ); diff --git a/kabc/ldapurl.cpp b/kabc/ldapurl.cpp index ee08060a9..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 { @@ -195,7 +195,7 @@ void LDAPUrl::parseQuery() name.remove(0, 1); } kdDebug(5700) << "LDAPUrl extensions name= " << name << " value: " << value << endl; - ext.value = value.tqreplace( "%2", "," ); + ext.value = value.replace( "%2", "," ); setExtension( name, ext ); } } diff --git a/kabc/ldif.cpp b/kabc/ldif.cpp index 2b8f4164c..19895fce5 100644 --- a/kabc/ldif.cpp +++ b/kabc/ldif.cpp @@ -112,9 +112,9 @@ 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 tqfind a fieldname + // strange: we did not find a fieldname fieldname = ""; TQCString str; str = line.stripWhiteSpace(); @@ -259,7 +259,7 @@ LDIF::ParseVal LDIF::processLine() retval = EndEntry; } else if ( attrLower == "add" ) { mModType = Mod_Add; - } else if ( attrLower == "tqreplace" ) { + } else if ( attrLower == "replace" ) { mModType = Mod_Replace; mAttr = TQString::fromUtf8( mVal, mVal.size() ); mVal.resize( 0 ); diff --git a/kabc/ldif.h b/kabc/ldif.h index afdd92b4d..10cd15e18 100644 --- a/kabc/ldif.h +++ b/kabc/ldif.h @@ -96,7 +96,7 @@ namespace KABC { * Process the LDIF until a complete item can be returned * @returns NewEntry if a new DN encountered, * Item if a new item returned, - * Err if the LDIF tqcontains error, + * Err if the LDIF contains error, * EndEntry if the parser reached the end of the current entry * and MoreData if the parser encountered the end of the current chunk of * the LDIF. If you want to finish the parsing after receiving diff --git a/kabc/ldifconverter.cpp b/kabc/ldifconverter.cpp index 120e6f70a..6f875cffb 100644 --- a/kabc/ldifconverter.cpp +++ b/kabc/ldifconverter.cpp @@ -175,7 +175,7 @@ bool LDIFConverter::LDIFToAddressee( const TQString &str, AddresseeList &addrLis LDIF ldif; LDIF::ParseVal ret; const char *latinstr = str.latin1(); - int latinstrlen = tqstrlen( latinstr ); + int latinstrlen = qstrlen( latinstr ); TQByteArray data; Addressee a; Address homeAddr, workAddr; @@ -183,7 +183,7 @@ bool LDIFConverter::LDIFToAddressee( const TQString &str, AddresseeList &addrLis data.setRawData( latinstr, latinstrlen ); ldif.setLDIF( data ); if (!dt.isValid()) - dt = TQDateTime::tqcurrentDateTime(); + dt = TQDateTime::currentDateTime(); a.setRevision(dt); homeAddr = Address( Address::Home ); workAddr = Address( Address::Work ); @@ -235,7 +235,7 @@ bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr, Address &workAddr, TQString &fieldname, TQString &value ) { - if ( fieldname == TQString::tqfromLatin1( "dn" ) ) // ignore & return false! + if ( fieldname == TQString::fromLatin1( "dn" ) ) // ignore & return false! return false; if ( fieldname.startsWith("#") ) { @@ -249,56 +249,56 @@ bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr, return true; } - if ( fieldname == TQString::tqfromLatin1( "givenname" ) ) { + if ( fieldname == TQString::fromLatin1( "givenname" ) ) { a.setGivenName( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "xmozillanickname") || - fieldname == TQString::tqfromLatin1( "nickname") ) { + if ( fieldname == TQString::fromLatin1( "xmozillanickname") || + fieldname == TQString::fromLatin1( "nickname") ) { a.setNickName( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "sn" ) ) { + if ( fieldname == TQString::fromLatin1( "sn" ) ) { a.setFamilyName( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "uid" ) ) { + if ( fieldname == TQString::fromLatin1( "uid" ) ) { a.setUid( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mail" ) || - fieldname == TQString::tqfromLatin1( "mozillasecondemail" ) ) { // mozilla - if ( a.emails().tqfindIndex( value ) == -1 ) + if ( fieldname == TQString::fromLatin1( "mail" ) || + fieldname == TQString::fromLatin1( "mozillasecondemail" ) ) { // mozilla + if ( a.emails().findIndex( value ) == -1 ) a.insertEmail( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "title" ) ) { + if ( fieldname == TQString::fromLatin1( "title" ) ) { a.setTitle( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "vocation" ) ) { + if ( fieldname == TQString::fromLatin1( "vocation" ) ) { a.setPrefix( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "cn" ) ) { + if ( fieldname == TQString::fromLatin1( "cn" ) ) { a.setFormattedName( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "o" ) || - fieldname == TQString::tqfromLatin1( "organization" ) || // Exchange - fieldname == TQString::tqfromLatin1( "organizationname" ) ) { // Exchange + if ( fieldname == TQString::fromLatin1( "o" ) || + fieldname == TQString::fromLatin1( "organization" ) || // Exchange + fieldname == TQString::fromLatin1( "organizationname" ) ) { // Exchange a.setOrganization( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "description" ) ) { + if ( fieldname == TQString::fromLatin1( "description" ) ) { addComment: if ( !a.note().isEmpty() ) a.setNote( a.note() + "\n" ); @@ -306,15 +306,15 @@ addComment: return true; } - if ( fieldname == TQString::tqfromLatin1( "custom1" ) || - fieldname == TQString::tqfromLatin1( "custom2" ) || - fieldname == TQString::tqfromLatin1( "custom3" ) || - fieldname == TQString::tqfromLatin1( "custom4" ) ) { + if ( fieldname == TQString::fromLatin1( "custom1" ) || + fieldname == TQString::fromLatin1( "custom2" ) || + fieldname == TQString::fromLatin1( "custom3" ) || + fieldname == TQString::fromLatin1( "custom4" ) ) { goto addComment; } - if ( fieldname == TQString::tqfromLatin1( "homeurl" ) || - fieldname == TQString::tqfromLatin1( "workurl" ) ) { + if ( fieldname == TQString::fromLatin1( "homeurl" ) || + fieldname == TQString::fromLatin1( "workurl" ) ) { if (a.url().isEmpty()) { a.setUrl( KURL( value ) ); return true; @@ -325,139 +325,139 @@ addComment: // TODO: change this with KDE 4 } - if ( fieldname == TQString::tqfromLatin1( "homephone" ) ) { + if ( fieldname == TQString::fromLatin1( "homephone" ) ) { a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Home ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "telephonenumber" ) ) { + if ( fieldname == TQString::fromLatin1( "telephonenumber" ) ) { a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mobile" ) ) { // mozilla/Netscape 7 + if ( fieldname == TQString::fromLatin1( "mobile" ) ) { // mozilla/Netscape 7 a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "cellphone" ) ) { + if ( fieldname == TQString::fromLatin1( "cellphone" ) ) { a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "pager" ) || // mozilla - fieldname == TQString::tqfromLatin1( "pagerphone" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "pager" ) || // mozilla + fieldname == TQString::fromLatin1( "pagerphone" ) ) { // mozilla a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Pager ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "facsimiletelephonenumber" ) ) { + if ( fieldname == TQString::fromLatin1( "facsimiletelephonenumber" ) ) { a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Fax ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "xmozillaanyphone" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "xmozillaanyphone" ) ) { // mozilla a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "street" ) || - fieldname == TQString::tqfromLatin1( "streethomeaddress" ) ) { + if ( fieldname == TQString::fromLatin1( "street" ) || + fieldname == TQString::fromLatin1( "streethomeaddress" ) ) { homeAddr.setStreet( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "postaladdress" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "postaladdress" ) ) { // mozilla workAddr.setStreet( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillapostaladdress2" ) ) { // mozilla - workAddr.setStreet( workAddr.street() + TQString::tqfromLatin1( "\n" ) + value ); + if ( fieldname == TQString::fromLatin1( "mozillapostaladdress2" ) ) { // mozilla + workAddr.setStreet( workAddr.street() + TQString::fromLatin1( "\n" ) + value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "postalcode" ) ) { + if ( fieldname == TQString::fromLatin1( "postalcode" ) ) { workAddr.setPostalCode( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "postofficebox" ) ) { + if ( fieldname == TQString::fromLatin1( "postofficebox" ) ) { workAddr.setPostOfficeBox( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "homepostaladdress" ) ) { // Netscape 7 + if ( fieldname == TQString::fromLatin1( "homepostaladdress" ) ) { // Netscape 7 homeAddr.setStreet( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillahomepostaladdress2" ) ) { // mozilla - homeAddr.setStreet( homeAddr.street() + TQString::tqfromLatin1( "\n" ) + value ); + if ( fieldname == TQString::fromLatin1( "mozillahomepostaladdress2" ) ) { // mozilla + homeAddr.setStreet( homeAddr.street() + TQString::fromLatin1( "\n" ) + value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillahomelocalityname" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "mozillahomelocalityname" ) ) { // mozilla homeAddr.setLocality( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillahomestate" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "mozillahomestate" ) ) { // mozilla homeAddr.setRegion( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillahomepostalcode" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "mozillahomepostalcode" ) ) { // mozilla homeAddr.setPostalCode( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillahomecountryname" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "mozillahomecountryname" ) ) { // mozilla if ( value.length() <= 2 ) value = Address::ISOtoCountry(value); homeAddr.setCountry( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "locality" ) ) { + if ( fieldname == TQString::fromLatin1( "locality" ) ) { workAddr.setLocality( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "streetaddress" ) ) { // Netscape 4.x + if ( fieldname == TQString::fromLatin1( "streetaddress" ) ) { // Netscape 4.x workAddr.setStreet( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "countryname" ) || - fieldname == TQString::tqfromLatin1( "c" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "countryname" ) || + fieldname == TQString::fromLatin1( "c" ) ) { // mozilla if ( value.length() <= 2 ) value = Address::ISOtoCountry(value); workAddr.setCountry( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "l" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "l" ) ) { // mozilla workAddr.setLocality( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "st" ) ) { + if ( fieldname == TQString::fromLatin1( "st" ) ) { workAddr.setRegion( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "ou" ) ) { + if ( fieldname == TQString::fromLatin1( "ou" ) ) { a.setRole( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "department" ) ) { + if ( fieldname == TQString::fromLatin1( "department" ) ) { a.setDepartment( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "member" ) ) { + if ( fieldname == TQString::fromLatin1( "member" ) ) { // this is a mozilla list member (cn=xxx, mail=yyy) TQStringList list( TQStringList::split( ',', value ) ); TQString name, email; @@ -476,8 +476,8 @@ addComment: return true; } - if ( fieldname == TQString::tqfromLatin1( "modifytimestamp" ) ) { - if (value == TQString::tqfromLatin1("0Z")) // ignore + if ( fieldname == TQString::fromLatin1( "modifytimestamp" ) ) { + if (value == TQString::fromLatin1("0Z")) // ignore return true; TQDateTime dt = VCardStringToDate( value ); if ( dt.isValid() ) { @@ -486,7 +486,7 @@ addComment: } } - if ( fieldname == TQString::tqfromLatin1( "objectclass" ) ) // ignore + if ( fieldname == TQString::fromLatin1( "objectclass" ) ) // ignore return true; kdWarning() << TQString("LDIFConverter: Unknown field for '%1': '%2=%3'\n") @@ -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 @@ -542,13 +542,13 @@ TQString LDIFConverter::makeLDIFfieldString( TQString formatStr, TQString value, } } - if (printable) // always encode if we tqfind special chars... - printable = (value.tqfind('\n') == -1); + if (printable) // always encode if we find special chars... + 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/ldifconverter.h b/kabc/ldifconverter.h index a2225ad2d..a8052a65f 100644 --- a/kabc/ldifconverter.h +++ b/kabc/ldifconverter.h @@ -44,7 +44,7 @@ namespace KABC { * @param dt The date & time value of the last modification (e.g. file modification time). * @since 3.2 */ - KABC_EXPORT bool LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt = TQDateTime::tqcurrentDateTime() ); + KABC_EXPORT bool LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt = TQDateTime::currentDateTime() ); /** * Converts a list of addressees to a LDIF string. diff --git a/kabc/lock.cpp b/kabc/lock.cpp index fd300cfca..b5e0ea5a6 100644 --- a/kabc/lock.cpp +++ b/kabc/lock.cpp @@ -38,7 +38,7 @@ using namespace KABC; Lock::Lock( const TQString &identifier ) : mIdentifier( identifier ) { - mIdentifier.tqreplace( "/", "_" ); + mIdentifier.replace( "/", "_" ); } Lock::~Lock() @@ -101,7 +101,7 @@ bool Lock::lock() << endl; } else { TQString identifier( mIdentifier ); - identifier.tqreplace( '_', '/' ); + identifier.replace( '_', '/' ); mError = i18n("The address book '%1' is locked by application '%2'.\nIf you believe this is incorrect, just remove the lock file from '%3'") .arg( identifier ).arg( app ).arg( locateLocal( "data", "kabc/lock/*.lock" ) ); diff --git a/kabc/lock.h b/kabc/lock.h index b682ea9e2..95f5c87a3 100644 --- a/kabc/lock.h +++ b/kabc/lock.h @@ -32,7 +32,7 @@ namespace KABC { This class provides locking functionality for a file, directory or an arbitrary string-represented resource. */ -class KABC_EXPORT Lock : public TQObject +class KABC_EXPORT Lock : public QObject { Q_OBJECT public: diff --git a/kabc/phonenumber.cpp b/kabc/phonenumber.cpp index ec4e79e56..31a99f9ea 100644 --- a/kabc/phonenumber.cpp +++ b/kabc/phonenumber.cpp @@ -53,8 +53,8 @@ void PhoneNumber::validateNumber( const TQString &number ) mNumber = number; // remove line breaks - mNumber = mNumber.tqreplace( '\n', "" ); - mNumber = mNumber.tqreplace( '\r', "" ); + mNumber = mNumber.replace( '\n', "" ); + mNumber = mNumber.replace( '\r', "" ); } bool PhoneNumber::operator==( const PhoneNumber &p ) const diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp index 38fdf11e3..0897c9cee 100644 --- a/kabc/plugins/dir/resourcedir.cpp +++ b/kabc/plugins/dir/resourcedir.cpp @@ -258,7 +258,7 @@ bool ResourceDir::asyncSave( Ticket *ticket ) void ResourceDir::setPath( const TQString &path ) { mDirWatch.stopScan(); - if ( mDirWatch.tqcontains( mPath ) ) + if ( mDirWatch.contains( mPath ) ) mDirWatch.removeDir( mPath ); mPath = path; 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/evolution/dbwrapper.cpp b/kabc/plugins/evolution/dbwrapper.cpp index c7f526b47..bcc641191 100644 --- a/kabc/plugins/evolution/dbwrapper.cpp +++ b/kabc/plugins/evolution/dbwrapper.cpp @@ -145,7 +145,7 @@ DBIterator DBWrapper::end() { return it; } -bool DBWrapper::tqfind( const TQString& _key, TQString& _val ) { +bool DBWrapper::find( const TQString& _key, TQString& _val ) { DBT key, val; ::memset(&key, 0, sizeof(key) ); ::memset(&val, 0, sizeof(val) ); diff --git a/kabc/plugins/evolution/dbwrapper.h b/kabc/plugins/evolution/dbwrapper.h index 4c6511984..e5e0a2c33 100644 --- a/kabc/plugins/evolution/dbwrapper.h +++ b/kabc/plugins/evolution/dbwrapper.h @@ -44,7 +44,7 @@ namespace Evolution { DBIterator begin(); DBIterator end(); - bool tqfind( const TQString& key, TQString& value ); + bool find( const TQString& key, TQString& value ); bool add( const TQString& key, const TQString& val ); bool remove( const TQString& key ); private: diff --git a/kabc/plugins/evolution/resourceevo.cpp b/kabc/plugins/evolution/resourceevo.cpp index 90c566925..a93d7d2a1 100644 --- a/kabc/plugins/evolution/resourceevo.cpp +++ b/kabc/plugins/evolution/resourceevo.cpp @@ -51,7 +51,7 @@ bool ResourceEvolution::doOpen() { } TQString val; - if (!mWrap->tqfind( "PAS-DB-VERSION", val ) ) + if (!mWrap->find( "PAS-DB-VERSION", val ) ) return false; if (!val.startsWith("0.2") ) diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index 3037ec334..b391dffa5 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp @@ -319,7 +319,7 @@ bool ResourceFile::asyncSave( Ticket *ticket ) void ResourceFile::setFileName( const TQString &fileName ) { mDirWatch.stopScan(); - if ( mDirWatch.tqcontains( mFileName ) ) + if ( mDirWatch.contains( mFileName ) ) mDirWatch.removeFile( mFileName ); mFileName = fileName; 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 481672427..df0baf455 100644 --- a/kabc/plugins/ldapkio/resourceldapkio.cpp +++ b/kabc/plugins/ldapkio/resourceldapkio.cpp @@ -125,7 +125,7 @@ void ResourceLDAPKIO::enter_loop() TQWidget dummy(0,0,WType_Dialog | WShowModal); dummy.setFocusPolicy( TQWidget::NoFocus ); qt_enter_modal(&dummy); - tqApp->enter_loop(); + qApp->enter_loop(); qt_leave_modal(&dummy); } @@ -139,7 +139,7 @@ void ResourceLDAPKIO::entries( KIO::Job*, const KIO::UDSEntryList & list ) if ( (*it2).m_uds == KIO::UDS_URL ) { KURL tmpurl( (*it2).m_str ); d->mResultDn = tmpurl.path(); - kdDebug(7125) << "tqfindUid(): " << d->mResultDn << endl; + kdDebug(7125) << "findUid(): " << d->mResultDn << endl; if ( d->mResultDn.startsWith("/") ) d->mResultDn.remove(0,1); return; } @@ -154,10 +154,10 @@ void ResourceLDAPKIO::listResult( KIO::Job *job) mErrorMsg = job->errorString(); else mErrorMsg = ""; - tqApp->exit_loop(); + qApp->exit_loop(); } -TQString ResourceLDAPKIO::tqfindUid( const TQString &uid ) +TQString ResourceLDAPKIO::findUid( const TQString &uid ) { LDAPUrl url( d->mLDAPUrl ); KIO::UDSEntry entry; @@ -168,7 +168,7 @@ TQString ResourceLDAPKIO::tqfindUid( const TQString &uid ) url.setFilter( "(" + mAttributes[ "uid" ] + "=" + uid + ")" + mFilter ); url.setExtension( "x-dir", "one" ); - kdDebug(7125) << "ResourceLDAPKIO::tqfindUid() uid: " << uid << " url " << + kdDebug(7125) << "ResourceLDAPKIO::findUid() uid: " << uid << " url " << url.prettyURL() << endl; KIO::ListJob * listJob = KIO::listDir( url, false /* no GUI */ ); @@ -186,7 +186,7 @@ TQCString ResourceLDAPKIO::addEntry( const TQString &attr, const TQString &value { TQCString tmp; if ( !attr.isEmpty() ) { - if ( mod ) tmp += LDIF::assembleLine( "tqreplace", attr ) + "\n"; + if ( mod ) tmp += LDIF::assembleLine( "replace", attr ) + "\n"; tmp += LDIF::assembleLine( attr, value ) + "\n"; if ( mod ) tmp += "-\n"; } @@ -278,7 +278,7 @@ bool ResourceLDAPKIO::AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, if ( !mAttributes[ "mail" ].isEmpty() ) { if ( mod ) tmp += - LDIF::assembleLine( "tqreplace", mAttributes[ "mail" ] ) + "\n"; + LDIF::assembleLine( "replace", mAttributes[ "mail" ] ) + "\n"; if ( mailIt != emails.end() ) { tmp += LDIF::assembleLine( mAttributes[ "mail" ], *mailIt ) + "\n"; mailIt ++; @@ -288,7 +288,7 @@ bool ResourceLDAPKIO::AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, if ( !mAttributes[ "mailAlias" ].isEmpty() ) { if ( mod && mAttributes[ "mail" ] != mAttributes[ "mailAlias" ] ) tmp += - LDIF::assembleLine( "tqreplace", mAttributes[ "mailAlias" ] ) + "\n"; + LDIF::assembleLine( "replace", mAttributes[ "mailAlias" ] ) + "\n"; for ( ; mailIt != emails.end(); ++mailIt ) { tmp += LDIF::assembleLine( mAttributes[ "mailAlias" ], *mailIt ) + "\n" ; } @@ -302,7 +302,7 @@ bool ResourceLDAPKIO::AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, addr.photo().data().save( &buffer, "JPEG" ); if ( mod ) tmp += - LDIF::assembleLine( "tqreplace", mAttributes[ "jpegPhoto" ] ) + "\n"; + LDIF::assembleLine( "replace", mAttributes[ "jpegPhoto" ] ) + "\n"; tmp += LDIF::assembleLine( mAttributes[ "jpegPhoto" ], pic, 76 ) + "\n"; if ( mod ) tmp += "-\n"; } @@ -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(); @@ -766,7 +766,7 @@ void ResourceLDAPKIO::syncLoadSaveResult( KIO::Job *job ) mErrorMsg = ""; activateCache(); - tqApp->exit_loop(); + qApp->exit_loop(); } void ResourceLDAPKIO::saveResult( KIO::Job *job ) @@ -791,7 +791,7 @@ void ResourceLDAPKIO::saveData( KIO::Job*, TQByteArray& data ) kdDebug(7125) << "ResourceLDAPKIO saveData: " << (*d->mSaveIt).assembledName() << endl; - AddresseeToLDIF( data, *d->mSaveIt, tqfindUid( (*d->mSaveIt).uid() ) ); + AddresseeToLDIF( data, *d->mSaveIt, findUid( (*d->mSaveIt).uid() ) ); // kdDebug(7125) << "ResourceLDAPKIO save LDIF: " << TQString::fromUtf8(data) << endl; // mark as unchanged (*d->mSaveIt).setChanged( false ); @@ -801,7 +801,7 @@ void ResourceLDAPKIO::saveData( KIO::Job*, TQByteArray& data ) void ResourceLDAPKIO::removeAddressee( const Addressee& addr ) { - TQString dn = tqfindUid( addr.uid() ); + TQString dn = findUid( addr.uid() ); kdDebug(7125) << "ResourceLDAPKIO: removeAddressee: " << dn << endl; diff --git a/kabc/plugins/ldapkio/resourceldapkio.h b/kabc/plugins/ldapkio/resourceldapkio.h index 15a694af4..2b5685fdc 100644 --- a/kabc/plugins/ldapkio/resourceldapkio.h +++ b/kabc/plugins/ldapkio/resourceldapkio.h @@ -158,7 +158,7 @@ protected slots: void activateCache(); void enter_loop(); TQCString addEntry( const TQString &attr, const TQString &value, bool mod ); - TQString tqfindUid( const TQString &uid ); + TQString findUid( const TQString &uid ); bool AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, const TQString &olddn ); diff --git a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp index 80ad121a5..271328525 100644 --- a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp +++ b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp @@ -234,13 +234,13 @@ AttributesDialog::AttributesDialog( const TQMap<TQString, TQString> &attributes, mMapList.append( outlookMap ); TQFrame *page = plainPage(); - TQGridLayout *tqlayout = new TQGridLayout( page, 4, ( attributes.count() + 4 ) >> 1, + TQGridLayout *layout = new TQGridLayout( page, 4, ( attributes.count() + 4 ) >> 1, 0, spacingHint() ); TQLabel *label = new TQLabel( i18n( "Template:" ), page ); - tqlayout->addWidget( label, 0, 0 ); + layout->addWidget( label, 0, 0 ); mMapCombo = new KComboBox( page ); - tqlayout->addWidget( mMapCombo, 0, 1 ); + layout->addWidget( mMapCombo, 0, 1 ); mMapCombo->insertItem( i18n( "User Defined" ) ); mMapCombo->insertItem( i18n( "Kolab" ) ); @@ -250,9 +250,9 @@ AttributesDialog::AttributesDialog( const TQMap<TQString, TQString> &attributes, connect( mMapCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( mapChanged( int ) ) ); label = new TQLabel( i18n( "RDN prefix attribute:" ), page ); - tqlayout->addWidget( label, 1, 0 ); + layout->addWidget( label, 1, 0 ); mRDNCombo = new KComboBox( page ); - tqlayout->addWidget( mRDNCombo, 1, 1 ); + layout->addWidget( mRDNCombo, 1, 1 ); mRDNCombo->insertItem( i18n( "commonName" ) ); mRDNCombo->insertItem( i18n( "UID" ) ); mRDNCombo->setCurrentItem( rdnprefix ); @@ -274,14 +274,14 @@ AttributesDialog::AttributesDialog( const TQMap<TQString, TQString> &attributes, mLineEditDict.insert( it.key(), lineedit ); lineedit->setText( it.data() ); label->setBuddy( lineedit ); - tqlayout->addWidget( label, i, j ); - tqlayout->addWidget( lineedit, i, j+1 ); + layout->addWidget( label, i, j ); + layout->addWidget( lineedit, i, j+1 ); } 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; @@ -338,8 +338,8 @@ OfflineDialog::OfflineDialog( bool autoCache, int cachePolicy, const KURL &src, Ok, parent, name, true, true ) { TQFrame *page = plainPage(); - TQVBoxLayout *tqlayout = new TQVBoxLayout( page ); - tqlayout->setAutoAdd( true ); + TQVBoxLayout *layout = new TQVBoxLayout( page ); + layout->setAutoAdd( true ); mSrc = src; mDst = dst; mCacheGroup = new TQButtonGroup( 1, Qt::Horizontal, 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/plugins/sql/resourcesqlconfig.cpp b/kabc/plugins/sql/resourcesqlconfig.cpp index 403f8a6d0..ef1651cde 100644 --- a/kabc/plugins/sql/resourcesqlconfig.cpp +++ b/kabc/plugins/sql/resourcesqlconfig.cpp @@ -60,7 +60,7 @@ ResourceSqlConfig::ResourceSqlConfig( TQWidget* parent, const char* name ) label = new TQLabel( i18n( "Port:" ), this ); TQVBox *box = new TQVBox(this); mPort = new TQSpinBox(0, 65535, 1, box ); - mPort->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred)); + mPort->setSizePolicy(TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred)); mPort->setValue(389); new TQWidget(box, "dummy"); diff --git a/kabc/resource.cpp b/kabc/resource.cpp index c4ed66946..d43c68320 100644 --- a/kabc/resource.cpp +++ b/kabc/resource.cpp @@ -266,9 +266,9 @@ void Resource::removeAddressee( const Addressee &addr ) mAddrMap.erase( addr.uid() ); } -Addressee Resource::tqfindByUid( const TQString &uid ) +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(); @@ -276,7 +276,7 @@ Addressee Resource::tqfindByUid( const TQString &uid ) return Addressee(); } -Addressee::List Resource::tqfindByName( const TQString &name ) +Addressee::List Resource::findByName( const TQString &name ) { Addressee::List results; @@ -289,7 +289,7 @@ Addressee::List Resource::tqfindByName( const TQString &name ) return results; } -Addressee::List Resource::tqfindByEmail( const TQString &email ) +Addressee::List Resource::findByEmail( const TQString &email ) { Addressee::List results; const TQString lowerEmail = email.lower(); @@ -306,7 +306,7 @@ Addressee::List Resource::tqfindByEmail( const TQString &email ) return results; } -Addressee::List Resource::tqfindByCategory( const TQString &category ) +Addressee::List Resource::findByCategory( const TQString &category ) { Addressee::List results; diff --git a/kabc/resource.h b/kabc/resource.h index 9028914e2..0412a22b1 100644 --- a/kabc/resource.h +++ b/kabc/resource.h @@ -230,7 +230,7 @@ class KABC_EXPORT Resource : public KRES::Resource @return The addressee with the specified unique identifier or an empty addressee. */ - virtual Addressee tqfindByUid( const TQString &uid ); + virtual Addressee findByUid( const TQString &uid ); /** Searches all addressees which match the specified name. @@ -238,7 +238,7 @@ class KABC_EXPORT Resource : public KRES::Resource @param name The name you are looking for. @return A list of all matching addressees. */ - virtual Addressee::List tqfindByName( const TQString &name ); + virtual Addressee::List findByName( const TQString &name ); /** Searches all addressees which match the specified email address. @@ -246,7 +246,7 @@ class KABC_EXPORT Resource : public KRES::Resource @param email The email address you are looking for. @return A list of all matching addressees. */ - virtual Addressee::List tqfindByEmail( const TQString &email ); + virtual Addressee::List findByEmail( const TQString &email ); /** Searches all addressees which belongs to the specified category. @@ -254,7 +254,7 @@ class KABC_EXPORT Resource : public KRES::Resource @param category The category you are looking for. @return A list of all matching addressees. */ - virtual Addressee::List tqfindByCategory( const TQString &category ); + virtual Addressee::List findByCategory( const TQString &category ); /** Removes all addressees from the resource. diff --git a/kabc/resourceselectdialog.cpp b/kabc/resourceselectdialog.cpp index 91a86057e..a52754be3 100644 --- a/kabc/resourceselectdialog.cpp +++ b/kabc/resourceselectdialog.cpp @@ -56,7 +56,7 @@ ResourceSelectDialog::ResourceSelectDialog( AddressBook *ab, TQWidget *parent, c buttonBox->addStretch(); buttonBox->addButton( KStdGuiItem::ok(), this, TQT_SLOT( accept() ) ); buttonBox->addButton( KStdGuiItem::cancel(), this, TQT_SLOT( reject() ) ); - buttonBox->tqlayout(); + buttonBox->layout(); mainLayout->addWidget( buttonBox ); diff --git a/kabc/scripts/addressee.src.cpp b/kabc/scripts/addressee.src.cpp index 3665a5417..36c449f19 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; @@ -233,7 +233,7 @@ void Addressee::setNameFromString( const TQString &s ) TQString suffix; while ( rightOffset >= 0 ) { - if ( helper->tqcontainsSuffix( parts[ rightOffset ] ) ) { + if ( helper->containsSuffix( parts[ rightOffset ] ) ) { suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? emptyStr : spaceStr)); rightOffset--; } else @@ -246,7 +246,7 @@ void Addressee::setNameFromString( const TQString &s ) TQStringList inclusionList; for ( int n = 1; (rightOffset - n >= 0) && (n < 4); ++n ) { - if ( helper->tqcontainsPrefix( parts[ rightOffset - n ].lower() ) ) { + if ( helper->containsPrefix( parts[ rightOffset - n ].lower() ) ) { inclusionList.prepend( parts[ rightOffset - n ] ); } else break; @@ -264,7 +264,7 @@ void Addressee::setNameFromString( const TQString &s ) TQString prefix; while ( leftOffset < rightOffset ) { - if ( helper->tqcontainsTitle( parts[ leftOffset ] ) ) { + if ( helper->containsTitle( parts[ leftOffset ] ) ) { prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); leftOffset++; } else @@ -295,7 +295,7 @@ void Addressee::setNameFromString( const TQString &s ) TQString suffix; while ( rightOffset >= 0 ) { - if ( helper->tqcontainsSuffix( parts[ rightOffset ] ) ) { + if ( helper->containsSuffix( parts[ rightOffset ] ) ) { suffix.prepend(parts[ rightOffset ] + (suffix.isEmpty() ? emptyStr : spaceStr)); rightOffset--; } else @@ -303,7 +303,7 @@ void Addressee::setNameFromString( const TQString &s ) } setSuffix( suffix ); - if ( rightOffset - 1 >= 0 && helper->tqcontainsPrefix( parts[ rightOffset - 1 ].lower() ) ) { + if ( rightOffset - 1 >= 0 && helper->containsPrefix( parts[ rightOffset - 1 ].lower() ) ) { setFamilyName( parts[ rightOffset - 1 ] + spaceStr + parts[ rightOffset ] ); rightOffset--; } else @@ -311,7 +311,7 @@ void Addressee::setNameFromString( const TQString &s ) TQString prefix; while ( leftOffset < rightOffset ) { - if ( helper->tqcontainsTitle( parts[ leftOffset ] ) ) { + if ( helper->containsTitle( parts[ leftOffset ] ) ) { prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); leftOffset++; } else @@ -332,7 +332,7 @@ void Addressee::setNameFromString( const TQString &s ) TQString prefix; while ( leftOffset < rightOffset ) { - if ( helper->tqcontainsTitle( parts[ leftOffset ] ) ) { + if ( helper->containsTitle( parts[ leftOffset ] ) ) { prefix.append( ( prefix.isEmpty() ? emptyStr : spaceStr) + parts[ leftOffset ] ); leftOffset++; } else @@ -398,9 +398,9 @@ 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.tqreplace( "\"", "\\\"" ); + name.replace( "\"", "\\\"" ); text = "\"" + name + "\" <" + e + ">"; } else text = realName() + " <" + 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 ); @@ -520,7 +520,7 @@ PhoneNumber::List Addressee::phoneNumbers( int type ) const return list; } -PhoneNumber Addressee::tqfindPhoneNumber( const TQString &id ) const +PhoneNumber Addressee::findPhoneNumber( const TQString &id ) const { PhoneNumber::List::ConstIterator it; for( it = mData->phoneNumbers.constBegin(); it != mData->phoneNumbers.constEnd(); ++it ) { @@ -612,7 +612,7 @@ Key::List Addressee::keys( int type, TQString customTypeString ) const return list; } -Key Addressee::tqfindKey( const TQString &id ) const +Key Addressee::findKey( const TQString &id ) const { Key::List::ConstIterator it; for( it = mData->keys.constBegin(); it != mData->keys.constEnd(); ++it ) { @@ -739,7 +739,7 @@ Address::List Addressee::addresses( int type ) const return list; } -Address Addressee::tqfindAddress( const TQString &id ) const +Address Addressee::findAddress( const TQString &id ) const { Address::List::ConstIterator it; for( it = mData->addresses.constBegin(); it != mData->addresses.constEnd(); ++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/scripts/addressee.src.h b/kabc/scripts/addressee.src.h index 4b01d9963..f87edc5ec 100644 --- a/kabc/scripts/addressee.src.h +++ b/kabc/scripts/addressee.src.h @@ -213,7 +213,7 @@ class KABC_EXPORT Addressee /** Return phone number with the given id. */ - PhoneNumber tqfindPhoneNumber( const TQString &id ) const; + PhoneNumber findPhoneNumber( const TQString &id ) const; /** Insert a key. If a key with the same id already exists @@ -257,7 +257,7 @@ class KABC_EXPORT Addressee /** Return key with the given id. */ - Key tqfindKey( const TQString &id ) const; + Key findKey( const TQString &id ) const; /** Insert an address. If an address with the same id already exists @@ -289,7 +289,7 @@ class KABC_EXPORT Addressee /** Return address with the given id. */ - Address tqfindAddress( const TQString &id ) const; + Address findAddress( const TQString &id ) const; /** Insert category. If the category already exists it is not duplicated. @@ -319,7 +319,7 @@ class KABC_EXPORT Addressee /** Insert custom entry. The entry is identified by the name of the inserting application and a unique name. If an entry with the given app and name - already exists its value is tqreplaced with the new given value. + already exists its value is replaced with the new given value. An empty value isn't allowed (nothing happens if this is called with any of the three arguments being empty) diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp index 64ffd1a03..6b574d86f 100644 --- a/kabc/stdaddressbook.cpp +++ b/kabc/stdaddressbook.cpp @@ -191,7 +191,7 @@ Addressee StdAddressBook::whoAmI() KConfig config( "kabcrc" ); config.setGroup( "General" ); - return tqfindByUid( config.readEntry( "WhoAmI" ) ); + return findByUid( config.readEntry( "WhoAmI" ) ); } void StdAddressBook::setWhoAmI( const Addressee &addr ) diff --git a/kabc/tests/kabcargl.cpp b/kabc/tests/kabcargl.cpp index 2cd759d1b..b57724c15 100644 --- a/kabc/tests/kabcargl.cpp +++ b/kabc/tests/kabcargl.cpp @@ -56,7 +56,7 @@ int main(int argc,char **argv) f.close(); text = TQString::fromUtf8( text.local8Bit() ); - text.tqreplace( "\n", "\r\n" ); + text.replace( "\n", "\r\n" ); if ( !f.open( IO_WriteOnly ) ) { kdDebug() << "Error opening file '" << filename << "' for writing." << endl; diff --git a/kabc/tests/testldapclient.cpp b/kabc/tests/testldapclient.cpp index 9051bdc1c..2fa6a1c72 100644 --- a/kabc/tests/testldapclient.cpp +++ b/kabc/tests/testldapclient.cpp @@ -143,7 +143,7 @@ void TestLDAPClient::slotLDAPResult( const KABC::LdapObject& obj ) assert( !obj.attrs[ "mail" ].isEmpty() ); TQString mail = join( obj.attrs[ "mail" ], ", " ); kdDebug() << " mail:" << mail << endl; - assert( mail.tqcontains( '@' ) ); + assert( mail.contains( '@' ) ); } void TestLDAPClient::slotLDAPError( const TQString& err ) diff --git a/kabc/tests/testldapclient.h b/kabc/tests/testldapclient.h index 1995914c3..ea1293b51 100644 --- a/kabc/tests/testldapclient.h +++ b/kabc/tests/testldapclient.h @@ -24,7 +24,7 @@ #include "../ldapclient.h" typedef KABC::LdapClient LdapClient; -class TestLDAPClient : public TQObject +class TestLDAPClient : public QObject { Q_OBJECT diff --git a/kabc/tests/testlock.cpp b/kabc/tests/testlock.cpp index 380c9ab3a..4674606e0 100644 --- a/kabc/tests/testlock.cpp +++ b/kabc/tests/testlock.cpp @@ -72,8 +72,8 @@ LockWidget::LockWidget( const TQString &identifier ) TQLabel *resourceIdentifier = new TQLabel( identifier, this ); identifierLayout->addWidget( resourceIdentifier ); - mtqStatus = new TQLabel( "tqStatus: Unlocked", this ); - topLayout->addWidget( mtqStatus ); + mStatus = new TQLabel( "Status: Unlocked", this ); + topLayout->addWidget( mStatus ); TQPushButton *button = new TQPushButton( "Lock", this ); topLayout->addWidget( button ); @@ -139,7 +139,7 @@ void LockWidget::lock() if ( !mLock->lock() ) { KMessageBox::sorry( this, mLock->error() ); } else { - mtqStatus->setText( "tqStatus: Locked" ); + mStatus->setText( "Status: Locked" ); } } @@ -148,7 +148,7 @@ void LockWidget::unlock() if ( !mLock->unlock() ) { KMessageBox::sorry( this, mLock->error() ); } else { - mtqStatus->setText( "tqStatus: Unlocked" ); + mStatus->setText( "Status: Unlocked" ); } } diff --git a/kabc/tests/testlock.h b/kabc/tests/testlock.h index 7162bd203..92244cd30 100644 --- a/kabc/tests/testlock.h +++ b/kabc/tests/testlock.h @@ -44,7 +44,7 @@ class KABC_EXPORT LockWidget : public QWidget private: KABC::Lock *mLock; - TQLabel *mtqStatus; + TQLabel *mStatus; TQListView *mLockView; }; diff --git a/kabc/vcard/AdrParam.cpp b/kabc/vcard/AdrParam.cpp index 9c06bc223..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; @@ -100,7 +100,7 @@ AdrParam::_parse() return; } - if (!strRep_.tqcontains('=')) + if (!strRep_.contains('=')) return; RTokenise(strRep_, ",", adrTypeList_); diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp index a301a0244..52bcdf4f5 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 bc46b9536..aedfe5eba 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/RToken.cpp b/kabc/vcard/RToken.cpp index 582a9e1c7..b0e251a87 100644 --- a/kabc/vcard/RToken.cpp +++ b/kabc/vcard/RToken.cpp @@ -30,7 +30,7 @@ namespace VCARD { - TQ_UINT32 + Q_UINT32 RTokenise(const char * str, const char * delim, TQStrList & l) { // FIXME no stderr ! 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 ea598c5f5..98f75cb8e 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 c63e978d4..50c25da59 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/vcard/include/VCardRToken.h b/kabc/vcard/include/VCardRToken.h index 5122ef55c..0ea380267 100644 --- a/kabc/vcard/include/VCardRToken.h +++ b/kabc/vcard/include/VCardRToken.h @@ -32,7 +32,7 @@ namespace VCARD { -KVCARD_EXPORT TQ_UINT32 RTokenise(const char * str, const char * delim, TQStrList & l); +KVCARD_EXPORT Q_UINT32 RTokenise(const char * str, const char * delim, TQStrList & l); } diff --git a/kabc/vcard21parser.cpp b/kabc/vcard21parser.cpp index 87c498530..d7354539b 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 ) ); @@ -326,7 +326,7 @@ KABC::Addressee VCard21Parser::readFromString( const TQString &data) //set the addressee's delivery label tmpStr = vCard->getValue(VCARD_LABEL); if (!tmpStr.isEmpty()) { - tmpStr.tqreplace("\r\n","\n"); + tmpStr.replace("\r\n","\n"); Address tmpAddress; tmpAddress.setLabel(tmpStr); addressee.insertAddress(tmpAddress); @@ -334,7 +334,7 @@ KABC::Addressee VCard21Parser::readFromString( const TQString &data) //set the addressee's notes tmpStr = vCard->getValue(VCARD_NOTE); - tmpStr.tqreplace("\r\n","\n"); + tmpStr.replace("\r\n","\n"); addressee.setNote(tmpStr); //set the addressee's timezone @@ -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/vcardconverter.h b/kabc/vcardconverter.h index 976cea20b..dbc45f27a 100644 --- a/kabc/vcardconverter.h +++ b/kabc/vcardconverter.h @@ -75,7 +75,7 @@ class KABC_EXPORT VCardConverter ~VCardConverter(); /** - Creates a string in vCard format which tqcontains the given + Creates a string in vCard format which contains the given contact. @param addr The contact object @@ -84,7 +84,7 @@ class KABC_EXPORT VCardConverter TQString createVCard( const Addressee &addr, Version version = v3_0 ); /** - Creates a string in vCard format which tqcontains the given + Creates a string in vCard format which contains the given list of contact. @param list The list of contact objects @@ -120,7 +120,7 @@ class KABC_EXPORT VCardConverter private: /** - Split a string and tqreplaces escaped separators on the fly with + Split a string and replaces escaped separators on the fly with unescaped ones. */ TQStringList splitString( const TQChar &sep, const TQString &value ); diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp index 790f6ebb9..38d95294c 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() ) ); @@ -777,10 +777,10 @@ void VCardFormatImpl::addAgentValue( VCARD::VCard *vcard, const Agent &agent ) Addressee *addr = agent.addressee(); if ( addr ) { writeToString( (*addr), vstr ); - vstr.tqreplace( ":", "\\:" ); - vstr.tqreplace( ",", "\\," ); - vstr.tqreplace( ";", "\\;" ); - vstr.tqreplace( "\r\n", "\\n" ); + vstr.replace( ":", "\\:" ); + vstr.replace( ",", "\\," ); + vstr.replace( ";", "\\;" ); + vstr.replace( "\r\n", "\\n" ); cl.setValue( new TextValue( vstr.utf8() ) ); } else return; @@ -808,10 +808,10 @@ Agent VCardFormatImpl::readAgentValue( VCARD::ContentLine *cl ) if ( isIntern ) { TQString vstr = TQString::fromUtf8( v->asString() ); - vstr.tqreplace( "\\n", "\r\n" ); - vstr.tqreplace( "\\:", ":" ); - vstr.tqreplace( "\\,", "," ); - vstr.tqreplace( "\\;", ";" ); + vstr.replace( "\\n", "\r\n" ); + vstr.replace( "\\:", ":" ); + vstr.replace( "\\,", "," ); + vstr.replace( "\\;", ";" ); Addressee *addr = new Addressee; readFromString( vstr, *addr ); agent.setAddressee( addr ); diff --git a/kabc/vcardparser/README.testing b/kabc/vcardparser/README.testing index e412416ba..a7794931d 100644 --- a/kabc/vcardparser/README.testing +++ b/kabc/vcardparser/README.testing @@ -1,5 +1,5 @@ For testing the vcardparser there are some test files and a small testsuite -automatically checking for regressions. The tests directory tqcontains some vCard +automatically checking for regressions. The tests directory contains some vCard files and correpsonding reference output files (with an additional ".ref" suffix). For running the geression test do "make check". This will compile some test programs, parse the test files, write them out as vCard again and compare diff --git a/kabc/vcardparser/testwrite.cpp b/kabc/vcardparser/testwrite.cpp index f24f1ad25..f6e894f4b 100644 --- a/kabc/vcardparser/testwrite.cpp +++ b/kabc/vcardparser/testwrite.cpp @@ -60,7 +60,7 @@ int main( int argc, char **argv ) addressee.setOrganization( "KDE" ); addressee.setNote( "nerver\ntouch a running system" ); addressee.setProductId( "testId" ); - addressee.setRevision( TQDateTime::tqcurrentDateTime() ); + addressee.setRevision( TQDateTime::currentDateTime() ); addressee.setSortString( "koenig" ); addressee.setUrl( KURL( "http://wgess16.dyndns.org") ); addressee.setSecrecy( KABC::Secrecy( KABC::Secrecy::Confidential ) ); 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 a0e2061a4..67b1bc306 100644 --- a/kabc/vcardparser/vcardparser.cpp +++ b/kabc/vcardparser/vcardparser.cpp @@ -36,18 +36,18 @@ static TQString cr( "\\r" ); static void addEscapes( TQString &str ) { - str.tqreplace( '\\', backslash ); - str.tqreplace( ',', comma ); - str.tqreplace( '\r', cr ); - str.tqreplace( '\n', newline ); + str.replace( '\\', backslash ); + str.replace( ',', comma ); + str.replace( '\r', cr ); + str.replace( '\n', newline ); } static void removeEscapes( TQString &str ) { - str.tqreplace( cr, "\\r" ); - str.tqreplace( newline, "\n" ); - str.tqreplace( comma, "," ); - str.tqreplace( backslash, "\\" ); + str.replace( cr, "\\r" ); + str.replace( newline, "\n" ); + str.replace( comma, "," ); + str.replace( backslash, "\\" ); } VCardParser::VCardParser() @@ -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,14 +94,14 @@ 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] ); } else vCardLine.setIdentifier( params[0] ); - if ( params.count() > 1 ) { // tqfind all parameters + if ( params.count() > 1 ) { // find all parameters TQStringList::ConstIterator paramIt = params.begin(); for ( ++paramIt; paramIt != params.end(); ++paramIt ) { TQStringList pair = TQStringList::split( '=', *paramIt ); @@ -117,8 +117,8 @@ VCard::List VCardParser::parseVCards( const TQString& text ) pair.prepend( "type" ); } } - // This is pretty much a faster pair[1].tqcontains( ',' )... - if ( pair[1].tqfind( ',' ) != -1 ) { // parameter in type=x,y,z format + // This is pretty much a faster pair[1].contains( ',' )... + 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 43feb5c60..6e8dc9acc 100644 --- a/kabc/vcardtool.cpp +++ b/kabc/vcardtool.cpp @@ -98,13 +98,13 @@ TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) (*it).postalCode().isEmpty() && (*it).country().isEmpty() ); - address.append( (*it).postOfficeBox().tqreplace( ';', "\\;" ) ); - address.append( (*it).extended().tqreplace( ';', "\\;" ) ); - address.append( (*it).street().tqreplace( ';', "\\;" ) ); - address.append( (*it).locality().tqreplace( ';', "\\;" ) ); - address.append( (*it).region().tqreplace( ';', "\\;" ) ); - address.append( (*it).postalCode().tqreplace( ';', "\\;" ) ); - address.append( (*it).country().tqreplace( ';', "\\;" ) ); + address.append( (*it).postOfficeBox().replace( ';', "\\;" ) ); + address.append( (*it).extended().replace( ';', "\\;" ) ); + address.append( (*it).street().replace( ';', "\\;" ) ); + address.append( (*it).locality().replace( ';', "\\;" ) ); + address.append( (*it).region().replace( ';', "\\;" ) ); + address.append( (*it).postalCode().replace( ';', "\\;" ) ); + address.append( (*it).country().replace( ';', "\\;" ) ); VCardLine adrLine( "ADR", address.join( ";" ) ); if ( version == VCard::v2_1 && needsEncoding( address.join( ";" ) ) ) { @@ -145,7 +145,7 @@ TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) TQStringList categories = (*addrIt).categories(); TQStringList::Iterator catIt; for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) - (*catIt).tqreplace( ',', "\\," ); + (*catIt).replace( ',', "\\," ); VCardLine catLine( "CATEGORIES", categories.join( "," ) ); if ( version == VCard::v2_1 && needsEncoding( categories.join( "," ) ) ) { @@ -208,11 +208,11 @@ TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) // N TQStringList name; - name.append( (*addrIt).familyName().tqreplace( ';', "\\;" ) ); - name.append( (*addrIt).givenName().tqreplace( ';', "\\;" ) ); - name.append( (*addrIt).additionalName().tqreplace( ';', "\\;" ) ); - name.append( (*addrIt).prefix().tqreplace( ';', "\\;" ) ); - name.append( (*addrIt).suffix().tqreplace( ';', "\\;" ) ); + name.append( (*addrIt).familyName().replace( ';', "\\;" ) ); + name.append( (*addrIt).givenName().replace( ';', "\\;" ) ); + name.append( (*addrIt).additionalName().replace( ';', "\\;" ) ); + name.append( (*addrIt).prefix().replace( ';', "\\;" ) ); + name.append( (*addrIt).suffix().replace( ';', "\\;" ) ); VCardLine nLine( "N", name.join( ";" ) ); if ( version == VCard::v2_1 && needsEncoding( name.join( ";" ) ) ) { @@ -243,9 +243,9 @@ TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) // ORG TQStringList organization; - organization.append( ( *addrIt ).organization().tqreplace( ';', "\\;" ) ); + organization.append( ( *addrIt ).organization().replace( ';', "\\;" ) ); if ( !( *addrIt ).department().isEmpty() ) - organization.append( ( *addrIt ).department().tqreplace( ';', "\\;" ) ); + organization.append( ( *addrIt ).department().replace( ';', "\\;" ) ); VCardLine orgLine( "ORG", organization.join( ";" ) ); if ( version == VCard::v2_1 && needsEncoding( organization.join( ";" ) ) ) { orgLine.addParameter( "charset", "UTF-8" ); @@ -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,15 +700,15 @@ 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() ); } /* TODO: support sound types - if ( params.tqcontains( "type" ) ) + if ( params.contains( "type" ) ) snd.setType( line.parameter( "type" ) ); */ @@ -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,16 +814,16 @@ 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 { TQString str = line.value().asString(); - str.tqreplace( "\\n", "\r\n" ); - str.tqreplace( "\\N", "\r\n" ); - str.tqreplace( "\\;", ";" ); - str.tqreplace( "\\:", ":" ); - str.tqreplace( "\\,", "," ); + str.replace( "\\n", "\r\n" ); + str.replace( "\\N", "\r\n" ); + str.replace( "\\;", ";" ); + str.replace( "\\:", ":" ); + str.replace( "\\,", "," ); const Addressee::List list = parseVCards( str ); if ( list.count() > 0 ) { @@ -846,10 +846,10 @@ VCardLine VCardTool::createAgent( VCard::Version version, const Agent &agent ) list.append( *agent.addressee() ); TQString str = createVCards( list, version ); - str.tqreplace( "\r\n", "\\n" ); - str.tqreplace( ";", "\\;" ); - str.tqreplace( ":", "\\:" ); - str.tqreplace( ",", "\\," ); + str.replace( "\r\n", "\\n" ); + str.replace( ";", "\\;" ); + str.replace( ":", "\\:" ); + str.replace( ",", "\\," ); line.setValue( str ); } } else if ( !agent.url().isEmpty() ) { @@ -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.tqreplace( pos - 1, 2, sep ); - pos = value.tqfind( sep, pos ); + value.replace( pos - 1, 2, sep ); + pos = value.find( sep, pos ); } else - pos = value.tqfind( sep, pos + 1 ); + pos = value.find( sep, pos + 1 ); } } diff --git a/kabc/vcardtool.h b/kabc/vcardtool.h index 3df86067f..fbf959613 100644 --- a/kabc/vcardtool.h +++ b/kabc/vcardtool.h @@ -41,7 +41,7 @@ class KABC_EXPORT VCardTool ~VCardTool(); /** - Creates a string that tqcontains the addressees from the list in + Creates a string that contains the addressees from the list in the vCard format. */ TQString createVCards( Addressee::List list, VCard::Version version = VCard::v3_0 ); @@ -53,7 +53,7 @@ class KABC_EXPORT VCardTool private: /** - Split a string and tqreplaces escaped separators on the fly with + Split a string and replaces escaped separators on the fly with unescaped ones. */ TQStringList splitString( const TQChar &sep, const TQString &value ); |