summaryrefslogtreecommitdiffstats
path: root/kresources/kolab/kcal/resourcekolab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kresources/kolab/kcal/resourcekolab.cpp')
-rw-r--r--kresources/kolab/kcal/resourcekolab.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/kresources/kolab/kcal/resourcekolab.cpp b/kresources/kolab/kcal/resourcekolab.cpp
index da2cee412..2107642b6 100644
--- a/kresources/kolab/kcal/resourcekolab.cpp
+++ b/kresources/kolab/kcal/resourcekolab.cpp
@@ -285,7 +285,7 @@ void ResourceKolab::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 );
@@ -310,7 +310,7 @@ void ResourceKolab::incidenceUpdatedSilent( KCal::IncidenceBase* incidencebase )
const TQString uid = incidencebase->uid();
//kdDebug() << k_funcinfo << uid << endl;
- 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. */
@@ -336,7 +336,7 @@ void ResourceKolab::incidenceUpdatedSilent( KCal::IncidenceBase* incidencebase )
if ( i ) {
bool ignoreThisUpdate = false;
- if ( !mLastKnownRevisions.tqcontains( uid ) ) {
+ if ( !mLastKnownRevisions.contains( uid ) ) {
mLastKnownRevisions[uid] = i->revision();
}
@@ -355,7 +355,7 @@ void ResourceKolab::incidenceUpdatedSilent( KCal::IncidenceBase* incidencebase )
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 );
@@ -543,7 +543,7 @@ bool ResourceKolab::sendKMailUpdate( KCal::IncidenceBase* incidencebase, const T
// behold, sernum is an in-parameter
const bool rc = kmailUpdate( subresource, sernum, data, mimetype, subject, customHeaders, attURLs, attMimeTypes, attNames, deletedAtts );
// update the serial number
- if ( mUidMap.tqcontains( incidencebase->uid() ) ) {
+ if ( mUidMap.contains( incidencebase->uid() ) ) {
mUidMap[ incidencebase->uid() ].setSerialNumber( sernum );
}
@@ -629,7 +629,7 @@ bool ResourceKolab::addIncidence( KCal::Incidence* incidence, const TQString& _s
// Lets not warn the user 100 times that there's no writable resource
// and not ask 100 times which resource to use
- if ( !mBatchAddingInProgress || !mLastUsedResources.tqcontains( type ) ) {
+ if ( !mBatchAddingInProgress || !mLastUsedResources.contains( type ) ) {
subResource = findWritableResource( type, *map, text );
mLastUsedResources[type] = subResource;
} else {
@@ -676,7 +676,7 @@ bool ResourceKolab::addIncidence( KCal::Incidence* incidence, const TQString& _s
}
}
} else { /* KMail told us */
- const bool ourOwnUpdate = mUidsPendingUpdate.tqcontains( uid );
+ const bool ourOwnUpdate = mUidsPendingUpdate.contains( uid );
kdDebug( 5650 ) << "addIncidence: ourOwnUpdate " << ourOwnUpdate << endl;
/* Check if we updated this one, which means kmail deleted and added it.
* We know the new state, so lets just not do much at all. The old incidence
@@ -692,7 +692,7 @@ bool ResourceKolab::addIncidence( KCal::Incidence* incidence, const TQString& _s
* 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 ) ) {
if ( mUidMap[ uid ].resource() == subResource ) {
if ( (*map)[ subResource ].writable() ) {
kdDebug( 5650 ) << "lets resolve the conflict " << endl;
@@ -716,7 +716,7 @@ bool ResourceKolab::addIncidence( KCal::Incidence* incidence, const TQString& _s
}
/* 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 );
}
@@ -726,14 +726,14 @@ bool ResourceKolab::addIncidence( KCal::Incidence* incidence, const TQString& _s
}
}
/* 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 );
@@ -752,7 +752,7 @@ bool ResourceKolab::addEvent( KCal::Event *event )
bool ResourceKolab::addEvent( KCal::Event *event, const TQString &subResource )
{
- if ( mUidMap.tqcontains( event->uid() ) ) {
+ if ( mUidMap.contains( event->uid() ) ) {
return true; //noop
} else {
return addIncidence( event, subResource, 0 );
@@ -776,7 +776,7 @@ bool ResourceKolab::deleteIncidence( KCal::Incidence* incidence )
}
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(),
@@ -832,7 +832,7 @@ bool ResourceKolab::addTodo( KCal::Todo *todo )
bool ResourceKolab::addTodo( KCal::Todo *todo, const TQString &subResource )
{
- if ( mUidMap.tqcontains( todo->uid() ) ) {
+ if ( mUidMap.contains( todo->uid() ) ) {
return true; //noop
} else {
return addIncidence( todo, subResource, 0 );
@@ -876,7 +876,7 @@ bool ResourceKolab::addJournal( KCal::Journal *journal )
bool ResourceKolab::addJournal( KCal::Journal *journal, const TQString &subResource )
{
- if ( mUidMap.tqcontains( journal->uid() ) )
+ if ( mUidMap.contains( journal->uid() ) )
return true; //noop
else
return addIncidence( journal, subResource, 0 );
@@ -921,12 +921,12 @@ KCal::Alarm::List ResourceKolab::relevantAlarms( const KCal::Alarm::List &alarms
KCal::Alarm *a = (*it);
++it;
const TQString &uid = a->tqparent()->uid();
- if ( mUidMap.tqcontains( uid ) ) {
+ if ( mUidMap.contains( uid ) ) {
const TQString &sr = mUidMap[ uid ].resource();
Kolab::SubResource *subResource = 0;
- if ( mEventSubResources.tqcontains( sr ) )
+ if ( mEventSubResources.contains( sr ) )
subResource = &( mEventSubResources[ sr ] );
- else if ( mTodoSubResources.tqcontains( sr ) )
+ else if ( mTodoSubResources.contains( sr ) )
subResource = &( mTodoSubResources[ sr ] );
assert( subResource );
if ( subResource->alarmRelevant() )
@@ -1009,16 +1009,16 @@ void ResourceKolab::fromKMailDelIncidence( const TQString& type,
if ( !subresourceActive( subResource ) ) return;
// Can't be in both, by contract
- if ( mUidsPendingDeletion.tqfind( uid ) != mUidsPendingDeletion.end() ) {
- mUidsPendingDeletion.remove( mUidsPendingDeletion.tqfind( uid ) );
- } else if ( mUidsPendingUpdate.tqcontains( uid ) ) {
+ if ( mUidsPendingDeletion.find( uid ) != mUidsPendingDeletion.end() ) {
+ mUidsPendingDeletion.remove( mUidsPendingDeletion.find( 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 {
TQString uidToUse;
TQPair<TQString, TQString> p( uid, subResource );
- if ( mOriginalUID2fakeUID.tqcontains( p ) ) {
+ if ( mOriginalUID2fakeUID.contains( p ) ) {
// Incidence with the same uid in a different folder...
// use the UID that addIncidence(...) generated
uidToUse = mOriginalUID2fakeUID[p];
@@ -1073,7 +1073,7 @@ void ResourceKolab::fromKMailAddSubresource( const TQString& type,
// Not ours
return;
- if ( map->tqcontains( subResource ) )
+ if ( map->contains( subResource ) )
// Already registered
return;
@@ -1093,7 +1093,7 @@ void ResourceKolab::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
@@ -1122,11 +1122,11 @@ TQStringList ResourceKolab::subresources() const
const TQString
ResourceKolab::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;
}
@@ -1146,11 +1146,11 @@ bool ResourceKolab::subresourceActive( const TQString& subresource ) const
// before it opens the resource :-( Make sure we are open
const_cast<ResourceKolab*>( 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:
@@ -1163,15 +1163,15 @@ void ResourceKolab::setSubresourceActive( const TQString &subresource, bool v )
{
ResourceMap *map = 0;
const char* mimeType = 0;
- if ( mEventSubResources.tqcontains( subresource ) ) {
+ if ( mEventSubResources.contains( subresource ) ) {
map = &mEventSubResources;
mimeType = eventAttachmentMimeType;
}
- if ( mTodoSubResources.tqcontains( subresource ) ) {
+ if ( mTodoSubResources.contains( subresource ) ) {
map = &mTodoSubResources;
mimeType = todoAttachmentMimeType;
}
- if ( mJournalSubResources.tqcontains( subresource ) ) {
+ if ( mJournalSubResources.contains( subresource ) ) {
map = &mJournalSubResources;
mimeType = journalAttachmentMimeType;
}
@@ -1194,11 +1194,11 @@ bool ResourceKolab::subresourceWritable( const TQString& subresource ) const
// before it opens the resource :-( Make sure we are open
const_cast<ResourceKolab*>( this )->doOpen();
- if ( mEventSubResources.tqcontains( subresource ) )
+ if ( mEventSubResources.contains( subresource ) )
return mEventSubResources[ subresource ].writable();
- if ( mTodoSubResources.tqcontains( subresource ) )
+ if ( mTodoSubResources.contains( subresource ) )
return mTodoSubResources[ subresource ].writable();
- if ( mJournalSubResources.tqcontains( subresource ) )
+ if ( mJournalSubResources.contains( subresource ) )
return mJournalSubResources[ subresource ].writable();
return false; //better a safe default
@@ -1236,11 +1236,11 @@ bool ResourceKolab::addSubresource( const TQString& resource, const TQString& tq
kdDebug(5650) << "KCal Kolab resource - adding subresource: " << resource << endl;
TQString contentsType = kmailCalendarContentsType;
if ( !tqparent.isEmpty() ) {
- if ( mEventSubResources.tqcontains( tqparent ) )
+ if ( mEventSubResources.contains( tqparent ) )
contentsType = kmailCalendarContentsType;
- else if ( mTodoSubResources.tqcontains( tqparent ) )
+ else if ( mTodoSubResources.contains( tqparent ) )
contentsType = kmailTodoContentsType;
- else if ( mJournalSubResources.tqcontains( tqparent ) )
+ else if ( mJournalSubResources.contains( tqparent ) )
contentsType = kmailJournalContentsType;
} else {
TQStringList contentTypeChoices;
@@ -1269,10 +1269,10 @@ bool ResourceKolab::removeSubresource( const TQString& resource )
TQString ResourceKolab::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();
@@ -1311,11 +1311,11 @@ bool ResourceKolab::unloadSubResource( const TQString& subResource )
TQString ResourceKolab::subresourceType( const TQString &resource )
{
- if ( mEventSubResources.tqcontains( resource ) )
+ if ( mEventSubResources.contains( resource ) )
return "event";
- if ( mTodoSubResources.tqcontains( resource ) )
+ if ( mTodoSubResources.contains( resource ) )
return "todo";
- if ( mJournalSubResources.tqcontains( resource ) )
+ if ( mJournalSubResources.contains( resource ) )
return "journal";
return TQString();
}