diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kresources/scalix/kabc | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-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/scalix/kabc')
-rw-r--r-- | kresources/scalix/kabc/contact.cpp | 66 | ||||
-rw-r--r-- | kresources/scalix/kabc/contact.h | 4 | ||||
-rw-r--r-- | kresources/scalix/kabc/resourcescalix.cpp | 134 | ||||
-rw-r--r-- | kresources/scalix/kabc/resourcescalix.h | 52 | ||||
-rw-r--r-- | kresources/scalix/kabc/resourcescalix_plugin.cpp | 2 |
5 files changed, 129 insertions, 129 deletions
diff --git a/kresources/scalix/kabc/contact.cpp b/kresources/scalix/kabc/contact.cpp index 156ae01af..06c67442e 100644 --- a/kresources/scalix/kabc/contact.cpp +++ b/kresources/scalix/kabc/contact.cpp @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qdom.h> +#include <tqdom.h> #include <libkdepim/distributionlist.h> #include <kstaticdeleter.h> @@ -27,24 +27,24 @@ using namespace Scalix; -static QMap<QString, QString> *s_distListMap = 0; -static KStaticDeleter< QMap<QString, QString> > sd; +static TQMap<TQString, TQString> *s_distListMap = 0; +static KStaticDeleter< TQMap<TQString, TQString> > sd; -static QString custom( const QString &name, const KABC::Addressee &addr, const QString &defaultValue = QString() ) +static TQString custom( const TQString &name, const KABC::Addressee &addr, const TQString &defaultValue = TQString() ) { - const QString value = addr.custom( "Scalix", name ); + const TQString value = addr.custom( "Scalix", name ); if ( value.isEmpty() ) return defaultValue; else return value; } -static void setCustom( const QString &name, const QString &value, KABC::Addressee &addr ) +static void setCustom( const TQString &name, const TQString &value, KABC::Addressee &addr ) { addr.insertCustom( "Scalix", name, value ); } -QString Contact::toXml( const KABC::Addressee &addr ) +TQString Contact::toXml( const KABC::Addressee &addr ) { /** * Handle distribution lists. @@ -53,13 +53,13 @@ QString Contact::toXml( const KABC::Addressee &addr ) if ( s_distListMap ) return (*s_distListMap)[ addr.uid() ]; else - return QString(); + return TQString(); } /** * Handle normal contacts. */ - QString xml; + TQString xml; xml += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; xml += "<contact>\n"; @@ -86,9 +86,9 @@ QString Contact::toXml( const KABC::Addressee &addr ) xml += "<company_name>" + addr.organization() + "</company_name>\n"; xml += "<job_title>" + addr.title() + "</job_title>\n"; - QStringList emails = addr.emails(); + TQStringList emails = addr.emails(); for ( uint i = 0; i < 3; ++i ) { - QString type, address, comment, display; + TQString type, address, comment, display; if ( i < emails.count() ) { type = "SMTP"; @@ -103,19 +103,19 @@ QString Contact::toXml( const KABC::Addressee &addr ) comment = addr.formattedName(); display = emails[ i ]; } else { - comment = custom( QString( "email%1_address_with_comment" ).arg( i + 1 ), addr ); - display = custom( QString( "email%1_display_name" ).arg( i + 1 ), addr ); + comment = custom( TQString( "email%1_address_with_comment" ).arg( i + 1 ), addr ); + display = custom( TQString( "email%1_display_name" ).arg( i + 1 ), addr ); } } - xml += QString( "<email%1_address_type>" ).arg( i + 1 ) + type + - QString( "</email%1_address_type>" ).arg( i + 1 ) +"\n"; - xml += QString( "<email%1_address>" ).arg( i + 1 ) + address + - QString( "</email%1_address>" ).arg( i + 1 ) +"\n"; - xml += QString( "<email%1_address_with_comment>" ).arg( i + 1 ) + comment + - QString( "</email%1_address_with_comment>" ).arg( i + 1 ) + "\n"; - xml += QString( "<email%1_display_name>" ).arg( i + 1 ) + display + - QString( "</email%1_display_name>" ).arg( i + 1 ) + "\n"; + xml += TQString( "<email%1_address_type>" ).arg( i + 1 ) + type + + TQString( "</email%1_address_type>" ).arg( i + 1 ) +"\n"; + xml += TQString( "<email%1_address>" ).arg( i + 1 ) + address + + TQString( "</email%1_address>" ).arg( i + 1 ) +"\n"; + xml += TQString( "<email%1_address_with_comment>" ).arg( i + 1 ) + comment + + TQString( "</email%1_address_with_comment>" ).arg( i + 1 ) + "\n"; + xml += TQString( "<email%1_display_name>" ).arg( i + 1 ) + display + + TQString( "</email%1_display_name>" ).arg( i + 1 ) + "\n"; } KABC::PhoneNumber phone = addr.phoneNumber( KABC::PhoneNumber::Home ); @@ -176,22 +176,22 @@ QString Contact::toXml( const KABC::Addressee &addr ) return xml; } -KABC::Addressee Contact::fromXml( const QString &xml ) +KABC::Addressee Contact::fromXml( const TQString &xml ) { - QDomDocument document; + TQDomDocument document; - QString errorMsg; + TQString errorMsg; int errorLine, errorColumn; if ( !document.setContent( xml, true, &errorMsg, &errorLine, &errorColumn ) ) { qDebug( "Error parsing XML in Scalix::Contact::fromXml: %s (%d,%d)", errorMsg.latin1(), errorLine, errorColumn ); return KABC::Addressee(); } - QDomElement contactElement = document.documentElement(); + TQDomElement contactElement = document.documentElement(); if ( contactElement.tagName() != "contact" ) { if ( contactElement.tagName() == "distlist" ) { - const QDomNodeList names = contactElement.elementsByTagName( "display_name" ); - const QString listName = ( names.count() == 1 ? names.item( 0 ).toElement().text() : "Scalix Dummy List" ); + const TQDomNodeList names = contactElement.elementsByTagName( "display_name" ); + const TQString listName = ( names.count() == 1 ? names.item( 0 ).toElement().text() : "Scalix Dummy List" ); /** * As we can't provide distribution list functionality we store the entry @@ -201,7 +201,7 @@ KABC::Addressee Contact::fromXml( const QString &xml ) list.setName( listName ); if ( !s_distListMap ) - sd.setObject( s_distListMap, new QMap<QString, QString>() ); + sd.setObject( s_distListMap, new TQMap<TQString, TQString>() ); s_distListMap->insert( list.uid(), xml ); @@ -212,7 +212,7 @@ KABC::Addressee Contact::fromXml( const QString &xml ) } } - QString emails[ 3 ]; + TQString emails[ 3 ]; KABC::Address homeAddress( KABC::Address::Home ); KABC::Address workAddress( KABC::Address::Work ); KABC::Address otherAddress( KABC::Address::Dom ); @@ -220,9 +220,9 @@ KABC::Addressee Contact::fromXml( const QString &xml ) KABC::Addressee addr; setCustom( "comes_from_scalix", "true", addr ); - QDomNode node = contactElement.firstChild(); + TQDomNode node = contactElement.firstChild(); while ( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if ( !element.isNull() ) { if ( element.tagName() == "direct_ref" ) addr.setUid( element.text() ); @@ -235,7 +235,7 @@ KABC::Addressee Contact::fromXml( const QString &xml ) else if ( element.tagName() == "send_rich_info" ) setCustom( "send_rich_info", element.text(), addr ); else if ( element.tagName() == "last_modification_time" ) - addr.setRevision( QDateTime::fromString( element.text(), Qt::ISODate ) ); + addr.setRevision( TQDateTime::fromString( element.text(), Qt::ISODate ) ); // name else if ( element.tagName() == "display_name_prefix" ) @@ -352,7 +352,7 @@ KABC::Addressee Contact::fromXml( const QString &xml ) addr.insertCustom( "KADDRESSBOOK", "X-SpousesName", element.text() ); else if ( element.tagName() == "bday" ) - addr.setBirthday( QDateTime::fromString( element.text(), Qt::ISODate ) ); + addr.setBirthday( TQDateTime::fromString( element.text(), Qt::ISODate ) ); else if ( element.tagName() == "anniversary" ) addr.insertCustom( "KADDRESSBOOK", "X-Anniversary", element.text() ); else diff --git a/kresources/scalix/kabc/contact.h b/kresources/scalix/kabc/contact.h index d73765ede..ad095a8d0 100644 --- a/kresources/scalix/kabc/contact.h +++ b/kresources/scalix/kabc/contact.h @@ -28,8 +28,8 @@ namespace Scalix { class Contact { public: - static QString toXml( const KABC::Addressee &addr ); - static KABC::Addressee fromXml( const QString &xml ); + static TQString toXml( const KABC::Addressee &addr ); + static KABC::Addressee fromXml( const TQString &xml ); }; } diff --git a/kresources/scalix/kabc/resourcescalix.cpp b/kresources/scalix/kabc/resourcescalix.cpp index 6cbf10832..31ccdf2c9 100644 --- a/kresources/scalix/kabc/resourcescalix.cpp +++ b/kresources/scalix/kabc/resourcescalix.cpp @@ -44,11 +44,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> @@ -64,7 +64,7 @@ class ScalixFactory : public KRES::PluginFactoryBase return new KABC::ResourceScalix( config ); } - KRES::ConfigWidget *configWidget( QWidget* ) + KRES::ConfigWidget *configWidget( TQWidget* ) { return 0; } @@ -80,7 +80,7 @@ static const char* s_inlineMimeType = "application/scalix-properties"; KABC::ResourceScalix::ResourceScalix( const KConfig *config ) : KPIM::ResourceABC( config ), Scalix::ResourceScalixBase( "ResourceScalix-KABC" ), - mCachedSubresource( QString::null ), mLocked( false ) + mCachedSubresource( TQString::null ), mLocked( false ) { setType( "scalix" ); } @@ -95,8 +95,8 @@ KABC::ResourceScalix::~ResourceScalix() } void KABC::ResourceScalix::loadSubResourceConfig( KConfig& config, - const QString& name, - const QString& label, + const TQString& name, + const TQString& label, bool writable ) { KConfigGroup group( &config, name ); @@ -111,11 +111,11 @@ bool KABC::ResourceScalix::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 ); } @@ -149,12 +149,12 @@ KABC::Ticket * KABC::ResourceScalix::requestSaveTicket() void KABC::ResourceScalix::releaseSaveTicket( Ticket* ticket ) { mLocked = false; - mCachedSubresource = QString::null; + mCachedSubresource = TQString::null; delete ticket; } -QString KABC::ResourceScalix::loadContact( const QString& contactData, - const QString& subResource, +TQString KABC::ResourceScalix::loadContact( const TQString& contactData, + const TQString& subResource, Q_UINT32 sernum, KMailICalIface::StorageFormat ) { @@ -168,7 +168,7 @@ QString KABC::ResourceScalix::loadContact( const QString& contactData, return addr.uid(); } -bool KABC::ResourceScalix::loadSubResource( const QString& subResource ) +bool KABC::ResourceScalix::loadSubResource( const TQString& subResource ) { bool scalixcontacts = loadSubResourceHelper( subResource, s_attachmentMimeTypeContact, KMailICalIface::StorageXML ); bool scalixdistlists = loadSubResourceHelper( subResource, s_attachmentMimeTypeDistList, KMailICalIface::StorageXML ); @@ -176,7 +176,7 @@ bool KABC::ResourceScalix::loadSubResource( const QString& subResource ) return scalixcontacts && scalixdistlists && vcardstyle; } -bool KABC::ResourceScalix::loadSubResourceHelper( const QString& subResource, +bool KABC::ResourceScalix::loadSubResourceHelper( const TQString& subResource, const char* mimetype, KMailICalIface::StorageFormat format ) { @@ -204,7 +204,7 @@ bool KABC::ResourceScalix::loadSubResourceHelper( const QString& subResource, } for ( int startIndex = 0; startIndex < count; startIndex += nbMessages ) { - QMap<Q_UINT32, QString> lst; + TQMap<Q_UINT32, TQString> lst; if ( !kmailIncidences( lst, mimetype, subResource, startIndex, nbMessages ) ) { kdError() << "Communication problem in ResourceScalix::load()\n"; @@ -213,7 +213,7 @@ bool KABC::ResourceScalix::loadSubResourceHelper( 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 ); } if ( progressId ) { @@ -263,24 +263,24 @@ bool KABC::ResourceScalix::save( Ticket* ) namespace Scalix { 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() ) { @@ -296,7 +296,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() ) { @@ -314,8 +314,8 @@ void AttachmentList::updateAttachment( const QByteArray& data, const QString& na bool KABC::ResourceScalix::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(); @@ -340,11 +340,11 @@ bool KABC::ResourceScalix::kmailUpdateAddressee( const Addressee& addr ) } AttachmentList att; - QString subject = addr.formattedName(); + TQString subject = addr.formattedName(); - QString mimetype = s_inlineMimeType; + TQString mimetype = s_inlineMimeType; - QString data = Contact::toXml( addr ); + TQString data = Contact::toXml( addr ); CustomHeaderMap customHeaders; customHeaders.insert( "X-Scalix-Class", "IPM.Contact" ); @@ -365,7 +365,7 @@ bool KABC::ResourceScalix::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); } @@ -374,7 +374,7 @@ bool KABC::ResourceScalix::kmailUpdateAddressee( const Addressee& addr ) void KABC::ResourceScalix::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 ) ) { @@ -391,10 +391,10 @@ void KABC::ResourceScalix::insertAddressee( const Addressee& addr ) void KABC::ResourceScalix::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; @@ -412,18 +412,18 @@ void KABC::ResourceScalix::removeAddressee( const Addressee& addr ) * These are the DCOP slots that KMail call to notify when something * changed. */ -bool KABC::ResourceScalix::fromKMailAddIncidence( const QString& type, - const QString& subResource, +bool KABC::ResourceScalix::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; @@ -440,9 +440,9 @@ bool KABC::ResourceScalix::fromKMailAddIncidence( const QString& type, return true; } -void KABC::ResourceScalix::fromKMailDelIncidence( const QString& type, - const QString& subResource, - const QString& uid ) +void KABC::ResourceScalix::fromKMailDelIncidence( const TQString& type, + const TQString& subResource, + const TQString& uid ) { // Check if this is a contact if( type != s_kmailContentsType || !subresourceActive( subResource ) ) @@ -464,8 +464,8 @@ void KABC::ResourceScalix::fromKMailDelIncidence( const QString& type, } } -void KABC::ResourceScalix::fromKMailRefresh( const QString& type, - const QString& /*subResource*/ ) +void KABC::ResourceScalix::fromKMailRefresh( const TQString& type, + const TQString& /*subResource*/ ) { // Check if this is a contact if( type != s_kmailContentsType ) return; @@ -476,9 +476,9 @@ void KABC::ResourceScalix::fromKMailRefresh( const QString& type, addressBook()->emitAddressBookChanged(); } -void KABC::ResourceScalix::fromKMailAddSubresource( const QString& type, - const QString& subResource, - const QString& label, +void KABC::ResourceScalix::fromKMailAddSubresource( const TQString& type, + const TQString& subResource, + const TQString& label, bool writable ) { if( type != s_kmailContentsType ) return; @@ -495,8 +495,8 @@ void KABC::ResourceScalix::fromKMailAddSubresource( const QString& type, emit signalSubresourceAdded( this, type, subResource ); } -void KABC::ResourceScalix::fromKMailDelSubresource( const QString& type, - const QString& subResource ) +void KABC::ResourceScalix::fromKMailDelSubresource( const TQString& type, + const TQString& subResource ) { if( type != s_kmailContentsType ) return; @@ -513,7 +513,7 @@ void KABC::ResourceScalix::fromKMailDelSubresource( const QString& type, // Make a list of all uids to remove Scalix::UidMap::ConstIterator mapIt; - QStringList uids; + TQStringList uids; for ( mapIt = mUidMap.begin(); mapIt != mUidMap.end(); ++mapIt ) if ( mapIt.data().resource() == subResource ) // We have a match @@ -521,7 +521,7 @@ void KABC::ResourceScalix::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 ); @@ -535,13 +535,13 @@ void KABC::ResourceScalix::fromKMailDelSubresource( const QString& type, -void KABC::ResourceScalix::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map, - const QString& /* type */, - const QString& folder ) +void KABC::ResourceScalix::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() ){ @@ -550,12 +550,12 @@ void KABC::ResourceScalix::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QStrin addressBook()->emitAddressBookChanged(); } -QStringList KABC::ResourceScalix::subresources() const +TQStringList KABC::ResourceScalix::subresources() const { return mSubResources.keys(); } -bool KABC::ResourceScalix::subresourceActive( const QString& subresource ) const +bool KABC::ResourceScalix::subresourceActive( const TQString& subresource ) const { if ( mSubResources.contains( subresource ) ) { return mSubResources[ subresource ].active(); @@ -567,7 +567,7 @@ bool KABC::ResourceScalix::subresourceActive( const QString& subresource ) const return true; } -bool KABC::ResourceScalix::subresourceWritable( const QString& subresource ) const +bool KABC::ResourceScalix::subresourceWritable( const TQString& subresource ) const { if ( mSubResources.contains( subresource ) ) { return mSubResources[ subresource ].writable(); @@ -575,7 +575,7 @@ bool KABC::ResourceScalix::subresourceWritable( const QString& subresource ) con return false; //better a safe default } -int KABC::ResourceScalix::subresourceCompletionWeight( const QString& subresource ) const +int KABC::ResourceScalix::subresourceCompletionWeight( const TQString& subresource ) const { if ( mSubResources.contains( subresource ) ) { return mSubResources[ subresource ].completionWeight(); @@ -586,17 +586,17 @@ int KABC::ResourceScalix::subresourceCompletionWeight( const QString& subresourc return 80; } -QString KABC::ResourceScalix::subresourceLabel( const QString& subresource ) const +TQString KABC::ResourceScalix::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::ResourceScalix::setSubresourceCompletionWeight( const QString& subresource, int completionWeight ) +void KABC::ResourceScalix::setSubresourceCompletionWeight( const TQString& subresource, int completionWeight ) { if ( mSubResources.contains( subresource ) ) { mSubResources[ subresource ].setCompletionWeight( completionWeight ); @@ -605,17 +605,17 @@ void KABC::ResourceScalix::setSubresourceCompletionWeight( const QString& subres } } -QMap<QString, QString> KABC::ResourceScalix::uidToResourceMap() const +TQMap<TQString, TQString> KABC::ResourceScalix::uidToResourceMap() const { // TODO: Couldn't this be made simpler? - QMap<QString, QString> map; + TQMap<TQString, TQString> map; Scalix::UidMap::ConstIterator mapIt; for ( mapIt = mUidMap.begin(); mapIt != mUidMap.end(); ++mapIt ) map[ mapIt.key() ] = mapIt.data().resource(); return map; } -void KABC::ResourceScalix::setSubresourceActive( const QString &subresource, bool active ) +void KABC::ResourceScalix::setSubresourceActive( const TQString &subresource, bool active ) { if ( mSubResources.contains( subresource ) ) { mSubResources[ subresource ].setActive( active ); diff --git a/kresources/scalix/kabc/resourcescalix.h b/kresources/scalix/kabc/resourcescalix.h index 10d3d8aa5..25eca7e49 100644 --- a/kresources/scalix/kabc/resourcescalix.h +++ b/kresources/scalix/kabc/resourcescalix.h @@ -107,61 +107,61 @@ 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 fromKMailDelSubresource( const QString& type, const QString& id ); + void fromKMailAddSubresource( const TQString& type, const TQString& id, + const TQString& label, bool writable ); + 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 writabel? - bool subresourceWritable( const QString& ) const; + bool subresourceWritable( const TQString& ) const; - virtual void setSubresourceActive( const QString &, bool ); + virtual void setSubresourceActive( const TQString &, bool ); /// 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 ); - bool loadSubResourceHelper( const QString& subResource, const char* mimetype, KMailICalIface::StorageFormat format ); - 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 ); + bool loadSubResourceHelper( const TQString& subResource, const char* mimetype, KMailICalIface::StorageFormat format ); + TQString loadContact( const TQString& contactData, const TQString& subResource, Q_UINT32 sernum, const KMailICalIface::StorageFormat format ); - QString configFile() const { + TQString configFile() const { return Scalix::ResourceScalixBase::configFile( "kabc" ); } // The list of subresources Scalix::ResourceMap mSubResources; - QString mCachedSubresource; + TQString mCachedSubresource; bool mLocked; }; diff --git a/kresources/scalix/kabc/resourcescalix_plugin.cpp b/kresources/scalix/kabc/resourcescalix_plugin.cpp index 95bc28beb..a5f289a78 100644 --- a/kresources/scalix/kabc/resourcescalix_plugin.cpp +++ b/kresources/scalix/kabc/resourcescalix_plugin.cpp @@ -43,7 +43,7 @@ class ScalixFactory : public KRES::PluginFactoryBase return new KABC::ResourceScalix( config ); } - KRES::ConfigWidget *configWidget( QWidget* ) + KRES::ConfigWidget *configWidget( TQWidget* ) { return 0; } |