summaryrefslogtreecommitdiffstats
path: root/libkdepim/distributionlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkdepim/distributionlist.cpp')
-rw-r--r--libkdepim/distributionlist.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/libkdepim/distributionlist.cpp b/libkdepim/distributionlist.cpp
index 64f56a209..e70b77b57 100644
--- a/libkdepim/distributionlist.cpp
+++ b/libkdepim/distributionlist.cpp
@@ -14,7 +14,7 @@ KPIM::DistributionList::DistributionList( const KABC::Addressee& addr )
{
}
-void KPIM::DistributionList::setName( const QString &name )
+void KPIM::DistributionList::setName( const TQString &name )
{
// We can't use Addressee::setName, the name isn't saved/loaded in the vcard (fixed in 3.4)
Addressee::setFormattedName( name );
@@ -28,21 +28,21 @@ void KPIM::DistributionList::setName( const QString &name )
// Helper function, to parse the contents of the custom field
// Returns a list of { uid, email }
-typedef QValueList<QPair<QString, QString> > ParseList;
-static ParseList parseCustom( const QString& str )
+typedef TQValueList<QPair<TQString, TQString> > ParseList;
+static ParseList parseCustom( const TQString& str )
{
ParseList res;
- const QStringList lst = QStringList::split( ';', str );
- for( QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ const TQStringList lst = TQStringList::split( ';', str );
+ for( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
if ( (*it).isEmpty() )
continue;
// parse "uid,email"
- QStringList helpList = QStringList::split( ',', (*it) );
+ TQStringList helpList = TQStringList::split( ',', (*it) );
Q_ASSERT( !helpList.isEmpty() );
if ( helpList.isEmpty() )
continue;
- const QString uid = helpList.first();
- QString email;
+ const TQString uid = helpList.first();
+ TQString email;
Q_ASSERT( helpList.count() < 3 ); // 1 or 2 items, but not more
if ( helpList.count() == 2 )
email = helpList.last();
@@ -51,38 +51,38 @@ static ParseList parseCustom( const QString& str )
return res;
}
-void KPIM::DistributionList::insertEntry( const Addressee& addr, const QString& email )
+void KPIM::DistributionList::insertEntry( const Addressee& addr, const TQString& email )
{
// insertEntry will removeEntry(uid), but not with formattedName
removeEntry( addr.formattedName(), email );
insertEntry( addr.uid(), email );
}
-void KPIM::DistributionList::insertEntry( const QString& uid, const QString& email )
+void KPIM::DistributionList::insertEntry( const TQString& uid, const TQString& email )
{
Q_ASSERT( !email.isEmpty() || email.isNull() ); // hopefully never called with "", would lead to confusion
removeEntry( uid, email ); // avoid duplicates
- QString str = custom( "KADDRESSBOOK", s_customFieldName );
+ TQString str = custom( "KADDRESSBOOK", s_customFieldName );
// Assumption: UIDs don't contain ; nor ,
str += ";" + uid + "," + email;
insertCustom( "KADDRESSBOOK", s_customFieldName, str ); // replace old value
}
-void KPIM::DistributionList::removeEntry( const Addressee& addr, const QString& email )
+void KPIM::DistributionList::removeEntry( const Addressee& addr, const TQString& email )
{
removeEntry( addr.uid(), email );
// Also remove entries with the full name as uid (for the kolab thing)
removeEntry( addr.formattedName(), email );
}
-void KPIM::DistributionList::removeEntry( const QString& uid, const QString& email )
+void KPIM::DistributionList::removeEntry( const TQString& uid, const TQString& email )
{
Q_ASSERT( !email.isEmpty() || email.isNull() ); // hopefully never called with "", would lead to confusion
ParseList parseList = parseCustom( custom( "KADDRESSBOOK", s_customFieldName ) );
- QString str;
+ TQString str;
for( ParseList::ConstIterator it = parseList.begin(); it != parseList.end(); ++it ) {
- const QString thisUid = (*it).first;
- const QString thisEmail = (*it).second;
+ const TQString thisUid = (*it).first;
+ const TQString thisEmail = (*it).second;
if ( thisUid == uid && thisEmail == email ) {
continue; // remove that one
}
@@ -95,13 +95,13 @@ void KPIM::DistributionList::removeEntry( const QString& uid, const QString& ema
bool KPIM::DistributionList::isDistributionList( const KABC::Addressee& addr )
{
- const QString str = addr.custom( "KADDRESSBOOK", s_customFieldName );
+ const TQString str = addr.custom( "KADDRESSBOOK", s_customFieldName );
return !str.isEmpty();
}
// ###### KDE4: add findByFormattedName to KABC::AddressBook
static KABC::Addressee::List findByFormattedName( KABC::AddressBook* book,
- const QString& name,
+ const TQString& name,
bool caseSensitive = true )
{
KABC::Addressee::List res;
@@ -117,7 +117,7 @@ static KABC::Addressee::List findByFormattedName( KABC::AddressBook* book,
}
KPIM::DistributionList KPIM::DistributionList::findByName( KABC::AddressBook* book,
- const QString& name,
+ const TQString& name,
bool caseSensitive )
{
KABC::AddressBook::Iterator abIt;
@@ -133,7 +133,7 @@ KPIM::DistributionList KPIM::DistributionList::findByName( KABC::AddressBook* bo
return DistributionList();
}
-static KABC::Addressee findByUidOrName( KABC::AddressBook* book, const QString& uidOrName, const QString& email )
+static KABC::Addressee findByUidOrName( KABC::AddressBook* book, const TQString& uidOrName, const TQString& email )
{
KABC::Addressee a = book->findByUid( uidOrName );
if ( a.isEmpty() ) {
@@ -166,11 +166,11 @@ static KABC::Addressee findByUidOrName( KABC::AddressBook* book, const QString&
KPIM::DistributionList::Entry::List KPIM::DistributionList::entries( KABC::AddressBook* book ) const
{
Entry::List res;
- const QString str = custom( "KADDRESSBOOK", s_customFieldName );
+ const TQString str = custom( "KADDRESSBOOK", s_customFieldName );
const ParseList parseList = parseCustom( str );
for( ParseList::ConstIterator it = parseList.begin(); it != parseList.end(); ++it ) {
- const QString uid = (*it).first;
- const QString email = (*it).second;
+ const TQString uid = (*it).first;
+ const TQString email = (*it).second;
// look up contact
KABC::Addressee a = findByUidOrName( book, uid, email );
if ( a.isEmpty() ) {
@@ -183,15 +183,15 @@ KPIM::DistributionList::Entry::List KPIM::DistributionList::entries( KABC::Addre
return res;
}
-QStringList KPIM::DistributionList::emails( KABC::AddressBook* book ) const
+TQStringList KPIM::DistributionList::emails( KABC::AddressBook* book ) const
{
- QStringList emails;
+ TQStringList emails;
- const QString str = custom( "KADDRESSBOOK", s_customFieldName );
+ const TQString str = custom( "KADDRESSBOOK", s_customFieldName );
ParseList parseList = parseCustom( str );
for( ParseList::ConstIterator it = parseList.begin(); it != parseList.end(); ++it ) {
- const QString thisUid = (*it).first;
- const QString thisEmail = (*it).second;
+ const TQString thisUid = (*it).first;
+ const TQString thisEmail = (*it).second;
// look up contact
KABC::Addressee a = findByUidOrName( book, thisUid, thisEmail );
@@ -200,7 +200,7 @@ QStringList KPIM::DistributionList::emails( KABC::AddressBook* book ) const
continue;
}
- const QString email = thisEmail.isEmpty() ? a.fullEmail() :
+ const TQString email = thisEmail.isEmpty() ? a.fullEmail() :
a.fullEmail( thisEmail );
if ( !email.isEmpty() ) {
emails.append( email );
@@ -210,10 +210,10 @@ QStringList KPIM::DistributionList::emails( KABC::AddressBook* book ) const
return emails;
}
-QValueList<KPIM::DistributionList>
+TQValueList<KPIM::DistributionList>
KPIM::DistributionList::allDistributionLists( KABC::AddressBook* book )
{
- QValueList<KPIM::DistributionList> lst;
+ TQValueList<KPIM::DistributionList> lst;
KABC::AddressBook::Iterator abIt;
for ( abIt = book->begin(); abIt != book->end(); ++abIt )
{