summaryrefslogtreecommitdiffstats
path: root/kresources/scalix/kcal/resourcescalix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kresources/scalix/kcal/resourcescalix.cpp')
-rw-r--r--kresources/scalix/kcal/resourcescalix.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/kresources/scalix/kcal/resourcescalix.cpp b/kresources/scalix/kcal/resourcescalix.cpp
index a67585ee..2848a353 100644
--- a/kresources/scalix/kcal/resourcescalix.cpp
+++ b/kresources/scalix/kcal/resourcescalix.cpp
@@ -249,7 +249,7 @@ void ResourceScalix::removeIncidences( const TQCString& incidenceType )
// better call event(uid), todo(uid) etc. directly.
// A faster but hackish way would probably be to check the type of the resource,
- // like mEventSubResources.tqfind( it.data().resource() ) != mEventSubResources.end() ?
+ // like mEventSubResources.find( it.data().resource() ) != mEventSubResources.end() ?
const TQString& uid = it.key();
if ( incidenceType == "Event" && mCalendar.event( uid ) )
mUidMap.remove( it );
@@ -276,17 +276,17 @@ void ResourceScalix::incidenceUpdated( KCal::IncidenceBase* incidencebase )
const TQString uid = incidencebase->uid();
- if ( mUidsPendingUpdate.tqcontains( uid ) || mUidsPendingAdding.tqcontains( uid ) ) {
+ if ( mUidsPendingUpdate.contains( uid ) || mUidsPendingAdding.contains( uid ) ) {
/* We are currently processing this event ( removing and readding or
* adding it ). If so, ignore this update. Keep the last of these around
* and process once we hear back from KMail on this event. */
- mPendingUpdates.tqreplace( uid, incidencebase );
+ mPendingUpdates.replace( uid, incidencebase );
return;
}
TQString subResource;
TQ_UINT32 sernum = 0;
- if ( mUidMap.tqcontains( uid ) ) {
+ if ( mUidMap.contains( uid ) ) {
subResource = mUidMap[ uid ].resource();
sernum = mUidMap[ uid ].serialNumber();
mUidsPendingUpdate.append( uid );
@@ -390,7 +390,7 @@ bool ResourceScalix::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const
// behold, sernum is an in-parameter
const bool rc = kmailUpdate( subresource, sernum, data, mimetype, subject, customHeaders );
// update the serial number
- if ( mUidMap.tqcontains( incidencebase->uid() ) ) {
+ if ( mUidMap.contains( incidencebase->uid() ) ) {
mUidMap[ incidencebase->uid() ].setSerialNumber( sernum );
}
return rc;
@@ -450,7 +450,7 @@ bool ResourceScalix::addIncidence( KCal::Incidence* incidence, const TQString& _
* We know the new state, so lets just not do much at all. The old incidence
* in the calendar remains valid, but the serial number changed, so we need to
* update that */
- if ( ourOwnUpdate = mUidsPendingUpdate.tqcontains( uid ) ) {
+ if ( ourOwnUpdate = mUidsPendingUpdate.contains( uid ) ) {
mUidsPendingUpdate.remove( uid );
mUidMap.remove( uid );
mUidMap[ uid ] = StorageReference( subResource, sernum );
@@ -460,7 +460,7 @@ bool ResourceScalix::addIncidence( KCal::Incidence* incidence, const TQString& _
* unless the folder is read-only, in which case the user should not be
* offered a means of putting mails in a folder she'll later be unable to
* upload. Skip the incidence, in this case. */
- if ( mUidMap.tqcontains( uid )
+ if ( mUidMap.contains( uid )
&& ( mUidMap[ uid ].resource() == subResource ) ) {
if ( (*map)[ subResource ].writable() ) {
resolveConflict( incidence, subResource, sernum );
@@ -472,7 +472,7 @@ bool ResourceScalix::addIncidence( KCal::Incidence* incidence, const TQString& _
}
/* Add to the cache if the add didn't come from KOrganizer, in which case
* we've already added it, and listen to updates from KOrganizer for it. */
- if ( !mUidsPendingAdding.tqcontains( uid ) ) {
+ if ( !mUidsPendingAdding.contains( uid ) ) {
mCalendar.addIncidence( incidence );
incidence->registerObserver( this );
}
@@ -482,14 +482,14 @@ bool ResourceScalix::addIncidence( KCal::Incidence* incidence, const TQString& _
}
}
/* Check if there are updates for this uid pending and if so process them. */
- if ( KCal::IncidenceBase *update = mPendingUpdates.tqfind( uid ) ) {
+ if ( KCal::IncidenceBase *update = mPendingUpdates.find( uid ) ) {
mSilent = false; // we do want to tell KMail
mPendingUpdates.remove( uid );
incidenceUpdated( update );
} else {
/* If the uid was added by KMail, KOrganizer needs to be told, so
* schedule emitting of the resourceChanged signal. */
- if ( !mUidsPendingAdding.tqcontains( uid ) ) {
+ if ( !mUidsPendingAdding.contains( uid ) ) {
if ( !ourOwnUpdate ) mResourceChangedTimer.changeInterval( 100 );
} else {
mUidsPendingAdding.remove( uid );
@@ -504,7 +504,7 @@ bool ResourceScalix::addIncidence( KCal::Incidence* incidence, const TQString& _
bool ResourceScalix::addEvent( KCal::Event* event )
{
- if ( mUidMap.tqcontains( event->uid() ) )
+ if ( mUidMap.contains( event->uid() ) )
return true; //noop
else
return addIncidence( event, TQString(), 0 );
@@ -521,7 +521,7 @@ bool ResourceScalix::deleteIncidence( KCal::Incidence* incidence )
if ( incidence->isReadOnly() ) return false;
const TQString uid = incidence->uid();
- if( !mUidMap.tqcontains( uid ) ) return false; // Odd
+ if( !mUidMap.contains( uid ) ) return false; // Odd
/* The user told us to delete, tell KMail */
if ( !mSilent ) {
kmailDeleteIncidence( mUidMap[ uid ].resource(),
@@ -572,7 +572,7 @@ KCal::Event::List ResourceScalix::rawEvents( const TQDate& start,
bool ResourceScalix::addTodo( KCal::Todo* todo )
{
- if ( mUidMap.tqcontains( todo->uid() ) )
+ if ( mUidMap.contains( todo->uid() ) )
return true; //noop
else
return addIncidence( todo, TQString(), 0 );
@@ -606,7 +606,7 @@ KCal::Todo::List ResourceScalix::rawTodosForDate( const TQDate& date )
bool ResourceScalix::addJournal( KCal::Journal* journal )
{
- if ( mUidMap.tqcontains( journal->uid() ) )
+ if ( mUidMap.contains( journal->uid() ) )
return true; //noop
else
return addIncidence( journal, TQString(), 0 );
@@ -689,9 +689,9 @@ void ResourceScalix::fromKMailDelIncidence( const TQString& type,
if ( !subresourceActive( subResource ) ) return;
// Can't be in both, by contract
- if ( mUidsPendingDeletion.tqcontains( uid ) ) {
+ if ( mUidsPendingDeletion.contains( uid ) ) {
mUidsPendingDeletion.remove( uid );
- } else if ( mUidsPendingUpdate.tqcontains( uid ) ) {
+ } else if ( mUidsPendingUpdate.contains( uid ) ) {
// It's good to know if was deleted, but we are waiting on a new one to
// replace it, so let's just sit tight.
} else {
@@ -741,7 +741,7 @@ void ResourceScalix::fromKMailAddSubresource( const TQString& type,
// Not ours
return;
- if ( map->tqcontains( subResource ) )
+ if ( map->contains( subResource ) )
// Already registered
return;
@@ -760,7 +760,7 @@ void ResourceScalix::fromKMailDelSubresource( const TQString& type,
ResourceMap* map = subResourceMap( type );
if ( !map ) // not ours
return;
- if ( map->tqcontains( subResource ) )
+ if ( map->contains( subResource ) )
map->erase( subResource );
else
// Not registered
@@ -807,11 +807,11 @@ TQStringList ResourceScalix::subresources() const
const TQString
ResourceScalix::labelForSubresource( const TQString& subresource ) const
{
- if ( mEventSubResources.tqcontains( subresource ) )
+ if ( mEventSubResources.contains( subresource ) )
return mEventSubResources[ subresource ].label();
- if ( mTodoSubResources.tqcontains( subresource ) )
+ if ( mTodoSubResources.contains( subresource ) )
return mTodoSubResources[ subresource ].label();
- if ( mJournalSubResources.tqcontains( subresource ) )
+ if ( mJournalSubResources.contains( subresource ) )
return mJournalSubResources[ subresource ].label();
return subresource;
}
@@ -819,10 +819,10 @@ ResourceScalix::labelForSubresource( const TQString& subresource ) const
TQString ResourceScalix::subresourceIdentifier( Incidence *incidence )
{
TQString uid = incidence->uid();
- if ( mUidMap.tqcontains( uid ) )
+ if ( mUidMap.contains( uid ) )
return mUidMap[ uid ].resource();
else
- if ( mNewIncidencesMap.tqcontains( uid ) )
+ if ( mNewIncidencesMap.contains( uid ) )
return mNewIncidencesMap[ uid ];
else
return TQString();
@@ -843,11 +843,11 @@ bool ResourceScalix::subresourceActive( const TQString& subresource ) const
// before it opens the resource :-( Make sure we are open
const_cast<ResourceScalix*>( this )->doOpen();
- if ( mEventSubResources.tqcontains( subresource ) )
+ if ( mEventSubResources.contains( subresource ) )
return mEventSubResources[ subresource ].active();
- if ( mTodoSubResources.tqcontains( subresource ) )
+ if ( mTodoSubResources.contains( subresource ) )
return mTodoSubResources[ subresource ].active();
- if ( mJournalSubResources.tqcontains( subresource ) )
+ if ( mJournalSubResources.contains( subresource ) )
return mJournalSubResources[ subresource ].active();
// Safe default bet:
@@ -860,11 +860,11 @@ void ResourceScalix::setSubresourceActive( const TQString &subresource, bool v )
{
ResourceMap *map = 0;
- if ( mEventSubResources.tqcontains( subresource ) )
+ if ( mEventSubResources.contains( subresource ) )
map = &mEventSubResources;
- if ( mTodoSubResources.tqcontains( subresource ) )
+ if ( mTodoSubResources.contains( subresource ) )
map = &mTodoSubResources;
- if ( mJournalSubResources.tqcontains( subresource ) )
+ if ( mJournalSubResources.contains( subresource ) )
map = &mJournalSubResources;
if ( map && ( ( *map )[ subresource ].active() != v ) ) {