summaryrefslogtreecommitdiffstats
path: root/libtdepim/tdeabcresourcecached.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-20 16:27:27 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-20 16:27:27 -0600
commit94273bcb909fac42ef9427e3d8a614cab8c29c66 (patch)
tree91b99186971ecb475db3ca41b1b12df24029e389 /libtdepim/tdeabcresourcecached.cpp
parent41b65d69967ad0d35f8b4dd37ac63aad1cebdae9 (diff)
downloadtdepim-94273bcb909fac42ef9427e3d8a614cab8c29c66.tar.gz
tdepim-94273bcb909fac42ef9427e3d8a614cab8c29c66.zip
Rename KABC namespace
Diffstat (limited to 'libtdepim/tdeabcresourcecached.cpp')
-rw-r--r--libtdepim/tdeabcresourcecached.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/libtdepim/tdeabcresourcecached.cpp b/libtdepim/tdeabcresourcecached.cpp
index 4cb4901a8..3bb96112d 100644
--- a/libtdepim/tdeabcresourcecached.cpp
+++ b/libtdepim/tdeabcresourcecached.cpp
@@ -27,10 +27,10 @@
#include "tdeabcresourcecached.h"
-using namespace KABC;
+using namespace TDEABC;
ResourceCached::ResourceCached( const TDEConfig *config )
- : KABC::Resource( config ), mIdMapper( "tdeabc/uidmaps/" ),
+ : TDEABC::Resource( config ), mIdMapper( "tdeabc/uidmaps/" ),
mReloadPolicy( ReloadInterval ), mReloadInterval( 10 ),
mKABCReloadTimer( 0, "mKABCReloadTimer" ), mReloaded( false ),
mSavePolicy( SaveDelayed ), mSaveInterval( 10 ),
@@ -102,7 +102,7 @@ void ResourceCached::writeConfig( TDEConfig *config )
config->writeEntry( "LastLoad", mLastLoad );
config->writeEntry( "LastSave", mLastSave );
- KABC::Resource::writeConfig( config );
+ TDEABC::Resource::writeConfig( config );
}
void ResourceCached::readConfig( TDEConfig *config )
@@ -157,7 +157,7 @@ void ResourceCached::slotKABCSave()
kdDebug(5800) << "ResourceCached::slotKABCSave()" << endl;
- KABC::Ticket *ticket = requestSaveTicket();
+ TDEABC::Ticket *ticket = requestSaveTicket();
if ( ticket ) {
save( ticket );
}
@@ -178,7 +178,7 @@ void ResourceCached::insertAddressee( const Addressee &addr )
mAddrMap.insert( addr.uid(), addr );
mAddedAddressees.insert( addr.uid(), addr );
} else {
- KABC::Addressee oldAddressee = mAddrMap.find( addr.uid() ).data();
+ TDEABC::Addressee oldAddressee = mAddrMap.find( addr.uid() ).data();
if ( oldAddressee != addr ) {
mAddrMap.remove( addr.uid() );
mAddrMap.insert( addr.uid(), addr );
@@ -213,13 +213,13 @@ void ResourceCached::loadCache()
return;
- KABC::VCardConverter converter;
+ TDEABC::VCardConverter converter;
#if defined(KABC_VCARD_ENCODING_FIX)
- KABC::Addressee::List list = converter.parseVCardsRaw( file.readAll().data() );
+ TDEABC::Addressee::List list = converter.parseVCardsRaw( file.readAll().data() );
#else
- KABC::Addressee::List list = converter.parseVCards( TQString::fromUtf8( file.readAll() ) );
+ TDEABC::Addressee::List list = converter.parseVCards( TQString::fromUtf8( file.readAll() ) );
#endif
- KABC::Addressee::List::Iterator it;
+ TDEABC::Addressee::List::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
(*it).setResource( this );
@@ -240,9 +240,9 @@ void ResourceCached::saveCache()
if ( !file.open( IO_WriteOnly ) )
return;
- KABC::Addressee::List list = mAddrMap.values();
+ TDEABC::Addressee::List list = mAddrMap.values();
- KABC::VCardConverter converter;
+ TDEABC::VCardConverter converter;
#if defined(KABC_VCARD_ENCODING_FIX)
TQCString vCard = converter.createVCardsRaw( list );
file.writeBlock( vCard, vCard.length() );
@@ -259,7 +259,7 @@ void ResourceCached::clearCache()
mAddrMap.clear();
}
-void ResourceCached::cleanUpCache( const KABC::Addressee::List &addrList )
+void ResourceCached::cleanUpCache( const TDEABC::Addressee::List &addrList )
{
// load cache
TQFile file( cacheFile() );
@@ -267,14 +267,14 @@ void ResourceCached::cleanUpCache( const KABC::Addressee::List &addrList )
return;
- KABC::VCardConverter converter;
+ TDEABC::VCardConverter converter;
#if defined(KABC_VCARD_ENCODING_FIX)
- KABC::Addressee::List list = converter.parseVCardsRaw( file.readAll().data() );
+ TDEABC::Addressee::List list = converter.parseVCardsRaw( file.readAll().data() );
#else
- KABC::Addressee::List list = converter.parseVCards( TQString::fromUtf8( file.readAll() ) );
+ TDEABC::Addressee::List list = converter.parseVCards( TQString::fromUtf8( file.readAll() ) );
#endif
- KABC::Addressee::List::Iterator cacheIt;
- KABC::Addressee::List::ConstIterator it;
+ TDEABC::Addressee::List::Iterator cacheIt;
+ TDEABC::Addressee::List::ConstIterator it;
for ( cacheIt = list.begin(); cacheIt != list.end(); ++cacheIt ) {
bool found = false;
@@ -311,7 +311,7 @@ void ResourceCached::clearChanges()
mDeletedAddressees.clear();
}
-void ResourceCached::clearChange( const KABC::Addressee &addr )
+void ResourceCached::clearChange( const TDEABC::Addressee &addr )
{
mAddedAddressees.remove( addr.uid() );
mChangedAddressees.remove( addr.uid() );
@@ -325,17 +325,17 @@ void ResourceCached::clearChange( const TQString &uid )
mDeletedAddressees.remove( uid );
}
-KABC::Addressee::List ResourceCached::addedAddressees() const
+TDEABC::Addressee::List ResourceCached::addedAddressees() const
{
return mAddedAddressees.values();
}
-KABC::Addressee::List ResourceCached::changedAddressees() const
+TDEABC::Addressee::List ResourceCached::changedAddressees() const
{
return mChangedAddressees.values();
}
-KABC::Addressee::List ResourceCached::deletedAddressees() const
+TDEABC::Addressee::List ResourceCached::deletedAddressees() const
{
return mDeletedAddressees.values();
}
@@ -350,11 +350,11 @@ TQString ResourceCached::changesCacheFile( const TQString &type ) const
return locateLocal( "cache", "tdeabc/changescache/" + identifier() + "_" + type );
}
-void ResourceCached::saveChangesCache( const TQMap<TQString, KABC::Addressee> &map, const TQString &type )
+void ResourceCached::saveChangesCache( const TQMap<TQString, TDEABC::Addressee> &map, const TQString &type )
{
TQFile file( changesCacheFile( type ) );
- const KABC::Addressee::List list = map.values();
+ const TDEABC::Addressee::List list = map.values();
if ( list.isEmpty() ) {
file.remove();
} else {
@@ -363,7 +363,7 @@ void ResourceCached::saveChangesCache( const TQMap<TQString, KABC::Addressee> &m
return;
}
- KABC::VCardConverter converter;
+ TDEABC::VCardConverter converter;
#if defined(KABC_VCARD_ENCODING_FIX)
const TQCString vCards = converter.createVCardsRaw( list );
file.writeBlock( vCards, vCards.length() );
@@ -382,20 +382,20 @@ void ResourceCached::saveChangesCache()
saveChangesCache( mChangedAddressees, "changed" );
}
-void ResourceCached::loadChangesCache( TQMap<TQString, KABC::Addressee> &map, const TQString &type )
+void ResourceCached::loadChangesCache( TQMap<TQString, TDEABC::Addressee> &map, const TQString &type )
{
TQFile file( changesCacheFile( type ) );
if ( !file.open( IO_ReadOnly ) )
return;
- KABC::VCardConverter converter;
+ TDEABC::VCardConverter converter;
#if defined(KABC_VCARD_ENCODING_FIX)
- const KABC::Addressee::List list = converter.parseVCardsRaw( file.readAll().data() );
+ const TDEABC::Addressee::List list = converter.parseVCardsRaw( file.readAll().data() );
#else
- const KABC::Addressee::List list = converter.parseVCards( TQString::fromUtf8( file.readAll() ) );
+ const TDEABC::Addressee::List list = converter.parseVCards( TQString::fromUtf8( file.readAll() ) );
#endif
- KABC::Addressee::List::ConstIterator it;
+ TDEABC::Addressee::List::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it )
map.insert( (*it).uid(), *it );