summaryrefslogtreecommitdiffstats
path: root/libtdepim/tests
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/tests
parent41b65d69967ad0d35f8b4dd37ac63aad1cebdae9 (diff)
downloadtdepim-94273bcb909fac42ef9427e3d8a614cab8c29c66.tar.gz
tdepim-94273bcb909fac42ef9427e3d8a614cab8c29c66.zip
Rename KABC namespace
Diffstat (limited to 'libtdepim/tests')
-rw-r--r--libtdepim/tests/testdistrlist.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/libtdepim/tests/testdistrlist.cpp b/libtdepim/tests/testdistrlist.cpp
index 0bbb536d7..f2d6b68b1 100644
--- a/libtdepim/tests/testdistrlist.cpp
+++ b/libtdepim/tests/testdistrlist.cpp
@@ -61,11 +61,11 @@ int main(int argc, char *argv[])
void TestDistrList::setup()
{
// We need a std addressbook
- KABC::AddressBook *ab = KABC::StdAddressBook::self();
- KABC::StdAddressBook::setAutomaticSave( false );
+ TDEABC::AddressBook *ab = TDEABC::StdAddressBook::self();
+ TDEABC::StdAddressBook::setAutomaticSave( false );
// and two contacts
- KABC::Addressee addr1;
+ TDEABC::Addressee addr1;
addr1.setName( "addr1" );
addr1.setFormattedName( "addr1" );
addr1.insertEmail( "addr1@kde.org", true );
@@ -73,7 +73,7 @@ void TestDistrList::setup()
ab->insertAddressee( addr1 );
assert( addr1.emails().count() == 2 );
- KABC::Addressee addr2;
+ TDEABC::Addressee addr2;
addr2.setName( "addr2" );
addr2.insertEmail( "addr2@kde.org", true );
addr2.insertEmail( "addr2-alternate@kde.org" );
@@ -146,9 +146,9 @@ static bool removeDirAndContentsRecursively( const TQString & path )
void TestDistrList::cleanup()
{
kdDebug() << k_funcinfo << endl;
- KABC::AddressBook *ab = KABC::StdAddressBook::self();
+ TDEABC::AddressBook *ab = TDEABC::StdAddressBook::self();
ab->clear();
- KABC::StdAddressBook::close();
+ TDEABC::StdAddressBook::close();
TQString tdehome = TQFile::decodeName( getenv("TDEHOME") );
KURL urltdehome; urltdehome.setPath( tdehome );
@@ -173,17 +173,17 @@ void TestDistrList::testNewList()
check( "name set", dl.formattedName(), "foo" );
assert( DistributionList::isDistributionList( dl ) );
- KABC::AddressBook *ab = KABC::StdAddressBook::self();
+ TDEABC::AddressBook *ab = TDEABC::StdAddressBook::self();
ab->insertAddressee( dl );
-#if 0 // can't do that until we have KABC::AddressBook::findByFormattedName, or we use setName()
- KABC::Addressee::List addrList = ab->findByName( "foo" );
+#if 0 // can't do that until we have TDEABC::AddressBook::findByFormattedName, or we use setName()
+ TDEABC::Addressee::List addrList = ab->findByName( "foo" );
assert( addrList.count() == 1 );
- KABC::Addressee addr = addrList.first();
+ TDEABC::Addressee addr = addrList.first();
assert( !addr.isEmpty() );
check( "correct name", addr.name(), "foo" );
assert( DistributionList::isDistributionList( addr ) );
#else
- KABC::Addressee addr = dl;
+ TDEABC::Addressee addr = dl;
#endif
DistributionList dl2 = DistributionList::findByName( ab, "foo" );
@@ -201,19 +201,19 @@ void TestDistrList::testNewList()
void TestDistrList::testInsertEntry()
{
kdDebug() << k_funcinfo << endl;
- KABC::AddressBook *ab = KABC::StdAddressBook::self();
+ TDEABC::AddressBook *ab = TDEABC::StdAddressBook::self();
DistributionList dl = DistributionList::findByName( ab, "foo" );
assert( !dl.isEmpty() );
#if 0 // the usual method
- KABC::Addressee addr1 = ab->findByName( "addr1" ).first();
+ TDEABC::Addressee addr1 = ab->findByName( "addr1" ).first();
assert( !addr1.isEmpty() );
dl.insertEntry( addr1 );
#else // the kolab-resource method
dl.insertEntry( "addr1" );
#endif
- KABC::Addressee addr2 = ab->findByName( "addr2" ).first();
+ TDEABC::Addressee addr2 = ab->findByName( "addr2" ).first();
assert( !addr2.isEmpty() );
dl.insertEntry( addr2, "addr2-alternate@kde.org" );
@@ -248,17 +248,17 @@ void TestDistrList::testInsertEntry()
void TestDistrList::testRemoveEntry()
{
kdDebug() << k_funcinfo << endl;
- KABC::AddressBook *ab = KABC::StdAddressBook::self();
+ TDEABC::AddressBook *ab = TDEABC::StdAddressBook::self();
DistributionList dl = DistributionList::findByName( ab, "foo" );
assert( !dl.isEmpty() );
DistributionList::Entry::List entries = dl.entries( ab );
check( "entries count before removeEntry", TQString::number( entries.count() ), "3" );
// Removing an empty entry shouldn't do anything
- dl.removeEntry( KABC::Addressee() );
+ dl.removeEntry( TDEABC::Addressee() );
check( "entries count after removing empty entry", TQString::number( dl.entries(ab).count() ), "3" );
- KABC::Addressee addr1 = ab->findByName( "addr1" ).first();
+ TDEABC::Addressee addr1 = ab->findByName( "addr1" ).first();
assert( !addr1.isEmpty() );
// Removing an entry with the wrong email passed, shouldn't do anything
dl.removeEntry( addr1, "foo@foobar.com" );
@@ -272,7 +272,7 @@ void TestDistrList::testRemoveEntry()
check( "first email", emails[0], "addr2 <addr2-alternate@kde.org>" );
// Now move on to addr2. First remove with no or a wrong email (nothing should happen)
- KABC::Addressee addr2 = ab->findByName( "addr2" ).first();
+ TDEABC::Addressee addr2 = ab->findByName( "addr2" ).first();
assert( !addr2.isEmpty() );
dl.removeEntry( addr2 );
check( "entries count after removing entry with no email", TQString::number( dl.entries(ab).count() ), "2" );
@@ -293,14 +293,14 @@ void TestDistrList::testDuplicate()
{
kdDebug() << k_funcinfo << endl;
// This is a special test for the case where we have a contact and a distr list with the same name
- KABC::AddressBook *ab = KABC::StdAddressBook::self();
- KABC::Addressee addr;
+ TDEABC::AddressBook *ab = TDEABC::StdAddressBook::self();
+ TDEABC::Addressee addr;
addr.setName( "foo" );
addr.insertEmail( "foo@kde.org", true );
ab->insertAddressee( addr );
#if 0 // we need a findByFormattedName
- KABC::Addressee::List addrList = ab->findByName( "foo" );
+ TDEABC::Addressee::List addrList = ab->findByName( "foo" );
assert( addrList.count() == 2 );
bool a = DistributionList::isDistributionList( addrList.first() );
@@ -321,7 +321,7 @@ void TestDistrList::testDeleteList()
{
kdDebug() << k_funcinfo << endl;
- KABC::AddressBook *ab = KABC::StdAddressBook::self();
+ TDEABC::AddressBook *ab = TDEABC::StdAddressBook::self();
DistributionList dl = DistributionList::findByName( ab, "foo" );
assert( !dl.isEmpty() );
ab->removeAddressee( dl );