diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 4c6f8d69e2d1501837affb472c4eb8fec4462240 (patch) | |
tree | 766a8ad7939fcf3eec534184c36bd0e0f80489e2 /kresources/lib | |
parent | 469cc56a805bd3d6940d54adbef554877c29853c (diff) | |
download | tdepim-4c6f8d69e2d1501837affb472c4eb8fec4462240.tar.gz tdepim-4c6f8d69e2d1501837affb472c4eb8fec4462240.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kresources/lib')
-rw-r--r-- | kresources/lib/calendaradaptor.cpp | 4 | ||||
-rw-r--r-- | kresources/lib/folderconfig.cpp | 12 | ||||
-rw-r--r-- | kresources/lib/folderlister.cpp | 12 | ||||
-rw-r--r-- | kresources/lib/folderlistview.cpp | 30 | ||||
-rw-r--r-- | kresources/lib/folderlistview.h | 6 | ||||
-rw-r--r-- | kresources/lib/groupwaredataadaptor.cpp | 6 | ||||
-rw-r--r-- | kresources/lib/groupwaredataadaptor.h | 2 | ||||
-rw-r--r-- | kresources/lib/groupwaredownloadjob.cpp | 18 | ||||
-rw-r--r-- | kresources/lib/webdavhandler.cpp | 4 |
9 files changed, 47 insertions, 47 deletions
diff --git a/kresources/lib/calendaradaptor.cpp b/kresources/lib/calendaradaptor.cpp index 9c6084b92..88685bdfe 100644 --- a/kresources/lib/calendaradaptor.cpp +++ b/kresources/lib/calendaradaptor.cpp @@ -75,11 +75,11 @@ bool CalendarAdaptor::localItemHasChanged( const TQString &localId ) if ( !i ) return false; if ( !mResource->deletedIncidences().isEmpty() && - mResource->deletedIncidences().tqfind( i ) + mResource->deletedIncidences().find( i ) != mResource->deletedIncidences().end() ) return true; if ( !mResource->changedIncidences().isEmpty() && - mResource->changedIncidences().tqfind( i ) + mResource->changedIncidences().find( i ) != mResource->changedIncidences().end() ) return true; diff --git a/kresources/lib/folderconfig.cpp b/kresources/lib/folderconfig.cpp index f8feb456f..f5af726ac 100644 --- a/kresources/lib/folderconfig.cpp +++ b/kresources/lib/folderconfig.cpp @@ -73,12 +73,12 @@ void FolderConfig::setFolderLister( FolderLister *f ) TQValueList<FolderListView::Property> types; TQValueList<FolderLister::ContentType> suptypes( mFolderLister->supportedTypes() ); - if ( suptypes.tqcontains( FolderLister::Event ) ) types << FolderListView::Event; - if ( suptypes.tqcontains( FolderLister::Todo ) ) types << FolderListView::Todo; - if ( suptypes.tqcontains( FolderLister::Journal ) ) types << FolderListView::Journal; - if ( suptypes.tqcontains( FolderLister::Contact ) ) types << FolderListView::Contact; - if ( suptypes.tqcontains( FolderLister::All ) ) types << FolderListView::All; - if ( suptypes.tqcontains( FolderLister::Unknown ) ) types << FolderListView::Unknown; + if ( suptypes.contains( FolderLister::Event ) ) types << FolderListView::Event; + if ( suptypes.contains( FolderLister::Todo ) ) types << FolderListView::Todo; + if ( suptypes.contains( FolderLister::Journal ) ) types << FolderListView::Journal; + if ( suptypes.contains( FolderLister::Contact ) ) types << FolderListView::Contact; + if ( suptypes.contains( FolderLister::All ) ) types << FolderListView::All; + if ( suptypes.contains( FolderLister::Unknown ) ) types << FolderListView::Unknown; mFolderList->setEnabledTypes( types ); connect( mFolderLister, TQT_SIGNAL( foldersRead() ), TQT_SLOT( updateFolderList() ) ); diff --git a/kresources/lib/folderlister.cpp b/kresources/lib/folderlister.cpp index 9436a6f92..eec969c26 100644 --- a/kresources/lib/folderlister.cpp +++ b/kresources/lib/folderlister.cpp @@ -50,11 +50,11 @@ void FolderLister::setWriteDestinationId( KPIM::FolderLister::ContentType type, TQString FolderLister::writeDestinationId( KPIM::FolderLister::ContentType type ) const { - if ( mWriteDestinationId.tqcontains( type ) ) { + if ( mWriteDestinationId.contains( type ) ) { return mWriteDestinationId[type]; - } else if ( mWriteDestinationId.tqcontains( KPIM::FolderLister::All ) ) { + } else if ( mWriteDestinationId.contains( KPIM::FolderLister::All ) ) { return mWriteDestinationId[ KPIM::FolderLister::All ]; - } else if ( mWriteDestinationId.tqcontains( KPIM::FolderLister::Unknown ) ) { + } else if ( mWriteDestinationId.contains( KPIM::FolderLister::Unknown ) ) { return mWriteDestinationId[ KPIM::FolderLister::Unknown ]; } else return TQString(); } @@ -151,7 +151,7 @@ void FolderLister::readConfig( KPIM::GroupwarePrefsBase *newprefs ) for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) { e.type = (FolderLister::ContentType)( e.type | contentTypeFromString( *it ) ); } - if ( active.tqfind( e.id ) != active.end() ) e.active = true; + if ( active.find( e.id ) != active.end() ) e.active = true; mFolders.append( e ); } @@ -196,7 +196,7 @@ void FolderLister::writeConfig( GroupwarePrefsBase *newprefs ) TQStringList defaultFolders; #define writeDestination(type) \ - if ( mWriteDestinationId.tqcontains( type ) ) \ + if ( mWriteDestinationId.contains( type ) ) \ defaultFolders << mWriteDestinationId[type]; \ else defaultFolders << TQString(); writeDestination( KPIM::FolderLister::Event ); @@ -262,7 +262,7 @@ void FolderLister::doRetrieveFolder( const KURL &u ) KURL url( u ); if ( adaptor() ) adaptor()->adaptDownloadUrl( url ); - if ( mUrls.tqcontains( url ) || mProcessedPathes.tqcontains( url.path(-1) ) ) { + if ( mUrls.contains( url ) || mProcessedPathes.contains( url.path(-1) ) ) { kdDebug()<<"Item "<<u.path(-1)<<" is already being downloaded "<<endl; } else { diff --git a/kresources/lib/folderlistview.cpp b/kresources/lib/folderlistview.cpp index c6b34cbd2..d8ae7ec13 100644 --- a/kresources/lib/folderlistview.cpp +++ b/kresources/lib/folderlistview.cpp @@ -54,37 +54,37 @@ void FolderListView::setEnabledTypes( const TQValueList<Property> &types ) kdDebug() << "FolderListView::setEnabledTypes" << endl; for ( int i = 0; i< columns(); ++i ) removeColumn( i ); mTypes = types; - if ( !mTypes.tqcontains( FolderName ) ) mTypes.prepend( FolderName ); + if ( !mTypes.contains( FolderName ) ) mTypes.prepend( FolderName ); mColumnMap[FolderName] = addColumn( i18n("Folder") ); mTypeMap[mColumnMap[FolderName]] = FolderName; - if ( mTypes.tqcontains( Event ) ) { + if ( mTypes.contains( Event ) ) { mColumnMap[Event] = addColumn( i18n("Short column header meaning default for new events", "Events") ); mTypeMap[mColumnMap[Event]] = Event; } else mColumnMap[Event] = -1; - if ( mTypes.tqcontains( Todo ) ) { + if ( mTypes.contains( Todo ) ) { mColumnMap[Todo] = addColumn( i18n("Short column header meaning default for new to-dos", "Todos") ); mTypeMap[mColumnMap[Todo]] = Todo; } else mColumnMap[Todo] = -1; - if ( mTypes.tqcontains( Journal ) ) { + if ( mTypes.contains( Journal ) ) { mColumnMap[Journal] = addColumn( i18n("Short column header meaning default for new journals", "Journals") ); mTypeMap[mColumnMap[Journal]] = Journal; } else mColumnMap[Journal] = -1; - if ( mTypes.tqcontains( Contact ) ) { + if ( mTypes.contains( Contact ) ) { mColumnMap[Contact] = addColumn( i18n("Short column header meaning default for new contacts", "Contacts") ); mTypeMap[mColumnMap[Contact]] = Contact; } else mColumnMap[Contact] = -1; - if ( mTypes.tqcontains( All ) ) { + if ( mTypes.contains( All ) ) { mColumnMap[All] = addColumn( i18n("Short column header meaning default for all items", "All") ); mTypeMap[mColumnMap[All]] = All; } else mColumnMap[All] = -1; - if ( mTypes.tqcontains( Unknown ) ) { + if ( mTypes.contains( Unknown ) ) { mColumnMap[Unknown] = addColumn( i18n("Short column header meaning default for unknown new items", "Unknown") ); mTypeMap[mColumnMap[Unknown]] = Unknown; } else mColumnMap[Unknown] = -1; @@ -103,27 +103,27 @@ void FolderListView::showPopupMenu( FolderListItem *i, const TQPoint &globalPos m.setItemChecked( id, i->isOn() ); m.insertSeparator(); - if ( ( folder.type & KPIM::FolderLister::Event ) && (mTypes.tqcontains( Event ) ) ) { + if ( ( folder.type & KPIM::FolderLister::Event ) && (mTypes.contains( Event ) ) ) { id = m.insertItem( i18n("Default for New &Events"), this, TQT_SLOT(slotPopupHandler(int)), 0, Event ); m.setItemChecked( id, i->isDefault( Event ) ); } - if ( ( folder.type & KPIM::FolderLister::Todo ) && (mTypes.tqcontains( Todo ) ) ) { + if ( ( folder.type & KPIM::FolderLister::Todo ) && (mTypes.contains( Todo ) ) ) { id = m.insertItem( i18n("Default for New &Todos"), this, TQT_SLOT(slotPopupHandler(int)), 0, Todo ); m.setItemChecked( id, i->isDefault( Todo ) ); } - if ( ( folder.type & KPIM::FolderLister::Journal ) && (mTypes.tqcontains( Journal ) ) ) { + if ( ( folder.type & KPIM::FolderLister::Journal ) && (mTypes.contains( Journal ) ) ) { id = m.insertItem( i18n("Default for New &Journals"), this, TQT_SLOT(slotPopupHandler(int)), 0, Journal ); m.setItemChecked( id, i->isDefault( Journal ) ); } - if ( ( folder.type & KPIM::FolderLister::Contact ) && (mTypes.tqcontains( Contact ) ) ) { + if ( ( folder.type & KPIM::FolderLister::Contact ) && (mTypes.contains( Contact ) ) ) { id = m.insertItem( i18n("Default for New &Contacts"), this, TQT_SLOT(slotPopupHandler(int)), 0, Contact ); m.setItemChecked( id, i->isDefault( Contact ) ); } - if ( ( folder.type == KPIM::FolderLister::All ) && (mTypes.tqcontains( All ) ) ) { + if ( ( folder.type == KPIM::FolderLister::All ) && (mTypes.contains( All ) ) ) { id = m.insertItem( i18n("Default for All New &Items"), this, TQT_SLOT(slotPopupHandler(int)), 0, All ); m.setItemChecked( id, i->isDefault( All ) ); } - if ( ( folder.type == KPIM::FolderLister::Unknown ) && (mTypes.tqcontains( Unknown ) ) ) { + if ( ( folder.type == KPIM::FolderLister::Unknown ) && (mTypes.contains( Unknown ) ) ) { id = m.insertItem( i18n("Default for &Unknown New Items"), this, TQT_SLOT(slotPopupHandler(int)), 0, Unknown ); m.setItemChecked( id, i->isDefault( Unknown ) ); } @@ -184,7 +184,7 @@ void FolderListItem::activate( int column, const TQPoint &localPos ) default: return; } - if ( !TQRect( x, 0, w, BoxSize ).tqcontains( localPos ) ) + if ( !TQRect( x, 0, w, BoxSize ).contains( localPos ) ) changeProperty( prop ); } @@ -293,4 +293,4 @@ void FolderListItem::paintCell( TQPainter *p, const TQColorGroup &cg, int col, i //END #include "folderlistview.moc" -// kate: space-indent on; indent-width 2; tqreplace-tabs on; +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kresources/lib/folderlistview.h b/kresources/lib/folderlistview.h index e4d5a56de..0c99d913c 100644 --- a/kresources/lib/folderlistview.h +++ b/kresources/lib/folderlistview.h @@ -55,8 +55,8 @@ class FolderListView : public KListView void emitChanged() { emit changed(); }; void setEnabledTypes( const TQValueList<Property> &types ); - int columnForType( Property prop ) const { if ( mColumnMap.tqcontains(prop) ) return mColumnMap[prop]; else return -1;} - Property typeForColumn( int col ) const { if ( mTypeMap.tqcontains( col ) ) return mTypeMap[col]; else return Unknown; } + int columnForType( Property prop ) const { if ( mColumnMap.contains(prop) ) return mColumnMap[prop]; else return -1;} + Property typeForColumn( int col ) const { if ( mTypeMap.contains( col ) ) return mTypeMap[col]; else return Unknown; } private slots: /* Display a popupmenu for item i at item position */ @@ -127,4 +127,4 @@ class FolderListItem : public TQCheckListItem #endif -// kate: space-indent on; indent-width 2; tqreplace-tabs on; +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kresources/lib/groupwaredataadaptor.cpp b/kresources/lib/groupwaredataadaptor.cpp index 88ca09c10..d77c0e550 100644 --- a/kresources/lib/groupwaredataadaptor.cpp +++ b/kresources/lib/groupwaredataadaptor.cpp @@ -78,7 +78,7 @@ kdDebug()<<"GroupwareUploadItem::createUploadNewJob, baseurl=" << baseurl.url() if ( job ) { kdDebug() << "Adding If-None-Match " << endl; TQString header; - if ( job->outgoingMetaData().tqcontains("customHTTPHeader") ) { + if ( job->outgoingMetaData().contains("customHTTPHeader") ) { header = job->outgoingMetaData()["customHTTPHeader"]; header += "\r\n"; } @@ -96,7 +96,7 @@ kdDebug()<<"GroupwareUploadItem::createUploadJob" << endl; if ( job && adaptor ) { kdDebug()<<"Adding If-Match header: " << adaptor->idMapper()->fingerprint( uid() ) << endl; TQString header; - if ( job->outgoingMetaData().tqcontains("customHTTPHeader") ) { + if ( job->outgoingMetaData().contains("customHTTPHeader") ) { header = job->outgoingMetaData()["customHTTPHeader"]; header += "\r\n"; } @@ -262,7 +262,7 @@ bool GroupwareDataAdaptor::interpretUploadNewJob( KIO::Job *job, const TQString TQString GroupwareDataAdaptor::uidFromJob( KIO::Job *job ) const { kdDebug()<<"GroupwareDataAdaptor::uidFromJob( "<<job<<")"<<endl; - if ( mJobUIDMap.tqcontains( job ) ) { + if ( mJobUIDMap.contains( job ) ) { kdDebug()<<" Contained: "<< mJobUIDMap[job] << endl; return mJobUIDMap[ job ]; } else { diff --git a/kresources/lib/groupwaredataadaptor.h b/kresources/lib/groupwaredataadaptor.h index 2216fa560..203c62782 100644 --- a/kresources/lib/groupwaredataadaptor.h +++ b/kresources/lib/groupwaredataadaptor.h @@ -241,7 +241,7 @@ Q_OBJECT virtual FolderLister::Entry::List defaultFolders(); virtual TQValueList<FolderLister::ContentType> supportedTypes() = 0; virtual bool supports( FolderLister::ContentType type ) { - return supportedTypes().tqcontains( type ); + return supportedTypes().contains( type ); } diff --git a/kresources/lib/groupwaredownloadjob.cpp b/kresources/lib/groupwaredownloadjob.cpp index 5cf494b97..f363dbc20 100644 --- a/kresources/lib/groupwaredownloadjob.cpp +++ b/kresources/lib/groupwaredownloadjob.cpp @@ -229,9 +229,9 @@ void GroupwareDownloadJob::slotItemToDownload( const KURL &remoteURL, { KURL url( remoteURL ); adaptor()->adaptDownloadUrl( url ); - if ( !mItemsForDownload.tqcontains( url ) && - !mItemsDownloading.tqcontains( url ) && - !mItemsDownloaded.tqcontains( url ) ) { + if ( !mItemsForDownload.contains( url ) && + !mItemsDownloading.contains( url ) && + !mItemsDownloaded.contains( url ) ) { mItemsForDownload.insert( url, type ); } } @@ -240,7 +240,7 @@ void GroupwareDownloadJob::slotItemToDownload( const KURL &remoteURL, void GroupwareDownloadJob::slotItemOnServer( const KURL &remoteURL ) { kdDebug()<<"GroupwareDownloadJob::slotItemOnServer( " << remoteURL.url() << ")" << endl; - if ( !mCurrentlyOnServer.tqcontains( remoteURL ) ) { + if ( !mCurrentlyOnServer.contains( remoteURL ) ) { mCurrentlyOnServer.append( remoteURL ); } } @@ -249,9 +249,9 @@ kdDebug()<<"GroupwareDownloadJob::slotItemOnServer( " << remoteURL.url() << ")" void GroupwareDownloadJob::slotItemDownloadError( const KURL &remoteURL, const TQString &/*error*/ ) { // TODO: Error handling! - if ( mItemsDownloading.tqcontains( remoteURL ) ) { + if ( mItemsDownloading.contains( remoteURL ) ) { mItemsDownloadError[ remoteURL ] = mItemsDownloading[ remoteURL ]; - } else if ( mItemsForDownload.tqcontains( remoteURL ) ) { + } else if ( mItemsForDownload.contains( remoteURL ) ) { mItemsDownloadError[ remoteURL ] = mItemsForDownload[ remoteURL ]; } } @@ -261,15 +261,15 @@ void GroupwareDownloadJob::slotItemDownloaded( const TQString &localID, const KURL &remoteURL, const TQString &fingerprint ) { kdDebug()<<"GroupwareDownloadJob::slotItemDownloaded( " << localID << ", " << remoteURL.url() << ", " << fingerprint << ")" << endl; - if ( mItemsForDownload.tqcontains( remoteURL ) ) { + if ( mItemsForDownload.contains( remoteURL ) ) { mItemsDownloaded[ remoteURL ] = mItemsForDownload[ remoteURL ]; mItemsForDownload.remove( remoteURL ); } - if ( mItemsDownloading.tqcontains( remoteURL ) ) { + if ( mItemsDownloading.contains( remoteURL ) ) { mItemsDownloaded[ remoteURL ] = mItemsDownloading[ remoteURL ]; mItemsDownloading.remove( remoteURL ); } - if ( !mItemsDownloaded.tqcontains( remoteURL ) ) { + if ( !mItemsDownloaded.contains( remoteURL ) ) { mItemsDownloaded[ remoteURL ] = KPIM::FolderLister::Unknown; } adaptor()->idMapper()->setRemoteId( localID, remoteURL.path() ); diff --git a/kresources/lib/webdavhandler.cpp b/kresources/lib/webdavhandler.cpp index 9ae500e52..180740662 100644 --- a/kresources/lib/webdavhandler.cpp +++ b/kresources/lib/webdavhandler.cpp @@ -154,10 +154,10 @@ bool WebdavHandler::extractStringList( const TQDomElement &node, const TQString const TQString WebdavHandler::getEtagFromHeaders( const TQString& headers ) { - int start = headers.tqfind( "etag:", 0, false ); + int start = headers.find( "etag:", 0, false ); if ( start < 0 ) return TQString(); start += 6; - return headers.mid( start, headers.tqfind( "\n", start ) - start ); + return headers.mid( start, headers.find( "\n", start ) - start ); } //TODO: should not call libical functions directly -- better to make |