diff options
Diffstat (limited to 'libkdepim')
38 files changed, 159 insertions, 159 deletions
diff --git a/libkdepim/addresseediffalgo.cpp b/libkdepim/addresseediffalgo.cpp index 1de2dddcc..361ec631f 100644 --- a/libkdepim/addresseediffalgo.cpp +++ b/libkdepim/addresseediffalgo.cpp @@ -135,12 +135,12 @@ void AddresseeDiffAlgo::diffList( const TQString &id, const TQValueList<L> &left, const TQValueList<L> &right ) { for ( uint i = 0; i < left.count(); ++i ) { - if ( right.tqfind( left[ i ] ) == right.end() ) + if ( right.find( left[ i ] ) == right.end() ) additionalLeftField( id, toString( left[ i ] ) ); } for ( uint i = 0; i < right.count(); ++i ) { - if ( left.tqfind( right[ i ] ) == left.end() ) + if ( left.find( right[ i ] ) == left.end() ) additionalRightField( id, toString( right[ i ] ) ); } } diff --git a/libkdepim/addresseeemailselection.cpp b/libkdepim/addresseeemailselection.cpp index 589e7e334..d0862fa27 100644 --- a/libkdepim/addresseeemailselection.cpp +++ b/libkdepim/addresseeemailselection.cpp @@ -150,7 +150,7 @@ bool AddresseeEmailSelection::itemMatches( const KABC::Addressee &addressee, uin bool AddresseeEmailSelection::itemEquals( const KABC::Addressee &addressee, uint index, const TQString &pattern ) const { return (pattern == addressee.formattedName() + " " + email( addressee, index )) || - (addressee.emails().tqcontains( pattern )); + (addressee.emails().contains( pattern )); } TQString AddresseeEmailSelection::distributionListText( const KABC::DistributionList *distributionList ) const diff --git a/libkdepim/addresseelineedit.cpp b/libkdepim/addresseelineedit.cpp index 9e42085b5..63473a6f1 100644 --- a/libkdepim/addresseelineedit.cpp +++ b/libkdepim/addresseelineedit.cpp @@ -285,13 +285,13 @@ void AddresseeLineEdit::insert( const TQString &t ) KURL url( newText ); newText = url.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 ) { - newText.tqreplace( TQRegExp("\\s*\\(at\\)\\s*"), "@" ); + else if ( newText.find("(at)") != -1 ) { + newText.replace( TQRegExp("\\s*\\(at\\)\\s*"), "@" ); } TQString contents = text(); @@ -567,7 +567,7 @@ void AddresseeLineEdit::loadContacts() KABC::Resource::Iterator it; for ( it = resource->begin(); it != resource->end(); ++it ) { TQString uid = (*it).uid(); - TQMap<TQString, TQString>::const_iterator wit = uidToResourceMap.tqfind( uid ); + TQMap<TQString, TQString>::const_iterator wit = uidToResourceMap.find( uid ); const TQString subresourceLabel = resabc->subresourceLabel( *wit ); const int weight = ( wit != uidToResourceMap.end() ) ? resabc->subresourceCompletionWeight( *wit ) : 80; const int idx = addCompletionSource( subresourceLabel, weight ); @@ -641,7 +641,7 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int const TQString givenName = addr.givenName(); const TQString familyName= addr.familyName(); const TQString nickName = addr.nickName(); - const TQString domain = email.mid( email.tqfind( '@' ) + 1 ); + const TQString domain = email.mid( email.find( '@' ) + 1 ); TQString fullEmail = addr.fullEmail( email ); //TODO: let user decide what fields to use in lookup, e.g. company, city, ... @@ -698,7 +698,7 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int * We remove the <blank> in getAdjustedCompletionItems. */ if ( isPrefEmail == prefEmailWeight ) - fullEmail.tqreplace( " <", " <" ); + fullEmail.replace( " <", " <" ); addCompletionItem( fullEmail, weight + isPrefEmail, source, &keyWords ); isPrefEmail = 0; @@ -727,7 +727,7 @@ void AddresseeLineEdit::addContact( const KABC::Addressee& addr, int weight, int bool bDone = false; int i = -1; - while( ( i = name.tqfindRev(' ') ) > 1 && !bDone ) { + while( ( i = name.findRev(' ') ) > 1 && !bDone ) { TQString sLastName( name.mid( i+1 ) ); if( ! sLastName.isEmpty() && 2 <= sLastName.length() && // last names must be at least 2 chars long @@ -758,7 +758,7 @@ void AddresseeLineEdit::addCompletionItem( const TQString& string, int weight, i { // Check if there is an exact match for item already, and use the max weight if so. // Since there's no way to get the information from KCompletion, we have to keep our own TQMap - CompletionItemsMap::iterator it = s_completionItemMap->tqfind( string ); + CompletionItemsMap::iterator it = s_completionItemMap->find( string ); if ( it != s_completionItemMap->end() ) { weight = TQMAX( ( *it ).first, weight ); ( *it ).first = weight; @@ -798,7 +798,7 @@ void AddresseeLineEdit::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 ) + ' '; s = s.mid( n + 1, 255 ).stripWhiteSpace(); @@ -821,7 +821,7 @@ void AddresseeLineEdit::slotLDAPSearchData( const KPIM::LdapResultList& adrs ) addr.setNameFromString( (*it).name ); addr.setEmails( (*it).email ); - if ( !s_ldapClientToCompletionSourceMap->tqcontains( (*it).clientNumber ) ) + if ( !s_ldapClientToCompletionSourceMap->contains( (*it).clientNumber ) ) updateLDAPWeights(); // we got results from a new source, so update the completion sources addContact( addr, (*it).completionWeight, (*s_ldapClientToCompletionSourceMap)[ (*it ).clientNumber ] ); @@ -872,13 +872,13 @@ void AddresseeLineEdit::setCompletedItems( const TQStringList& items, bool autoS // item, if there is one TQListBoxItem* item = 0; if ( oldCurrentText.isEmpty() - || ( item = completionBox->tqfindItem( oldCurrentText ) ) == 0 ) { + || ( item = completionBox->findItem( oldCurrentText ) ) == 0 ) { item = completionBox->item( 1 ); } if ( item ) { if ( itemUnderMouse ) { - TQListBoxItem *newItemUnderMouse = completionBox->tqfindItem( oldTextUnderMouse ); + TQListBoxItem *newItemUnderMouse = completionBox->findItem( oldTextUnderMouse ); // if the mouse was over an item, before, but now that's elsewhere, // move the cursor, so folks don't accidently click the wrong item if ( newItemUnderMouse ) { @@ -900,7 +900,7 @@ void AddresseeLineEdit::setCompletedItems( const TQStringList& items, bool autoS if ( autoSuggest ) { - int index = items.first().tqfind( m_searchString ); + int index = items.first().find( m_searchString ); TQString newText = items.first().mid( index ); setUserSelection(false); setCompletedText(newText,true); @@ -1020,13 +1020,13 @@ KCompletion::CompOrder KPIM::AddresseeLineEdit::completionOrder() int KPIM::AddresseeLineEdit::addCompletionSource( const TQString &source, int weight ) { - TQMap<TQString,int>::iterator it = s_completionSourceWeights->tqfind( source ); + TQMap<TQString,int>::iterator it = s_completionSourceWeights->find( source ); if ( it == s_completionSourceWeights->end() ) s_completionSourceWeights->insert( source, weight ); else (*s_completionSourceWeights)[source] = weight; - int sourceIndex = s_completionSources->tqfindIndex( source ); + int sourceIndex = s_completionSources->findIndex( source ); if ( sourceIndex == -1 ) { s_completionSources->append( source ); return s_completionSources->size() - 1; @@ -1228,7 +1228,7 @@ const TQStringList KPIM::AddresseeLineEdit::getAdjustedCompletionItems( bool ful TQMap<int, TQStringList> sections; TQStringList sortedItems; for ( TQStringList::Iterator it = items.begin(); it != items.end(); ++it, ++i ) { - CompletionItemsMap::const_iterator cit = s_completionItemMap->tqfind(*it); + CompletionItemsMap::const_iterator cit = s_completionItemMap->find(*it); if ( cit == s_completionItemMap->end() ) continue; int idx = (*cit).second; @@ -1236,14 +1236,14 @@ const TQStringList KPIM::AddresseeLineEdit::getAdjustedCompletionItems( bool ful if ( s_completion->order() == KCompletion::Weighted ) { if ( lastSourceIndex == -1 || lastSourceIndex != idx ) { const TQString sourceLabel( (*s_completionSources)[idx] ); - if ( sections.tqfind(idx) == sections.end() ) { + if ( sections.find(idx) == sections.end() ) { items.insert( it, sourceLabel ); } lastSourceIndex = idx; } (*it) = (*it).prepend( s_completionItemIndentString ); // remove preferred email sort <blank> added in addContact() - (*it).tqreplace( " <", " <" ); + (*it).replace( " <", " <" ); } sections[idx].append( *it ); diff --git a/libkdepim/addresseeselector.cpp b/libkdepim/addresseeselector.cpp index 70d587bae..d947baa1a 100644 --- a/libkdepim/addresseeselector.cpp +++ b/libkdepim/addresseeselector.cpp @@ -47,7 +47,7 @@ class AddresseeSelector::AddressBookManager void addAddressBook( const TQString &title, SelectionItem::List &list ); void clear(); - bool tqcontains( uint index, const SelectionItem& ); + bool contains( uint index, const SelectionItem& ); private: struct AddressBookEntry { @@ -79,7 +79,7 @@ TQStringList AddresseeSelector::AddressBookManager::titles() const void AddresseeSelector::AddressBookManager::addResource( KABC::Resource *resource ) { - if ( mResources.tqfind( resource ) == mResources.end() ) + if ( mResources.find( resource ) == mResources.end() ) mResources.append( resource ); } @@ -101,7 +101,7 @@ void AddresseeSelector::AddressBookManager::clear() mAddressBooks.clear(); } -bool AddresseeSelector::AddressBookManager::tqcontains( uint index, const SelectionItem &item ) +bool AddresseeSelector::AddressBookManager::contains( uint index, const SelectionItem &item ) { if ( index == 0 ) // the 'all' entry return true; @@ -362,7 +362,7 @@ void AddresseeSelector::updateAddresseeView() SelectionItem::List::Iterator it; for ( it = mSelectionItems.begin(); it != mSelectionItems.end(); ++it ) { - if ( mAddressBookManager->tqcontains( addressBookIndex, *it ) ) { + if ( mAddressBookManager->contains( addressBookIndex, *it ) ) { if ( (*it).distributionList() == 0 ) { if ( mAddresseeFilter->text().isEmpty() || mSelection->itemMatches( (*it).addressee(), (*it).index(), diff --git a/libkdepim/addresseeview.cpp b/libkdepim/addresseeview.cpp index f291e4e1d..82f0305e1 100644 --- a/libkdepim/addresseeview.cpp +++ b/libkdepim/addresseeview.cpp @@ -238,11 +238,11 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr smsURL = TQString(" (<a href=\"sms:%1\">%2</a>)" ).tqarg( number ).tqarg( i18n( "SMS") ); dynamicPart += rowFmtStr - .tqarg( (*phoneIt).typeLabel().tqreplace( " ", " " ) ) + .tqarg( (*phoneIt).typeLabel().replace( " ", " " ) ) .tqarg( TQString::tqfromLatin1( "<a href=\"%1\">%2</a>%3" ).tqarg( url ).tqarg( number ).tqarg( smsURL ) ); } else { dynamicPart += rowFmtStr - .tqarg( (*phoneIt).typeLabel().tqreplace( " ", " " ) ) + .tqarg( (*phoneIt).typeLabel().replace( " ", " " ) ) .tqarg( number ); } } @@ -296,7 +296,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr TQString formattedAddress; formattedAddress = TQStyleSheet::escape( (*addrIt).formattedAddress().stripWhiteSpace() ); - formattedAddress = formattedAddress.tqreplace( '\n', "<br>" ); + formattedAddress = formattedAddress.replace( '\n', "<br>" ); TQString link = "<a href=\"addr:" + (*addrIt).id() + "\">" + formattedAddress + "</a>"; @@ -312,7 +312,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr } } else { TQString link = "<a href=\"addr:" + (*addrIt).id() + "\">" + - (*addrIt).label().tqreplace( '\n', "<br>" ) + "</a>"; + (*addrIt).label().replace( '\n', "<br>" ) + "</a>"; if ( linkMask & AddressLinks ) { dynamicPart += rowFmtStr @@ -321,7 +321,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr } else { dynamicPart += rowFmtStr .tqarg( KABC::Address::typeLabel( (*addrIt).type() ) ) - .tqarg( (*addrIt).label().tqreplace( '\n', "<br>" ) ); + .tqarg( (*addrIt).label().replace( '\n', "<br>" ) ); } } } @@ -333,7 +333,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr // the data afterwards (keeps us safe from possible % signs // in either one). notes = TQStyleSheet::escape( addr.note() ); - notes = rowFmtStr.tqarg( i18n( "Notes" ) ).tqarg( notes.tqreplace( '\n', "<br>" ) ) ; + notes = rowFmtStr.tqarg( i18n( "Notes" ) ).tqarg( notes.replace( '\n', "<br>" ) ) ; } TQString customData; @@ -359,7 +359,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr customEntry.remove( "KADDRESSBOOK-X-" ); customEntry.remove( "KADDRESSBOOK-" ); - int pos = customEntry.tqfind( ':' ); + int pos = customEntry.find( ':' ); TQString key = customEntry.left( pos ); const TQString value = customEntry.mid( pos + 1 ); @@ -367,7 +367,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr if ( key == "BlogFeed" || key == "IMAddress" ) continue; - const TQMap<TQString, TQString>::ConstIterator keyIt = titleMap.tqfind( key ); + const TQMap<TQString, TQString>::ConstIterator keyIt = titleMap.find( key ); if ( keyIt != titleMap.end() ) key = keyIt.data(); @@ -419,7 +419,7 @@ TQString AddresseeView::vCardAsHTML( const KABC::Addressee& addr, ::KIMProxy *pr // @STYLE@ - construct the string by parts, substituting in // the styles first. There are lots of appends, but we need to // do it this way to avoid cases where the substituted string - // tqcontains %1 and the like. + // contains %1 and the like. // TQString strAddr = TQString::tqfromLatin1( "<div align=\"center\">" @@ -591,7 +591,7 @@ void AddresseeView::phoneNumberClicked( const TQString &number ) return; } - commandLine.tqreplace( "%N", number ); + commandLine.replace( "%N", number ); KRun::runCommand( commandLine ); } @@ -623,8 +623,8 @@ void AddresseeView::sendSMS( const TQString &number, const TQString &text ) *stream << text; file.close(); - commandLine.tqreplace( "%N", number ); - commandLine.tqreplace( "%F", file.name() ); + commandLine.replace( "%N", number ); + commandLine.replace( "%F", file.name() ); KRun::runCommand( commandLine ); } @@ -640,7 +640,7 @@ void AddresseeView::faxNumberClicked( const TQString &number ) return; } - commandLine.tqreplace( "%N", number ); + commandLine.replace( "%N", number ); KRun::runCommand( commandLine ); } diff --git a/libkdepim/addressesdialog.cpp b/libkdepim/addressesdialog.cpp index e874ac017..d73ab63f8 100644 --- a/libkdepim/addressesdialog.cpp +++ b/libkdepim/addressesdialog.cpp @@ -176,7 +176,7 @@ AddresseeViewItem::email() const bool AddresseeViewItem::matches(const TQString& txt) const { - return d->address.realName().tqcontains(txt, false) || d->address.preferredEmail().tqcontains(txt, false); + return d->address.realName().contains(txt, false) || d->address.preferredEmail().contains(txt, false); } void AddresseeViewItem::setSelected(bool selected) @@ -402,7 +402,7 @@ AddressesDialog::allToAddressesNoDuplicates() const TQValueList<KPIM::DistributionList::Entry>::ConstIterator eit; for( eit = eList.begin(); eit != eList.end(); ++eit ) { KABC::Addressee a = (*eit).addressee; - if ( !a.preferredEmail().isEmpty() && aList.tqfind( a ) == aList.end() ) { + if ( !a.preferredEmail().isEmpty() && aList.find( a ) == aList.end() ) { aList.append( a ) ; } } @@ -415,7 +415,7 @@ AddressesDialog::allToAddressesNoDuplicates() const TQValueList<KABC::DistributionList::Entry>::ConstIterator eit; for( eit = eList.begin(); eit != eList.end(); ++eit ) { KABC::Addressee a = (*eit).addressee; - if ( !a.preferredEmail().isEmpty() && aList.tqfind( a ) == aList.end() ) { + if ( !a.preferredEmail().isEmpty() && aList.find( a ) == aList.end() ) { aList.append( a ) ; } } @@ -678,7 +678,7 @@ AddressesDialog::addAddresseesToSelected( AddresseeViewItem *tqparent, AddresseeViewItem* address = itr.current(); ++itr; - if (selectedToAvailableMapping.tqfind(address) != 0) + if (selectedToAvailableMapping.find(address) != 0) { continue; } @@ -1043,11 +1043,11 @@ AddressesDialog::filterChanged( const TQString& txt ) } p2 = static_cast<AddresseeViewItem*>( p2->nextSibling() ); } - if ( !pcount && !p->text( 0 ).tqcontains( txt, false ) ) { + if ( !pcount && !p->text( 0 ).contains( txt, false ) ) { p->setVisible( false ); } distlistgroupVisible += pcount; - if ( p->text( 0 ).tqcontains( txt, false ) ) { + if ( p->text( 0 ).contains( txt, false ) ) { distlistgroupVisible++; } } diff --git a/libkdepim/calendardiffalgo.cpp b/libkdepim/calendardiffalgo.cpp index dc22fd30e..d1eb29b32 100644 --- a/libkdepim/calendardiffalgo.cpp +++ b/libkdepim/calendardiffalgo.cpp @@ -202,12 +202,12 @@ void CalendarDiffAlgo::diffList( const TQString &id, const TQValueList<L> &left, const TQValueList<L> &right ) { for ( uint i = 0; i < left.count(); ++i ) { - if ( right.tqfind( left[ i ] ) == right.end() ) + if ( right.find( left[ i ] ) == right.end() ) additionalLeftField( id, toString( left[ i ] ) ); } for ( uint i = 0; i < right.count(); ++i ) { - if ( left.tqfind( right[ i ] ) == left.end() ) + if ( left.find( right[ i ] ) == left.end() ) additionalRightField( id, toString( right[ i ] ) ); } } diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp index 982e11517..5b39139e4 100644 --- a/libkdepim/categoryselectdialog.cpp +++ b/libkdepim/categoryselectdialog.cpp @@ -58,7 +58,7 @@ void CategorySelectDialog::setCategories( const TQStringList &categoryList ) TQStringList::ConstIterator it; for ( it = categoryList.begin(); it != categoryList.end(); ++it ) - if ( mPrefs->mCustomCategories.tqfind( *it ) == mPrefs->mCustomCategories.end() ) + if ( mPrefs->mCustomCategories.find( *it ) == mPrefs->mCustomCategories.end() ) mPrefs->mCustomCategories.append( *it ); for ( it = mPrefs->mCustomCategories.begin(); diff --git a/libkdepim/designerfields.cpp b/libkdepim/designerfields.cpp index 31a3b7f8a..e1f767998 100644 --- a/libkdepim/designerfields.cpp +++ b/libkdepim/designerfields.cpp @@ -78,7 +78,7 @@ void DesignerFields::initGUI( const TQString &uiFile ) << "KDatePicker"; while ( it.current() ) { - if ( allowedTypes.tqcontains( it.current()->className() ) ) { + if ( allowedTypes.contains( it.current()->className() ) ) { TQString name = it.current()->name(); if ( name.startsWith( "X_" ) ) { name = name.mid( 2 ); @@ -174,7 +174,7 @@ void DesignerFields::load( DesignerFields::Storage *storage ) for ( it2 = keys.begin(); it2 != keys.end(); ++it2 ) { TQString value = storage->read( *it2 ); - TQMap<TQString, TQWidget *>::ConstIterator it = mWidgets.tqfind( *it2 ); + TQMap<TQString, TQWidget *>::ConstIterator it = mWidgets.find( *it2 ); if ( it != mWidgets.end() ) { if ( it.data()->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) ) { TQLineEdit *wdg = static_cast<TQLineEdit*>( it.data() ); @@ -244,7 +244,7 @@ void DesignerFields::setReadOnly( bool readOnly ) { TQMap<TQString, TQWidget*>::Iterator it; for ( it = mWidgets.begin(); it != mWidgets.end(); ++it ) - if ( mDisabledWidgets.tqfind( it.data() ) == mDisabledWidgets.end() ) + if ( mDisabledWidgets.find( it.data() ) == mDisabledWidgets.end() ) it.data()->setEnabled( !readOnly ); } diff --git a/libkdepim/diffalgo.cpp b/libkdepim/diffalgo.cpp index 428316568..21c476861 100644 --- a/libkdepim/diffalgo.cpp +++ b/libkdepim/diffalgo.cpp @@ -75,7 +75,7 @@ void DiffAlgo::conflictField( const TQString &id, const TQString &leftValue, void DiffAlgo::addDisplay( DiffAlgoDisplay *display ) { - if ( mDisplays.tqfind( display ) == mDisplays.end() ) + if ( mDisplays.find( display ) == mDisplays.end() ) mDisplays.append( display ); } diff --git a/libkdepim/kabcresourcecached.cpp b/libkdepim/kabcresourcecached.cpp index 7e6842bfb..d46156f6d 100644 --- a/libkdepim/kabcresourcecached.cpp +++ b/libkdepim/kabcresourcecached.cpp @@ -165,8 +165,8 @@ void ResourceCached::slotKABCSave() void ResourceCached::insertAddressee( const Addressee &addr ) { - if ( !mAddrMap.tqcontains( addr.uid() ) ) { // new contact - if ( mDeletedAddressees.tqcontains( addr.uid() ) ) { + if ( !mAddrMap.contains( addr.uid() ) ) { // new contact + if ( mDeletedAddressees.contains( addr.uid() ) ) { // it was first removed, then added, so it's an update... mDeletedAddressees.remove( addr.uid() ); @@ -178,7 +178,7 @@ void ResourceCached::insertAddressee( const Addressee &addr ) mAddrMap.insert( addr.uid(), addr ); mAddedAddressees.insert( addr.uid(), addr ); } else { - KABC::Addressee oldAddressee = mAddrMap.tqfind( addr.uid() ).data(); + KABC::Addressee oldAddressee = mAddrMap.find( addr.uid() ).data(); if ( oldAddressee != addr ) { mAddrMap.remove( addr.uid() ); mAddrMap.insert( addr.uid(), addr ); @@ -189,12 +189,12 @@ void ResourceCached::insertAddressee( const Addressee &addr ) void ResourceCached::removeAddressee( const Addressee &addr ) { - if ( mAddedAddressees.tqcontains( addr.uid() ) ) { + if ( mAddedAddressees.contains( addr.uid() ) ) { mAddedAddressees.remove( addr.uid() ); return; } - if ( mDeletedAddressees.tqfind( addr.uid() ) == mDeletedAddressees.end() ) + if ( mDeletedAddressees.find( addr.uid() ) == mDeletedAddressees.end() ) mDeletedAddressees.insert( addr.uid(), addr ); mAddrMap.remove( addr.uid() ); diff --git a/libkdepim/kcmdesignerfields.cpp b/libkdepim/kcmdesignerfields.cpp index 10edf6f8b..bc7ddb747 100644 --- a/libkdepim/kcmdesignerfields.cpp +++ b/libkdepim/kcmdesignerfields.cpp @@ -60,7 +60,7 @@ class PageItem : public TQCheckListItem : TQCheckListItem( tqparent, "", TQCheckListItem::CheckBox ), mPath( path ), mIsActive( false ) { - mName = path.mid( path.tqfindRev( '/' ) + 1 ); + mName = path.mid( path.findRev( '/' ) + 1 ); TQWidget *wdg = TQWidgetFactory::create( mPath, 0, 0 ); if ( wdg ) { @@ -85,7 +85,7 @@ class PageItem : public TQCheckListItem allowedTypes.insert( "KDatePicker", i18n( "Date" ) ); while ( it.current() ) { - if ( allowedTypes.tqfind( it.current()->className() ) != allowedTypes.end() ) { + if ( allowedTypes.find( it.current()->className() ) != allowedTypes.end() ) { TQString name = it.current()->name(); if ( name.startsWith( "X_" ) ) { new TQListViewItem( this, name, @@ -217,7 +217,7 @@ void KCMDesignerFields::loadActivePages(const TQStringList& ai) while ( it.current() ) { if ( it.current()->tqparent() == 0 ) { PageItem *item = static_cast<PageItem*>( it.current() ); - if ( ai.tqfind( item->name() ) != ai.end() ) { + if ( ai.find( item->name() ) != ai.end() ) { item->setOn( true ); item->setIsActive( true ); } @@ -361,7 +361,7 @@ void KCMDesignerFields::updatePreview( TQListViewItem *item ) "<tr><td align=\"right\"><b>%7</b></td><td>%8</td></tr>" "</table></qt>" ) .tqarg( i18n( "Key:" ) ) - .tqarg( item->text( 0 ).tqreplace("X_","X-") ) + .tqarg( item->text( 0 ).replace("X_","X-") ) .tqarg( i18n( "Type:" ) ) .tqarg( item->text( 1 ) ) .tqarg( i18n( "Classname:" ) ) diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp index 118c92c21..65dc3b8b3 100644 --- a/libkdepim/kdateedit.cpp +++ b/libkdepim/kdateedit.cpp @@ -49,7 +49,7 @@ class DateValidator : public TQValidator if ( length <= 0 ) return Intermediate; - if ( mKeywords.tqcontains( str.lower() ) ) + if ( mKeywords.contains( str.lower() ) ) return Acceptable; bool ok = false; @@ -214,7 +214,7 @@ TQDate KDateEdit::parseDate( bool *replaced ) const if ( text.isEmpty() ) result = TQDate(); - else if ( mKeywordMap.tqcontains( text.lower() ) ) { + else if ( mKeywordMap.contains( text.lower() ) ) { TQDate today = TQDate::tqcurrentDate(); int i = mKeywordMap[ text.lower() ]; if ( i >= 100 ) { @@ -286,7 +286,7 @@ bool KDateEdit::eventFilter( TQObject *object, TQEvent *event ) case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonPress: { TQMouseEvent *mouseEvent = (TQMouseEvent*)event; - if ( !TQT_TQRECT_OBJECT(mPopup->rect()).tqcontains( mouseEvent->pos() ) ) { + if ( !TQT_TQRECT_OBJECT(mPopup->rect()).contains( mouseEvent->pos() ) ) { TQPoint globalPos = mPopup->mapToGlobal( mouseEvent->pos() ); if ( TQApplication::widgetAt( globalPos, true ) == this ) { // The date picker is being closed by a click on the diff --git a/libkdepim/kfileio.h b/libkdepim/kfileio.h index 8365f1e29..928175b6f 100644 --- a/libkdepim/kfileio.h +++ b/libkdepim/kfileio.h @@ -17,7 +17,7 @@ class TQString; namespace KPIM { -/** Load a file. Returns a pointer to the memory-block that tqcontains +/** Load a file. Returns a pointer to the memory-block that contains * the loaded file. Returns a null string if the file could not be loaded. * If withDialogs is FALSE no warning dialogs are opened if there are * problems. diff --git a/libkdepim/kimportdialog.cpp b/libkdepim/kimportdialog.cpp index 904415982..0e08eec29 100644 --- a/libkdepim/kimportdialog.cpp +++ b/libkdepim/kimportdialog.cpp @@ -323,7 +323,7 @@ void KImportDialog::readFile( int rows ) pDialog.setAutoClose(true); KProgress *progress = pDialog.progressBar(); - progress->setTotalSteps( mFile.tqcontains(mSeparator, false) ); + progress->setTotalSteps( mFile.contains(mSeparator, false) ); progress->setValue(0); int progressValue = 0; @@ -443,7 +443,7 @@ void KImportDialog::setCellText(int row, int col, const TQString& text) if ((mTable->numRows() - 1) < row) mTable->setNumRows(row + 1); if ((mTable->numCols() - 1) < col) mTable->setNumCols(col + 1); - KImportColumn *c = mColumnDict.tqfind(col); + KImportColumn *c = mColumnDict.find(col); TQString formattedText; if (c) formattedText = c->preview(text,findFormat(col)); else formattedText = text; @@ -492,7 +492,7 @@ void KImportDialog::tableSelected() TQTableSelection selection = mTable->selection(mTable->currentSelection()); TQListViewItem *item = mHeaderList->firstChild(); - KImportColumn *col = mColumnDict.tqfind(selection.leftCol()); + KImportColumn *col = mColumnDict.find(selection.leftCol()); if (col) { while(item) { if (item->text(0) == col->header()) { @@ -550,9 +550,9 @@ void KImportDialog::assignColumn(TQListViewItem *item) for(int i=selection.leftCol();i<=selection.rightCol();++i) { if (i >= 0) { mTable->horizontalHeader()->setLabel(i,colItem->text(0)); - mColumnDict.tqreplace(i,colItem->column()); + mColumnDict.replace(i,colItem->column()); int format = mFormatCombo->currentItem() + 1; - mFormats.tqreplace(i,format); + mFormats.replace(i,format); colItem->column()->addColId(i); } } @@ -616,8 +616,8 @@ void KImportDialog::assignTemplate() continue; KImportColumn *col = mColumns.at(i); mTable->horizontalHeader()->setLabel( tableColumn, col->header() ); - mColumnDict.tqreplace( tableColumn, col ); - mFormats.tqreplace( tableColumn, format ); + mColumnDict.replace( tableColumn, col ); + mFormats.replace( tableColumn, format ); col->addColId( tableColumn ); } @@ -633,7 +633,7 @@ void KImportDialog::removeColumn() for(int i=selection.leftCol();i<=selection.rightCol();++i) { if (i >= 0) { mTable->horizontalHeader()->setLabel(i,TQString::number(i+1)); - KImportColumn *col = mColumnDict.tqfind(i); + KImportColumn *col = mColumnDict.find(i); if (col) { mColumnDict.remove(i); mFormats.remove(i); @@ -674,7 +674,7 @@ void KImportDialog::applyConverter() int KImportDialog::findFormat(int column) { - TQMap<int,int>::ConstIterator formatIt = mFormats.tqfind(column); + TQMap<int,int>::ConstIterator formatIt = mFormats.find(column); int format; if (formatIt == mFormats.end()) format = KImportColumn::FormatUndefined; else format = *formatIt; @@ -698,7 +698,7 @@ void KImportDialog::addColumn(KImportColumn *col) void KImportDialog::setData( uint row, uint col, const TQString &value ) { TQString val = value; - val.tqreplace( "\\n", "\n" ); + val.replace( "\\n", "\n" ); if ( row >= mData.count() ) { mData.resize( row + 1 ); @@ -713,7 +713,7 @@ void KImportDialog::setData( uint row, uint col, const TQString &value ) rowVector->resize( col + 1 ); } - KImportColumn *c = mColumnDict.tqfind( col ); + KImportColumn *c = mColumnDict.find( col ); if ( c ) rowVector->at( col ) = c->preview( val, findFormat(col) ); else @@ -734,7 +734,7 @@ void KImportDialog::saveTemplate() if ( fileName.isEmpty() ) return; - if ( !fileName.tqcontains( ".desktop" ) ) + if ( !fileName.contains( ".desktop" ) ) fileName += ".desktop"; TQString name = KInputDialog::getText( i18n( "Template Name" ), i18n( "Please enter a name for the template:" ) ); diff --git a/libkdepim/kmailcompletion.cpp b/libkdepim/kmailcompletion.cpp index 98a3cb9ee..7e71ec78c 100644 --- a/libkdepim/kmailcompletion.cpp +++ b/libkdepim/kmailcompletion.cpp @@ -44,8 +44,8 @@ TQString KMailCompletion::makeCompletion( const TQString &string ) // this should be in postProcessMatch, but postProcessMatch is const and will not allow nextMatch if ( !match.isEmpty() ){ const TQString firstMatch( match ); - while ( match.tqfind( TQRegExp( "(@)|(<.*>)" ) ) == -1 ) { - /* local email do not require @domain part, if match is an address we'll tqfind + while ( match.find( TQRegExp( "(@)|(<.*>)" ) ) == -1 ) { + /* local email do not require @domain part, if match is an address we'll find * last+first <match> in m_keyMap and we'll know that match is already a valid email. * * Distribution list do not have last+first <match> entry, they will be in mailAddr @@ -53,7 +53,7 @@ TQString KMailCompletion::makeCompletion( const TQString &string ) const TQStringList &mailAddr = m_keyMap[ match ]; //get all mailAddr for this keyword bool isEmail = false; for ( TQStringList::ConstIterator sit ( mailAddr.begin() ), sEnd( mailAddr.end() ); sit != sEnd; ++sit ) - if ( (*sit).tqfind( "<" + match + ">" ) != -1 || (*sit) == match ) { + if ( (*sit).find( "<" + match + ">" ) != -1 || (*sit) == match ) { isEmail = true; break; } @@ -77,7 +77,7 @@ void KMailCompletion::addItemWithKeys( const TQString& email, int weight, const Q_ASSERT( keyWords != 0 ); for ( TQStringList::ConstIterator it( keyWords->begin() ); it != keyWords->end(); ++it ) { TQStringList &emailList = m_keyMap[ (*it) ]; //lookup email-list for given keyword - if ( emailList.tqfind( email ) == emailList.end() ) //add email if not there + if ( emailList.find( email ) == emailList.end() ) //add email if not there emailList.append( email ); addItem( (*it),weight ); //inform KCompletion about keyword } diff --git a/libkdepim/kmailcompletion.h b/libkdepim/kmailcompletion.h index 254507c19..868e1b2b8 100644 --- a/libkdepim/kmailcompletion.h +++ b/libkdepim/kmailcompletion.h @@ -60,7 +60,7 @@ class KMailCompletion : public KCompletion * Items may be added with KCompletion::addItem, those will only be returned as match if they * are in one of these formats: * \li contains localpart@domain - * \li tqcontains <email> + * \li contains <email> * or if they have also been added with this function. */ void addItemWithKeys( const TQString& email, int weight, const TQStringList * keyWords); diff --git a/libkdepim/komposer/core/core.cpp b/libkdepim/komposer/core/core.cpp index bffae60ed..3618b88ee 100644 --- a/libkdepim/komposer/core/core.cpp +++ b/libkdepim/komposer/core/core.cpp @@ -158,7 +158,7 @@ Core::selectEditor( Komposer::Editor *editor ) TQPtrList<KParts::Part> *partList = const_cast<TQPtrList<KParts::Part>*>( m_partManager->parts() ); - if ( partList->tqfind( part ) == -1 ) + if ( partList->find( part ) == -1 ) addPart( part ); m_partManager->setActivePart( part ); diff --git a/libkdepim/komposer/core/pluginmanager.cpp b/libkdepim/komposer/core/pluginmanager.cpp index 50ef26a96..30d52ffcd 100644 --- a/libkdepim/komposer/core/pluginmanager.cpp +++ b/libkdepim/komposer/core/pluginmanager.cpp @@ -305,7 +305,7 @@ PluginManager::loadPluginInternal( const TQString &pluginId ) return 0; } - if ( d->loadedPlugins.tqcontains( info ) ) + if ( d->loadedPlugins.contains( info ) ) return d->loadedPlugins[ info ]; int error = 0; @@ -408,7 +408,7 @@ PluginManager::plugin( const TQString &pluginId ) const if ( !info ) return 0; - if ( d->loadedPlugins.tqcontains( info ) ) + if ( d->loadedPlugins.contains( info ) ) return d->loadedPlugins[ info ]; else return 0; diff --git a/libkdepim/komposer/core/prefsmodule.cpp b/libkdepim/komposer/core/prefsmodule.cpp index 1c088e9e8..3b82f96d3 100644 --- a/libkdepim/komposer/core/prefsmodule.cpp +++ b/libkdepim/komposer/core/prefsmodule.cpp @@ -110,7 +110,7 @@ EditorSelection::readConfig() TQString name = (*it)->property( "X-KDE-KomposerIdentifier" ).toString(); m_editorsCombo->insertItem( name ); - if ( m_reference.tqcontains( name ) ) + if ( m_reference.contains( name ) ) m_editorsCombo->setCurrentItem( i ); } } diff --git a/libkdepim/komposer/plugins/default/defaulteditor.cpp b/libkdepim/komposer/plugins/default/defaulteditor.cpp index c75f63920..96458ae3d 100644 --- a/libkdepim/komposer/plugins/default/defaulteditor.cpp +++ b/libkdepim/komposer/plugins/default/defaulteditor.cpp @@ -37,7 +37,7 @@ #include <kfinddialog.h> #include <kfind.h> #include <kreplacedialog.h> -#include <ktqreplace.h> +#include <kreplace.h> #include <tqtextedit.h> #include <tqwidget.h> @@ -86,10 +86,10 @@ DefaultEditor::changeSignature( const TQString &sig ) { TQString text = m_textEdit->text(); - int sigStart = text.tqfindRev( "-- " ); + int sigStart = text.findRev( "-- " ); TQString sigText = TQString( "-- \n%1" ).tqarg( sig ); - text.tqreplace( sigStart, text.length(), sigText ); + text.replace( sigStart, text.length(), sigText ); } void diff --git a/libkdepim/kpimprefs.cpp b/libkdepim/kpimprefs.cpp index 55a6a799f..730ed8f52 100644 --- a/libkdepim/kpimprefs.cpp +++ b/libkdepim/kpimprefs.cpp @@ -79,7 +79,7 @@ const TQString KPimPrefs::timezone() int len = readlink( "/etc/localtime", zonefilebuf, PATH_MAX ); if ( len > 0 && len < PATH_MAX ) { zone = TQString::fromLocal8Bit( zonefilebuf, len ); - zone = zone.mid( zone.tqfind( "zoneinfo/" ) + 9 ); + zone = zone.mid( zone.find( "zoneinfo/" ) + 9 ); kdDebug(5300) << "system timezone from /etc/localtime is " << zone << endl; } else { diff --git a/libkdepim/kpixmapregionselectorwidget.cpp b/libkdepim/kpixmapregionselectorwidget.cpp index a6d992f54..46e65524a 100644 --- a/libkdepim/kpixmapregionselectorwidget.cpp +++ b/libkdepim/kpixmapregionselectorwidget.cpp @@ -227,7 +227,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(TQObject *obj, TQEvent *ev) }; TQCursor cursor; - if ( m_selectedRegion.tqcontains( mev->pos() ) + if ( m_selectedRegion.contains( mev->pos() ) && m_selectedRegion!=m_originalPixmap.rect() ) { m_state=Moving; diff --git a/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp index bb2bdca79..38adc8fa3 100644 --- a/libkdepim/kprefsdialog.cpp +++ b/libkdepim/kprefsdialog.cpp @@ -768,7 +768,7 @@ void KPrefsDialog::autoCreate() TQWidget *page; TQGridLayout *tqlayout; int currentRow; - if ( !mGroupPages.tqcontains( group ) ) { + if ( !mGroupPages.contains( group ) ) { page = addPage( group ); tqlayout = new TQGridLayout( page ); mGroupPages.insert( group, page ); @@ -804,7 +804,7 @@ void KPrefsDialog::autoCreate() addWid( wid ); - mCurrentRows.tqreplace( group, ++currentRow ); + mCurrentRows.replace( group, ++currentRow ); } } diff --git a/libkdepim/kregexp3.cpp b/libkdepim/kregexp3.cpp index ca9725ba2..c4efa96f1 100644 --- a/libkdepim/kregexp3.cpp +++ b/libkdepim/kregexp3.cpp @@ -37,7 +37,7 @@ #include <kdebug.h> #endif -TQString KRegExp3::tqreplace( const TQString & str, +TQString KRegExp3::replace( const TQString & str, const TQString & replacementStr, int start, bool global ) { @@ -69,16 +69,16 @@ TQString KRegExp3::tqreplace( const TQString & str, if ( pos < 0 ) { literalStrs << replacementStr.mid( oldpos ) - .tqreplace( bbrx, "\\" ) - .tqreplace( brx, "" ); + .replace( bbrx, "\\" ) + .replace( brx, "" ); #ifdef DEBUG_KREGEXP3 kdDebug() << " No more matches. Last literal is \"" + literalStrs.last() + "\"" << endl; #endif break; } else { literalStrs << replacementStr.mid( oldpos, pos-oldpos ) - .tqreplace( bbrx, "\\" ) - .tqreplace( brx, "" ); + .replace( bbrx, "\\" ) + .replace( brx, "" ); #ifdef DEBUG_KREGEXP3 kdDebug() << TQString(" Inserting \"") + literalStrs.last() + "\" as literal." << endl; kdDebug() << " Searching for corresponding digit(s):" << endl; diff --git a/libkdepim/kregexp3.h b/libkdepim/kregexp3.h index 64a874d3a..c58feb9d1 100644 --- a/libkdepim/kregexp3.h +++ b/libkdepim/kregexp3.h @@ -36,11 +36,11 @@ #include <kdepimmacros.h> -/** @short A TQRegExp (TQt3.x) with a tqreplace() method. +/** @short A TQRegExp (TQt3.x) with a replace() method. This class is simply there to provide a namespace for some nice enhancements of the mighty TQRegExp (TQt3 version) regular - expression engine, namely the method tqreplace(), which can be + expression engine, namely the method replace(), which can be used to do search-and-replace like one is used to from perl or sed. It "simply" adds the ability to define a replacement string which @@ -105,7 +105,7 @@ public: Equivalent to the /g switch to perl's s/// operator. @return The modified string. */ - TQString tqreplace( const TQString & str, + TQString replace( const TQString & str, const TQString & replacementStr, int start=0, bool global=TRUE ); }; diff --git a/libkdepim/kscoring.cpp b/libkdepim/kscoring.cpp index 58595b933..cf02d88f4 100644 --- a/libkdepim/kscoring.cpp +++ b/libkdepim/kscoring.cpp @@ -47,19 +47,19 @@ static TQString toXml(const TQString& str) uint i = 0; while ( i < len ) { if (tmp[(int)i] == '<') { - tmp.tqreplace(i, 1, "<"); + tmp.replace(i, 1, "<"); len += 3; i += 4; } else if (tmp[(int)i] == '"') { - tmp.tqreplace(i, 1, """); + tmp.replace(i, 1, """); len += 5; i += 6; } else if (tmp[(int)i] == '&') { - tmp.tqreplace(i, 1, "&"); + tmp.replace(i, 1, "&"); len += 4; i += 5; } else if (tmp[(int)i] == '>') { - tmp.tqreplace(i, 1, ">"); + tmp.replace(i, 1, ">"); len += 3; i += 4; } else { @@ -91,7 +91,7 @@ NotifyDialog::NotifyDialog(TQWidget* p) void NotifyDialog::slotShowAgainToggled(bool flag) { - dict.tqreplace(msg,!flag); + dict.replace(msg,!flag); kdDebug(5100) << "note \"" << note << "\" will popup again: " << flag << endl; } @@ -101,7 +101,7 @@ void NotifyDialog::display(ScorableArticle& a, const TQString& s) if (!me) me = new NotifyDialog(); me->msg = s; - NotesMap::Iterator i = dict.tqfind(s); + NotesMap::Iterator i = dict.find(s); if (i == dict.end() || i.data()) { TQString msg = i18n("Article\n<b>%1</b><br><b>%2</b><br>caused the following" " note to appear:<br>%3"). @@ -109,7 +109,7 @@ void NotifyDialog::display(ScorableArticle& a, const TQString& s) arg(a.subject()). arg(s); me->note->setText(msg); - if ( i == dict.end() ) i = dict.tqreplace(s,false); + if ( i == dict.end() ) i = dict.replace(s,false); me->adjustSize(); me->exec(); } @@ -348,10 +348,10 @@ NotifyCollection::~NotifyCollection() void NotifyCollection::addNote(const ScorableArticle& a, const TQString& note) { - article_list *l = notifyList.tqfind(note); + article_list *l = notifyList.find(note); if (!l) { notifyList.insert(note,new article_list); - l = notifyList.tqfind(note); + l = notifyList.find(note); } article_info i; i.from = a.from(); @@ -514,7 +514,7 @@ bool KScoringExpression::match(ScorableArticle& a) const res = (head.lower() == expr_str.lower()); break; case CONTAINS: - res = (head.lower().tqfind(expr_str.lower()) >= 0); + res = (head.lower().find(expr_str.lower()) >= 0); break; case MATCH: case MATCHCS: @@ -936,7 +936,7 @@ KScoringRule* KScoringManager::addRule(const ScorableArticle& a, TQString group, KScoringRule* KScoringManager::addRule(KScoringRule* expr) { - int i = allRules.tqfindRef(expr); + int i = allRules.findRef(expr); if (i == -1) { // only add a rule we don't know addRuleInternal(expr); @@ -965,7 +965,7 @@ void KScoringManager::addRuleInternal(KScoringRule *e) void KScoringManager::cancelNewRule(KScoringRule *r) { // if e was'nt previously added to the list of rules, we delete it - int i = allRules.tqfindRef(r); + int i = allRules.findRef(r); if (i == -1) { kdDebug(5100) << "deleting rule " << r->getName() << endl; deleteRule(r); @@ -1002,7 +1002,7 @@ void KScoringManager::setRuleName(KScoringRule *r, const TQString& s) void KScoringManager::deleteRule(KScoringRule *r) { - int i = allRules.tqfindRef(r); + int i = allRules.findRef(r); if (i != -1) { allRules.remove(); emit changedRules(); @@ -1019,8 +1019,8 @@ void KScoringManager::editRule(KScoringRule *e, TQWidget *w) void KScoringManager::moveRuleAbove( KScoringRule *above, KScoringRule *below ) { - int aindex = allRules.tqfindRef( above ); - int bindex = allRules.tqfindRef( below ); + int aindex = allRules.findRef( above ); + int bindex = allRules.findRef( below ); if ( aindex <= 0 || bindex < 0 ) return; if ( aindex < bindex ) @@ -1031,8 +1031,8 @@ void KScoringManager::moveRuleAbove( KScoringRule *above, KScoringRule *below ) void KScoringManager::moveRuleBelow( KScoringRule *below, KScoringRule *above ) { - int bindex = allRules.tqfindRef( below ); - int aindex = allRules.tqfindRef( above ); + int bindex = allRules.findRef( below ); + int aindex = allRules.findRef( above ); if ( bindex < 0 || bindex >= (int)allRules.count() - 1 || aindex < 0 ) return; if ( bindex < aindex ) diff --git a/libkdepim/ksubscription.cpp b/libkdepim/ksubscription.cpp index 512ef3453..f5aef4a4b 100644 --- a/libkdepim/ksubscription.cpp +++ b/libkdepim/ksubscription.cpp @@ -511,7 +511,7 @@ void KSubscription::filterChanged( TQListViewItem* item, const TQString & text ) continue; } if ( !text.isEmpty() && - gr->text(0).tqfind(text, 0, false) == -1) + gr->text(0).find(text, 0, false) == -1) { // searchfield gr->setVisible(false); diff --git a/libkdepim/kwidgetlister.cpp b/libkdepim/kwidgetlister.cpp index 98c6062be..bc9d89803 100644 --- a/libkdepim/kwidgetlister.cpp +++ b/libkdepim/kwidgetlister.cpp @@ -125,7 +125,7 @@ void KWidgetLister::addWidgetAtEnd(TQWidget *w) { if (!w) w = this->createWidget(this); - mLayout->insertWidget( mLayout->tqfindWidget( mButtonBox ), w ); + mLayout->insertWidget( mLayout->findWidget( mButtonBox ), w ); mWidgetList.append( w ); w->show(); enableControls(); diff --git a/libkdepim/kxface.cpp b/libkdepim/kxface.cpp index 6af87cef9..c8d11447f 100644 --- a/libkdepim/kxface.cpp +++ b/libkdepim/kxface.cpp @@ -94,8 +94,8 @@ TQString KXFace::fromImage( const TQImage &image ) buffer.open( IO_WriteOnly ); scaledImg.save( &buffer, "XBM" ); TQString xbm( ba ); - xbm.remove( 0, xbm.tqfind( "{" ) + 1 ); - xbm.truncate( xbm.tqfind( "}" ) ); + xbm.remove( 0, xbm.find( "{" ) + 1 ); + xbm.truncate( xbm.find( "}" ) ); xbm.remove( " " ); xbm.remove( "," ); xbm.remove( "0x" ); @@ -132,8 +132,8 @@ TQString KXFace::fromImage( const TQImage &image ) tmp[i-1] = t; } } - tmp.tqreplace( TQRegExp( "(\\w{12})" ), "\\1\n" ); - tmp.tqreplace( TQRegExp( "(\\w{4})" ), "0x\\1," ); + tmp.replace( TQRegExp( "(\\w{12})" ), "\\1\n" ); + tmp.replace( TQRegExp( "(\\w{4})" ), "0x\\1," ); len = tmp.length(); char *fbuf = (char *)malloc( len + 1 ); strncpy( fbuf, (const char *)tmp, len ); diff --git a/libkdepim/ldapclient.cpp b/libkdepim/ldapclient.cpp index 2f29b7633..a7dcfcd26 100644 --- a/libkdepim/ldapclient.cpp +++ b/libkdepim/ldapclient.cpp @@ -196,7 +196,7 @@ void LdapClient::finishCurrentObject() mCurrentObject.dn = mLdif.dn(); const TQString sClass( mCurrentObject.objectClass.lower() ); if( sClass == "groupofnames" || sClass == "kolabgroupofnames" ){ - LdapAttrMap::ConstIterator it = mCurrentObject.attrs.tqfind("mail"); + LdapAttrMap::ConstIterator it = mCurrentObject.attrs.find("mail"); if( it == mCurrentObject.attrs.end() ){ // No explicit mail address found so far? // Fine, then we use the address stored in the DN. @@ -423,11 +423,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 @@ -575,7 +575,7 @@ void LdapSearch::makeSearchData( TQStringList& ret, LdapResultList& resList ) // must use the correct SMTP server, by definition. // //mail = (*it1).client->base().simplifyWhiteSpace(); - //mail.tqreplace( ",dc=", ".", false ); + //mail.replace( ",dc=", ".", false ); //if( mail.startsWith("dc=", false) ) // mail.remove(0, 3); //mail.prepend( '@' ); diff --git a/libkdepim/linklocator.cpp b/libkdepim/linklocator.cpp index e0c4c0d24..399c5d3b3 100644 --- a/libkdepim/linklocator.cpp +++ b/libkdepim/linklocator.cpp @@ -92,14 +92,14 @@ TQString LinkLocator::getUrl() // handle cases like this: <link>http://foobar.org/</link> int start = mPos; while(mPos < (int)mText.length() && mText[mPos] > ' ' && mText[mPos] != '"' && - TQString("<>()[]").tqfind(mText[mPos]) == -1) + TQString("<>()[]").find(mText[mPos]) == -1) { ++mPos; } /* some URLs really end with: # / & - _ */ const TQString allowedSpecialChars = TQString("#/&-_"); while(mPos > start && mText[mPos-1].isPunct() && - allowedSpecialChars.tqfind(mText[mPos-1]) == -1 ) + allowedSpecialChars.find(mText[mPos-1]) == -1 ) { --mPos; } @@ -128,7 +128,7 @@ bool LinkLocator::atUrl() const // the character directly before the URL must not be a letter, a number or // any other character allowed in a dot-atom (RFC 2822). if( ( mPos > 0 ) && ( mText[mPos-1].isLetterOrNumber() || - ( allowedSpecialChars.tqfind( mText[mPos-1] ) != -1 ) ) ) + ( allowedSpecialChars.find( mText[mPos-1] ) != -1 ) ) ) return false; TQChar ch = mText[mPos]; @@ -179,9 +179,9 @@ TQString LinkLocator::getEmailAddress() while ( start >= 0 && mText[start].tqunicode() < 128 && ( mText[start].isLetterOrNumber() || mText[start] == '@' || // allow @ to find invalid email addresses - allowedSpecialChars.tqfind( mText[start] ) != -1 ) ) { + allowedSpecialChars.find( mText[start] ) != -1 ) ) { if ( mText[start] == '@' ) - return TQString(); // local part tqcontains '@' -> no email address + return TQString(); // local part contains '@' -> no email address --start; } ++start; @@ -200,7 +200,7 @@ TQString LinkLocator::getEmailAddress() mText[end] == '.' || mText[end] == '-' ) ) { if ( mText[end] == '@' ) - return TQString(); // domain part tqcontains '@' -> no email address + return TQString(); // domain part contains '@' -> no email address if ( mText[end] == '.' ) dotPos = TQMIN( dotPos, end ); // remember index of first dot in domain ++end; @@ -305,7 +305,7 @@ TQString LinkLocator::convertToHtml(const TQString& plainText, int flags, else hyperlink = str; - str = str.tqreplace('&', "&"); + str = str.replace('&', "&"); result += "<a href=\"" + hyperlink + "\">" + str + "</a>"; x += locator.mPos - start; continue; @@ -314,12 +314,12 @@ TQString LinkLocator::convertToHtml(const TQString& plainText, int flags, if(!str.isEmpty()) { // len is the length of the local part - int len = str.tqfind('@'); + int len = str.find('@'); TQString localPart = str.left(len); // remove the local part from the result (as '&'s have been expanded to // & we have to take care of the 4 additional characters per '&') - result.truncate(result.length() - len - (localPart.tqcontains('&')*4)); + result.truncate(result.length() - len - (localPart.contains('&')*4)); x -= len; result += "<a href=\"mailto:" + str + "\">" + str + "</a>"; @@ -390,11 +390,11 @@ TQString LinkLocator::getEmoticon() return TQString(); const TQString smiley = mText.mid( mPos, smileyLen ); - if ( !s_smileyEmoticonNameMap->tqcontains( smiley ) ) + if ( !s_smileyEmoticonNameMap->contains( smiley ) ) return TQString(); // that's not a (known) smiley TQString htmlRep; - if ( s_smileyEmoticonHTMLCache->tqcontains( smiley ) ) { + if ( s_smileyEmoticonHTMLCache->contains( smiley ) ) { htmlRep = (*s_smileyEmoticonHTMLCache)[smiley]; } else { diff --git a/libkdepim/pluginloaderbase.cpp b/libkdepim/pluginloaderbase.cpp index 9be0ffd05..40a4beb2f 100644 --- a/libkdepim/pluginloaderbase.cpp +++ b/libkdepim/pluginloaderbase.cpp @@ -58,7 +58,7 @@ namespace KPIM { } const PluginMetaData * PluginLoaderBase::infoForName( const TQString & type ) const { - return mPluginMap.tqcontains( type ) ? &(mPluginMap[type]) : 0 ; + return mPluginMap.contains( type ) ? &(mPluginMap[type]) : 0 ; } @@ -114,7 +114,7 @@ namespace KPIM { void * PluginLoaderBase::mainFunc( const TQString & type, const char * mf_name ) const { - if ( type.isEmpty() || !mPluginMap.tqcontains( type ) ) + if ( type.isEmpty() || !mPluginMap.contains( type ) ) return 0; const TQString libName = mPluginMap[ type ].library; diff --git a/libkdepim/progressdialog.cpp b/libkdepim/progressdialog.cpp index 580830dec..e12a1b758 100644 --- a/libkdepim/progressdialog.cpp +++ b/libkdepim/progressdialog.cpp @@ -309,7 +309,7 @@ void ProgressDialog::slotTransactionAdded( ProgressItem *item ) { TransactionItem *tqparent = 0; if ( item->tqparent() ) { - if ( mTransactionsToListviewItems.tqcontains( item->tqparent() ) ) { + if ( mTransactionsToListviewItems.contains( item->tqparent() ) ) { tqparent = mTransactionsToListviewItems[ item->tqparent() ]; tqparent->addSubTransaction( item ); } @@ -317,7 +317,7 @@ void ProgressDialog::slotTransactionAdded( ProgressItem *item ) const bool first = mTransactionsToListviewItems.empty(); TransactionItem *ti = mScrollView->addTransactionItem( item, first ); if ( ti ) - mTransactionsToListviewItems.tqreplace( item, ti ); + mTransactionsToListviewItems.replace( item, ti ); if ( first && mWasLastShown ) TQTimer::singleShot( 1000, this, TQT_SLOT( slotShow() ) ); @@ -326,7 +326,7 @@ void ProgressDialog::slotTransactionAdded( ProgressItem *item ) void ProgressDialog::slotTransactionCompleted( ProgressItem *item ) { - if ( mTransactionsToListviewItems.tqcontains( item ) ) { + if ( mTransactionsToListviewItems.contains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; mTransactionsToListviewItems.remove( item ); ti->setItemComplete(); @@ -347,7 +347,7 @@ void ProgressDialog::slotTransactionCanceled( ProgressItem* ) void ProgressDialog::slotTransactionProgress( ProgressItem *item, unsigned int progress ) { - if ( mTransactionsToListviewItems.tqcontains( item ) ) { + if ( mTransactionsToListviewItems.contains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; ti->setProgress( progress ); } @@ -356,7 +356,7 @@ void ProgressDialog::slotTransactionProgress( ProgressItem *item, void ProgressDialog::slotTransactiontqStatus( ProgressItem *item, const TQString& status ) { - if ( mTransactionsToListviewItems.tqcontains( item ) ) { + if ( mTransactionsToListviewItems.contains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; ti->setqStatus( status ); } @@ -365,7 +365,7 @@ void ProgressDialog::slotTransactiontqStatus( ProgressItem *item, void ProgressDialog::slotTransactionLabel( ProgressItem *item, const TQString& label ) { - if ( mTransactionsToListviewItems.tqcontains( item ) ) { + if ( mTransactionsToListviewItems.contains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; ti->setLabel( label ); } @@ -375,7 +375,7 @@ void ProgressDialog::slotTransactionLabel( ProgressItem *item, void ProgressDialog::slotTransactionUsesCrypto( ProgressItem *item, bool value ) { - if ( mTransactionsToListviewItems.tqcontains( item ) ) { + if ( mTransactionsToListviewItems.contains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; ti->setCrypto( value ); } @@ -383,7 +383,7 @@ void ProgressDialog::slotTransactionUsesCrypto( ProgressItem *item, void ProgressDialog::slotTransactionUsesBusyIndicator( KPIM::ProgressItem *item, bool value ) { - if ( mTransactionsToListviewItems.tqcontains( item ) ) { + if ( mTransactionsToListviewItems.contains( item ) ) { TransactionItem *ti = mTransactionsToListviewItems[ item ]; if ( value ) ti->setTotalSteps( 0 ); diff --git a/libkdepim/progressmanager.cpp b/libkdepim/progressmanager.cpp index de305212d..9dd80c9dc 100644 --- a/libkdepim/progressmanager.cpp +++ b/libkdepim/progressmanager.cpp @@ -66,7 +66,7 @@ void ProgressItem::setComplete() void ProgressItem::addChild( ProgressItem *kiddo ) { - mChildren.tqreplace( kiddo, true ); + mChildren.replace( kiddo, true ); } void ProgressItem::removeChild( ProgressItem *kiddo ) diff --git a/libkdepim/qutf7codec.cpp b/libkdepim/qutf7codec.cpp index 630dcaa25..db6589cd9 100644 --- a/libkdepim/qutf7codec.cpp +++ b/libkdepim/qutf7codec.cpp @@ -183,7 +183,7 @@ public: qWarning("TQUtf7Decoder: 8bit char found in input. " "Parser has been re-initialized!"); resetParser(); - result += TQChar::tqreplacement; + result += TQChar::replacement; continue; } diff --git a/libkdepim/spellingfilter.cpp b/libkdepim/spellingfilter.cpp index a08610983..cc94968d4 100644 --- a/libkdepim/spellingfilter.cpp +++ b/libkdepim/spellingfilter.cpp @@ -89,7 +89,7 @@ void SpellingFilter::TextCensor::censorQuotations(const TQString& quotePrefix) int len = mPos - start; TQString spaces; spaces.fill(' ', len); - mText.tqreplace(start, len, spaces); + mText.replace(start, len, spaces); //kdDebug(5006) << "censored quotation [" // << start << ", " << mPos << ")" << endl; @@ -116,7 +116,7 @@ void SpellingFilter::TextCensor::censorUrls() // Replace url with spaces url.fill(' '); - mText.tqreplace(start, url.length(), url); + mText.replace(start, url.length(), url); //kdDebug(5006) << "censored url [" // << start << ", " << mPos << ")" << endl; @@ -141,7 +141,7 @@ void SpellingFilter::TextCensor::censorEmailAddresses() // Replace address with spaces address.fill(' '); - mText.tqreplace(start, address.length(), address); + mText.replace(start, address.length(), address); //kdDebug(5006) << "censored addr [" // << start << ", "<< mPos << ")" << endl; @@ -156,13 +156,13 @@ void SpellingFilter::TextCensor::censorString(const TQString& s) while(mPos != -1) { // Find start of string - mPos = mText.tqfind(s, mPos); + mPos = mText.find(s, mPos); if(mPos != -1) { // Replace string with spaces TQString spaces; spaces.fill(' ', s.length()); - mText.tqreplace(mPos, s.length(), spaces); + mText.replace(mPos, s.length(), spaces); mPos += s.length(); //kdDebug(5006) << "censored string [" @@ -187,7 +187,7 @@ bool SpellingFilter::TextCensor::atLineStart() const void SpellingFilter::TextCensor::skipLine() { - mPos = mText.tqfind('\n', mPos); + mPos = mText.find('\n', mPos); if(mPos == -1) mPos = static_cast<int>(mText.length()); else diff --git a/libkdepim/tests/test_kregexp.cpp b/libkdepim/tests/test_kregexp.cpp index 0644bbba5..511687d07 100644 --- a/libkdepim/tests/test_kregexp.cpp +++ b/libkdepim/tests/test_kregexp.cpp @@ -9,7 +9,7 @@ main() // test for http://bugs.kde.org/show_bug.cgi?id=54886 KRegExp3 reg("^"); - TQString res = reg.tqreplace(TQString::tqfromLatin1("Fun stuff"), + TQString res = reg.replace(TQString::tqfromLatin1("Fun stuff"), TQString::tqfromLatin1("[fun] ")); kdDebug() << res << endl; |