summaryrefslogtreecommitdiffstats
path: root/kresources/kolab/kabc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kresources/kolab/kabc
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kresources/kolab/kabc')
-rw-r--r--kresources/kolab/kabc/contact.cpp296
-rw-r--r--kresources/kolab/kabc/contact.h300
-rw-r--r--kresources/kolab/kabc/resourcekolab.cpp140
-rw-r--r--kresources/kolab/kabc/resourcekolab.h54
-rw-r--r--kresources/kolab/kabc/resourcekolab_plugin.cpp2
5 files changed, 396 insertions, 396 deletions
diff --git a/kresources/kolab/kabc/contact.cpp b/kresources/kolab/kabc/contact.cpp
index c5e819b3f..fc9087316 100644
--- a/kresources/kolab/kabc/contact.cpp
+++ b/kresources/kolab/kabc/contact.cpp
@@ -38,7 +38,7 @@
#include <libkdepim/distributionlist.h>
#include <kio/netaccess.h>
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <float.h>
using namespace Kolab;
@@ -56,7 +56,7 @@ Contact::Contact( const KABC::Addressee* addr )
}
// loading (xml->addressee)
-Contact::Contact( const QString& xml, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum )
+Contact::Contact( const TQString& xml, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum )
: mHasGeo( false )
{
load( xml );
@@ -72,252 +72,252 @@ Contact::~Contact()
{
}
-void Contact::setGivenName( const QString& name )
+void Contact::setGivenName( const TQString& name )
{
mGivenName = name;
}
-QString Contact::givenName() const
+TQString Contact::givenName() const
{
return mGivenName;
}
-void Contact::setMiddleNames( const QString& names )
+void Contact::setMiddleNames( const TQString& names )
{
mMiddleNames = names;
}
-QString Contact::middleNames() const
+TQString Contact::middleNames() const
{
return mMiddleNames;
}
-void Contact::setLastName( const QString& name )
+void Contact::setLastName( const TQString& name )
{
mLastName = name;
}
-QString Contact::lastName() const
+TQString Contact::lastName() const
{
return mLastName;
}
-void Contact::setFullName( const QString& name )
+void Contact::setFullName( const TQString& name )
{
mFullName = name;
}
-QString Contact::fullName() const
+TQString Contact::fullName() const
{
return mFullName;
}
-void Contact::setInitials( const QString& initials )
+void Contact::setInitials( const TQString& initials )
{
mInitials = initials;
}
-QString Contact::initials() const
+TQString Contact::initials() const
{
return mInitials;
}
-void Contact::setPrefix( const QString& prefix )
+void Contact::setPrefix( const TQString& prefix )
{
mPrefix = prefix;
}
-QString Contact::prefix() const
+TQString Contact::prefix() const
{
return mPrefix;
}
-void Contact::setSuffix( const QString& suffix )
+void Contact::setSuffix( const TQString& suffix )
{
mSuffix = suffix;
}
-QString Contact::suffix() const
+TQString Contact::suffix() const
{
return mSuffix;
}
-void Contact::setRole( const QString& role )
+void Contact::setRole( const TQString& role )
{
mRole = role;
}
-QString Contact::role() const
+TQString Contact::role() const
{
return mRole;
}
-void Contact::setFreeBusyUrl( const QString& fbUrl )
+void Contact::setFreeBusyUrl( const TQString& fbUrl )
{
mFreeBusyUrl = fbUrl;
}
-QString Contact::freeBusyUrl() const
+TQString Contact::freeBusyUrl() const
{
return mFreeBusyUrl;
}
-void Contact::setOrganization( const QString& organization )
+void Contact::setOrganization( const TQString& organization )
{
mOrganization = organization;
}
-QString Contact::organization() const
+TQString Contact::organization() const
{
return mOrganization;
}
-void Contact::setWebPage( const QString& url )
+void Contact::setWebPage( const TQString& url )
{
mWebPage = url;
}
-QString Contact::webPage() const
+TQString Contact::webPage() const
{
return mWebPage;
}
-void Contact::setIMAddress( const QString& imAddress )
+void Contact::setIMAddress( const TQString& imAddress )
{
mIMAddress = imAddress;
}
-QString Contact::imAddress() const
+TQString Contact::imAddress() const
{
return mIMAddress;
}
-void Contact::setDepartment( const QString& department )
+void Contact::setDepartment( const TQString& department )
{
mDepartment = department;
}
-QString Contact::department() const
+TQString Contact::department() const
{
return mDepartment;
}
-void Contact::setOfficeLocation( const QString& location )
+void Contact::setOfficeLocation( const TQString& location )
{
mOfficeLocation = location;
}
-QString Contact::officeLocation() const
+TQString Contact::officeLocation() const
{
return mOfficeLocation;
}
-void Contact::setProfession( const QString& profession )
+void Contact::setProfession( const TQString& profession )
{
mProfession = profession;
}
-QString Contact::profession() const
+TQString Contact::profession() const
{
return mProfession;
}
-// void Contact::setJobTitle( const QString& title )
+// void Contact::setJobTitle( const TQString& title )
// {
// mJobTitle = title;
// }
-// QString Contact::jobTitle() const
+// TQString Contact::jobTitle() const
// {
// return mJobTitle;
// }
-void Contact::setManagerName( const QString& name )
+void Contact::setManagerName( const TQString& name )
{
mManagerName = name;
}
-QString Contact::managerName() const
+TQString Contact::managerName() const
{
return mManagerName;
}
-void Contact::setAssistant( const QString& name )
+void Contact::setAssistant( const TQString& name )
{
mAssistant = name;
}
-QString Contact::assistant() const
+TQString Contact::assistant() const
{
return mAssistant;
}
-void Contact::setNickName( const QString& name )
+void Contact::setNickName( const TQString& name )
{
mNickName = name;
}
-QString Contact::nickName() const
+TQString Contact::nickName() const
{
return mNickName;
}
-void Contact::setSpouseName( const QString& name )
+void Contact::setSpouseName( const TQString& name )
{
mSpouseName = name;
}
-QString Contact::spouseName() const
+TQString Contact::spouseName() const
{
return mSpouseName;
}
-void Contact::setBirthday( const QDate& date )
+void Contact::setBirthday( const TQDate& date )
{
mBirthday = date;
}
-QDate Contact::birthday() const
+TQDate Contact::birthday() const
{
return mBirthday;
}
-void Contact::setAnniversary( const QDate& date )
+void Contact::setAnniversary( const TQDate& date )
{
mAnniversary = date;
}
-QDate Contact::anniversary() const
+TQDate Contact::anniversary() const
{
return mAnniversary;
}
-void Contact::setChildren( const QString& children )
+void Contact::setChildren( const TQString& children )
{
mChildren = children;
}
-QString Contact::children() const
+TQString Contact::children() const
{
return mChildren;
}
-void Contact::setGender( const QString& gender )
+void Contact::setGender( const TQString& gender )
{
mGender = gender;
}
-QString Contact::gender() const
+TQString Contact::gender() const
{
return mGender;
}
-void Contact::setLanguage( const QString& language )
+void Contact::setLanguage( const TQString& language )
{
mLanguage = language;
}
-QString Contact::language() const
+TQString Contact::language() const
{
return mLanguage;
}
@@ -327,12 +327,12 @@ void Contact::addPhoneNumber( const PhoneNumber& number )
mPhoneNumbers.append( number );
}
-QValueList<Contact::PhoneNumber>& Contact::phoneNumbers()
+TQValueList<Contact::PhoneNumber>& Contact::phoneNumbers()
{
return mPhoneNumbers;
}
-const QValueList<Contact::PhoneNumber>& Contact::phoneNumbers() const
+const TQValueList<Contact::PhoneNumber>& Contact::phoneNumbers() const
{
return mPhoneNumbers;
}
@@ -342,12 +342,12 @@ void Contact::addEmail( const Email& email )
mEmails.append( email );
}
-QValueList<Contact::Email>& Contact::emails()
+TQValueList<Contact::Email>& Contact::emails()
{
return mEmails;
}
-const QValueList<Contact::Email>& Contact::emails() const
+const TQValueList<Contact::Email>& Contact::emails() const
{
return mEmails;
}
@@ -357,34 +357,34 @@ void Contact::addAddress( const Contact::Address& address )
mAddresses.append( address );
}
-QValueList<Contact::Address>& Contact::addresses()
+TQValueList<Contact::Address>& Contact::addresses()
{
return mAddresses;
}
-const QValueList<Contact::Address>& Contact::addresses() const
+const TQValueList<Contact::Address>& Contact::addresses() const
{
return mAddresses;
}
-void Contact::setPreferredAddress( const QString& address )
+void Contact::setPreferredAddress( const TQString& address )
{
mPreferredAddress = address;
}
-QString Contact::preferredAddress() const
+TQString Contact::preferredAddress() const
{
return mPreferredAddress;
}
-bool Contact::loadNameAttribute( QDomElement& element )
+bool Contact::loadNameAttribute( TQDomElement& element )
{
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "given-name" )
setGivenName( e.text() );
@@ -410,9 +410,9 @@ bool Contact::loadNameAttribute( QDomElement& element )
return true;
}
-void Contact::saveNameAttribute( QDomElement& element ) const
+void Contact::saveNameAttribute( TQDomElement& element ) const
{
- QDomElement e = element.ownerDocument().createElement( "name" );
+ TQDomElement e = element.ownerDocument().createElement( "name" );
element.appendChild( e );
writeString( e, "given-name", givenName() );
@@ -424,15 +424,15 @@ void Contact::saveNameAttribute( QDomElement& element ) const
writeString( e, "suffix", suffix() );
}
-bool Contact::loadPhoneAttribute( QDomElement& element )
+bool Contact::loadPhoneAttribute( TQDomElement& element )
{
PhoneNumber number;
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "type" )
number.type = e.text();
@@ -449,11 +449,11 @@ bool Contact::loadPhoneAttribute( QDomElement& element )
return true;
}
-void Contact::savePhoneAttributes( QDomElement& element ) const
+void Contact::savePhoneAttributes( TQDomElement& element ) const
{
- QValueList<PhoneNumber>::ConstIterator it = mPhoneNumbers.begin();
+ TQValueList<PhoneNumber>::ConstIterator it = mPhoneNumbers.begin();
for ( ; it != mPhoneNumbers.end(); ++it ) {
- QDomElement e = element.ownerDocument().createElement( "phone" );
+ TQDomElement e = element.ownerDocument().createElement( "phone" );
element.appendChild( e );
const PhoneNumber& p = *it;
writeString( e, "type", p.type );
@@ -461,14 +461,14 @@ void Contact::savePhoneAttributes( QDomElement& element ) const
}
}
-void Contact::saveEmailAttributes( QDomElement& element ) const
+void Contact::saveEmailAttributes( TQDomElement& element ) const
{
- QValueList<Email>::ConstIterator it = mEmails.begin();
+ TQValueList<Email>::ConstIterator it = mEmails.begin();
for ( ; it != mEmails.end(); ++it )
saveEmailAttribute( element, *it );
}
-void Contact::loadCustomAttributes( QDomElement& element )
+void Contact::loadCustomAttributes( TQDomElement& element )
{
Custom custom;
custom.app = element.attribute( "app" );
@@ -477,16 +477,16 @@ void Contact::loadCustomAttributes( QDomElement& element )
mCustomList.append( custom );
}
-void Contact::saveCustomAttributes( QDomElement& element ) const
+void Contact::saveCustomAttributes( TQDomElement& element ) const
{
- QValueList<Custom>::ConstIterator it = mCustomList.begin();
+ TQValueList<Custom>::ConstIterator it = mCustomList.begin();
for ( ; it != mCustomList.end(); ++it ) {
Q_ASSERT( !(*it).name.isEmpty() );
if ( (*it).app == s_unhandledTagAppName ) {
writeString( element, (*it).name, (*it).value );
} else {
// Let's use attributes so that other tag-preserving-code doesn't need sub-elements
- QDomElement e = element.ownerDocument().createElement( "x-custom" );
+ TQDomElement e = element.ownerDocument().createElement( "x-custom" );
element.appendChild( e );
e.setAttribute( "app", (*it).app );
e.setAttribute( "name", (*it).name );
@@ -495,16 +495,16 @@ void Contact::saveCustomAttributes( QDomElement& element ) const
}
}
-bool Contact::loadAddressAttribute( QDomElement& element )
+bool Contact::loadAddressAttribute( TQDomElement& element )
{
Address address;
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "type" )
address.type = e.text();
@@ -533,15 +533,15 @@ bool Contact::loadAddressAttribute( QDomElement& element )
return true;
}
-void Contact::saveAddressAttributes( QDomElement& element ) const
+void Contact::saveAddressAttributes( TQDomElement& element ) const
{
- QValueList<Address>::ConstIterator it = mAddresses.begin();
+ TQValueList<Address>::ConstIterator it = mAddresses.begin();
for ( ; it != mAddresses.end(); ++it ) {
- QDomElement e = element.ownerDocument().createElement( "address" );
+ TQDomElement e = element.ownerDocument().createElement( "address" );
element.appendChild( e );
const Address& a = *it;
writeString( e, "type", a.type );
- writeString( e, "x-kde-type", QString::number( a.kdeAddressType ) );
+ writeString( e, "x-kde-type", TQString::number( a.kdeAddressType ) );
if ( !a.street.isEmpty() )
writeString( e, "street", a.street );
if ( !a.pobox.isEmpty() )
@@ -558,15 +558,15 @@ void Contact::saveAddressAttributes( QDomElement& element ) const
}
-void Kolab::Contact::loadDistrListMember( const QDomElement& element )
+void Kolab::Contact::loadDistrListMember( const TQDomElement& element )
{
Member member;
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
if ( tagName == "display-name" )
member.displayName = e.text();
else if ( tagName == "smtp-address" )
@@ -576,11 +576,11 @@ void Kolab::Contact::loadDistrListMember( const QDomElement& element )
mDistrListMembers.append( member );
}
-void Contact::saveDistrListMembers( QDomElement& element ) const
+void Contact::saveDistrListMembers( TQDomElement& element ) const
{
- QValueList<Member>::ConstIterator it = mDistrListMembers.begin();
+ TQValueList<Member>::ConstIterator it = mDistrListMembers.begin();
for( ; it != mDistrListMembers.end(); ++it ) {
- QDomElement e = element.ownerDocument().createElement( "member" );
+ TQDomElement e = element.ownerDocument().createElement( "member" );
element.appendChild( e );
const Member& m = *it;
writeString( e, "display-name", m.displayName );
@@ -588,9 +588,9 @@ void Contact::saveDistrListMembers( QDomElement& element ) const
}
}
-bool Contact::loadAttribute( QDomElement& element )
+bool Contact::loadAttribute( TQDomElement& element )
{
- const QString tagName = element.tagName();
+ const TQString tagName = element.tagName();
switch ( tagName[0].latin1() ) {
case 'a':
if ( tagName == "address" )
@@ -762,7 +762,7 @@ bool Contact::loadAttribute( QDomElement& element )
return KolabBase::loadAttribute( element );
}
-bool Contact::saveAttributes( QDomElement& element ) const
+bool Contact::saveAttributes( TQDomElement& element ) const
{
// Save the base class elements
KolabBase::saveAttributes( element );
@@ -804,8 +804,8 @@ bool Contact::saveAttributes( QDomElement& element ) const
saveAddressAttributes( element );
writeString( element, "preferred-address", preferredAddress() );
if ( mHasGeo ) {
- writeString( element, "latitude", QString::number( latitude(), 'g', DBL_DIG ) );
- writeString( element, "longitude", QString::number( longitude(), 'g', DBL_DIG ) );
+ writeString( element, "latitude", TQString::number( latitude(), 'g', DBL_DIG ) );
+ writeString( element, "longitude", TQString::number( longitude(), 'g', DBL_DIG ) );
}
}
saveCustomAttributes( element );
@@ -813,9 +813,9 @@ bool Contact::saveAttributes( QDomElement& element ) const
return true;
}
-bool Contact::loadXML( const QDomDocument& document )
+bool Contact::loadXML( const TQDomDocument& document )
{
- QDomElement top = document.documentElement();
+ TQDomElement top = document.documentElement();
mIsDistributionList = top.tagName() == "distribution-list";
if ( top.tagName() != "contact" && !mIsDistributionList ) {
@@ -825,11 +825,11 @@ bool Contact::loadXML( const QDomDocument& document )
}
- for ( QDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = top.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !loadAttribute( e ) ) {
// Unhandled tag - save for later storage
//kdDebug() << "Saving unhandled tag " << e.tagName() << endl;
@@ -846,10 +846,10 @@ bool Contact::loadXML( const QDomDocument& document )
return true;
}
-QString Contact::saveXML() const
+TQString Contact::saveXML() const
{
- QDomDocument document = domTree();
- QDomElement element = document.createElement(
+ TQDomDocument document = domTree();
+ TQDomElement element = document.createElement(
mIsDistributionList ? "distribution-list" : "contact" );
element.setAttribute( "version", "1.0" );
saveAttributes( element );
@@ -857,7 +857,7 @@ QString Contact::saveXML() const
return document.toString();
}
-static QString addressTypeToString( int /*KABC::Address::Type*/ type )
+static TQString addressTypeToString( int /*KABC::Address::Type*/ type )
{
if ( type & KABC::Address::Home )
return "home";
@@ -866,7 +866,7 @@ static QString addressTypeToString( int /*KABC::Address::Type*/ type )
return "other";
}
-static int addressTypeFromString( const QString& type )
+static int addressTypeFromString( const TQString& type )
{
if ( type == "home" )
return KABC::Address::Home;
@@ -876,12 +876,12 @@ static int addressTypeFromString( const QString& type )
return KABC::Address::Dom | KABC::Address::Intl | KABC::Address::Postal | KABC::Address::Parcel;
}
-static QStringList phoneTypeToString( int /*KABC::PhoneNumber::Types*/ type )
+static TQStringList phoneTypeToString( int /*KABC::PhoneNumber::Types*/ type )
{
// KABC has a bitfield, i.e. the same phone number can be used for work and home
// and fax and cellphone etc. etc.
// So when saving we need to create as many tags as bits that were set.
- QStringList types;
+ TQStringList types;
if ( type & KABC::PhoneNumber::Fax ) {
if ( type & KABC::PhoneNumber::Home )
types << "homefax";
@@ -936,7 +936,7 @@ static QStringList phoneTypeToString( int /*KABC::PhoneNumber::Types*/ type )
return types;
}
-static int /*KABC::PhoneNumber::Types*/ phoneTypeFromString( const QString& type )
+static int /*KABC::PhoneNumber::Types*/ phoneTypeFromString( const TQString& type )
{
if ( type == "homefax" )
return KABC::PhoneNumber::Home | KABC::PhoneNumber::Fax;
@@ -1030,15 +1030,15 @@ void Contact::setFields( const KABC::Addressee* addressee )
setSpouseName( addressee->custom( "KADDRESSBOOK", "X-SpousesName" ) );
if ( !addressee->birthday().isNull() )
setBirthday( addressee->birthday().date() );
- const QString& anniversary = addressee->custom( "KADDRESSBOOK", "X-Anniversary" );
+ const TQString& anniversary = addressee->custom( "KADDRESSBOOK", "X-Anniversary" );
if ( !anniversary.isEmpty() )
setAnniversary( stringToDate( anniversary ) );
- const QStringList emails = addressee->emails();
+ const TQStringList emails = addressee->emails();
// Conversion problem here:
// KABC::Addressee has only one full name and N addresses, but the XML format
// has N times (fullname+address). So we just copy the fullname over and ignore it on loading.
- for ( QStringList::ConstIterator it = emails.begin(); it != emails.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = emails.begin(); it != emails.end(); ++it ) {
Email email;
email.displayName = fullName();
email.smtpAddress = *it;
@@ -1046,7 +1046,7 @@ void Contact::setFields( const KABC::Addressee* addressee )
}
// Now the real-world addresses
- QString preferredAddress = "home";
+ TQString preferredAddress = "home";
const KABC::Address::List addresses = addressee->addresses();
for ( KABC::Address::List::ConstIterator it = addresses.begin() ; it != addresses.end(); ++it ) {
Address address;
@@ -1070,8 +1070,8 @@ void Contact::setFields( const KABC::Addressee* addressee )
const KABC::PhoneNumber::List phones = addressee->phoneNumbers();
for ( KABC::PhoneNumber::List::ConstIterator it = phones.begin(); it != phones.end(); ++it ) {
// Create a tag per phone type set in the bitfield
- QStringList types = phoneTypeToString( (*it).type() );
- for( QStringList::Iterator typit = types.begin(); typit != types.end(); ++typit ) {
+ TQStringList types = phoneTypeToString( (*it).type() );
+ for( TQStringList::Iterator typit = types.begin(); typit != types.end(); ++typit ) {
PhoneNumber phoneNumber;
phoneNumber.type = *typit;
phoneNumber.number = (*it).number();
@@ -1102,21 +1102,21 @@ void Contact::setFields( const KABC::Addressee* addressee )
// Other KADDRESSBOOK custom fields than those already handled
// (includes e.g. crypto settings, and extra im addresses)
- QStringList knownCustoms;
+ TQStringList knownCustoms;
for ( const char** p = s_knownCustomFields; *p; ++p )
- knownCustoms << QString::fromLatin1( *p );
- QStringList customs = addressee->customs();
- for( QStringList::Iterator it = customs.begin(); it != customs.end(); ++it ) {
+ knownCustoms << TQString::fromLatin1( *p );
+ TQStringList customs = addressee->customs();
+ for( TQStringList::Iterator it = customs.begin(); it != customs.end(); ++it ) {
// KABC::Addressee doesn't offer a real way to iterate over customs, other than splitting strings ourselves
// The format is "app-name:value".
int pos = (*it).find( '-' );
if ( pos == -1 ) continue;
- QString app = (*it).left( pos );
+ TQString app = (*it).left( pos );
if ( app == "KOLAB" ) continue;
- QString name = (*it).mid( pos + 1 );
+ TQString name = (*it).mid( pos + 1 );
pos = name.find( ':' );
if ( pos == -1 ) continue;
- QString value = name.mid( pos + 1 );
+ TQString value = name.mid( pos + 1 );
name = name.left( pos );
if ( !knownCustoms.contains( name ) ) {
//kdDebug() << k_funcinfo << "app=" << app << " name=" << name << " value=" << value << endl;
@@ -1150,9 +1150,9 @@ void Contact::saveTo( KABC::Addressee* addressee )
if ( mIsDistributionList ) {
KPIM::DistributionList distrList( *addressee );
distrList.setName( fullName() );
- QValueList<Member>::ConstIterator mit = mDistrListMembers.begin();
+ TQValueList<Member>::ConstIterator mit = mDistrListMembers.begin();
for ( ; mit != mDistrListMembers.end(); ++mit ) {
- QString displayName = (*mit).displayName;
+ TQString displayName = (*mit).displayName;
// fixup the display name DistributionList::assumes neither ',' nor ';' is present
displayName.replace( ',', ' ' );
displayName.replace( ';', ' ' );
@@ -1183,7 +1183,7 @@ void Contact::saveTo( KABC::Addressee* addressee )
addressee->setNickName( nickName() );
addressee->insertCustom( "KADDRESSBOOK", "X-SpousesName", spouseName() );
if ( birthday().isValid() )
- addressee->setBirthday( QDateTime( birthday() ) );
+ addressee->setBirthday( TQDateTime( birthday() ) );
if ( anniversary().isValid() )
addressee->insertCustom( "KADDRESSBOOK", "X-Anniversary",
@@ -1208,14 +1208,14 @@ void Contact::saveTo( KABC::Addressee* addressee )
if ( mHasGeo )
addressee->setGeo( KABC::Geo( mLatitude, mLongitude ) );
- QStringList emailAddresses;
- for ( QValueList<Email>::ConstIterator it = mEmails.begin(); it != mEmails.end(); ++it ) {
+ TQStringList emailAddresses;
+ for ( TQValueList<Email>::ConstIterator it = mEmails.begin(); it != mEmails.end(); ++it ) {
// we can't do anything with (*it).displayName
emailAddresses.append( (*it).smtpAddress );
}
addressee->setEmails( emailAddresses );
- for ( QValueList<Address>::ConstIterator it = mAddresses.begin(); it != mAddresses.end(); ++it ) {
+ for ( TQValueList<Address>::ConstIterator it = mAddresses.begin(); it != mAddresses.end(); ++it ) {
KABC::Address address;
int type = (*it).kdeAddressType;
if ( type == -1 ) { // no kde-specific type available
@@ -1233,37 +1233,37 @@ void Contact::saveTo( KABC::Addressee* addressee )
addressee->insertAddress( address );
}
- for ( QValueList<PhoneNumber>::ConstIterator it = mPhoneNumbers.begin(); it != mPhoneNumbers.end(); ++it ) {
+ for ( TQValueList<PhoneNumber>::ConstIterator it = mPhoneNumbers.begin(); it != mPhoneNumbers.end(); ++it ) {
KABC::PhoneNumber number;
number.setType( phoneTypeFromString( (*it).type ) );
number.setNumber( (*it).number );
addressee->insertPhoneNumber( number );
}
- for( QValueList<Custom>::ConstIterator it = mCustomList.begin(); it != mCustomList.end(); ++it ) {
- QString app = (*it).app.isEmpty() ? QString::fromLatin1( "KADDRESSBOOK" ) : (*it).app;
+ for( TQValueList<Custom>::ConstIterator it = mCustomList.begin(); it != mCustomList.end(); ++it ) {
+ TQString app = (*it).app.isEmpty() ? TQString::fromLatin1( "KADDRESSBOOK" ) : (*it).app;
addressee->insertCustom( app, (*it).name, (*it).value );
}
//kdDebug(5006) << addressee->customs() << endl;
}
-QImage Contact::loadPictureFromKMail( const QString& attachmentName, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum )
+TQImage Contact::loadPictureFromKMail( const TQString& attachmentName, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum )
{
- QImage img;
+ TQImage img;
KURL url;
if ( resource->kmailGetAttachment( url, subResource, sernum, attachmentName ) && !url.isEmpty() ) {
- const QString path = url.path();
+ const TQString path = url.path();
img.load( path );
- QFile::remove(path);
+ TQFile::remove(path);
}
return img;
}
-QImage Contact::loadPictureFromAddressee( const KABC::Picture& picture )
+TQImage Contact::loadPictureFromAddressee( const KABC::Picture& picture )
{
- QImage img;
+ TQImage img;
if ( !picture.isIntern() && !picture.url().isEmpty() ) {
- QString tmpFile;
+ TQString tmpFile;
if ( KIO::NetAccess::download( picture.url(), tmpFile, 0 /*no widget known*/ ) ) {
img.load( tmpFile );
KIO::NetAccess::removeTempFile( tmpFile );
@@ -1273,12 +1273,12 @@ QImage Contact::loadPictureFromAddressee( const KABC::Picture& picture )
return img;
}
-QByteArray Kolab::Contact::loadDataFromKMail( const QString& attachmentName, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum )
+TQByteArray Kolab::Contact::loadDataFromKMail( const TQString& attachmentName, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum )
{
- QByteArray data;
+ TQByteArray data;
KURL url;
if ( resource->kmailGetAttachment( url, subResource, sernum, attachmentName ) && !url.isEmpty() ) {
- QFile f( url.path() );
+ TQFile f( url.path() );
if ( f.open( IO_ReadOnly ) ) {
data = f.readAll();
f.close();
@@ -1288,13 +1288,13 @@ QByteArray Kolab::Contact::loadDataFromKMail( const QString& attachmentName, KAB
return data;
}
-QByteArray Kolab::Contact::loadSoundFromAddressee( const KABC::Sound& sound )
+TQByteArray Kolab::Contact::loadSoundFromAddressee( const KABC::Sound& sound )
{
- QByteArray data;
+ TQByteArray data;
if ( !sound.isIntern() && !sound.url().isEmpty() ) {
- QString tmpFile;
+ TQString tmpFile;
if ( KIO::NetAccess::download( sound.url(), tmpFile, 0 /*no widget known*/ ) ) {
- QFile f( tmpFile );
+ TQFile f( tmpFile );
if ( f.open( IO_ReadOnly ) ) {
data = f.readAll();
f.close();
@@ -1306,7 +1306,7 @@ QByteArray Kolab::Contact::loadSoundFromAddressee( const KABC::Sound& sound )
return data;
}
-QString Kolab::Contact::productID() const
+TQString Kolab::Contact::productID() const
{
// TODO: When KAB has the version number in a header file, don't hardcode (Bo)
// Or we could use Addressee::productID? (David)
diff --git a/kresources/kolab/kabc/contact.h b/kresources/kolab/kabc/contact.h
index 0c06dfb8a..39a235cc2 100644
--- a/kresources/kolab/kabc/contact.h
+++ b/kresources/kolab/kabc/contact.h
@@ -34,7 +34,7 @@
#define KOLABCONTACT_H
#include <kolabbase.h>
-#include <qimage.h>
+#include <tqimage.h>
namespace KABC {
class Addressee;
@@ -49,8 +49,8 @@ class Contact : public KolabBase {
public:
struct PhoneNumber {
public:
- QString type;
- QString number;
+ TQString type;
+ TQString number;
};
struct Address {
@@ -59,126 +59,126 @@ public:
{
}
int kdeAddressType; // KABC::Address::Type
- QString type; // kolab-compliant address type: home, work or other
- QString street;
- QString pobox;
- QString locality;
- QString region;
- QString postalCode;
- QString country;
+ TQString type; // kolab-compliant address type: home, work or other
+ TQString street;
+ TQString pobox;
+ TQString locality;
+ TQString region;
+ TQString postalCode;
+ TQString country;
};
explicit Contact( const KABC::Addressee* address );
- Contact( const QString& xml, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum );
+ Contact( const TQString& xml, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum );
~Contact();
void saveTo( KABC::Addressee* address );
- QString type() const { return "Contact"; }
+ TQString type() const { return "Contact"; }
- void setGivenName( const QString& name );
- QString givenName() const;
+ void setGivenName( const TQString& name );
+ TQString givenName() const;
- void setMiddleNames( const QString& names );
- QString middleNames() const;
+ void setMiddleNames( const TQString& names );
+ TQString middleNames() const;
- void setLastName( const QString& name );
- QString lastName() const;
+ void setLastName( const TQString& name );
+ TQString lastName() const;
- void setFullName( const QString& name );
- QString fullName() const;
+ void setFullName( const TQString& name );
+ TQString fullName() const;
- void setInitials( const QString& initials );
- QString initials() const;
+ void setInitials( const TQString& initials );
+ TQString initials() const;
- void setPrefix( const QString& prefix );
- QString prefix() const;
+ void setPrefix( const TQString& prefix );
+ TQString prefix() const;
- void setSuffix( const QString& suffix );
- QString suffix() const;
+ void setSuffix( const TQString& suffix );
+ TQString suffix() const;
- void setRole( const QString& role );
- QString role() const;
+ void setRole( const TQString& role );
+ TQString role() const;
- void setFreeBusyUrl( const QString& fbUrl );
- QString freeBusyUrl() const;
+ void setFreeBusyUrl( const TQString& fbUrl );
+ TQString freeBusyUrl() const;
- void setOrganization( const QString& organization );
- QString organization() const;
+ void setOrganization( const TQString& organization );
+ TQString organization() const;
- void setWebPage( const QString& url );
- QString webPage() const;
+ void setWebPage( const TQString& url );
+ TQString webPage() const;
- void setIMAddress( const QString& imAddress );
- QString imAddress() const;
+ void setIMAddress( const TQString& imAddress );
+ TQString imAddress() const;
- void setDepartment( const QString& department );
- QString department() const;
+ void setDepartment( const TQString& department );
+ TQString department() const;
- void setOfficeLocation( const QString& location );
- QString officeLocation() const;
+ void setOfficeLocation( const TQString& location );
+ TQString officeLocation() const;
- void setProfession( const QString& profession );
- QString profession() const;
+ void setProfession( const TQString& profession );
+ TQString profession() const;
// not shown in the kaddressbook GUI
- //void setJobTitle( const QString& title );
- //QString jobTitle() const;
+ //void setJobTitle( const TQString& title );
+ //TQString jobTitle() const;
- void setManagerName( const QString& name );
- QString managerName() const;
+ void setManagerName( const TQString& name );
+ TQString managerName() const;
- void setAssistant( const QString& name );
- QString assistant() const;
+ void setAssistant( const TQString& name );
+ TQString assistant() const;
- void setNickName( const QString& name );
- QString nickName() const;
+ void setNickName( const TQString& name );
+ TQString nickName() const;
- void setSpouseName( const QString& name );
- QString spouseName() const;
+ void setSpouseName( const TQString& name );
+ TQString spouseName() const;
- void setBirthday( const QDate& date );
- QDate birthday() const;
+ void setBirthday( const TQDate& date );
+ TQDate birthday() const;
- void setAnniversary( const QDate& date );
- QDate anniversary() const;
+ void setAnniversary( const TQDate& date );
+ TQDate anniversary() const;
- void setPicture( const QImage& image) { mPicture = image; }
- QString pictureAttachmentName() const { return mPictureAttachmentName; }
- QImage picture() const { return mPicture; }
+ void setPicture( const TQImage& image) { mPicture = image; }
+ TQString pictureAttachmentName() const { return mPictureAttachmentName; }
+ TQImage picture() const { return mPicture; }
- void setLogo( const QImage& image ) { mLogo = image; }
- QString logoAttachmentName() const { return mLogoAttachmentName; }
- QImage logo() const { return mLogo; }
+ void setLogo( const TQImage& image ) { mLogo = image; }
+ TQString logoAttachmentName() const { return mLogoAttachmentName; }
+ TQImage logo() const { return mLogo; }
- void setSound( const QByteArray& sound ) { mSound = sound; }
- QString soundAttachmentName() const { return mSoundAttachmentName; }
- QByteArray sound() const { return mSound; }
+ void setSound( const TQByteArray& sound ) { mSound = sound; }
+ TQString soundAttachmentName() const { return mSoundAttachmentName; }
+ TQByteArray sound() const { return mSound; }
- void setChildren( const QString& children );
- QString children() const;
+ void setChildren( const TQString& children );
+ TQString children() const;
- void setGender( const QString& gender );
- QString gender() const;
+ void setGender( const TQString& gender );
+ TQString gender() const;
- void setLanguage( const QString& language );
- QString language() const;
+ void setLanguage( const TQString& language );
+ TQString language() const;
void addPhoneNumber( const PhoneNumber& number );
- QValueList<PhoneNumber>& phoneNumbers();
- const QValueList<PhoneNumber>& phoneNumbers() const;
+ TQValueList<PhoneNumber>& phoneNumbers();
+ const TQValueList<PhoneNumber>& phoneNumbers() const;
void addEmail( const Email& email );
- QValueList<Email>& emails();
- const QValueList<Email>& emails() const;
+ TQValueList<Email>& emails();
+ const TQValueList<Email>& emails() const;
void addAddress( const Address& address );
- QValueList<Address>& addresses();
- const QValueList<Address>& addresses() const;
+ TQValueList<Address>& addresses();
+ const TQValueList<Address>& addresses() const;
// which address is preferred: home or business or other
- void setPreferredAddress( const QString& address );
- QString preferredAddress() const;
+ void setPreferredAddress( const TQString& address );
+ TQString preferredAddress() const;
float latitude() const { return mLatitude; }
void setLatitude( float latitude ) { mLatitude = latitude; }
@@ -187,16 +187,16 @@ public:
void setLongitude( float longitude ) { mLongitude = longitude; }
// Load the attributes of this class
- bool loadAttribute( QDomElement& );
+ bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- bool saveAttributes( QDomElement& ) const;
+ bool saveAttributes( TQDomElement& ) const;
// Load this note by reading the XML file
- bool loadXML( const QDomDocument& xml );
+ bool loadXML( const TQDomDocument& xml );
// Serialize this note to an XML string
- QString saveXML() const;
+ TQString saveXML() const;
// Return true if this contact is a distr list
bool isDistributionList() const { return mIsDistributionList; }
@@ -205,81 +205,81 @@ protected:
void setFields( const KABC::Addressee* );
private:
- bool loadNameAttribute( QDomElement& element );
- void saveNameAttribute( QDomElement& element ) const;
-
- bool loadPhoneAttribute( QDomElement& element );
- void savePhoneAttributes( QDomElement& element ) const;
-
- void saveEmailAttributes( QDomElement& element ) const;
-
- bool loadAddressAttribute( QDomElement& element );
- void saveAddressAttributes( QDomElement& element ) const;
-
- void loadCustomAttributes( QDomElement& element );
- void saveCustomAttributes( QDomElement& element ) const;
-
- void loadDistrListMember( const QDomElement& element );
- void saveDistrListMembers( QDomElement& element ) const;
-
- QImage loadPictureFromKMail( const QString& attachmentName, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum );
- QImage loadPictureFromAddressee( const KABC::Picture& picture );
-
- QByteArray loadDataFromKMail( const QString& attachmentName, KABC::ResourceKolab* resource, const QString& subResource, Q_UINT32 sernum );
- QByteArray loadSoundFromAddressee( const KABC::Sound& sound );
-
- QString productID() const;
-
- QString mGivenName;
- QString mMiddleNames;
- QString mLastName;
- QString mFullName;
- QString mInitials;
- QString mPrefix;
- QString mSuffix;
- QString mRole;
- QString mFreeBusyUrl;
- QString mOrganization;
- QString mWebPage;
- QString mIMAddress;
- QString mDepartment;
- QString mOfficeLocation;
- QString mProfession;
- //QString mJobTitle;
- QString mManagerName;
- QString mAssistant;
- QString mNickName;
- QString mSpouseName;
- QDate mBirthday;
- QDate mAnniversary;
- QImage mPicture;
- QImage mLogo;
- QByteArray mSound;
- QString mPictureAttachmentName;
- QString mLogoAttachmentName;
- QString mSoundAttachmentName;
- QString mChildren;
- QString mGender;
- QString mLanguage;
- QValueList<PhoneNumber> mPhoneNumbers;
- QValueList<Email> mEmails;
- QValueList<Address> mAddresses;
- QString mPreferredAddress;
+ bool loadNameAttribute( TQDomElement& element );
+ void saveNameAttribute( TQDomElement& element ) const;
+
+ bool loadPhoneAttribute( TQDomElement& element );
+ void savePhoneAttributes( TQDomElement& element ) const;
+
+ void saveEmailAttributes( TQDomElement& element ) const;
+
+ bool loadAddressAttribute( TQDomElement& element );
+ void saveAddressAttributes( TQDomElement& element ) const;
+
+ void loadCustomAttributes( TQDomElement& element );
+ void saveCustomAttributes( TQDomElement& element ) const;
+
+ void loadDistrListMember( const TQDomElement& element );
+ void saveDistrListMembers( TQDomElement& element ) const;
+
+ TQImage loadPictureFromKMail( const TQString& attachmentName, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum );
+ TQImage loadPictureFromAddressee( const KABC::Picture& picture );
+
+ TQByteArray loadDataFromKMail( const TQString& attachmentName, KABC::ResourceKolab* resource, const TQString& subResource, Q_UINT32 sernum );
+ TQByteArray loadSoundFromAddressee( const KABC::Sound& sound );
+
+ TQString productID() const;
+
+ TQString mGivenName;
+ TQString mMiddleNames;
+ TQString mLastName;
+ TQString mFullName;
+ TQString mInitials;
+ TQString mPrefix;
+ TQString mSuffix;
+ TQString mRole;
+ TQString mFreeBusyUrl;
+ TQString mOrganization;
+ TQString mWebPage;
+ TQString mIMAddress;
+ TQString mDepartment;
+ TQString mOfficeLocation;
+ TQString mProfession;
+ //TQString mJobTitle;
+ TQString mManagerName;
+ TQString mAssistant;
+ TQString mNickName;
+ TQString mSpouseName;
+ TQDate mBirthday;
+ TQDate mAnniversary;
+ TQImage mPicture;
+ TQImage mLogo;
+ TQByteArray mSound;
+ TQString mPictureAttachmentName;
+ TQString mLogoAttachmentName;
+ TQString mSoundAttachmentName;
+ TQString mChildren;
+ TQString mGender;
+ TQString mLanguage;
+ TQValueList<PhoneNumber> mPhoneNumbers;
+ TQValueList<Email> mEmails;
+ TQValueList<Address> mAddresses;
+ TQString mPreferredAddress;
float mLatitude;
float mLongitude;
bool mHasGeo;
bool mIsDistributionList;
struct Custom {
- QString app;
- QString name;
- QString value;
+ TQString app;
+ TQString name;
+ TQString value;
};
- QValueList<Custom> mCustomList;
+ TQValueList<Custom> mCustomList;
struct Member {
- QString displayName;
- QString email;
+ TQString displayName;
+ TQString email;
};
- QValueList<Member> mDistrListMembers;
+ TQValueList<Member> mDistrListMembers;
};
}
diff --git a/kresources/kolab/kabc/resourcekolab.cpp b/kresources/kolab/kabc/resourcekolab.cpp
index 464c9c610..034c32d78 100644
--- a/kresources/kolab/kabc/resourcekolab.cpp
+++ b/kresources/kolab/kabc/resourcekolab.cpp
@@ -45,11 +45,11 @@
#include <kapplication.h>
#include <dcopclient.h>
-#include <qobject.h>
-#include <qtimer.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qapplication.h>
+#include <tqobject.h>
+#include <tqtimer.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqapplication.h>
#include <assert.h>
@@ -63,7 +63,7 @@ class KolabFactory : public KRES::PluginFactoryBase
return new KABC::ResourceKolab( config );
}
- KRES::ConfigWidget *configWidget( QWidget* )
+ KRES::ConfigWidget *configWidget( TQWidget* )
{
return 0;
}
@@ -79,7 +79,7 @@ static const char* s_inlineMimeType = "text/x-vcard";
KABC::ResourceKolab::ResourceKolab( const KConfig *config )
: KPIM::ResourceABC( config ),
Kolab::ResourceKolabBase( "ResourceKolab-KABC" ),
- mCachedSubresource( QString::null ), mLocked( false )
+ mCachedSubresource( TQString::null ), mLocked( false )
{
setType( "imap" );
}
@@ -94,8 +94,8 @@ KABC::ResourceKolab::~ResourceKolab()
}
void KABC::ResourceKolab::loadSubResourceConfig( KConfig& config,
- const QString& name,
- const QString& label,
+ const TQString& name,
+ const TQString& label,
bool writable )
{
KConfigGroup group( &config, name );
@@ -110,11 +110,11 @@ bool KABC::ResourceKolab::doOpen()
KConfig config( configFile() );
// Read the calendar entries
- QValueList<KMailICalIface::SubResource> subResources;
+ TQValueList<KMailICalIface::SubResource> subResources;
if ( !kmailSubresources( subResources, s_kmailContentsType ) )
return false;
mSubResources.clear();
- QValueList<KMailICalIface::SubResource>::ConstIterator it;
+ TQValueList<KMailICalIface::SubResource>::ConstIterator it;
for ( it = subResources.begin(); it != subResources.end(); ++it ) {
loadSubResourceConfig( config, (*it).location, (*it).label, (*it).writable );
}
@@ -148,12 +148,12 @@ KABC::Ticket * KABC::ResourceKolab::requestSaveTicket()
void KABC::ResourceKolab::releaseSaveTicket( Ticket* ticket )
{
mLocked = false;
- mCachedSubresource = QString::null;
+ mCachedSubresource = TQString::null;
delete ticket;
}
-QString KABC::ResourceKolab::loadContact( const QString& contactData,
- const QString& subResource,
+TQString KABC::ResourceKolab::loadContact( const TQString& contactData,
+ const TQString& subResource,
Q_UINT32 sernum,
KMailICalIface::StorageFormat format )
{
@@ -181,10 +181,10 @@ static const struct { const char* mimetype; KMailICalIface::StorageFormat format
{ s_inlineMimeType, KMailICalIface::StorageIcalVcard }
};
-bool KABC::ResourceKolab::loadSubResource( const QString& subResource )
+bool KABC::ResourceKolab::loadSubResource( const TQString& subResource )
{
int count = 0;
- if ( !kmailIncidencesCount( count, QString::null, subResource ) ) {
+ if ( !kmailIncidencesCount( count, TQString::null, subResource ) ) {
kdError() << "Communication problem in KABC::ResourceKolab::loadSubResource()\n";
return false;
}
@@ -210,11 +210,11 @@ bool KABC::ResourceKolab::loadSubResource( const QString& subResource )
// TODO it would be faster to pass the s_formats array to kmail and let it load
// all events - to avoid loading each mail 3 times. But then we need to extend the returned
- // QMap to also tell us the StorageFormat of each found contact...
+ // TQMap to also tell us the StorageFormat of each found contact...
for ( int indexFormat = 0; indexFormat < 3; ++indexFormat ) {
const char* mimetype = s_formats[indexFormat].mimetype;
KMailICalIface::StorageFormat format = s_formats[indexFormat].format;
- QMap<Q_UINT32, QString> lst;
+ TQMap<Q_UINT32, TQString> lst;
if ( !kmailIncidences( lst, mimetype, subResource, startIndex, nbMessages ) ) {
kdError() << "Communication problem in KABC::ResourceKolab::loadSubResource()\n";
if ( progressId )
@@ -222,7 +222,7 @@ bool KABC::ResourceKolab::loadSubResource( const QString& subResource )
return false;
}
- for( QMap<Q_UINT32, QString>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
loadContact( it.data(), subResource, it.key(), format );
}
@@ -280,24 +280,24 @@ bool KABC::ResourceKolab::save( Ticket* )
namespace Kolab {
struct AttachmentList {
- QStringList attachmentURLs;
- QStringList attachmentNames;
- QStringList attachmentMimeTypes;
- QStringList deletedAttachments;
- QValueList<KTempFile *> tempFiles;
+ TQStringList attachmentURLs;
+ TQStringList attachmentNames;
+ TQStringList attachmentMimeTypes;
+ TQStringList deletedAttachments;
+ TQValueList<KTempFile *> tempFiles;
- void addAttachment( const QString& url, const QString& name, const QString& mimetype ) {
+ void addAttachment( const TQString& url, const TQString& name, const TQString& mimetype ) {
attachmentURLs.append( url );
attachmentNames.append( name );
attachmentMimeTypes.append( mimetype );
}
- void updatePictureAttachment( const QImage& image, const QString& name );
- void updateAttachment( const QByteArray& data, const QString& name, const char* mimetype );
+ void updatePictureAttachment( const TQImage& image, const TQString& name );
+ void updateAttachment( const TQByteArray& data, const TQString& name, const char* mimetype );
};
} // namespace
-void AttachmentList::updatePictureAttachment( const QImage& image, const QString& name )
+void AttachmentList::updatePictureAttachment( const TQImage& image, const TQString& name )
{
assert( !name.isEmpty() );
if ( !image.isNull() ) {
@@ -313,7 +313,7 @@ void AttachmentList::updatePictureAttachment( const QImage& image, const QString
}
}
-void AttachmentList::updateAttachment( const QByteArray& data, const QString& name, const char* mimetype )
+void AttachmentList::updateAttachment( const TQByteArray& data, const TQString& name, const char* mimetype )
{
assert( !name.isEmpty() );
if ( !data.isNull() ) {
@@ -331,8 +331,8 @@ void AttachmentList::updateAttachment( const QByteArray& data, const QString& na
bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr )
{
- const QString uid = addr.uid();
- QString subResource;
+ const TQString uid = addr.uid();
+ TQString subResource;
Q_UINT32 sernum;
if ( mUidMap.find( uid ) != mUidMap.end() ) {
subResource = mUidMap[ uid ].resource();
@@ -355,11 +355,11 @@ bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr )
return false;
sernum = 0;
}
- QString data;
- QString mimetype;
+ TQString data;
+ TQString mimetype;
AttachmentList att;
bool isXMLStorageFormat = kmailStorageFormat( subResource ) == KMailICalIface::StorageXML;
- QString subject = uid; // as per kolab2 spec
+ TQString subject = uid; // as per kolab2 spec
if ( isXMLStorageFormat ) {
Contact contact( &addr );
// The addressee is converted to: 1) the xml 2) the optional picture 3) the optional logo 4) the optional sound
@@ -393,7 +393,7 @@ bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr )
const_cast<Addressee&>(addr).setChanged( false );
}
- for( QValueList<KTempFile *>::Iterator it = att.tempFiles.begin(); it != att.tempFiles.end(); ++it ) {
+ for( TQValueList<KTempFile *>::Iterator it = att.tempFiles.begin(); it != att.tempFiles.end(); ++it ) {
(*it)->setAutoDelete( true );
delete (*it);
}
@@ -402,7 +402,7 @@ bool KABC::ResourceKolab::kmailUpdateAddressee( const Addressee& addr )
void KABC::ResourceKolab::insertAddressee( const Addressee& addr )
{
- const QString uid = addr.uid();
+ const TQString uid = addr.uid();
//kdDebug(5650) << k_funcinfo << uid << endl;
bool ok = false;
if ( mUidMap.contains( uid ) ) {
@@ -419,10 +419,10 @@ void KABC::ResourceKolab::insertAddressee( const Addressee& addr )
void KABC::ResourceKolab::removeAddressee( const Addressee& addr )
{
- const QString uid = addr.uid();
+ const TQString uid = addr.uid();
if ( mUidMap.find( uid ) == mUidMap.end() ) return;
//kdDebug(5650) << k_funcinfo << uid << endl;
- const QString resource = mUidMap[ uid ].resource();
+ const TQString resource = mUidMap[ uid ].resource();
if ( !subresourceWritable( resource ) ) {
kdWarning() << "Wow! Something tried to delete a non-writable addressee! Fix this caller: " << kdBacktrace() << endl;
return;
@@ -440,18 +440,18 @@ void KABC::ResourceKolab::removeAddressee( const Addressee& addr )
* These are the DCOP slots that KMail call to notify when something
* changed.
*/
-bool KABC::ResourceKolab::fromKMailAddIncidence( const QString& type,
- const QString& subResource,
+bool KABC::ResourceKolab::fromKMailAddIncidence( const TQString& type,
+ const TQString& subResource,
Q_UINT32 sernum,
int format,
- const QString& contactXML )
+ const TQString& contactXML )
{
// Check if this is a contact
if( type != s_kmailContentsType || !subresourceActive( subResource ) )
return false;
// Load contact to find the UID
- const QString uid = loadContact( contactXML, subResource, sernum,
+ const TQString uid = loadContact( contactXML, subResource, sernum,
( KMailICalIface::StorageFormat )format );
//kdDebug(5650) << k_funcinfo << uid << endl;
@@ -468,9 +468,9 @@ bool KABC::ResourceKolab::fromKMailAddIncidence( const QString& type,
return true;
}
-void KABC::ResourceKolab::fromKMailDelIncidence( const QString& type,
- const QString& subResource,
- const QString& uid )
+void KABC::ResourceKolab::fromKMailDelIncidence( const TQString& type,
+ const TQString& subResource,
+ const TQString& uid )
{
// Check if this is a contact
if( type != s_kmailContentsType || !subresourceActive( subResource ) )
@@ -492,8 +492,8 @@ void KABC::ResourceKolab::fromKMailDelIncidence( const QString& type,
}
}
-void KABC::ResourceKolab::fromKMailRefresh( const QString& type,
- const QString& /*subResource*/ )
+void KABC::ResourceKolab::fromKMailRefresh( const TQString& type,
+ const TQString& /*subResource*/ )
{
// Check if this is a contact
if( type != s_kmailContentsType ) return;
@@ -504,9 +504,9 @@ void KABC::ResourceKolab::fromKMailRefresh( const QString& type,
addressBook()->emitAddressBookChanged();
}
-void KABC::ResourceKolab::fromKMailAddSubresource( const QString& type,
- const QString& subResource,
- const QString& label,
+void KABC::ResourceKolab::fromKMailAddSubresource( const TQString& type,
+ const TQString& subResource,
+ const TQString& label,
bool writable,
bool )
{
@@ -524,8 +524,8 @@ void KABC::ResourceKolab::fromKMailAddSubresource( const QString& type,
emit signalSubresourceAdded( this, type, subResource );
}
-void KABC::ResourceKolab::fromKMailDelSubresource( const QString& type,
- const QString& subResource )
+void KABC::ResourceKolab::fromKMailDelSubresource( const TQString& type,
+ const TQString& subResource )
{
if( type != s_kmailContentsType ) return;
@@ -542,7 +542,7 @@ void KABC::ResourceKolab::fromKMailDelSubresource( const QString& type,
// Make a list of all uids to remove
Kolab::UidMap::ConstIterator mapIt;
- QStringList uids;
+ TQStringList uids;
for ( mapIt = mUidMap.begin(); mapIt != mUidMap.end(); ++mapIt )
if ( mapIt.data().resource() == subResource )
// We have a match
@@ -550,7 +550,7 @@ void KABC::ResourceKolab::fromKMailDelSubresource( const QString& type,
// Finally delete all the incidences
if ( !uids.isEmpty() ) {
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = uids.begin(); it != uids.end(); ++it ) {
mAddrMap.remove( *it );
mUidMap.remove( *it );
@@ -564,13 +564,13 @@ void KABC::ResourceKolab::fromKMailDelSubresource( const QString& type,
-void KABC::ResourceKolab::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& /* type */,
- const QString& folder )
+void KABC::ResourceKolab::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& /* type */,
+ const TQString& folder )
{
// FIXME
KMailICalIface::StorageFormat format = KMailICalIface::StorageXML;
- for( QMap<Q_UINT32, QString>::ConstIterator it = map.begin(); it != map.end(); ++it ) {
+ for( TQMap<Q_UINT32, TQString>::ConstIterator it = map.begin(); it != map.end(); ++it ) {
loadContact( it.data(), folder, it.key(), format );
}
if ( !addressBook() ){
@@ -579,12 +579,12 @@ void KABC::ResourceKolab::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString
addressBook()->emitAddressBookChanged();
}
-QStringList KABC::ResourceKolab::subresources() const
+TQStringList KABC::ResourceKolab::subresources() const
{
return mSubResources.keys();
}
-bool KABC::ResourceKolab::subresourceActive( const QString& subresource ) const
+bool KABC::ResourceKolab::subresourceActive( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].active();
@@ -596,7 +596,7 @@ bool KABC::ResourceKolab::subresourceActive( const QString& subresource ) const
return true;
}
-bool KABC::ResourceKolab::subresourceWritable( const QString& subresource ) const
+bool KABC::ResourceKolab::subresourceWritable( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].writable();
@@ -604,7 +604,7 @@ bool KABC::ResourceKolab::subresourceWritable( const QString& subresource ) cons
return false; //better a safe default
}
-int KABC::ResourceKolab::subresourceCompletionWeight( const QString& subresource ) const
+int KABC::ResourceKolab::subresourceCompletionWeight( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].completionWeight();
@@ -615,17 +615,17 @@ int KABC::ResourceKolab::subresourceCompletionWeight( const QString& subresource
return 80;
}
-QString KABC::ResourceKolab::subresourceLabel( const QString& subresource ) const
+TQString KABC::ResourceKolab::subresourceLabel( const TQString& subresource ) const
{
if ( mSubResources.contains( subresource ) ) {
return mSubResources[ subresource ].label();
}
kdDebug(5650) << "subresourceLabel( " << subresource << " ): not found!\n";
- return QString::null;
+ return TQString::null;
}
-void KABC::ResourceKolab::setSubresourceCompletionWeight( const QString& subresource, int completionWeight )
+void KABC::ResourceKolab::setSubresourceCompletionWeight( const TQString& subresource, int completionWeight )
{
if ( mSubResources.contains( subresource ) ) {
mSubResources[ subresource ].setCompletionWeight( completionWeight );
@@ -634,17 +634,17 @@ void KABC::ResourceKolab::setSubresourceCompletionWeight( const QString& subreso
}
}
-QMap<QString, QString> KABC::ResourceKolab::uidToResourceMap() const
+TQMap<TQString, TQString> KABC::ResourceKolab::uidToResourceMap() const
{
// TODO: Couldn't this be made simpler?
- QMap<QString, QString> map;
+ TQMap<TQString, TQString> map;
Kolab::UidMap::ConstIterator mapIt;
for ( mapIt = mUidMap.begin(); mapIt != mUidMap.end(); ++mapIt )
map[ mapIt.key() ] = mapIt.data().resource();
return map;
}
-void KABC::ResourceKolab::setSubresourceActive( const QString &subresource, bool active )
+void KABC::ResourceKolab::setSubresourceActive( const TQString &subresource, bool active )
{
if ( mSubResources.contains( subresource ) ) {
mSubResources[ subresource ].setActive( active );
@@ -656,13 +656,13 @@ void KABC::ResourceKolab::setSubresourceActive( const QString &subresource, bool
/*virtual*/
-bool KABC::ResourceKolab::addSubresource( const QString& label, const QString& parent )
+bool KABC::ResourceKolab::addSubresource( const TQString& label, const TQString& parent )
{
return kmailAddSubresource( label, parent, s_kmailContentsType );
}
/*virtual*/
-bool KABC::ResourceKolab::removeSubresource( const QString& id )
+bool KABC::ResourceKolab::removeSubresource( const TQString& id )
{
return kmailRemoveSubresource( id );
}
diff --git a/kresources/kolab/kabc/resourcekolab.h b/kresources/kolab/kabc/resourcekolab.h
index e01922681..1da472015 100644
--- a/kresources/kolab/kabc/resourcekolab.h
+++ b/kresources/kolab/kabc/resourcekolab.h
@@ -106,67 +106,67 @@ public:
virtual void removeAddressee( const Addressee& addr );
// Listen to KMail changes in the amount of sub resources
- void fromKMailAddSubresource( const QString& type, const QString& id,
- const QString& label, bool writable,
+ void fromKMailAddSubresource( const TQString& type, const TQString& id,
+ const TQString& label, bool writable,
bool alarmRelevant );
- void fromKMailDelSubresource( const QString& type, const QString& id );
+ void fromKMailDelSubresource( const TQString& type, const TQString& id );
- bool fromKMailAddIncidence( const QString& type, const QString& resource,
- Q_UINT32 sernum, int format, const QString& contact );
- void fromKMailDelIncidence( const QString& type, const QString& resource,
- const QString& contact );
- void fromKMailRefresh( const QString& type, const QString& resource );
+ bool fromKMailAddIncidence( const TQString& type, const TQString& resource,
+ Q_UINT32 sernum, int format, const TQString& contact );
+ void fromKMailDelIncidence( const TQString& type, const TQString& resource,
+ const TQString& contact );
+ void fromKMailRefresh( const TQString& type, const TQString& resource );
- void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder );
+ void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder );
/// Return the list of subresources.
- QStringList subresources() const;
+ TQStringList subresources() const;
/// Is this subresource active?
- bool subresourceActive( const QString& ) const;
+ bool subresourceActive( const TQString& ) const;
/// Is this subresource writable?
- virtual bool subresourceWritable( const QString& ) const;
+ virtual bool subresourceWritable( const TQString& ) const;
- virtual void setSubresourceActive( const QString &, bool );
+ virtual void setSubresourceActive( const TQString &, bool );
- virtual bool addSubresource( const QString&, const QString& );
+ virtual bool addSubresource( const TQString&, const TQString& );
- virtual bool removeSubresource( const QString& );
+ virtual bool removeSubresource( const TQString& );
virtual bool canHaveSubresources() const { return true; }
/// Completion weight for a given subresource
- virtual int subresourceCompletionWeight( const QString& ) const;
+ virtual int subresourceCompletionWeight( const TQString& ) const;
/// Label for a given subresource
- virtual QString subresourceLabel( const QString& ) const;
+ virtual TQString subresourceLabel( const TQString& ) const;
/// Set completion weight for a given subresource
- virtual void setSubresourceCompletionWeight( const QString&, int );
+ virtual void setSubresourceCompletionWeight( const TQString&, int );
/// Give the uidmap. Used for ordered searching
- QMap<QString, QString> uidToResourceMap() const;
+ TQMap<TQString, TQString> uidToResourceMap() const;
protected:
bool kmailUpdateAddressee( const Addressee& );
void doClose();
- void loadSubResourceConfig( KConfig& config, const QString& name,
- const QString& label, bool writable );
- bool loadSubResource( const QString& subResource );
- QString loadContact( const QString& contactData, const QString& subResource,
+ void loadSubResourceConfig( KConfig& config, const TQString& name,
+ const TQString& label, bool writable );
+ bool loadSubResource( const TQString& subResource );
+ TQString loadContact( const TQString& contactData, const TQString& subResource,
Q_UINT32 sernum, const KMailICalIface::StorageFormat format );
- QString configFile() const {
+ TQString configFile() const {
return Kolab::ResourceKolabBase::configFile( "kabc" );
}
// The list of subresources
Kolab::ResourceMap mSubResources;
- QString mCachedSubresource;
+ TQString mCachedSubresource;
bool mLocked;
};
diff --git a/kresources/kolab/kabc/resourcekolab_plugin.cpp b/kresources/kolab/kabc/resourcekolab_plugin.cpp
index be87772b3..c4f1b3333 100644
--- a/kresources/kolab/kabc/resourcekolab_plugin.cpp
+++ b/kresources/kolab/kabc/resourcekolab_plugin.cpp
@@ -42,7 +42,7 @@ class KolabFactory : public KRES::PluginFactoryBase
return new KABC::ResourceKolab( config );
}
- KRES::ConfigWidget *configWidget( QWidget* )
+ KRES::ConfigWidget *configWidget( TQWidget* )
{
return 0;
}