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/exchange | |
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/exchange')
-rw-r--r-- | kresources/exchange/dateset.cpp | 18 | ||||
-rw-r--r-- | kresources/exchange/dateset.h | 10 | ||||
-rw-r--r-- | kresources/exchange/resourceexchange.cpp | 8 |
3 files changed, 18 insertions, 18 deletions
diff --git a/kresources/exchange/dateset.cpp b/kresources/exchange/dateset.cpp index e6393afa0..b26229022 100644 --- a/kresources/exchange/dateset.cpp +++ b/kresources/exchange/dateset.cpp @@ -48,7 +48,7 @@ void DateSet::add( TQDate const& date ) mDates->insert( 0, new TQPair<TQDate,TQDate>( date, date ) ); return; } - int i = tqfind( date ); + int i = find( date ); mDates->insert( i, new TQPair<TQDate,TQDate>( date, date ) ); tryMerge( i ); tryMerge( i-1 ); @@ -60,7 +60,7 @@ void DateSet::add( TQDate const& from, TQDate const& to ) mDates->insert( 0, new TQPair<TQDate,TQDate>( from, to ) ); return; } - uint i = tqfind( from ); + uint i = find( from ); kdDebug() << "Adding range at position " << i << endl; mDates->insert( i, new TQPair<TQDate,TQDate>( from, to ) ); @@ -87,7 +87,7 @@ void DateSet::remove( TQDate const& date ) return; } - uint i = tqfind( date ); + uint i = find( date ); if ( i == mDates->count() ) return; @@ -117,7 +117,7 @@ void DateSet::remove( TQDate const& from, TQDate const& to ) return; } - uint i = tqfind( from ); + uint i = find( from ); if ( i == mDates->count() ) return; @@ -155,13 +155,13 @@ void DateSet::remove( TQDate const& from, TQDate const& to ) } } -bool DateSet::tqcontains( TQDate const& date ) +bool DateSet::contains( TQDate const& date ) { if (mDates->isEmpty()) { return false; } - uint i = tqfind( date ); + uint i = find( date ); // kdDebug() << "contains looking for " << date.toString() << " at range " << i << endl; if ( i == mDates->count() ) return false; @@ -172,13 +172,13 @@ bool DateSet::tqcontains( TQDate const& date ) } // returns true if and only if the whole range is in the set -bool DateSet::tqcontains( TQDate const& from, TQDate const& to ) +bool DateSet::contains( TQDate const& from, TQDate const& to ) { if (mDates->isEmpty()) { return false; } - uint i = tqfind( from ); + uint i = find( from ); if ( i == mDates->count() ) return false; @@ -192,7 +192,7 @@ bool DateSet::tqcontains( TQDate const& from, TQDate const& to ) // If mDates is empty, return 0. // If date is later than the last item in mDates, return mDates->count() -int DateSet::tqfind( TQDate const& date ) +int DateSet::find( TQDate const& date ) { if ( mDates->isEmpty() ) return 0; diff --git a/kresources/exchange/dateset.h b/kresources/exchange/dateset.h index 99c02a5c7..693aa4a31 100644 --- a/kresources/exchange/dateset.h +++ b/kresources/exchange/dateset.h @@ -34,8 +34,8 @@ class DateRange { DateRange( TQDate const& from, TQDate const& to ) : mFrom( from ), mTo( to ) { } bool operator< ( const DateRange& r ) { return mFrom < r.from(); } - bool tqcontains( TQDate const& d ) { return ( mFrom <= d && d <= mTo ); } - bool tqcontains( TQDate const& from, TQDate const& to ) { return ( mFrom <= from && to <= mTo ); } + bool contains( TQDate const& d ) { return ( mFrom <= d && d <= mTo ); } + bool contains( TQDate const& from, TQDate const& to ) { return ( mFrom <= from && to <= mTo ); } TQDate from() { return mFrom; } TQDate to() { return mTo; } @@ -68,11 +68,11 @@ class DateSet { void remove( TQDate const& date ); void remove( TQDate const& from, TQDate const& to ); - bool tqcontains( TQDate const& date ); + bool contains( TQDate const& date ); // returns true if and only if the whole range is in the set - bool tqcontains( TQDate const& from, TQDate const& to ); + bool contains( TQDate const& from, TQDate const& to ); - int tqfind( TQDate const &date ); + int find( TQDate const &date ); void print(); protected: diff --git a/kresources/exchange/resourceexchange.cpp b/kresources/exchange/resourceexchange.cpp index de9158755..b58a750f2 100644 --- a/kresources/exchange/resourceexchange.cpp +++ b/kresources/exchange/resourceexchange.cpp @@ -233,7 +233,7 @@ void ResourceExchange::slotMonitorNotify( const TQValueList<long>& IDs, const TQ * 3. Event modified that we have in cache * 4. Something else happened that isn't relevant to us * Update cache, then notify whoever's watching us - * We may be able to tqfind (1) and (3) by looking at the + * We may be able to find (1) and (3) by looking at the * DAV:getlastmodified property * (2) is trickier: we might have to resort to checking * all uids in the cache @@ -298,7 +298,7 @@ void ResourceExchange::changeIncidence( Incidence *incidence ) kdDebug() << "ResourceExchange::changeIncidence(): " << incidence->summary() << endl; - if ( mChangedIncidences.tqfind( incidence ) == mChangedIncidences.end() ) { + if ( mChangedIncidences.find( incidence ) == mChangedIncidences.end() ) { mChangedIncidences.append( incidence ); } } @@ -481,7 +481,7 @@ Event::List ResourceExchange::rawEventsForDate( const TQDate &qd, // kdDebug() << "Now is " << now.toString() << endl; // kdDebug() << "mDates: " << mDates << endl; TQDate start = TQDate( qd.year(), qd.month(), 1 ); // First day of month - if ( mDates && ( !mDates->tqcontains( start ) || + if ( mDates && ( !mDates->contains( start ) || (*mCacheDates)[start].secsTo( now ) > mCachedSeconds ) ) { TQDate end = start.addMonths( 1 ).addDays( -1 ); // Last day of month // Get events that occur in this period from the cache @@ -505,7 +505,7 @@ Event::List ResourceExchange::rawEventsForDate( const TQDate &qd, // are really new. Event::List eventsAfter = mCache->rawEvents(); for ( it = eventsAfter.begin(); it != eventsAfter.end(); ++it ) { - if ( eventsBefore.tqfind( *it ) == eventsBefore.end() ) { + if ( eventsBefore.find( *it ) == eventsBefore.end() ) { // it's a new event downloaded by downloadSynchronous -> install observer (*it)->registerObserver( this ); } |