diff options
Diffstat (limited to 'kopete/protocols/groupwise/gwprotocol.cpp')
-rw-r--r-- | kopete/protocols/groupwise/gwprotocol.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/kopete/protocols/groupwise/gwprotocol.cpp b/kopete/protocols/groupwise/gwprotocol.cpp index dcf92a17..6eb489a2 100644 --- a/kopete/protocols/groupwise/gwprotocol.cpp +++ b/kopete/protocols/groupwise/gwprotocol.cpp @@ -19,8 +19,8 @@ * * ************************************************************************* */ -#include <qregexp.h> -#include <qstringlist.h> +#include <tqregexp.h> +#include <tqstringlist.h> #include <kgenericfactory.h> #include <kdebug.h> @@ -41,12 +41,12 @@ K_EXPORT_COMPONENT_FACTORY( kopete_groupwise, GroupWiseProtocolFactory( "kopete_ GroupWiseProtocol *GroupWiseProtocol::s_protocol = 0L; -GroupWiseProtocol::GroupWiseProtocol( QObject* parent, const char *name, const QStringList &/*args*/ ) +GroupWiseProtocol::GroupWiseProtocol( TQObject* parent, const char *name, const TQStringList &/*args*/ ) : Kopete::Protocol( GroupWiseProtocolFactory::instance(), parent, name ), /* initialise Kopete::OnlineStatus that should be user selectable in the user interface */ - groupwiseOffline ( Kopete::OnlineStatus::Offline, 0, this, GroupWise::Offline, QString::null, + groupwiseOffline ( Kopete::OnlineStatus::Offline, 0, this, GroupWise::Offline, TQString::null, i18n( "Offline" ), i18n( "O&ffline" ), Kopete::OnlineStatusManager::Offline ), - groupwiseAvailable ( Kopete::OnlineStatus::Online, 25, this, GroupWise::Available, QString::null, + groupwiseAvailable ( Kopete::OnlineStatus::Online, 25, this, GroupWise::Available, TQString::null, i18n( "Online" ), i18n( "&Online" ), Kopete::OnlineStatusManager::Online ), groupwiseBusy ( Kopete::OnlineStatus::Away, 18, this, GroupWise::Busy, "contact_busy_overlay", i18n( "Busy" ), i18n( "&Busy" ), Kopete::OnlineStatusManager::Busy, Kopete::OnlineStatusManager::HasAwayMessage ), @@ -68,8 +68,8 @@ GroupWiseProtocol::GroupWiseProtocol( QObject* parent, const char *name, const Q propLastName( Kopete::Global::Properties::self()->lastName() ), propFullName( Kopete::Global::Properties::self()->fullName() ), propAwayMessage( Kopete::Global::Properties::self()->awayMessage() ), - propAutoReply( "groupwiseAutoReply", i18n( "Auto Reply Message" ), QString::null, false, false ), - propCN( "groupwiseCommonName", i18n( "Common Name" ), QString::null, true, false ), + propAutoReply( "groupwiseAutoReply", i18n( "Auto Reply Message" ), TQString::null, false, false ), + propCN( "groupwiseCommonName", i18n( "Common Name" ), TQString::null, true, false ), propPhoneWork( Kopete::Global::Properties::self()->workPhone() ), propPhoneMobile( Kopete::Global::Properties::self()->privateMobilePhone() ), propEmail( Kopete::Global::Properties::self()->emailAddress() ) @@ -87,17 +87,17 @@ GroupWiseProtocol::~GroupWiseProtocol() } Kopete::Contact *GroupWiseProtocol::deserializeContact( - Kopete::MetaContact *metaContact, const QMap<QString, QString> &serializedData, - const QMap<QString, QString> &/* addressBookData */) + Kopete::MetaContact *metaContact, const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> &/* addressBookData */) { - QString dn = serializedData[ "DN" ]; - QString accountId = serializedData[ "accountId" ]; - QString displayName = serializedData[ "displayName" ]; + TQString dn = serializedData[ "DN" ]; + TQString accountId = serializedData[ "accountId" ]; + TQString displayName = serializedData[ "displayName" ]; int objectId = serializedData[ "objectId" ].toInt(); int parentId = serializedData[ "parentId" ].toInt(); int sequence = serializedData[ "sequenceNumber" ].toInt(); - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this ); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this ); Kopete::Account *account = accounts[ accountId ]; if ( !account ) @@ -110,19 +110,19 @@ Kopete::Contact *GroupWiseProtocol::deserializeContact( return new GroupWiseContact(account, dn, metaContact, objectId, parentId, sequence ); } -AddContactPage * GroupWiseProtocol::createAddContactWidget( QWidget *parent, Kopete::Account * account ) +AddContactPage * GroupWiseProtocol::createAddContactWidget( TQWidget *parent, Kopete::Account * account ) { kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "Creating Add Contact Page" << endl; return new GroupWiseAddContactPage( account, parent, "addcontactpage"); } -KopeteEditAccountWidget * GroupWiseProtocol::createEditAccountWidget( Kopete::Account *account, QWidget *parent ) +KopeteEditAccountWidget * GroupWiseProtocol::createEditAccountWidget( Kopete::Account *account, TQWidget *parent ) { kdDebug(GROUPWISE_DEBUG_GLOBAL) << "Creating Edit Account Page" << endl; return new GroupWiseEditAccountWidget( parent, account ); } -Kopete::Account *GroupWiseProtocol::createNewAccount( const QString &accountId ) +Kopete::Account *GroupWiseProtocol::createNewAccount( const TQString &accountId ) { return new GroupWiseAccount( this, accountId ); } @@ -165,7 +165,7 @@ Kopete::OnlineStatus GroupWiseProtocol::gwStatusToKOS( const int gwInternal ) return status; } -QString GroupWiseProtocol::rtfizeText( const QString & plain ) +TQString GroupWiseProtocol::rtfizeText( const TQString & plain ) { // transcode a utf-8 encoded string into an rtf string // iterate through the input string converting each char into the equivalent rtf @@ -173,12 +173,12 @@ QString GroupWiseProtocol::rtfizeText( const QString & plain ) // of multi-byte UTF-8 characters 2 to 6 bytes long (with first byte > 0x7f), these are recoded as 32 bit values, escaped as \u<val>? strings // vanilla RTF "envelope" that doesn't say much but causes other clients to accept the message - QString rtfTemplate = QString::fromLatin1("{\\rtf1\\ansi\n" + TQString rtfTemplate = TQString::fromLatin1("{\\rtf1\\ansi\n" "{\\fonttbl{\\f0\\fnil Unknown;}}\n" "{\\colortbl ;\\red0\\green0\\blue0;}\n" "\\uc1\\cf1\\f0\\fs18 %1\\par\n}"); - QString outputText; // output text - QCString plainUtf8 = plain.utf8(); // encoded as UTF8, because that's what this encoding algorithm, taken from Gaim's Novell plugin + TQString outputText; // output text + TQCString plainUtf8 = plain.utf8(); // encoded as UTF8, because that's what this encoding algorithm, taken from Gaim's Novell plugin uint index = 0; // current char to transcode while ( index < plainUtf8.length() ) { @@ -190,13 +190,13 @@ QString GroupWiseProtocol::rtfizeText( const QString & plain ) case '{': case '}': case '\\': - outputText.append( QString( "\\%1" ).arg( QChar( current ) ) ); + outputText.append( TQString( "\\%1" ).arg( TQChar( current ) ) ); break; case '\n': outputText.append( "\\par " ); break; default: - outputText.append( QChar( current ) ); + outputText.append( TQChar( current ) ); break; } ++index; @@ -205,7 +205,7 @@ QString GroupWiseProtocol::rtfizeText( const QString & plain ) { Q_UINT32 ucs4Char; int bytesEncoded; - QString escapedUnicodeChar; + TQString escapedUnicodeChar; if ( current <= 0xDF ) { ucs4Char = (( plainUtf8.data()[ index ] & 0x001F) << 6) | @@ -248,12 +248,12 @@ QString GroupWiseProtocol::rtfizeText( const QString & plain ) } else { - kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "bogus utf-8 lead byte: 0x" << QTextStream::hex << current << endl; + kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "bogus utf-8 lead byte: 0x" << TQTextStream::hex << current << endl; ucs4Char = 0x003F; bytesEncoded = 1; } index += bytesEncoded; - escapedUnicodeChar = QString("\\u%1?").arg( ucs4Char ); + escapedUnicodeChar = TQString("\\u%1?").arg( ucs4Char ); kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "unicode escaped char: " << escapedUnicodeChar << endl; outputText.append( escapedUnicodeChar ); } @@ -261,21 +261,21 @@ QString GroupWiseProtocol::rtfizeText( const QString & plain ) return rtfTemplate.arg( outputText ); } -QString GroupWiseProtocol::dnToDotted( const QString & dn ) +TQString GroupWiseProtocol::dnToDotted( const TQString & dn ) { - QRegExp rx("[a-zA-Z]*=(.*)$", false ); + TQRegExp rx("[a-zA-Z]*=(.*)$", false ); if( !dn.find( '=' ) ) // if it's not a DN, return it unprocessed return dn; // split the dn into elements - QStringList elements = QStringList::split( ',', dn ); + TQStringList elements = TQStringList::split( ',', dn ); // remove the key, keep the value - for ( QStringList::Iterator it = elements.begin(); it != elements.end(); ++it ) + for ( TQStringList::Iterator it = elements.begin(); it != elements.end(); ++it ) { if ( rx.search( *it ) != -1 ) *it = rx.cap( 1 ); } - QString dotted = elements.join( "." ); + TQString dotted = elements.join( "." ); // reassemble as dotted return dotted; |