summaryrefslogtreecommitdiffstats
path: root/kresources/scalix
diff options
context:
space:
mode:
Diffstat (limited to 'kresources/scalix')
-rw-r--r--kresources/scalix/kabc/resourcescalix.cpp32
-rw-r--r--kresources/scalix/kcal/resourcescalix.cpp58
-rw-r--r--kresources/scalix/kioslave/scalix.cpp8
-rw-r--r--kresources/scalix/knotes/resourcescalix.cpp12
-rw-r--r--kresources/scalix/scalixadmin/otherusermanager.cpp2
5 files changed, 56 insertions, 56 deletions
diff --git a/kresources/scalix/kabc/resourcescalix.cpp b/kresources/scalix/kabc/resourcescalix.cpp
index e9193c4b2..94cec32a2 100644
--- a/kresources/scalix/kabc/resourcescalix.cpp
+++ b/kresources/scalix/kabc/resourcescalix.cpp
@@ -317,7 +317,7 @@ bool KABC::ResourceScalix::kmailUpdateAddressee( const Addressee& addr )
const TQString uid = addr.uid();
TQString subResource;
TQ_UINT32 sernum;
- if ( mUidMap.tqfind( uid ) != mUidMap.end() ) {
+ if ( mUidMap.find( uid ) != mUidMap.end() ) {
subResource = mUidMap[ uid ].resource();
if ( !subresourceWritable( subResource ) ) {
kdWarning() << "Wow! Something tried to update a non-writable addressee! Fix this caller: " << kdBacktrace() << endl;
@@ -359,7 +359,7 @@ bool KABC::ResourceScalix::kmailUpdateAddressee( const Addressee& addr )
kdDebug(5650) << "kmailUpdate returned, now sernum=" << sernum << " for uid=" << uid << endl;
mUidMap[ uid ] = StorageReference( subResource, sernum );
// This is ugly, but it's faster than doing
- // mAddrMap.tqfind(addr.uid()), which would give the same :-(
+ // mAddrMap.find(addr.uid()), which would give the same :-(
// Reason for this: The Changed attribute of Addressee should
// be mutable
const_cast<Addressee&>(addr).setChanged( false );
@@ -377,7 +377,7 @@ void KABC::ResourceScalix::insertAddressee( const Addressee& addr )
const TQString uid = addr.uid();
//kdDebug(5650) << k_funcinfo << uid << endl;
bool ok = false;
- if ( mUidMap.tqcontains( uid ) ) {
+ if ( mUidMap.contains( uid ) ) {
mUidsPendingUpdate.append( uid );
} else {
mUidsPendingAdding.append( uid );
@@ -392,7 +392,7 @@ void KABC::ResourceScalix::insertAddressee( const Addressee& addr )
void KABC::ResourceScalix::removeAddressee( const Addressee& addr )
{
const TQString uid = addr.uid();
- if ( mUidMap.tqfind( uid ) == mUidMap.end() ) return;
+ if ( mUidMap.find( uid ) == mUidMap.end() ) return;
//kdDebug(5650) << k_funcinfo << uid << endl;
const TQString resource = mUidMap[ uid ].resource();
if ( !subresourceWritable( resource ) ) {
@@ -429,8 +429,8 @@ bool KABC::ResourceScalix::fromKMailAddIncidence( const TQString& type,
//kdDebug(5650) << k_funcinfo << uid << endl;
// Emit "addressbook changed" if this comes from kmail and not from the GUI
- if ( !mUidsPendingAdding.tqcontains( uid )
- && !mUidsPendingUpdate.tqcontains( uid ) ) {
+ if ( !mUidsPendingAdding.contains( uid )
+ && !mUidsPendingUpdate.contains( uid ) ) {
addressBook()->emitAddressBookChanged();
} else {
mUidsPendingAdding.remove( uid );
@@ -451,9 +451,9 @@ void KABC::ResourceScalix::fromKMailDelIncidence( const TQString& type,
//kdDebug(5650) << k_funcinfo << uid << endl;
// 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 {
@@ -483,7 +483,7 @@ void KABC::ResourceScalix::fromKMailAddSubresource( const TQString& type,
{
if( type != s_kmailContentsType ) return;
- if ( mSubResources.tqcontains( subResource ) )
+ if ( mSubResources.contains( subResource ) )
// Already registered
return;
@@ -500,7 +500,7 @@ void KABC::ResourceScalix::fromKMailDelSubresource( const TQString& type,
{
if( type != s_kmailContentsType ) return;
- if ( !mSubResources.tqcontains( subResource ) )
+ if ( !mSubResources.contains( subResource ) )
// Not registered
return;
@@ -557,7 +557,7 @@ TQStringList KABC::ResourceScalix::subresources() const
bool KABC::ResourceScalix::subresourceActive( const TQString& subresource ) const
{
- if ( mSubResources.tqcontains( subresource ) ) {
+ if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].active();
}
@@ -569,7 +569,7 @@ bool KABC::ResourceScalix::subresourceActive( const TQString& subresource ) cons
bool KABC::ResourceScalix::subresourceWritable( const TQString& subresource ) const
{
- if ( mSubResources.tqcontains( subresource ) ) {
+ if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].writable();
}
return false; //better a safe default
@@ -577,7 +577,7 @@ bool KABC::ResourceScalix::subresourceWritable( const TQString& subresource ) co
int KABC::ResourceScalix::subresourceCompletionWeight( const TQString& subresource ) const
{
- if ( mSubResources.tqcontains( subresource ) ) {
+ if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].completionWeight();
}
@@ -588,7 +588,7 @@ int KABC::ResourceScalix::subresourceCompletionWeight( const TQString& subresour
TQString KABC::ResourceScalix::subresourceLabel( const TQString& subresource ) const
{
- if ( mSubResources.tqcontains( subresource ) ) {
+ if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].label();
}
@@ -598,7 +598,7 @@ TQString KABC::ResourceScalix::subresourceLabel( const TQString& subresource ) c
void KABC::ResourceScalix::setSubresourceCompletionWeight( const TQString& subresource, int completionWeight )
{
- if ( mSubResources.tqcontains( subresource ) ) {
+ if ( mSubResources.contains( subresource ) ) {
mSubResources[ subresource ].setCompletionWeight( completionWeight );
} else {
kdDebug(5650) << "setSubresourceCompletionWeight: subresource " << subresource << " not found" << endl;
@@ -617,7 +617,7 @@ TQMap<TQString, TQString> KABC::ResourceScalix::uidToResourceMap() const
void KABC::ResourceScalix::setSubresourceActive( const TQString &subresource, bool active )
{
- if ( mSubResources.tqcontains( subresource ) ) {
+ if ( mSubResources.contains( subresource ) ) {
mSubResources[ subresource ].setActive( active );
load();
} else {
diff --git a/kresources/scalix/kcal/resourcescalix.cpp b/kresources/scalix/kcal/resourcescalix.cpp
index a67585ee0..2848a353a 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 ) ) {
diff --git a/kresources/scalix/kioslave/scalix.cpp b/kresources/scalix/kioslave/scalix.cpp
index d5603af92..36b2aa776 100644
--- a/kresources/scalix/kioslave/scalix.cpp
+++ b/kresources/scalix/kioslave/scalix.cpp
@@ -73,7 +73,7 @@ void Scalix::get( const KURL &url )
TQString path = url.path();
- if ( path.tqcontains( "/freebusy/" ) ) {
+ if ( path.contains( "/freebusy/" ) ) {
retrieveFreeBusy( url );
} else {
error( KIO::ERR_SLAVE_DEFINED, i18n( "Unknown path. Known path is '/freebusy/'" ) );
@@ -84,7 +84,7 @@ void Scalix::put( const KURL& url, int, bool, bool )
{
TQString path = url.path();
- if ( path.tqcontains( "/freebusy/" ) ) {
+ if ( path.contains( "/freebusy/" ) ) {
publishFreeBusy( url );
} else {
error( KIO::ERR_SLAVE_DEFINED, i18n( "Unknown path. Known path is '/freebusy/'" ) );
@@ -134,12 +134,12 @@ void Scalix::publishFreeBusy( const KURL &url )
TQString path = url.path();
// extract user name
- int lastSlash = path.tqfindRev( '/' );
+ int lastSlash = path.findRev( '/' );
if ( lastSlash != -1 )
requestUser = path.mid( lastSlash + 1 );
// extract calendar name
- int secondSlash = path.tqfind( '/', 1 );
+ int secondSlash = path.find( '/', 1 );
if ( secondSlash != -1 )
calendar = path.mid( secondSlash + 1, lastSlash - secondSlash - 1 );
diff --git a/kresources/scalix/knotes/resourcescalix.cpp b/kresources/scalix/knotes/resourcescalix.cpp
index b9d5b54ca..69922283e 100644
--- a/kresources/scalix/knotes/resourcescalix.cpp
+++ b/kresources/scalix/knotes/resourcescalix.cpp
@@ -166,7 +166,7 @@ KCal::Journal* ResourceScalix::addNote( const TQString& data, const TQString& su
journal = static_cast<KCal::Journal*>( formatter.fromString( data ) );
Q_ASSERT( journal );
- if( journal && !mUidMap.tqcontains( journal->uid() ) )
+ if( journal && !mUidMap.contains( journal->uid() ) )
if ( addNote( journal, subresource, sernum ) )
return journal;
else
@@ -212,7 +212,7 @@ bool ResourceScalix::addNote( KCal::Journal* journal,
bool ResourceScalix::deleteNote( KCal::Journal* journal )
{
const TQString uid = journal->uid();
- if ( !mUidMap.tqcontains( uid ) )
+ if ( !mUidMap.contains( uid ) )
// Odd
return false;
@@ -253,7 +253,7 @@ void ResourceScalix::incidenceUpdated( KCal::IncidenceBase* i )
{
TQString subResource;
TQ_UINT32 sernum;
- if ( mUidMap.tqcontains( i->uid() ) ) {
+ if ( mUidMap.contains( i->uid() ) ) {
subResource = mUidMap[ i->uid() ].resource();
sernum = mUidMap[ i->uid() ].serialNumber();
} else { // can this happen?
@@ -327,7 +327,7 @@ void ResourceScalix::fromKMailAddSubresource( const TQString& type,
// Not ours
return;
- if ( mSubResources.tqcontains( subResource ) )
+ if ( mSubResources.contains( subResource ) )
// Already registered
return;
@@ -347,7 +347,7 @@ void ResourceScalix::fromKMailDelSubresource( const TQString& type,
// Not ours
return;
- if ( !mSubResources.tqcontains( subResource ) )
+ if ( !mSubResources.contains( subResource ) )
// Not registered
return;
@@ -411,7 +411,7 @@ TQStringList ResourceScalix::subresources() const
bool ResourceScalix::subresourceActive( const TQString& res ) const
{
- if ( mSubResources.tqcontains( res ) ) {
+ if ( mSubResources.contains( res ) ) {
return mSubResources[ res ].active();
}
diff --git a/kresources/scalix/scalixadmin/otherusermanager.cpp b/kresources/scalix/scalixadmin/otherusermanager.cpp
index cacb94742..a3c19de12 100644
--- a/kresources/scalix/scalixadmin/otherusermanager.cpp
+++ b/kresources/scalix/scalixadmin/otherusermanager.cpp
@@ -30,7 +30,7 @@ OtherUserManager::~OtherUserManager()
void OtherUserManager::addOtherUser( const TQString &email )
{
- if ( !mOtherUsers.tqcontains( email ) ) {
+ if ( !mOtherUsers.contains( email ) ) {
mOtherUsers.append( email );
emit changed();
}