diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/groupwise/libgroupwise | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/groupwise/libgroupwise')
112 files changed, 1281 insertions, 1281 deletions
diff --git a/kopete/protocols/groupwise/libgroupwise/bytestream.cpp b/kopete/protocols/groupwise/libgroupwise/bytestream.cpp index ad860b98..0b20c050 100644 --- a/kopete/protocols/groupwise/libgroupwise/bytestream.cpp +++ b/kopete/protocols/groupwise/libgroupwise/bytestream.cpp @@ -35,7 +35,7 @@ //! //! The signals connectionClosed(), delayedCloseFinished(), readyRead(), //! bytesWritten(), and error() serve the exact same function as those from -//! <A HREF="http://doc.trolltech.com/3.1/qsocket.html">QSocket</A>. +//! <A HREF="http://doc.trolltech.com/3.1/tqsocket.html">TQSocket</A>. //! //! The simplest way to create a ByteStream is to reimplement isOpen(), close(), //! and tryWrite(). Call appendRead() whenever you want to make data available for @@ -59,13 +59,13 @@ class ByteStream::Private public: Private() {} - QByteArray readBuf, writeBuf; + TQByteArray readBuf, writeBuf; }; //! //! Constructs a ByteStream object with parent \a parent. -ByteStream::ByteStream(QObject *parent) -:QObject(parent) +ByteStream::ByteStream(TQObject *parent) +:TQObject(parent) { d = new Private; } @@ -95,7 +95,7 @@ void ByteStream::close() //! //! Writes array \a a to the stream. -void ByteStream::write(const QByteArray &a) +void ByteStream::write(const TQByteArray &a) { if(!isOpen()) return; @@ -109,7 +109,7 @@ void ByteStream::write(const QByteArray &a) //! //! Reads bytes \a bytes of data from the stream and returns them as an array. If \a bytes is 0, then //! \a read will return all available data. -QByteArray ByteStream::read(int bytes) +TQByteArray ByteStream::read(int bytes) { return takeRead(bytes); } @@ -130,9 +130,9 @@ int ByteStream::bytesToWrite() const //! //! Writes string \a cs to the stream. -void ByteStream::write(const QCString &cs) +void ByteStream::write(const TQCString &cs) { - QByteArray block(cs.length()); + TQByteArray block(cs.length()); memcpy(block.data(), cs.data(), block.size()); write(block); } @@ -153,14 +153,14 @@ void ByteStream::clearWriteBuffer() //! //! Appends \a block to the end of the read buffer. -void ByteStream::appendRead(const QByteArray &block) +void ByteStream::appendRead(const TQByteArray &block) { appendArray(&d->readBuf, block); } //! //! Appends \a block to the end of the write buffer. -void ByteStream::appendWrite(const QByteArray &block) +void ByteStream::appendWrite(const TQByteArray &block) { appendArray(&d->writeBuf, block); } @@ -169,7 +169,7 @@ void ByteStream::appendWrite(const QByteArray &block) //! Returns \a size bytes from the start of the read buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeRead(int size, bool del) +TQByteArray ByteStream::takeRead(int size, bool del) { return takeArray(&d->readBuf, size, del); } @@ -178,21 +178,21 @@ QByteArray ByteStream::takeRead(int size, bool del) //! Returns \a size bytes from the start of the write buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeWrite(int size, bool del) +TQByteArray ByteStream::takeWrite(int size, bool del) { return takeArray(&d->writeBuf, size, del); } //! //! Returns a reference to the read buffer. -QByteArray & ByteStream::readBuf() +TQByteArray & ByteStream::readBuf() { return d->readBuf; } //! //! Returns a reference to the write buffer. -QByteArray & ByteStream::writeBuf() +TQByteArray & ByteStream::writeBuf() { return d->writeBuf; } @@ -207,7 +207,7 @@ int ByteStream::tryWrite() //! //! Append array \a b to the end of the array pointed to by \a a. -void ByteStream::appendArray(QByteArray *a, const QByteArray &b) +void ByteStream::appendArray(TQByteArray *a, const TQByteArray &b) { int oldsize = a->size(); a->resize(oldsize + b.size()); @@ -218,9 +218,9 @@ void ByteStream::appendArray(QByteArray *a, const QByteArray &b) //! Returns \a size bytes from the start of the array pointed to by \a from. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeArray(QByteArray *from, int size, bool del) +TQByteArray ByteStream::takeArray(TQByteArray *from, int size, bool del) { - QByteArray a; + TQByteArray a; if(size == 0) { a = from->copy(); if(del) diff --git a/kopete/protocols/groupwise/libgroupwise/bytestream.h b/kopete/protocols/groupwise/libgroupwise/bytestream.h index b90f109d..f10b46a1 100644 --- a/kopete/protocols/groupwise/libgroupwise/bytestream.h +++ b/kopete/protocols/groupwise/libgroupwise/bytestream.h @@ -21,8 +21,8 @@ #ifndef CS_BYTESTREAM_H #define CS_BYTESTREAM_H -#include<qobject.h> -#include<qcstring.h> +#include<tqobject.h> +#include<tqcstring.h> // CS_NAMESPACE_BEGIN @@ -32,20 +32,20 @@ class ByteStream : public QObject Q_OBJECT public: enum Error { ErrRead, ErrWrite, ErrCustom = 10 }; - ByteStream(QObject *parent=0); + ByteStream(TQObject *parent=0); virtual ~ByteStream()=0; virtual bool isOpen() const; virtual void close(); - virtual void write(const QByteArray &); - virtual QByteArray read(int bytes=0); + virtual void write(const TQByteArray &); + virtual TQByteArray read(int bytes=0); virtual int bytesAvailable() const; virtual int bytesToWrite() const; - void write(const QCString &); + void write(const TQCString &); - static void appendArray(QByteArray *a, const QByteArray &b); - static QByteArray takeArray(QByteArray *from, int size=0, bool del=true); + static void appendArray(TQByteArray *a, const TQByteArray &b); + static TQByteArray takeArray(TQByteArray *from, int size=0, bool del=true); signals: void connectionClosed(); @@ -57,12 +57,12 @@ signals: protected: void clearReadBuffer(); void clearWriteBuffer(); - void appendRead(const QByteArray &); - void appendWrite(const QByteArray &); - QByteArray takeRead(int size=0, bool del=true); - QByteArray takeWrite(int size=0, bool del=true); - QByteArray & readBuf(); - QByteArray & writeBuf(); + void appendRead(const TQByteArray &); + void appendWrite(const TQByteArray &); + TQByteArray takeRead(int size=0, bool del=true); + TQByteArray takeWrite(int size=0, bool del=true); + TQByteArray & readBuf(); + TQByteArray & writeBuf(); virtual int tryWrite(); private: diff --git a/kopete/protocols/groupwise/libgroupwise/chatroommanager.cpp b/kopete/protocols/groupwise/libgroupwise/chatroommanager.cpp index adbb66de..3ee9b947 100644 --- a/kopete/protocols/groupwise/libgroupwise/chatroommanager.cpp +++ b/kopete/protocols/groupwise/libgroupwise/chatroommanager.cpp @@ -16,8 +16,8 @@ ************************************************************************* */ -#include <qmap.h> -#include <qvaluelist.h> +#include <tqmap.h> +#include <tqvaluelist.h> #include <kdebug.h> @@ -29,7 +29,7 @@ #include "chatroommanager.h" ChatroomManager::ChatroomManager( Client * parent, const char *name) - : QObject(parent, name), m_client( parent ), m_replace( false ) + : TQObject(parent, name), m_client( parent ), m_replace( false ) { } @@ -52,7 +52,7 @@ void ChatroomManager::getChatrooms( bool refresh ) m_replace = !refresh; SearchChatTask * sct = new SearchChatTask( m_client->rootTask() ); sct->search( ( refresh ? SearchChatTask::SinceLastSearch : SearchChatTask::FetchAll ) ); - connect( sct, SIGNAL( finished() ), SLOT( slotGotChatroomList() ) ); + connect( sct, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotChatroomList() ) ); sct->go( true ); } @@ -65,9 +65,9 @@ void ChatroomManager::slotGotChatroomList() if ( m_replace ) m_rooms.clear(); - QValueList<ChatroomSearchResult> roomsFound = sct->results(); - QValueList<ChatroomSearchResult>::Iterator it = roomsFound.begin(); - const QValueList<ChatroomSearchResult>::Iterator end = roomsFound.end(); + TQValueList<ChatroomSearchResult> roomsFound = sct->results(); + TQValueList<ChatroomSearchResult>::Iterator it = roomsFound.begin(); + const TQValueList<ChatroomSearchResult>::Iterator end = roomsFound.end(); for ( ; it != end; ++it ) { GroupWise::Chatroom c( *it ); @@ -80,7 +80,7 @@ void ChatroomManager::slotGotChatroomList() void ChatroomManager::updateCounts() { ChatCountsTask * cct = new ChatCountsTask( m_client->rootTask() ); - connect( cct, SIGNAL( finished() ), SLOT( slotGotChatCounts() ) ); + connect( cct, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotChatCounts() ) ); cct->go( true ); } @@ -89,9 +89,9 @@ void ChatroomManager::slotGotChatCounts() ChatCountsTask * cct = (ChatCountsTask *)sender(); if ( cct ) { - QMap< QString, int > newCounts = cct->results(); - QMap< QString, int >::iterator it = newCounts.begin(); - const QMap< QString, int >::iterator end = newCounts.end(); + TQMap< TQString, int > newCounts = cct->results(); + TQMap< TQString, int >::iterator it = newCounts.begin(); + const TQMap< TQString, int >::iterator end = newCounts.end(); for ( ; it != end; ++it ) if ( m_rooms.contains( it.key() ) ) @@ -100,7 +100,7 @@ void ChatroomManager::slotGotChatCounts() emit updated(); } -void ChatroomManager::requestProperties( const QString & displayName ) +void ChatroomManager::requestProperties( const TQString & displayName ) { if ( 0 /*m_rooms.contains( displayName ) */) emit gotProperties( m_rooms[ displayName ] ); @@ -108,7 +108,7 @@ void ChatroomManager::requestProperties( const QString & displayName ) { ChatPropertiesTask * cpt = new ChatPropertiesTask( m_client->rootTask() ); cpt->setChat( displayName ); - connect ( cpt, SIGNAL( finished() ), SLOT( slotGotChatProperties() ) ); + connect ( cpt, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotChatProperties() ) ); cpt->go( true ); } } diff --git a/kopete/protocols/groupwise/libgroupwise/chatroommanager.h b/kopete/protocols/groupwise/libgroupwise/chatroommanager.h index 4d0e888b..5fff7b73 100644 --- a/kopete/protocols/groupwise/libgroupwise/chatroommanager.h +++ b/kopete/protocols/groupwise/libgroupwise/chatroommanager.h @@ -19,7 +19,7 @@ #ifndef CHATROOMMANAGER_H #define CHATROOMMANAGER_H -#include <qobject.h> +#include <tqobject.h> #include "gwchatrooms.h" @@ -36,7 +36,7 @@ class ChatroomManager : public QObject ChatroomManager( Client * client, const char *name = 0); ~ChatroomManager(); GroupWise::ChatroomMap rooms(); - void requestProperties( const QString & displayName ); + void requestProperties( const TQString & displayName ); void updateRooms(); void updateCounts(); signals: diff --git a/kopete/protocols/groupwise/libgroupwise/client.cpp b/kopete/protocols/groupwise/libgroupwise/client.cpp index 274a9ea8..1a88fbc3 100644 --- a/kopete/protocols/groupwise/libgroupwise/client.cpp +++ b/kopete/protocols/groupwise/libgroupwise/client.cpp @@ -19,8 +19,8 @@ ************************************************************************* */ -#include <qapplication.h> -#include <qtimer.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "chatroommanager.h" #include "gwclientstream.h" @@ -53,8 +53,8 @@ public: ClientStream *stream; int id_seed; Task *root; - QString host, user, userDN, pass; - QString osname, tzname, clientName, clientVersion; + TQString host, user, userDN, pass; + TQString osname, tzname, clientName, clientVersion; uint port; /* int tzoffset;*/ bool active; @@ -63,12 +63,12 @@ public: UserDetailsManager * userDetailsMgr; PrivacyManager * privacyMgr; uint protocolVersion; - QValueList<GroupWise::CustomStatus> customStatuses; - QTimer * keepAliveTimer; + TQValueList<GroupWise::CustomStatus> customStatuses; + TQTimer * keepAliveTimer; }; -Client::Client(QObject *par, uint protocolVersion ) -:QObject(par, "groupwiseclient") +Client::Client(TQObject *par, uint protocolVersion ) +:TQObject(par, "groupwiseclient") { d = new ClientPrivate; /* d->tzoffset = 0;*/ @@ -85,8 +85,8 @@ Client::Client(QObject *par, uint protocolVersion ) d->stream = 0; d->protocolVersion = protocolVersion; // Sends regular keepalives so the server knows we are still running - d->keepAliveTimer = new QTimer( this ); - connect( d->keepAliveTimer, SIGNAL( timeout() ), SLOT( sendKeepAlive() ) ); + d->keepAliveTimer = new TQTimer( this ); + connect( d->keepAliveTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( sendKeepAlive() ) ); } Client::~Client() @@ -100,32 +100,32 @@ Client::~Client() void Client::connectToServer( ClientStream *s, const NovellDN &server, bool auth ) { d->stream = s; - //connect(d->stream, SIGNAL(connected()), SLOT(streamConnected())); - //connect(d->stream, SIGNAL(handshaken()), SLOT(streamHandshaken())); - connect(d->stream, SIGNAL(error(int)), SLOT(streamError(int))); - //connect(d->stream, SIGNAL(sslCertificateReady(const QSSLCert &)), SLOT(streamSSLCertificateReady(const QSSLCert &))); - connect(d->stream, SIGNAL(readyRead()), SLOT(streamReadyRead())); - //connect(d->stream, SIGNAL(closeFinished()), SLOT(streamCloseFinished())); + //connect(d->stream, TQT_SIGNAL(connected()), TQT_SLOT(streamConnected())); + //connect(d->stream, TQT_SIGNAL(handshaken()), TQT_SLOT(streamHandshaken())); + connect(d->stream, TQT_SIGNAL(error(int)), TQT_SLOT(streamError(int))); + //connect(d->stream, TQT_SIGNAL(sslCertificateReady(const QSSLCert &)), TQT_SLOT(streamSSLCertificateReady(const QSSLCert &))); + connect(d->stream, TQT_SIGNAL(readyRead()), TQT_SLOT(streamReadyRead())); + //connect(d->stream, TQT_SIGNAL(closeFinished()), TQT_SLOT(streamCloseFinished())); d->stream->connectToServer(server, auth); } -void Client::setOSName(const QString &name) +void Client::setOSName(const TQString &name) { d->osname = name; } -void Client::setClientName(const QString &s) +void Client::setClientName(const TQString &s) { d->clientName = s; } -void Client::setClientVersion(const QString &s) +void Client::setClientVersion(const TQString &s) { d->clientVersion = s; } -void Client::start( const QString &host, const uint port, const QString &userId, const QString &pass ) +void Client::start( const TQString &host, const uint port, const TQString &userId, const TQString &pass ) { d->host = host; d->port = port; @@ -136,27 +136,27 @@ void Client::start( const QString &host, const uint port, const QString &userId, LoginTask * login = new LoginTask( d->root ); - connect( login, SIGNAL( gotMyself( const GroupWise::ContactDetails & ) ), - this, SIGNAL( accountDetailsReceived( const GroupWise::ContactDetails & ) ) ); + connect( login, TQT_SIGNAL( gotMyself( const GroupWise::ContactDetails & ) ), + this, TQT_SIGNAL( accountDetailsReceived( const GroupWise::ContactDetails & ) ) ); - connect( login, SIGNAL( gotFolder( const FolderItem & ) ), - this, SIGNAL( folderReceived( const FolderItem & ) ) ); + connect( login, TQT_SIGNAL( gotFolder( const FolderItem & ) ), + this, TQT_SIGNAL( folderReceived( const FolderItem & ) ) ); - connect( login, SIGNAL( gotContact( const ContactItem & ) ), - this, SIGNAL( contactReceived( const ContactItem & ) ) ); + connect( login, TQT_SIGNAL( gotContact( const ContactItem & ) ), + this, TQT_SIGNAL( contactReceived( const ContactItem & ) ) ); - connect( login, SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ), - this, SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ) ) ; + connect( login, TQT_SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ), + this, TQT_SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ) ) ; - connect( login, SIGNAL( gotPrivacySettings( bool, bool, const QStringList &, const QStringList & ) ), - privacyManager(), SLOT( slotGotPrivacySettings( bool, bool, const QStringList &, const QStringList & ) ) ); + connect( login, TQT_SIGNAL( gotPrivacySettings( bool, bool, const TQStringList &, const TQStringList & ) ), + privacyManager(), TQT_SLOT( slotGotPrivacySettings( bool, bool, const TQStringList &, const TQStringList & ) ) ); - connect( login, SIGNAL( gotCustomStatus( const GroupWise::CustomStatus & ) ), - SLOT( lt_gotCustomStatus( const GroupWise::CustomStatus & ) ) ); + connect( login, TQT_SIGNAL( gotCustomStatus( const GroupWise::CustomStatus & ) ), + TQT_SLOT( lt_gotCustomStatus( const GroupWise::CustomStatus & ) ) ); - connect( login, SIGNAL( gotKeepalivePeriod( int ) ), SLOT( lt_gotKeepalivePeriod( int ) ) ); + connect( login, TQT_SIGNAL( gotKeepalivePeriod( int ) ), TQT_SLOT( lt_gotKeepalivePeriod( int ) ) ); - connect( login, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) ); + connect( login, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) ); login->initialise(); login->go( true ); @@ -175,7 +175,7 @@ void Client::close() } } -QString Client::host() +TQString Client::host() { return d->host; } @@ -185,7 +185,7 @@ int Client::port() return d->port; } -QValueList<GroupWise::CustomStatus> Client::customStatuses() +TQValueList<GroupWise::CustomStatus> Client::customStatuses() { return d->customStatuses; } @@ -194,51 +194,51 @@ void Client::initialiseEventTasks() { // The StatusTask handles incoming status changes StatusTask * st = new StatusTask( d->root ); // FIXME - add an additional EventRoot? - connect( st, SIGNAL( gotStatus( const QString &, Q_UINT16, const QString & ) ), SIGNAL( statusReceived( const QString &, Q_UINT16, const QString & ) ) ); + connect( st, TQT_SIGNAL( gotStatus( const TQString &, Q_UINT16, const TQString & ) ), TQT_SIGNAL( statusReceived( const TQString &, Q_UINT16, const TQString & ) ) ); // The ConferenceTask handles incoming conference events, messages, joins, leaves, etc ConferenceTask * ct = new ConferenceTask( d->root ); - connect( ct, SIGNAL( message( const ConferenceEvent & ) ), SLOT( ct_messageReceived( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( typing( const ConferenceEvent & ) ), SIGNAL( contactTyping( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( notTyping( const ConferenceEvent & ) ), SIGNAL( contactNotTyping( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( joined( const ConferenceEvent & ) ), SIGNAL( conferenceJoinNotifyReceived( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( left( const ConferenceEvent & ) ), SIGNAL( conferenceLeft( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( invited( const ConferenceEvent & ) ), SIGNAL( invitationReceived( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( otherInvited( const ConferenceEvent & ) ), SIGNAL( inviteNotifyReceived( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( invitationDeclined( const ConferenceEvent & ) ), SIGNAL( invitationDeclined( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( closed( const ConferenceEvent & ) ), SIGNAL( conferenceClosed( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( autoReply( const ConferenceEvent & ) ), SIGNAL( autoReplyReceived( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( broadcast( const ConferenceEvent & ) ), SIGNAL( broadcastReceived( const ConferenceEvent & ) ) ); - connect( ct, SIGNAL( systemBroadcast( const ConferenceEvent & ) ), SIGNAL( systemBroadcastReceived( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( message( const ConferenceEvent & ) ), TQT_SLOT( ct_messageReceived( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( typing( const ConferenceEvent & ) ), TQT_SIGNAL( contactTyping( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( notTyping( const ConferenceEvent & ) ), TQT_SIGNAL( contactNotTyping( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( joined( const ConferenceEvent & ) ), TQT_SIGNAL( conferenceJoinNotifyReceived( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( left( const ConferenceEvent & ) ), TQT_SIGNAL( conferenceLeft( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( invited( const ConferenceEvent & ) ), TQT_SIGNAL( invitationReceived( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( otherInvited( const ConferenceEvent & ) ), TQT_SIGNAL( inviteNotifyReceived( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( invitationDeclined( const ConferenceEvent & ) ), TQT_SIGNAL( invitationDeclined( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( closed( const ConferenceEvent & ) ), TQT_SIGNAL( conferenceClosed( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( autoReply( const ConferenceEvent & ) ), TQT_SIGNAL( autoReplyReceived( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( broadcast( const ConferenceEvent & ) ), TQT_SIGNAL( broadcastReceived( const ConferenceEvent & ) ) ); + connect( ct, TQT_SIGNAL( systemBroadcast( const ConferenceEvent & ) ), TQT_SIGNAL( systemBroadcastReceived( const ConferenceEvent & ) ) ); // The ConnectionTask handles incoming connection events ConnectionTask* cont = new ConnectionTask( d->root ); - connect( cont, SIGNAL( connectedElsewhere() ), SIGNAL( connectedElsewhere() ) ); + connect( cont, TQT_SIGNAL( connectedElsewhere() ), TQT_SIGNAL( connectedElsewhere() ) ); } -void Client::setStatus( GroupWise::Status status, const QString & reason, const QString & autoReply ) +void Client::setStatus( GroupWise::Status status, const TQString & reason, const TQString & autoReply ) { - debug( QString("Setting status to %1").arg( status ) );; + debug( TQString("Setting status to %1").arg( status ) );; SetStatusTask * sst = new SetStatusTask( d->root ); sst->status( status, reason, autoReply ); - connect( sst, SIGNAL( finished() ), this, SLOT( sst_statusChanged() ) ); + connect( sst, TQT_SIGNAL( finished() ), this, TQT_SLOT( sst_statusChanged() ) ); sst->go( true ); // TODO: set status change in progress flag } -void Client::requestStatus( const QString & userDN ) +void Client::requestStatus( const TQString & userDN ) { GetStatusTask * gst = new GetStatusTask( d->root ); gst->userDN( userDN ); - connect( gst, SIGNAL( gotStatus( const QString &, Q_UINT16, const QString & ) ), SIGNAL( statusReceived( const QString &, Q_UINT16, const QString & ) ) ); + connect( gst, TQT_SIGNAL( gotStatus( const TQString &, Q_UINT16, const TQString & ) ), TQT_SIGNAL( statusReceived( const TQString &, Q_UINT16, const TQString & ) ) ); gst->go( true ); } -void Client::sendMessage( const QStringList & addresseeDNs, const OutgoingMessage & message ) +void Client::sendMessage( const TQStringList & addresseeDNs, const OutgoingMessage & message ) { SendMessageTask * smt = new SendMessageTask( d->root ); smt->message( addresseeDNs, message ); - connect( smt, SIGNAL( finished() ), SLOT( smt_messageSent() ) ); + connect( smt, TQT_SIGNAL( finished() ), TQT_SLOT( smt_messageSent() ) ); smt->go( true ); } @@ -251,23 +251,23 @@ void Client::sendTyping( const GroupWise::ConferenceGuid & conferenceGuid, bool void Client::createConference( const int clientId ) { - QStringList dummy; + TQStringList dummy; createConference( clientId, dummy ); } -void Client::createConference( const int clientId, const QStringList & participants ) +void Client::createConference( const int clientId, const TQStringList & participants ) { CreateConferenceTask * cct = new CreateConferenceTask( d->root ); cct->conference( clientId, participants ); - connect( cct, SIGNAL( finished() ), SLOT( cct_conferenceCreated() ) ); + connect( cct, TQT_SIGNAL( finished() ), TQT_SLOT( cct_conferenceCreated() ) ); cct->go( true ); } -void Client::requestDetails( const QStringList & userDNs ) +void Client::requestDetails( const TQStringList & userDNs ) { GetDetailsTask * gdt = new GetDetailsTask( d->root ); gdt->userDNs( userDNs ); - connect( gdt, SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ), - this, SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ) ); + connect( gdt, TQT_SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ), + this, TQT_SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ) ); gdt->go( true ); } @@ -275,7 +275,7 @@ void Client::joinConference( const GroupWise::ConferenceGuid & guid ) { JoinConferenceTask * jct = new JoinConferenceTask( d->root ); jct->join( guid ); - connect( jct, SIGNAL( finished() ), SLOT( jct_joinConfCompleted() ) ); + connect( jct, TQT_SIGNAL( finished() ), TQT_SLOT( jct_joinConfCompleted() ) ); jct->go( true ); } @@ -291,14 +291,14 @@ void Client::leaveConference( const GroupWise::ConferenceGuid & guid ) { LeaveConferenceTask * lct = new LeaveConferenceTask( d->root ); lct->leave( guid ); - //connect( lct, SIGNAL( finished() ), SLOT( lct_leftConference() ) ); + //connect( lct, TQT_SIGNAL( finished() ), TQT_SLOT( lct_leftConference() ) ); lct->go( true ); } -void Client::sendInvitation( const GroupWise::ConferenceGuid & guid, const QString & dn, const GroupWise::OutgoingMessage & message ) +void Client::sendInvitation( const GroupWise::ConferenceGuid & guid, const TQString & dn, const GroupWise::OutgoingMessage & message ) { SendInviteTask * sit = new SendInviteTask( d->root ); - QStringList invitees( dn ); + TQStringList invitees( dn ); sit->invite( guid, dn, message ); sit->go( true ); } @@ -306,7 +306,7 @@ void Client::sendInvitation( const GroupWise::ConferenceGuid & guid, const QStri // SLOTS // void Client::streamError( int error ) { - debug( QString( "CLIENT ERROR (Error %1)" ).arg( error ) ); + debug( TQString( "CLIENT ERROR (Error %1)" ).arg( error ) ); } void Client::streamReadyRead() @@ -326,7 +326,7 @@ void Client::lt_loginFinished() debug( "Client::lt_loginFinished() LOGIN SUCCEEDED" ); // set our initial status SetStatusTask * sst = new SetStatusTask( d->root ); - sst->status( GroupWise::Available, QString::null, QString::null ); + sst->status( GroupWise::Available, TQString::null, TQString::null ); sst->go( true ); emit loggedIn(); // fetch details for any privacy list items that aren't in our contact list. @@ -357,17 +357,17 @@ void Client::ct_messageReceived( const ConferenceEvent & messageEvent ) debug( "parsing received message's RTF" ); ConferenceEvent transformedEvent = messageEvent; RTF2HTML parser; - QString rtf = messageEvent.message; + TQString rtf = messageEvent.message; if ( !rtf.isEmpty() ) transformedEvent.message = parser.Parse( rtf.latin1(), "" ); // fixes for RTF to HTML conversion problems // we can drop these once the server reenables the sending of unformatted text // redundant linebreak at the end of the message - QRegExp rx(" </span> </span> </span><br>$"); + TQRegExp rx(" </span> </span> </span><br>$"); transformedEvent.message.replace( rx, "</span></span></span>" ); // missing linebreak after first line of an encrypted message - QRegExp ry("-----BEGIN PGP MESSAGE----- </span> </span> </span>"); + TQRegExp ry("-----BEGIN PGP MESSAGE----- </span> </span> </span>"); transformedEvent.message.replace( ry, "-----BEGIN PGP MESSAGE-----</span></span></span><br/>" ); emit messageReceived( transformedEvent ); @@ -390,14 +390,14 @@ void Client::jct_joinConfCompleted() { const JoinConferenceTask * jct = ( JoinConferenceTask * )sender(); #ifdef LIBGW_DEBUG - debug( QString( "Joined conference %1, participants are: " ).arg( jct->guid() ) ); - QStringList parts = jct->participants(); - for ( QStringList::Iterator it = parts.begin(); it != parts.end(); ++it ) - debug( QString( " - %1" ).arg(*it) ); + debug( TQString( "Joined conference %1, participants are: " ).arg( jct->guid() ) ); + TQStringList parts = jct->participants(); + for ( TQStringList::Iterator it = parts.begin(); it != parts.end(); ++it ) + debug( TQString( " - %1" ).arg(*it) ); debug( "invitees are: " ); - QStringList invitees = jct->invitees(); - for ( QStringList::Iterator it = invitees.begin(); it != invitees.end(); ++it ) - debug( QString( " - %1" ).arg(*it) ); + TQStringList invitees = jct->invitees(); + for ( TQStringList::Iterator it = invitees.begin(); it != invitees.end(); ++it ) + debug( TQString( " - %1" ).arg(*it) ); #endif emit conferenceJoined( jct->guid(), jct->participants(), jct->invitees() ); } @@ -409,32 +409,32 @@ void Client::lt_gotCustomStatus( const GroupWise::CustomStatus & custom ) // INTERNALS // -QString Client::userId() +TQString Client::userId() { return d->user; } -void Client::setUserDN( const QString & userDN ) +void Client::setUserDN( const TQString & userDN ) { d->userDN = userDN; } -QString Client::userDN() +TQString Client::userDN() { return d->userDN; } -QString Client::password() +TQString Client::password() { return d->pass; } -QString Client::userAgent() +TQString Client::userAgent() { - return QString::fromLatin1( "%1/%2 (%3)" ).arg( d->clientName, d->clientVersion, d->osname ); + return TQString::fromLatin1( "%1/%2 (%3)" ).arg( d->clientName, d->clientVersion, d->osname ); } -QCString Client::ipAddress() +TQCString Client::ipAddress() { // TODO: remove hardcoding return "10.10.11.103"; @@ -456,14 +456,14 @@ void Client::send( Request * request ) debug( "CLIENT - NO STREAM TO SEND ON!"); return; } -// QString out = request.toString(); -// debug(QString("Client: outgoing: [\n%1]\n").arg(out)); +// TQString out = request.toString(); +// debug(TQString("Client: outgoing: [\n%1]\n").arg(out)); // xmlOutgoing(out); d->stream->write( request ); } -void Client::debug( const QString &str ) +void Client::debug( const TQString &str ) { #ifdef LIBGW_USE_KDEBUG kdDebug( GROUPWISE_DEBUG_LIBGW ) << "debug: " << str << endl; @@ -472,9 +472,9 @@ void Client::debug( const QString &str ) #endif } -QString Client::genUniqueId() +TQString Client::genUniqueId() { - QString s; + TQString s; s.sprintf("a%x", d->id_seed); d->id_seed += 0x10; return s; diff --git a/kopete/protocols/groupwise/libgroupwise/client.h b/kopete/protocols/groupwise/libgroupwise/client.h index 102b0c27..9cdb7c68 100644 --- a/kopete/protocols/groupwise/libgroupwise/client.h +++ b/kopete/protocols/groupwise/libgroupwise/client.h @@ -21,7 +21,7 @@ #ifndef LIBGW_CLIENT_H #define LIBGW_CLIENT_H -#include <qstring.h> +#include <tqstring.h> #include "gwclientstream.h" #include "gwerror.h" @@ -46,12 +46,12 @@ Q_OBJECT EXTERNAL API *************/ - Client( QObject *parent = 0, uint protocolVersion = 2 ); + Client( TQObject *parent = 0, uint protocolVersion = 2 ); ~Client(); - void setOSName( const QString &name ); - void setClientName( const QString &s ); - void setClientVersion( const QString &s ); - void setUserDN( const QString & userDN ); + void setOSName( const TQString &name ); + void setClientName( const TQString &s ); + void setClientVersion( const TQString &s ); + void setUserDN( const TQString & userDN ); /** * Start a connection to the server using the supplied @ref ClientStream. * This is only a transport layer connection. @@ -69,11 +69,11 @@ Q_OBJECT * @param user The user name to log in as. fd * @param password */ - void start( const QString &host, const uint port, const QString &userId, const QString &pass ); + void start( const TQString &host, const uint port, const TQString &userId, const TQString &pass ); /** * Logout and disconnect - * Protocol action P4 void distribute(const QDomElement &); + * Protocol action P4 void distribute(const TQDomElement &); */ void close(); @@ -81,7 +81,7 @@ fd * @param password /** * Accessors needed for login */ - QString host(); + TQString host(); int port(); /** @@ -91,14 +91,14 @@ fd * @param password * @param reason custom status name for away statuses * @param autoReply auto reply message for use in this status */ - void setStatus( GroupWise::Status status, const QString & reason, const QString & autoReply ); + void setStatus( GroupWise::Status status, const TQString & reason, const TQString & autoReply ); /** * Send a message * Protocol action P10 * @param message contains the text and the recipient. */ - void sendMessage( const QStringList & addresseeDNs, const OutgoingMessage & message ); + void sendMessage( const TQStringList & addresseeDNs, const OutgoingMessage & message ); /** * Send a typing notification @@ -112,12 +112,12 @@ fd * @param password * Request details for one or more users, for example, if we receive a message from someone who isn't on our contact list * @param userDNs A list of one or more user's DNs to fetch details for */ - void requestDetails( const QStringList & userDNs ); + void requestDetails( const TQStringList & userDNs ); /** * Request the status of a single user, for example, if they have messaged us and are not on our contact list */ - void requestStatus( const QString & userDN ); + void requestStatus( const TQString & userDN ); /** * Add a contact to the contact list @@ -137,7 +137,7 @@ fd * @param password /** * Overloaded version of the above to create a conference with a supplied list of invitees */ - void createConference( const int clientId, const QStringList & participants ); + void createConference( const int clientId, const TQStringList & participants ); /** * Join a conference, accepting an invitation @@ -161,7 +161,7 @@ fd * @param password * Send an invitation to join a conference * Protocol action P9 */ - void sendInvitation( const ConferenceGuid & guid, const QString & dn, const GroupWise::OutgoingMessage & message ); + void sendInvitation( const ConferenceGuid & guid, const TQString & dn, const GroupWise::OutgoingMessage & message ); /************* INTERNAL (FOR USE BY TASKS) METHODS *************/ @@ -172,7 +172,7 @@ fd * @param password /** * Print a debug statement */ - void debug( const QString &str ); + void debug( const TQString &str ); /** * The protocol version of the Client @@ -181,36 +181,36 @@ fd * @param password /** * Generate a unique ID for Tasks. */ - QString genUniqueId(); + TQString genUniqueId(); /** * The current user's user ID */ - QString userId(); + TQString userId(); /** * The current user's DN */ - QString userDN(); + TQString userDN(); /** * The current user's password */ - QString password(); + TQString password(); /** * User agent details for this host */ - QString userAgent(); + TQString userAgent(); /** * Host's IP address */ - QCString ipAddress(); + TQCString ipAddress(); /** * Obtain the list of custom statuses stored on the server */ - QValueList<GroupWise::CustomStatus> customStatuses(); + TQValueList<GroupWise::CustomStatus> customStatuses(); /** * Get a reference to the RequestFactory for this Client. @@ -276,11 +276,11 @@ fd * @param password /** * A remote contact changed status */ - void statusReceived( const QString & contactId, Q_UINT16 status, const QString & statusText ); + void statusReceived( const TQString & contactId, Q_UINT16 status, const TQString & statusText ); /** * Our status changed on the server */ - void ourStatusChanged( GroupWise::Status status, const QString & statusText, const QString & autoReply ); + void ourStatusChanged( GroupWise::Status status, const TQString & statusText, const TQString & autoReply ); /** CONFERENCE (MANAGEMENT) EVENTS */ /** @@ -324,7 +324,7 @@ fd * @param password /** * We joined a conference. */ - void conferenceJoined( const GroupWise::ConferenceGuid &, const QStringList &, const QStringList & ); + void conferenceJoined( const GroupWise::ConferenceGuid &, const TQStringList &, const TQStringList & ); /** * We received an "is typing" event in a conference */ diff --git a/kopete/protocols/groupwise/libgroupwise/connector.cpp b/kopete/protocols/groupwise/libgroupwise/connector.cpp index 55e866ee..57e4d222 100644 --- a/kopete/protocols/groupwise/libgroupwise/connector.cpp +++ b/kopete/protocols/groupwise/libgroupwise/connector.cpp @@ -20,8 +20,8 @@ #include "connector.h" -Connector::Connector(QObject *parent) -:QObject(parent) +Connector::Connector(TQObject *parent) +:TQObject(parent) { setUseSSL(false); setPeerAddressNone(); @@ -41,7 +41,7 @@ bool Connector::havePeerAddress() const return haveaddr; } -QHostAddress Connector::peerAddress() const +TQHostAddress Connector::peerAddress() const { return addr; } @@ -59,11 +59,11 @@ void Connector::setUseSSL(bool b) void Connector::setPeerAddressNone() { haveaddr = false; - addr = QHostAddress(); + addr = TQHostAddress(); port = 0; } -void Connector::setPeerAddress(const QHostAddress &_addr, Q_UINT16 _port) +void Connector::setPeerAddress(const TQHostAddress &_addr, Q_UINT16 _port) { haveaddr = true; addr = _addr; diff --git a/kopete/protocols/groupwise/libgroupwise/connector.h b/kopete/protocols/groupwise/libgroupwise/connector.h index 1cae3426..b1c31743 100644 --- a/kopete/protocols/groupwise/libgroupwise/connector.h +++ b/kopete/protocols/groupwise/libgroupwise/connector.h @@ -21,8 +21,8 @@ #ifndef LIBGW_CONNECTOR_H #define LIBGW_CONNECTOR_H -#include <qhostaddress.h> -#include <qobject.h> +#include <tqhostaddress.h> +#include <tqobject.h> class ByteStream; @@ -30,16 +30,16 @@ class Connector : public QObject { Q_OBJECT public: - Connector(QObject *parent=0); + Connector(TQObject *parent=0); virtual ~Connector(); - virtual void connectToServer(const QString &server)=0; + virtual void connectToServer(const TQString &server)=0; virtual ByteStream *stream() const=0; virtual void done()=0; bool useSSL() const; bool havePeerAddress() const; - QHostAddress peerAddress() const; + TQHostAddress peerAddress() const; Q_UINT16 peerPort() const; signals: @@ -49,12 +49,12 @@ signals: protected: void setUseSSL(bool b); void setPeerAddressNone(); - void setPeerAddress(const QHostAddress &addr, Q_UINT16 port); + void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port); private: bool ssl; bool haveaddr; - QHostAddress addr; + TQHostAddress addr; Q_UINT16 port; }; diff --git a/kopete/protocols/groupwise/libgroupwise/coreprotocol.cpp b/kopete/protocols/groupwise/libgroupwise/coreprotocol.cpp index 1e15287e..4c811eba 100644 --- a/kopete/protocols/groupwise/libgroupwise/coreprotocol.cpp +++ b/kopete/protocols/groupwise/libgroupwise/coreprotocol.cpp @@ -24,9 +24,9 @@ #include <iostream> #include <stdlib.h> -#include <qdatastream.h> -#include <qdatetime.h> -#include <qtextstream.h> +#include <tqdatastream.h> +#include <tqdatetime.h> +#include <tqtextstream.h> #include <kdebug.h> @@ -62,7 +62,7 @@ url_escape_string( const char *src) static const char hex_table[17] = "0123456789abcdef"; if (src == NULL) { - return QCString(); + return TQCString(); } /* Find number of chars to escape */ @@ -73,7 +73,7 @@ url_escape_string( const char *src) } } - QCString encoded((p - src) + (escape * 2) + 1); + TQCString encoded((p - src) + (escape * 2) + 1); /* Escape the string */ for (p = src, q = 0; *p != '\0'; p++) { @@ -102,7 +102,7 @@ url_escape_string( const char *src) return encoded; } -CoreProtocol::CoreProtocol() : QObject() +CoreProtocol::CoreProtocol() : TQObject() { m_eventProtocol = new EventProtocol( this, "eventprotocol" ); m_responseProtocol = new ResponseProtocol( this, "responseprotocol" ); @@ -117,7 +117,7 @@ int CoreProtocol::state() return m_state; } -void CoreProtocol::debug( const QString &str ) +void CoreProtocol::debug( const TQString &str ) { #ifdef LIBGW_USE_KDEBUG kdDebug( 14191 ) << "debug: " << str << endl; @@ -126,7 +126,7 @@ void CoreProtocol::debug( const QString &str ) #endif } -void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) +void CoreProtocol::addIncomingData( const TQByteArray & incomingBytes ) { // store locally debug( "CoreProtocol::addIncomingData()"); @@ -142,13 +142,13 @@ void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) while ( m_in.size() && ( parsedBytes = wireToTransfer( m_in ) ) ) { transferCount++; - debug( QString( "CoreProtocol::addIncomingData() - parsed transfer #%1 in chunk" ).arg( transferCount ) ); + debug( TQString( "CoreProtocol::addIncomingData() - parsed transfer #%1 in chunk" ).arg( transferCount ) ); int size = m_in.size(); if ( parsedBytes < size ) { debug( " - more data in chunk!" ); // copy the unparsed bytes into a new qbytearray and replace m_in with that - QByteArray remainder( size - parsedBytes ); + TQByteArray remainder( size - parsedBytes ); memcpy( remainder.data(), m_in.data() + parsedBytes, remainder.size() ); m_in = remainder; } @@ -182,10 +182,10 @@ Transfer* CoreProtocol::incomingTransfer() } } -void cp_dump( const QByteArray &bytes ) +void cp_dump( const TQByteArray &bytes ) { #ifdef LIBGW_DEBUG - CoreProtocol::debug( QString( "contains: %1 bytes" ).arg( bytes.count() ) ); + CoreProtocol::debug( TQString( "contains: %1 bytes" ).arg( bytes.count() ) ); for ( uint i = 0; i < bytes.count(); ++i ) { printf( "%02x ", bytes[ i ] ); @@ -214,19 +214,19 @@ void CoreProtocol::outgoingTransfer( Request* outgoing ) fields.append( fld ); // convert to QByteArray - QByteArray bytesOut; - QTextStream dout( bytesOut, IO_WriteOnly ); - dout.setEncoding( QTextStream::Latin1 ); - //dout.setByteOrder( QDataStream::LittleEndian ); + TQByteArray bytesOut; + TQTextStream dout( bytesOut, IO_WriteOnly ); + dout.setEncoding( TQTextStream::Latin1 ); + //dout.setByteOrder( TQDataStream::LittleEndian ); // strip out any embedded host and port in the command string - QCString command, host, port; + TQCString command, host, port; if ( request->command().section( ':', 0, 0 ) == "login" ) { command = "login"; host = request->command().section( ':', 1, 1 ).ascii(); port = request->command().section( ':', 2, 2 ).ascii(); - debug( QString( "Host: %1 Port: %2" ).arg( host.data() ).arg( port.data() ) ); + debug( TQString( "Host: %1 Port: %2" ).arg( host.data() ).arg( port.data() ) ); } else command = request->command().ascii(); @@ -246,7 +246,7 @@ void CoreProtocol::outgoingTransfer( Request* outgoing ) else dout << "\r\n"; - debug( QString( "data out: %1" ).arg( bytesOut.data() ) ); + debug( TQString( "data out: %1" ).arg( bytesOut.data() ) ); emit outgoingData( bytesOut ); // now convert @@ -261,7 +261,7 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth ) debug( "CoreProtocol::fieldsToWire()"); int subFieldCount = 0; - // TODO: consider constructing this as a QStringList and then join()ing it. + // TODO: consider constructing this as a TQStringList and then join()ing it. Field::FieldListIterator it; Field::FieldListIterator end = fields.end(); Field::FieldBase* field; @@ -269,9 +269,9 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth ) { field = *it; //debug( " - writing a field" ); - QByteArray bytesOut; - QDataStream dout( bytesOut, IO_WriteOnly ); - dout.setByteOrder( QDataStream::LittleEndian ); + TQByteArray bytesOut; + TQDataStream dout( bytesOut, IO_WriteOnly ); + dout.setByteOrder( TQDataStream::LittleEndian ); // these fields are ignored by Gaim's novell if ( field->type() == NMFIELD_TYPE_BINARY || field->method() == NMFIELD_METHOD_IGNORE ) @@ -299,7 +299,7 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth ) { //debug( " - it's a single string" ); const Field::SingleField *sField = static_cast<const Field::SingleField*>( field ); -// QString encoded = KURL::encode_string( sField->value().toString(), 106 /* UTF-8 */); +// TQString encoded = KURL::encode_string( sField->value().toString(), 106 /* UTF-8 */); // encoded.replace( "%20", "+" ); // dout << encoded.ascii(); @@ -313,7 +313,7 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth ) //debug( " - it's a multi" ); const Field::MultiField *mField = static_cast<const Field::MultiField*>( field ); subFieldCount = mField->fields().count(); // determines if we have a subarray to send after this field - //dout << QString::number( subFieldCount ).ascii(); + //dout << TQString::number( subFieldCount ).ascii(); snprintf( valString, NMFIELD_MAX_STR_LENGTH, "%u", subFieldCount ); break; } @@ -321,7 +321,7 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth ) { //debug( " - it's a number" ); const Field::SingleField *sField = static_cast<const Field::SingleField*>( field ); - //dout << QString::number( sField->value().toInt() ).ascii(); + //dout << TQString::number( sField->value().toInt() ).ascii(); snprintf( valString, NMFIELD_MAX_STR_LENGTH, "%u", sField->value().toInt() ); } } @@ -329,15 +329,15 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth ) // type //dout.writeRawBytes( GW_URLVAR_TYPE, sizeof( GW_URLVAR_TYPE ) ); - //dout << QString::number( field->type() ).ascii(); - QCString typeString; + //dout << TQString::number( field->type() ).ascii(); + TQCString typeString; typeString.setNum( field->type() ); - QCString outgoing = GW_URLVAR_TAG + field->tag() + TQCString outgoing = GW_URLVAR_TAG + field->tag() + GW_URLVAR_METHOD + (char)encode_method( field->method() ) + GW_URLVAR_VAL + (const char *)valString + GW_URLVAR_TYPE + typeString; - debug( QString( "CoreProtocol::fieldsToWire - outgoing data: %1" ).arg( outgoing.data() ) ); + debug( TQString( "CoreProtocol::fieldsToWire - outgoing data: %1" ).arg( outgoing.data() ) ); dout.writeRawBytes( outgoing.data(), outgoing.length() ); // write what we have so far, we may be calling this function recursively //kdDebug( 14999 ) << k_funcinfo << "writing \'" << bout << "\'" << endl; @@ -356,9 +356,9 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth ) if ( depth == 0 ) // this call to the function was not recursive, so the entire request has been sent at this point { // very important, don't send put the \r\n on the wire as a string or it will be preceded with the string length and 0 terminated, which the server reads as a request to disconnect. - QByteArray bytesOut; - QDataStream dout( bytesOut, IO_WriteOnly ); - dout.setByteOrder( QDataStream::LittleEndian ); + TQByteArray bytesOut; + TQDataStream dout( bytesOut, IO_WriteOnly ); + dout.setByteOrder( TQDataStream::LittleEndian ); dout.writeRawBytes( "\r\n", 2 ); emit outgoingData( bytesOut ); debug( "CoreProtocol::fieldsToWire - request completed" ); @@ -366,13 +366,13 @@ void CoreProtocol::fieldsToWire( Field::FieldList fields, int depth ) //debug( " - method done" ); } -int CoreProtocol::wireToTransfer( const QByteArray& wire ) +int CoreProtocol::wireToTransfer( const TQByteArray& wire ) { // processing incoming data and reassembling it into transfers // may be an event or a response uint bytesParsed = 0; - m_din = new QDataStream( wire, IO_ReadOnly ); - m_din->setByteOrder( QDataStream::LittleEndian ); + m_din = new TQDataStream( wire, IO_ReadOnly ); + m_din->setByteOrder( TQDataStream::LittleEndian ); // look at first four bytes and decide what to do with the chunk Q_UINT32 val; @@ -398,12 +398,12 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire ) } else // otherwise -> Event code { - debug( QString( "CoreProtocol::wireToTransfer() - looks like an EVENT: %1, length %2" ).arg( val ).arg( wire.size() ) ); + debug( TQString( "CoreProtocol::wireToTransfer() - looks like an EVENT: %1, length %2" ).arg( val ).arg( wire.size() ) ); Transfer * t = m_eventProtocol->parse( wire, bytesParsed ); if ( t ) { m_inTransfer = t; - debug( QString( "CoreProtocol::wireToTransfer() - got an EVENT: %1, parsed: %2" ).arg( val ).arg( bytesParsed ) ); + debug( TQString( "CoreProtocol::wireToTransfer() - got an EVENT: %1, parsed: %2" ).arg( val ).arg( bytesParsed ) ); m_state = Available; emit incomingData(); } @@ -423,9 +423,9 @@ void CoreProtocol::reset() m_in.resize( 0 ); } -QChar CoreProtocol::encode_method( Q_UINT8 method ) +TQChar CoreProtocol::encode_method( Q_UINT8 method ) { - QChar str; + TQChar str; switch (method) { case NMFIELD_METHOD_EQUAL: @@ -484,9 +484,9 @@ QChar CoreProtocol::encode_method( Q_UINT8 method ) return str; } -void CoreProtocol::slotOutgoingData( const QCString &out ) +void CoreProtocol::slotOutgoingData( const TQCString &out ) { - debug( QString( "CoreProtocol::slotOutgoingData() %1" ).arg( out ) ); + debug( TQString( "CoreProtocol::slotOutgoingData() %1" ).arg( out ) ); } bool CoreProtocol::okToProceed() diff --git a/kopete/protocols/groupwise/libgroupwise/coreprotocol.h b/kopete/protocols/groupwise/libgroupwise/coreprotocol.h index 4cd30b88..e9a14122 100644 --- a/kopete/protocols/groupwise/libgroupwise/coreprotocol.h +++ b/kopete/protocols/groupwise/libgroupwise/coreprotocol.h @@ -21,9 +21,9 @@ #ifndef GW_CORE_PROTOCOL_H #define GW_CORE_PROTOCOL_H -#include <qcstring.h> -#include <qobject.h> -#include <qptrlist.h> +#include <tqcstring.h> +#include <tqobject.h> +#include <tqptrlist.h> #include "gwfield.h" @@ -124,7 +124,7 @@ public: /** * Debug output */ - static void debug(const QString &str); + static void debug(const TQString &str); /** * Reset the protocol, clear buffers @@ -135,7 +135,7 @@ public: * Accept data from the network, and buffer it into a useful message * @param incomingBytes Raw data in wire format. */ - void addIncomingData( const QByteArray& incomingBytes ); + void addIncomingData( const TQByteArray& incomingBytes ); /** * @return the incoming transfer or 0 if none is available. @@ -157,7 +157,7 @@ signals: /** * Emitted as the core protocol converts fields to wire ready data */ - void outgoingData( const QByteArray& ); + void outgoingData( const TQByteArray& ); /** * Emitted when there is incoming data, parsed into a Transfer */ @@ -166,7 +166,7 @@ protected slots: /** * Just a debug method to test emitting to the socket, atm - should go to the ClientStream */ - void slotOutgoingData( const QCString & ); + void slotOutgoingData( const TQCString & ); protected: /** @@ -177,7 +177,7 @@ protected: * Convert incoming wire data into a Transfer object and queue it * @return number of bytes from the input that were parsed into a Transfer */ - int wireToTransfer( const QByteArray& wire ); + int wireToTransfer( const TQByteArray& wire ); /** * Convert fields to a wire representation. Emits outgoingData as each field is written. * Calls itself recursively to process nested fields, hence @@ -187,10 +187,10 @@ protected: /** * encodes a method number (usually supplied as a #defined symbol) to a char */ - QChar encode_method( Q_UINT8 method ); + TQChar encode_method( Q_UINT8 method ); private: - QByteArray m_in; // buffer containing unprocessed bytes we received - QDataStream* m_din; // contains the packet currently being parsed + TQByteArray m_in; // buffer containing unprocessed bytes we received + TQDataStream* m_din; // contains the packet currently being parsed int m_error; Transfer* m_inTransfer; // the transfer that is being received int m_state; // represents the protocol's overall state diff --git a/kopete/protocols/groupwise/libgroupwise/eventprotocol.cpp b/kopete/protocols/groupwise/libgroupwise/eventprotocol.cpp index 05320676..da8025b7 100644 --- a/kopete/protocols/groupwise/libgroupwise/eventprotocol.cpp +++ b/kopete/protocols/groupwise/libgroupwise/eventprotocol.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ -#include <qbuffer.h> +#include <tqbuffer.h> #include "gwerror.h" @@ -25,7 +25,7 @@ using namespace GroupWise; -EventProtocol::EventProtocol(QObject *parent, const char *name) +EventProtocol::EventProtocol(TQObject *parent, const char *name) : InputProtocolBase(parent, name) { } @@ -34,14 +34,14 @@ EventProtocol::~EventProtocol() { } -Transfer * EventProtocol::parse( const QByteArray & wire, uint& bytes ) +Transfer * EventProtocol::parse( const TQByteArray & wire, uint& bytes ) { m_bytes = 0; - //m_din = new QDataStream( wire, IO_ReadOnly ); - QBuffer inBuf( wire ); + //m_din = new TQDataStream( wire, IO_ReadOnly ); + TQBuffer inBuf( wire ); inBuf.open( IO_ReadOnly); m_din.setDevice( &inBuf ); - m_din.setByteOrder( QDataStream::LittleEndian ); + m_din.setByteOrder( TQDataStream::LittleEndian ); Q_UINT32 type; if ( !okToProceed() ) @@ -53,16 +53,16 @@ Transfer * EventProtocol::parse( const QByteArray & wire, uint& bytes ) m_din >> type; m_bytes += sizeof( Q_UINT32 ); - debug( QString( "EventProtocol::parse() Reading event of type %1" ).arg( type ) ); + debug( TQString( "EventProtocol::parse() Reading event of type %1" ).arg( type ) ); if ( type > Stop ) { - debug( QString ( "EventProtocol::parse() - found unexpected event type %1 - assuming out of sync" ).arg( type ) ); + debug( TQString ( "EventProtocol::parse() - found unexpected event type %1 - assuming out of sync" ).arg( type ) ); m_state = OutOfSync; return 0; } // read the event source - QString source; + TQString source; if ( !readString( source ) ) { m_din.unsetDevice(); @@ -71,15 +71,15 @@ Transfer * EventProtocol::parse( const QByteArray & wire, uint& bytes ) // now create an event object //HACK: lowercased DN - EventTransfer * tentative = new EventTransfer( type, source.lower(), QDateTime::currentDateTime() ); + EventTransfer * tentative = new EventTransfer( type, source.lower(), TQDateTime::currentDateTime() ); // add any additional data depending on the type of event // Note: if there are any errors in the way the data is read below, we will soon be OutOfSync - QString statusText; - QString guid; + TQString statusText; + TQString guid; Q_UINT16 status; Q_UINT32 flags; - QString message; + TQString message; switch ( type ) { @@ -96,9 +96,9 @@ Transfer * EventProtocol::parse( const QByteArray & wire, uint& bytes ) m_din.unsetDevice(); return 0; } - debug( QString( "got status: %1").arg( status ) ); + debug( TQString( "got status: %1").arg( status ) ); tentative->setStatus( status ); - debug( QString( "tentative status: %1").arg( tentative->status() ) ); + debug( TQString( "tentative status: %1").arg( tentative->status() ) ); tentative->setStatusText( statusText ); break; case ConferenceJoined: // 106 - GUID + FLAGS @@ -191,7 +191,7 @@ Transfer * EventProtocol::parse( const QByteArray & wire, uint& bytes ) tentative->setMessage( message ); break; default: - debug( QString( "EventProtocol::parse() - found unexpected event type %1" ).arg( type ) ); + debug( TQString( "EventProtocol::parse() - found unexpected event type %1" ).arg( type ) ); break; } // if we got this far, the parse succeeded, return the Transfer diff --git a/kopete/protocols/groupwise/libgroupwise/eventprotocol.h b/kopete/protocols/groupwise/libgroupwise/eventprotocol.h index 4f6d94e5..cb9fe204 100644 --- a/kopete/protocols/groupwise/libgroupwise/eventprotocol.h +++ b/kopete/protocols/groupwise/libgroupwise/eventprotocol.h @@ -32,7 +32,7 @@ class EventTransfer; Ablauf: CoreProtocol receives data in addIncomingData, and passes to wireToTransfer. wireToTransfer detects an event. - Passes whole chunk to EventProtocol ( as QByteArray ) + Passes whole chunk to EventProtocol ( as TQByteArray ) In to EventProtocol - QByteArray Returned from EventProtocol - EventTransfer *, bytes read, set state? EventProtocol tries to parse data into eventTransfer @@ -50,7 +50,7 @@ class EventTransfer; All Events contain an event code, and a source ( a DN ) NOTHANDLED indicates that there is no further data and we don't handle events of that type, because they are not sent by the server NONE indicates there is no further data - STATUSTEXT, GUID, MESSAGE indicate a string encoded in the usual GroupWise binary string encoding: a UINT32 containing the string length in little-endian, followed by the string itself, as UTF-8 encoded unicode. The string length value includes a terminating NUL, so when converting to a QString, subtract one from the string length. + STATUSTEXT, GUID, MESSAGE indicate a string encoded in the usual GroupWise binary string encoding: a UINT32 containing the string length in little-endian, followed by the string itself, as UTF-8 encoded unicode. The string length value includes a terminating NUL, so when converting to a TQString, subtract one from the string length. FLAGS contains a UINT32 containing the server's flags for this conference. See gwerror.h for the possible values and meanings of these flags. Only Logging has been observed in practice. All events are timestamped with the local time on receipt. @@ -110,7 +110,7 @@ class EventProtocol : public InputProtocolBase { Q_OBJECT public: - EventProtocol(QObject *parent = 0, const char *name = 0); + EventProtocol(TQObject *parent = 0, const char *name = 0); ~EventProtocol(); /** * Attempt to parse the supplied data into an @ref EventTransfer object. @@ -119,7 +119,7 @@ public: * @param bytes An integer used to return the number of bytes read. * @return A pointer to an EventTransfer object if successfull, otherwise 0. The caller is responsible for deleting this object. */ - Transfer * parse( const QByteArray &, uint & bytes ); + Transfer * parse( const TQByteArray &, uint & bytes ); protected: /** * Reads a conference's flags diff --git a/kopete/protocols/groupwise/libgroupwise/eventtransfer.cpp b/kopete/protocols/groupwise/libgroupwise/eventtransfer.cpp index 06178f21..fb3f3101 100644 --- a/kopete/protocols/groupwise/libgroupwise/eventtransfer.cpp +++ b/kopete/protocols/groupwise/libgroupwise/eventtransfer.cpp @@ -17,7 +17,7 @@ #include "eventtransfer.h" -EventTransfer::EventTransfer( const Q_UINT32 eventType, const QString & source, QDateTime timeStamp ) +EventTransfer::EventTransfer( const Q_UINT32 eventType, const TQString & source, TQDateTime timeStamp ) : Transfer(), m_eventType( eventType ), m_source( source ), m_timeStamp( timeStamp ) { m_contentFlags |= ( EventType | Source | TimeStamp ); @@ -77,12 +77,12 @@ int EventTransfer::eventType() return m_eventType; } -QString EventTransfer::source() +TQString EventTransfer::source() { return m_source; } -QDateTime EventTransfer::timeStamp() +TQDateTime EventTransfer::timeStamp() { return m_timeStamp; } @@ -97,7 +97,7 @@ Q_UINT32 EventTransfer::flags() return m_flags; } -QString EventTransfer::message() +TQString EventTransfer::message() { return m_message; } @@ -107,7 +107,7 @@ Q_UINT16 EventTransfer::status() return m_status; } -QString EventTransfer::statusText() +TQString EventTransfer::statusText() { return m_statusText; } @@ -125,7 +125,7 @@ void EventTransfer::setFlags( const Q_UINT32 flags ) m_flags = flags; } -void EventTransfer::setMessage( const QString & message ) +void EventTransfer::setMessage( const TQString & message ) { m_contentFlags |= Message; m_message = message; @@ -137,7 +137,7 @@ void EventTransfer::setStatus( const Q_UINT16 inStatus ) m_status = inStatus; } -void EventTransfer::setStatusText( const QString & statusText ) +void EventTransfer::setStatusText( const TQString & statusText ) { m_contentFlags |= StatusText; m_statusText = statusText; diff --git a/kopete/protocols/groupwise/libgroupwise/eventtransfer.h b/kopete/protocols/groupwise/libgroupwise/eventtransfer.h index 335d4593..d044fb55 100644 --- a/kopete/protocols/groupwise/libgroupwise/eventtransfer.h +++ b/kopete/protocols/groupwise/libgroupwise/eventtransfer.h @@ -18,8 +18,8 @@ #ifndef GW_EVENTTRANSFER_H #define GW_EVENTTRANSFER_H -#include <qcstring.h> -#include <qdatetime.h> +#include <tqcstring.h> +#include <tqdatetime.h> #include "gwerror.h" @@ -55,7 +55,7 @@ public: * @param source the user generating the event. * @param timeStamp the time at which the event was received. */ - EventTransfer( const Q_UINT32 eventType, const QString & source, QDateTime timeStamp ); + EventTransfer( const Q_UINT32 eventType, const TQString & source, TQDateTime timeStamp ); ~EventTransfer(); /** * Access the bitmask that describes the transfer's contents. Use @ref Contents to determine what it contains @@ -78,33 +78,33 @@ public: */ TransferType type() { return Transfer::EventTransfer; } int eventType(); - QString source(); - QDateTime timeStamp(); + TQString source(); + TQDateTime timeStamp(); GroupWise::ConferenceGuid guid(); Q_UINT32 flags(); - QString message(); + TQString message(); Q_UINT16 status(); - QString statusText(); + TQString statusText(); /** * Mutators to set the transfer's contents */ void setGuid( const GroupWise::ConferenceGuid & guid ); void setFlags( const Q_UINT32 flags ); - void setMessage( const QString & message ); + void setMessage( const TQString & message ); void setStatus( const Q_UINT16 status ); - void setStatusText( const QString & statusText); + void setStatusText( const TQString & statusText); private: Q_UINT32 m_contentFlags; int m_eventType; - QString m_source; - QDateTime m_timeStamp; + TQString m_source; + TQDateTime m_timeStamp; GroupWise::ConferenceGuid m_guid; Q_UINT32 m_flags; - QString m_message; + TQString m_message; Q_UINT16 m_status; - QString m_statusText; + TQString m_statusText; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/gwchatrooms.h b/kopete/protocols/groupwise/libgroupwise/gwchatrooms.h index 207531bb..4e73955a 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwchatrooms.h +++ b/kopete/protocols/groupwise/libgroupwise/gwchatrooms.h @@ -16,8 +16,8 @@ ************************************************************************* */ -#include <qdatetime.h> -#include <qvaluelist.h> +#include <tqdatetime.h> +#include <tqvaluelist.h> #ifndef GROUPWISE_CHATROOMS_H #define GROUPWISE_CHATROOMS_H @@ -28,15 +28,15 @@ namespace GroupWise class ChatContact { public: - QString dn; + TQString dn; uint chatRights; }; -typedef QValueList<GroupWise::ChatContact> ChatContactList; +typedef TQValueList<GroupWise::ChatContact> ChatContactList; struct ChatroomSearchResult { - QString name; - QString ownerDN; + TQString name; + TQString ownerDN; uint participants; }; @@ -46,19 +46,19 @@ class Chatroom public: enum UserStatus { Participating, NotParticipating }; enum Rights { Read = 1, Write = 2, Modify = 4, Moderator = 8, Owner = 16 }; - QString creatorDN; - QString description; - QString disclaimer; - QString displayName; - QString objectId; - QString ownerDN; - QString query; - QString topic; + TQString creatorDN; + TQString description; + TQString disclaimer; + TQString displayName; + TQString objectId; + TQString ownerDN; + TQString query; + TQString topic; bool archive; uint maxUsers; uint chatRights; UserStatus userStatus; - QDateTime createdOn; + TQDateTime createdOn; uint participantsCount; // haveParticipants, Acl, Invites indicate if we have obtained these lists from the server, so we can tell 'not fetched list' and 'fetched empty list' apart. bool haveParticipants; @@ -72,7 +72,7 @@ class Chatroom Chatroom( ChatroomSearchResult csr ) { archive = false; maxUsers = 0; chatRights = 0; participantsCount = csr.participants; haveParticipants = false; haveAcl = false; haveInvites = false; ownerDN = csr.ownerDN; displayName = csr.name; } }; -typedef QValueList<Chatroom> ChatroomList; -typedef QMap<QString, Chatroom> ChatroomMap; +typedef TQValueList<Chatroom> ChatroomList; +typedef TQMap<TQString, Chatroom> ChatroomMap; } #endif diff --git a/kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp b/kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp index 7d58de93..5d964ad0 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp +++ b/kopete/protocols/groupwise/libgroupwise/gwclientstream.cpp @@ -19,8 +19,8 @@ ************************************************************************* */ -//#include<qtextstream.h> -//#include<qguardedptr.h> +//#include<tqtextstream.h> +//#include<tqguardedptr.h> // #include<qca.h> // #include<stdlib.h> // #include"bytestream.h" @@ -30,11 +30,11 @@ // #include"securestream.h" // #include"protocol.h" -#include <qapplication.h> // for qdebug -#include <qguardedptr.h> -#include <qobject.h> -#include <qptrqueue.h> -#include <qtimer.h> +#include <tqapplication.h> // for qdebug +#include <tqguardedptr.h> +#include <tqobject.h> +#include <tqptrqueue.h> +#include <tqtimer.h> #include "bytestream.h" #include "connector.h" @@ -49,7 +49,7 @@ //#define LIBGW_DEBUG 1 -void cs_dump( const QByteArray &bytes ); +void cs_dump( const TQByteArray &bytes ); enum { Idle, @@ -101,14 +101,14 @@ public: } NovellDN id; - QString server; + TQString server; bool oldOnly; bool allowPlain, mutualAuth; bool haveLocalAddr; - QHostAddress localAddr; + TQHostAddress localAddr; Q_UINT16 localPort; // int minimumSSF, maximumSSF; -// QString sasl_mech; +// TQString sasl_mech; bool doBinding; bool in_rrsig; @@ -122,7 +122,7 @@ public: CoreProtocol client; //CoreProtocol srv; - QString defRealm; + TQString defRealm; int mode; int state; @@ -132,30 +132,30 @@ public: bool tls_warned, using_tls; bool doAuth; -// QStringList sasl_mechlist; +// TQStringList sasl_mechlist; int errCond; - QString errText; + TQString errText; - QPtrQueue<Transfer> in; + TQPtrQueue<Transfer> in; - QTimer noopTimer; // probably not needed + TQTimer noopTimer; // probably not needed int noop_time; }; -ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, QObject *parent) +ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, TQObject *parent) :Stream(parent) { d = new Private; d->mode = Client; d->conn = conn; - connect( d->conn, SIGNAL(connected()), SLOT(cr_connected()) ); - connect( d->conn, SIGNAL(error()), SLOT(cr_error()) ); - connect( &d->client, SIGNAL( outgoingData( const QByteArray& ) ), SLOT ( cp_outgoingData( const QByteArray & ) ) ); - connect( &d->client, SIGNAL( incomingData() ), SLOT ( cp_incomingData() ) ); + connect( d->conn, TQT_SIGNAL(connected()), TQT_SLOT(cr_connected()) ); + connect( d->conn, TQT_SIGNAL(error()), TQT_SLOT(cr_error()) ); + connect( &d->client, TQT_SIGNAL( outgoingData( const TQByteArray& ) ), TQT_SLOT ( cp_outgoingData( const TQByteArray & ) ) ); + connect( &d->client, TQT_SIGNAL( incomingData() ), TQT_SLOT ( cp_incomingData() ) ); d->noop_time = 0; - connect(&d->noopTimer, SIGNAL(timeout()), SLOT(doNoop())); + connect(&d->noopTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doNoop())); d->tlsHandler = tlsHandler; // all the extra stuff happening in the larger ctor happens at connect time :) } @@ -250,7 +250,7 @@ bool ClientStream::isAuthenticated() const return (d->state == Active); } -// void ClientStream::setPassword(const QString &s) +// void ClientStream::setPassword(const TQString &s) // { // if(d->client.old) { // d->client.setPassword(s); @@ -261,7 +261,7 @@ bool ClientStream::isAuthenticated() const // } // } -// void ClientStream::setRealm(const QString &s) +// void ClientStream::setRealm(const TQString &s) // { // if(d->sasl) // d->sasl->setRealm(s); @@ -295,7 +295,7 @@ void ClientStream::setNoopTime(int mills) d->noopTimer.start(d->noop_time); } -void ClientStream::setLocalAddr(const QHostAddress &addr, Q_UINT16 port) +void ClientStream::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port) { d->haveLocalAddr = true; d->localAddr = addr; @@ -307,12 +307,12 @@ int ClientStream::errorCondition() const return d->errCond; } -QString ClientStream::errorText() const +TQString ClientStream::errorText() const { return d->errText; } -// QDomElement ClientStream::errorAppSpec() const +// TQDomElement ClientStream::errorAppSpec() const // { // return d->errAppSpec;cr_error // } @@ -374,11 +374,11 @@ void ClientStream::write( Request *request ) d->client.outgoingTransfer( request ); } -void cs_dump( const QByteArray &bytes ) +void cs_dump( const TQByteArray &bytes ) { //#define GW_CLIENTSTREAM_DEBUG 1 #ifdef GW_CLIENTSTREAM_DEBUG - CoreProtocol::debug( QString( "contains: %1 bytes " ).arg( bytes.count() ) ); + CoreProtocol::debug( TQString( "contains: %1 bytes " ).arg( bytes.count() ) ); uint count = 0; while ( count < bytes.count() ) { @@ -418,7 +418,7 @@ void cs_dump( const QByteArray &bytes ) #endif } -void ClientStream::cp_outgoingData( const QByteArray& outgoingBytes ) +void ClientStream::cp_outgoingData( const TQByteArray& outgoingBytes ) { // take formatted bytes from CoreProtocol and put them on the wire #ifdef LIBGW_DEBUG @@ -440,23 +440,23 @@ void ClientStream::cp_incomingData() emit doReadyRead(); } else - CoreProtocol::debug( QString( " - client signalled incomingData but none was available, state is: %1" ).arg( d->client.state() ) ); + CoreProtocol::debug( TQString( " - client signalled incomingData but none was available, state is: %1" ).arg( d->client.state() ) ); } void ClientStream::cr_connected() { d->bs = d->conn->stream(); - connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed())); - connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished())); + connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed())); + connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished())); - QByteArray spare = d->bs->read(); + TQByteArray spare = d->bs->read(); d->ss = new SecureStream(d->bs); - connect(d->ss, SIGNAL(readyRead()), SLOT(ss_readyRead())); - connect(d->ss, SIGNAL(bytesWritten(int)), SLOT(ss_bytesWritten(int))); - connect(d->ss, SIGNAL(tlsHandshaken()), SLOT(ss_tlsHandshaken())); - connect(d->ss, SIGNAL(tlsClosed()), SLOT(ss_tlsClosed())); - connect(d->ss, SIGNAL(error(int)), SLOT(ss_error(int))); + connect(d->ss, TQT_SIGNAL(readyRead()), TQT_SLOT(ss_readyRead())); + connect(d->ss, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(ss_bytesWritten(int))); + connect(d->ss, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(ss_tlsHandshaken())); + connect(d->ss, TQT_SIGNAL(tlsClosed()), TQT_SLOT(ss_tlsClosed())); + connect(d->ss, TQT_SIGNAL(error(int)), TQT_SLOT(ss_error(int))); //d->client.startDialbackOut("andbit.net", "im.pyxa.org"); //d->client.startServerOut(d->server); @@ -474,7 +474,7 @@ void ClientStream::cr_connected() d->client.doTLS = d->tlsHandler ? true: false; d->client.doBinding = d->doBinding;*/ - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; emit connected(); if(!self) return; @@ -515,12 +515,12 @@ void ClientStream::bs_error(int) void ClientStream::ss_readyRead() { - QByteArray a; + TQByteArray a; a = d->ss->read(); #ifdef LIBGW_DEBUG - QCString cs(a.data(), a.size()+1); - CoreProtocol::debug( QString( "ClientStream: ss_readyRead() recv: %1 bytes" ).arg( a.size() ) ); + TQCString cs(a.data(), a.size()+1); + CoreProtocol::debug( TQString( "ClientStream: ss_readyRead() recv: %1 bytes" ).arg( a.size() ) ); cs_dump( a ); #endif @@ -532,7 +532,7 @@ void ClientStream::ss_readyRead() void ClientStream::ss_bytesWritten(int bytes) { #ifdef LIBGW_DEBUG - CoreProtocol::debug( QString( "ClientStream::ss_bytesWritten: %1 bytes written" ).arg( bytes ) ); + CoreProtocol::debug( TQString( "ClientStream::ss_bytesWritten: %1 bytes written" ).arg( bytes ) ); #else Q_UNUSED( bytes ); #endif @@ -540,7 +540,7 @@ void ClientStream::ss_bytesWritten(int bytes) void ClientStream::ss_tlsHandshaken() { - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; emit securityLayerActivated(LayerTLS); if(!self) return; @@ -556,7 +556,7 @@ void ClientStream::ss_tlsClosed() void ClientStream::ss_error(int x) { - CoreProtocol::debug( QString( "ClientStream::ss_error() x=%1 ").arg( x ) ); + CoreProtocol::debug( TQString( "ClientStream::ss_error() x=%1 ").arg( x ) ); if(x == SecureStream::ErrTLS) { reset(); d->errCond = TLSFail; @@ -574,7 +574,7 @@ void ClientStream::srvProcessNext() void ClientStream::doReadyRead() { - //QGuardedPtr<QObject> self = this; + //TQGuardedPtr<TQObject> self = this; emit readyRead(); //if(!self) // return; @@ -585,7 +585,7 @@ void ClientStream::processNext() { if( !d->in.isEmpty() ) { //d->in_rrsig = true; - QTimer::singleShot(0, this, SLOT(doReadyRead())); + TQTimer::singleShot(0, this, TQT_SLOT(doReadyRead())); } } diff --git a/kopete/protocols/groupwise/libgroupwise/gwclientstream.h b/kopete/protocols/groupwise/libgroupwise/gwclientstream.h index 5ae5ec8c..2d0cef92 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwclientstream.h +++ b/kopete/protocols/groupwise/libgroupwise/gwclientstream.h @@ -33,8 +33,8 @@ class TLSHandler; typedef struct NovellDN { - QString dn; - QString server; + TQString dn; + TQString server; }; class ClientStream : public Stream @@ -86,7 +86,7 @@ public: BindConflict // resource in-use }; - ClientStream(Connector *conn, TLSHandler *tlsHandler=0, QObject *parent=0); + ClientStream(Connector *conn, TLSHandler *tlsHandler=0, TQObject *parent=0); ~ClientStream(); void connectToServer(const NovellDN &id, bool auth=true); @@ -95,15 +95,15 @@ public: bool isAuthenticated() const; // login params - void setUsername(const QString &s); - void setPassword(const QString &s); - void setRealm(const QString &s); + void setUsername(const TQString &s); + void setPassword(const TQString &s); + void setRealm(const TQString &s); void continueAfterParams(); // security options (old protocol only uses the first !) void setAllowPlain(bool); void setRequireMutualAuth(bool); - void setLocalAddr(const QHostAddress &addr, Q_UINT16 port); + void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port); void close(); @@ -122,11 +122,11 @@ public: void write( Request * request ); int errorCondition() const; - QString errorText() const; -// # QDomElement errorAppSpec() const; // redondo + TQString errorText() const; +// # TQDomElement errorAppSpec() const; // redondo // extrahttp://bugs.kde.org/show_bug.cgi?id=85158 -/*# void writeDirect(const QString &s); // must be for debug testing*/ +/*# void writeDirect(const TQString &s); // must be for debug testing*/ void setNoopTime(int mills); signals: @@ -135,8 +135,8 @@ signals: //void needAuthParams(bool user, bool pass, bool realm); void authenticated(); // this signal is ordinarily emitted in processNext void warning(int); -// # void incomingXml(const QString &s); // signals emitted in processNext but don't seem to go anywhere... -// # void outgoingXml(const QString &s); // +// # void incomingXml(const TQString &s); // signals emitted in processNext but don't seem to go anywhere... +// # void outgoingXml(const TQString &s); // // void readyRead(); //signals that there is a transfer ready to be read - defined in stream public slots: void continueAfterWarning(); @@ -147,7 +147,7 @@ private slots: /** * collects wire ready outgoing data from the core protocol and sends */ - void cp_outgoingData( const QByteArray& ); + void cp_outgoingData( const TQByteArray& ); /** * collects parsed incoming data as a transfer from the core protocol and queues */ diff --git a/kopete/protocols/groupwise/libgroupwise/gwerror.cpp b/kopete/protocols/groupwise/libgroupwise/gwerror.cpp index 5338cea0..ba2a2a58 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwerror.cpp +++ b/kopete/protocols/groupwise/libgroupwise/gwerror.cpp @@ -19,9 +19,9 @@ #include "gwerror.h" -QString GroupWise::errorCodeToString( int errorCode ) +TQString GroupWise::errorCodeToString( int errorCode ) { - QString errorString; + TQString errorString; switch ( errorCode ) { #if 0 @@ -269,7 +269,7 @@ QString GroupWise::errorCodeToString( int errorCode ) errorString = "Chat has been removed from server"; break; default: - errorString = QString("Unrecognized error code: %s").arg( errorCode ); + errorString = TQString("Unrecognized error code: %s").arg( errorCode ); #endif } return errorString; diff --git a/kopete/protocols/groupwise/libgroupwise/gwerror.h b/kopete/protocols/groupwise/libgroupwise/gwerror.h index 5300f788..52a5ef36 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwerror.h +++ b/kopete/protocols/groupwise/libgroupwise/gwerror.h @@ -18,10 +18,10 @@ #ifndef GW_ERROR_H #define GW_ERROR_H -#include <qdatetime.h> -#include <qglobal.h> -#include <qmap.h> -#include <qstring.h> +#include <tqdatetime.h> +#include <tqglobal.h> +#include <tqmap.h> +#include <tqstring.h> typedef Q_UINT16 NMERR_T; #define GROUPWISE_DEBUG_GLOBAL 14190 @@ -94,29 +94,29 @@ namespace GroupWise Closed = 0x10000000 }; - QString errorCodeToString( int errorCode ); + TQString errorCodeToString( int errorCode ); // helpful structs used to pass data between the client library and the application using it - class ConferenceGuid : public QString + class ConferenceGuid : public TQString { public: ConferenceGuid(); - ConferenceGuid( const QString & string ); + ConferenceGuid( const TQString & string ); ~ConferenceGuid(); }; bool operator==( const ConferenceGuid & g1, const ConferenceGuid & g2 ); - bool operator==( const QString & s, const ConferenceGuid & g ); - bool operator==( const ConferenceGuid & g, const QString & s ); + bool operator==( const TQString & s, const ConferenceGuid & g ); + bool operator==( const ConferenceGuid & g, const TQString & s ); struct ConferenceEvent { Event type; ConferenceGuid guid; - QString user; - QDateTime timeStamp; + TQString user; + TQDateTime timeStamp; Q_UINT32 flags; - QString message; + TQString message; }; struct FolderItem @@ -124,7 +124,7 @@ namespace GroupWise uint id; uint sequence; uint parentId; - QString name; + TQString name; }; struct ContactItem @@ -132,13 +132,13 @@ namespace GroupWise uint id; uint parentId; uint sequence; - QString dn; - QString displayName; + TQString dn; + TQString displayName; }; struct ContactDetails { - QString cn, + TQString cn, dn, givenName, surname, @@ -147,28 +147,28 @@ namespace GroupWise authAttribute; int status; bool archive; - QMap< QString, QString > properties; + TQMap< TQString, TQString > properties; }; struct OutgoingMessage { ConferenceGuid guid; - QString message; - QString rtfMessage; + TQString message; + TQString rtfMessage; }; struct UserSearchQueryTerm { - QString field; - QString argument; + TQString field; + TQString argument; int operation; }; struct CustomStatus { GroupWise::Status status; - QString name; - QString autoReply; + TQString name; + TQString autoReply; }; } diff --git a/kopete/protocols/groupwise/libgroupwise/gwfield.cpp b/kopete/protocols/groupwise/libgroupwise/gwfield.cpp index e0d3c5db..6d025e47 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwfield.cpp +++ b/kopete/protocols/groupwise/libgroupwise/gwfield.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include <qcstring.h> +#include <tqcstring.h> #include "gwerror.h" @@ -36,13 +36,13 @@ FieldList::~FieldList() { } -FieldListIterator FieldList::find( QCString tag ) +FieldListIterator FieldList::find( TQCString tag ) { FieldListIterator it = begin(); return find( it, tag ); } -FieldListIterator FieldList::find( FieldListIterator &it, QCString tag ) +FieldListIterator FieldList::find( FieldListIterator &it, TQCString tag ) { FieldListIterator theEnd = end(); //cout << "FieldList::find() looking for " << tag.data() << endl; @@ -55,7 +55,7 @@ FieldListIterator FieldList::find( FieldListIterator &it, QCString tag ) return it; } -int FieldList::findIndex( QCString tag ) +int FieldList::findIndex( TQCString tag ) { FieldListIterator it = begin(); FieldListIterator theEnd = end(); @@ -74,7 +74,7 @@ void FieldList::dump( bool recursive, int offset ) kdDebug( GROUPWISE_DEBUG_LIBGW ) << k_funcinfo << ( recursive ? ", recursively" : ", non-recursive" ) << endl; for( FieldListIterator it = begin(); it != myEnd; ++it ) { - QString s; + TQString s; s.fill(' ', offset*2 ); s.append( (*it)->tag() ); SingleField * sf; @@ -105,13 +105,13 @@ void FieldList::purge() // THIS IS AN ATTEMPT TO HIDE THE POLYMORPHISM INSIDE THE LIST // HOWEVER IT FAILS BECAUSE WE NEED BOTH THE ITERATOR AND THE CASTED Single|MultiField it points to -SingleField * FieldList::findSingleField( QCString tag ) +SingleField * FieldList::findSingleField( TQCString tag ) { FieldListIterator it = begin(); return findSingleField( it, tag ); } -SingleField * FieldList::findSingleField( FieldListIterator &it, QCString tag ) +SingleField * FieldList::findSingleField( FieldListIterator &it, TQCString tag ) { FieldListIterator found = find( it, tag ); if ( found == end() ) @@ -120,13 +120,13 @@ SingleField * FieldList::findSingleField( FieldListIterator &it, QCString tag ) return dynamic_cast<SingleField *>( *found ); } -MultiField * FieldList::findMultiField( QCString tag ) +MultiField * FieldList::findMultiField( TQCString tag ) { FieldListIterator it = begin(); return findMultiField( it, tag ); } -MultiField * FieldList::findMultiField( FieldListIterator &it, QCString tag ) +MultiField * FieldList::findMultiField( FieldListIterator &it, TQCString tag ) { FieldListIterator found = find( it, tag ); if ( found == end() ) @@ -138,13 +138,13 @@ MultiField * FieldList::findMultiField( FieldListIterator &it, QCString tag ) /* === FieldBase ========================================================= */ -FieldBase::FieldBase( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type ) +FieldBase::FieldBase( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type ) : m_tag( tag ), m_method( method ), m_flags( flags ), m_type( type ) { } -QCString FieldBase::tag() const +TQCString FieldBase::tag() const { return m_tag; } @@ -171,12 +171,12 @@ void FieldBase::setFlags( const Q_UINT8 flags ) /* === SingleField ========================================================= */ -SingleField::SingleField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, QVariant value ) +SingleField::SingleField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, TQVariant value ) : FieldBase( tag, method, flags, type ), m_value( value ) { } -SingleField::SingleField( QCString tag, Q_UINT8 flags, Q_UINT8 type, QVariant value ) +SingleField::SingleField( TQCString tag, Q_UINT8 flags, Q_UINT8 type, TQVariant value ) : FieldBase( tag, NMFIELD_METHOD_VALID, flags, type ), m_value( value ) { } @@ -185,24 +185,24 @@ SingleField::~SingleField() { } -void SingleField::setValue( const QVariant v ) +void SingleField::setValue( const TQVariant v ) { m_value = v; } -QVariant SingleField::value() const +TQVariant SingleField::value() const { return m_value; } /* === MultiField ========================================================= */ -MultiField::MultiField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, FieldList fields ) +MultiField::MultiField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, FieldList fields ) : FieldBase( tag, method, flags, type ), m_fields( fields ) { } -MultiField::MultiField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type ) +MultiField::MultiField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type ) : FieldBase( tag, method, flags, type ) { } diff --git a/kopete/protocols/groupwise/libgroupwise/gwfield.h b/kopete/protocols/groupwise/libgroupwise/gwfield.h index 9362b5ad..0117b3e5 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwfield.h +++ b/kopete/protocols/groupwise/libgroupwise/gwfield.h @@ -146,10 +146,10 @@ #define NMFIELD_MAX_STR_LENGTH 32768 -#include <qglobal.h> -#include <qobject.h> -#include <qvariant.h> -#include <qvaluelist.h> +#include <tqglobal.h> +#include <tqobject.h> +#include <tqvariant.h> +#include <tqvaluelist.h> /** * Fields are typed units of information interchanged between the groupwise server and its clients. @@ -167,26 +167,26 @@ namespace Field { public: FieldBase() {} - FieldBase( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type ); + FieldBase( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type ); virtual ~FieldBase() {} - QCString tag() const; + TQCString tag() const; Q_UINT8 method() const; Q_UINT8 flags() const; Q_UINT8 type() const; void setFlags( const Q_UINT8 flags ); protected: - QCString m_tag; + TQCString m_tag; Q_UINT8 m_method; Q_UINT8 m_flags; Q_UINT8 m_type; // doch needed }; - typedef QValueListIterator<FieldBase *> FieldListIterator; - typedef QValueListConstIterator<FieldBase *> FieldListConstIterator; + typedef TQValueListIterator<FieldBase *> FieldListIterator; + typedef TQValueListConstIterator<FieldBase *> FieldListConstIterator; class SingleField; class MultiField; - class FieldList : public QValueList<FieldBase *> + class FieldList : public TQValueList<FieldBase *> { public: /** @@ -194,22 +194,22 @@ namespace Field */ virtual ~FieldList(); /** - * Locate the first occurrence of a given field in the list. Same semantics as QValueList::find(). + * Locate the first occurrence of a given field in the list. Same semantics as TQValueList::find(). * @param tag The tag name of the field to search for. * @return An iterator pointing to the first occurrence found, or end() if none was found. */ - FieldListIterator find( QCString tag ); + FieldListIterator find( TQCString tag ); /** * Locate the first occurrence of a given field in the list, starting at the supplied iterator * @param tag The tag name of the field to search for. * @param it An iterator within the list, to start searching from. * @return An iterator pointing to the first occurrence found, or end() if none was found. */ - FieldListIterator find( FieldListIterator &it, QCString tag ); + FieldListIterator find( FieldListIterator &it, TQCString tag ); /** * Get the index of the first occurrence of tag, or -1 if not found */ - int findIndex( QCString tag ); + int findIndex( TQCString tag ); /** * Debug function, dumps to stdout */ @@ -222,11 +222,11 @@ namespace Field * Utility functions for finding the first instance of a tag * @return 0 if no field of the right tag and type was found. */ - SingleField * findSingleField( QCString tag ); - MultiField * findMultiField( QCString tag ); + SingleField * findSingleField( TQCString tag ); + MultiField * findMultiField( TQCString tag ); protected: - SingleField * findSingleField( FieldListIterator &it, QCString tag ); - MultiField * findMultiField( FieldListIterator &it, QCString tag ); + SingleField * findSingleField( FieldListIterator &it, TQCString tag ); + MultiField * findMultiField( FieldListIterator &it, TQCString tag ); }; @@ -242,16 +242,16 @@ namespace Field /** * Single field constructor */ - SingleField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, QVariant value ); + SingleField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, TQVariant value ); /** * Convenience constructor for NMFIELD_METHOD_VALID fields */ - SingleField( QCString tag, Q_UINT8 flags, Q_UINT8 type, QVariant value ); + SingleField( TQCString tag, Q_UINT8 flags, Q_UINT8 type, TQVariant value ); ~SingleField(); - void setValue( const QVariant v ); - QVariant value() const; + void setValue( const TQVariant v ); + TQVariant value() const; private: - QVariant m_value; + TQVariant m_value; }; /** @@ -261,8 +261,8 @@ namespace Field class MultiField : public FieldBase { public: - MultiField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type ); - MultiField( QCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, FieldList fields ); + MultiField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type ); + MultiField( TQCString tag, Q_UINT8 method, Q_UINT8 flags, Q_UINT8 type, FieldList fields ); ~MultiField(); FieldList fields() const; void setFields( FieldList ); diff --git a/kopete/protocols/groupwise/libgroupwise/gwglobal.cpp b/kopete/protocols/groupwise/libgroupwise/gwglobal.cpp index 4ea25779..bb747945 100644 --- a/kopete/protocols/groupwise/libgroupwise/gwglobal.cpp +++ b/kopete/protocols/groupwise/libgroupwise/gwglobal.cpp @@ -20,7 +20,7 @@ namespace GroupWise { ConferenceGuid::ConferenceGuid() {} - ConferenceGuid::ConferenceGuid( const QString & string ) : QString( string ) {} + ConferenceGuid::ConferenceGuid( const TQString & string ) : TQString( string ) {} ConferenceGuid::~ConferenceGuid() {} @@ -28,11 +28,11 @@ namespace GroupWise { return g1.left( CONF_GUID_END ) == g2.left( CONF_GUID_END ); } - bool operator==( const QString & s, const ConferenceGuid & g ) + bool operator==( const TQString & s, const ConferenceGuid & g ) { return s.left( CONF_GUID_END ) == g.left( CONF_GUID_END ); } - bool operator==( const ConferenceGuid & g, const QString & s ) + bool operator==( const ConferenceGuid & g, const TQString & s ) { return s.left( CONF_GUID_END ) == g.left( CONF_GUID_END ); } diff --git a/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.cpp b/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.cpp index 30627a81..6dfb1d0f 100644 --- a/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.cpp +++ b/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.cpp @@ -23,8 +23,8 @@ #include "gwfield.h" #include "inputprotocolbase.h" -InputProtocolBase::InputProtocolBase(QObject *parent, const char *name) - : QObject(parent, name) +InputProtocolBase::InputProtocolBase(TQObject *parent, const char *name) + : TQObject(parent, name) { } @@ -33,7 +33,7 @@ InputProtocolBase::~InputProtocolBase() { } -void InputProtocolBase::debug( const QString &str ) +void InputProtocolBase::debug( const TQString &str ) { #ifdef LIBGW_USE_KDEBUG kdDebug( 14191 ) << "debug: " << str << endl; @@ -47,13 +47,13 @@ uint InputProtocolBase::state() const return m_state; } -bool InputProtocolBase::readString( QString &message ) +bool InputProtocolBase::readString( TQString &message ) { uint len; - QCString rawData; + TQCString rawData; if ( !safeReadBytes( rawData, len ) ) return false; - message = QString::fromUtf8( rawData.data(), len - 1 ); + message = TQString::fromUtf8( rawData.data(), len - 1 ); return true; } @@ -73,7 +73,7 @@ bool InputProtocolBase::okToProceed() return false; } -bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) +bool InputProtocolBase::safeReadBytes( TQCString & data, uint & len ) { // read the length of the bytes Q_UINT32 val; @@ -84,7 +84,7 @@ bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) if ( val > NMFIELD_MAX_STR_LENGTH ) return false; //qDebug( "EventProtocol::safeReadBytes() - expecting %i bytes", val ); - QCString temp( val ); + TQCString temp( val ); if ( val != 0 ) { if ( !okToProceed() ) @@ -98,7 +98,7 @@ bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) // if ( (Q_UINT8)( * ( temp.data() + ( temp.length() - 1 ) ) ) == 0xFF ) if ( temp.length() < ( val - 1 ) ) { - debug( QString( "InputProtocol::safeReadBytes() - string broke, giving up, only got: %1 bytes out of %2" ).arg( temp.length() ).arg( val ) ); + debug( TQString( "InputProtocol::safeReadBytes() - string broke, giving up, only got: %1 bytes out of %2" ).arg( temp.length() ).arg( val ) ); m_state = NeedMore; return false; } diff --git a/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.h b/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.h index efd2979f..529fea21 100644 --- a/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.h +++ b/kopete/protocols/groupwise/libgroupwise/inputprotocolbase.h @@ -19,7 +19,7 @@ #ifndef INPUTPROTOCOLBASE_H #define INPUTPROTOCOLBASE_H -#include <qobject.h> +#include <tqobject.h> class Transfer; /** @@ -32,13 +32,13 @@ class InputProtocolBase : public QObject Q_OBJECT public: enum EventProtocolState { Success, NeedMore, OutOfSync, ProtocolError }; - InputProtocolBase(QObject *parent = 0, const char *name = 0); + InputProtocolBase(TQObject *parent = 0, const char *name = 0); ~InputProtocolBase(); /** * Debug output */ - static void debug(const QString &str); + static void debug(const TQString &str); /** * Returns a value describing the state of the object. @@ -51,13 +51,13 @@ public: * @param bytes this will be set to the number of bytes that were successfully parsed. It is no indication of the success of the whole procedure * @return On success, a Transfer object that the caller is responsible for deleting. It will be either an EventTransfer or a Response, delete as appropriate. On failure, returns 0. */ - virtual Transfer * parse( const QByteArray &, uint & bytes ) = 0 ; + virtual Transfer * parse( const TQByteArray &, uint & bytes ) = 0 ; protected: /** * Reads an arbitrary string * updates the bytes parsed counter */ - bool readString( QString &message ); + bool readString( TQString &message ); /** * Check that there is data to read, and set the protocol's state if there isn't any. */ @@ -67,12 +67,12 @@ protected: * updates the bytes parsed counter * @return false if the string was broken or there was no data available at all */ - bool safeReadBytes( QCString & data, uint & len ); + bool safeReadBytes( TQCString & data, uint & len ); protected: uint m_state; uint m_bytes; - QDataStream m_din; + TQDataStream m_din; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/privacymanager.cpp b/kopete/protocols/groupwise/libgroupwise/privacymanager.cpp index 3d42207b..4960310a 100644 --- a/kopete/protocols/groupwise/libgroupwise/privacymanager.cpp +++ b/kopete/protocols/groupwise/libgroupwise/privacymanager.cpp @@ -23,7 +23,7 @@ #include "privacymanager.h" PrivacyManager::PrivacyManager( Client * client, const char *name) - : QObject(client, name), m_client( client ) + : TQObject(client, name), m_client( client ) { } @@ -41,12 +41,12 @@ bool PrivacyManager::defaultDeny() return m_defaultDeny; } -QStringList PrivacyManager::allowList() +TQStringList PrivacyManager::allowList() { return m_allowList; } -QStringList PrivacyManager::denyList() +TQStringList PrivacyManager::denyList() { return m_denyList; } @@ -56,7 +56,7 @@ bool PrivacyManager::isPrivacyLocked() return m_locked; } -bool PrivacyManager::isBlocked( const QString & dn ) +bool PrivacyManager::isBlocked( const TQString & dn ) { if ( m_defaultDeny ) return !m_allowList.contains( dn ); @@ -64,7 +64,7 @@ bool PrivacyManager::isBlocked( const QString & dn ) return m_denyList.contains( dn ); } -void PrivacyManager::setAllow( const QString & dn ) +void PrivacyManager::setAllow( const TQString & dn ) { if ( m_defaultDeny ) { @@ -78,7 +78,7 @@ void PrivacyManager::setAllow( const QString & dn ) } } -void PrivacyManager::setDeny( const QString & dn ) +void PrivacyManager::setDeny( const TQString & dn ) { if ( m_defaultDeny ) { @@ -97,7 +97,7 @@ void PrivacyManager::setDefaultAllow( bool allow ) { PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() ); pit->defaultPolicy( !allow ); - connect( pit, SIGNAL( finished() ), SLOT( slotDefaultPolicyChanged() ) ); + connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotDefaultPolicyChanged() ) ); pit->go( true ); } @@ -105,73 +105,73 @@ void PrivacyManager::setDefaultDeny( bool deny ) { PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() ); pit->defaultPolicy( deny); - connect( pit, SIGNAL( finished() ), SLOT( slotDefaultPolicyChanged() ) ); + connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotDefaultPolicyChanged() ) ); pit->go( true ); } -void PrivacyManager::addAllow( const QString & dn ) +void PrivacyManager::addAllow( const TQString & dn ) { // start off a CreatePrivacyItemTask PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() ); pit->allow( dn ); - connect( pit, SIGNAL( finished() ), SLOT( slotAllowAdded() ) ); + connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotAllowAdded() ) ); pit->go( true ); } -void PrivacyManager::addDeny( const QString & dn ) +void PrivacyManager::addDeny( const TQString & dn ) { // start off a CreatePrivacyItemTask PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() ); pit->deny( dn ); - connect( pit, SIGNAL( finished() ), SLOT( slotDenyAdded() ) ); + connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotDenyAdded() ) ); pit->go( true ); } -void PrivacyManager::removeAllow( const QString & dn ) +void PrivacyManager::removeAllow( const TQString & dn ) { PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() ); pit->removeAllow( dn ); - connect( pit, SIGNAL( finished() ), SLOT( slotAllowRemoved() ) ); + connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotAllowRemoved() ) ); pit->go( true ); } -void PrivacyManager::removeDeny( const QString & dn ) +void PrivacyManager::removeDeny( const TQString & dn ) { // start off a CreatePrivacyItemTask PrivacyItemTask * pit = new PrivacyItemTask( m_client->rootTask() ); pit->removeDeny( dn ); - connect( pit, SIGNAL( finished() ), SLOT( slotDenyRemoved() ) ); + connect( pit, TQT_SIGNAL( finished() ), TQT_SLOT( slotDenyRemoved() ) ); pit->go( true ); } -void PrivacyManager::setPrivacy( bool defaultIsDeny, const QStringList & allowList, const QStringList & denyList ) +void PrivacyManager::setPrivacy( bool defaultIsDeny, const TQStringList & allowList, const TQStringList & denyList ) { if ( defaultIsDeny != m_defaultDeny ) setDefaultDeny( defaultIsDeny ); // find the DNs no longer in the allow list - QStringList allowsToRemove = difference( m_allowList, allowList ); + TQStringList allowsToRemove = difference( m_allowList, allowList ); // find the DNs no longer in the deny list - QStringList denysToRemove = difference( m_denyList, denyList ); + TQStringList denysToRemove = difference( m_denyList, denyList ); // find the DNs new in the allow list - QStringList allowsToAdd = difference( allowList, m_allowList ); + TQStringList allowsToAdd = difference( allowList, m_allowList ); // find the DNs new in the deny list - QStringList denysToAdd = difference( denyList, m_denyList ); + TQStringList denysToAdd = difference( denyList, m_denyList ); - QStringList::ConstIterator end = allowsToRemove.end(); - for ( QStringList::ConstIterator it = allowsToRemove.begin(); it != end; ++it ) + TQStringList::ConstIterator end = allowsToRemove.end(); + for ( TQStringList::ConstIterator it = allowsToRemove.begin(); it != end; ++it ) removeAllow( *it ); end = denysToRemove.end(); - for ( QStringList::ConstIterator it = denysToRemove.begin(); it != end; ++it ) + for ( TQStringList::ConstIterator it = denysToRemove.begin(); it != end; ++it ) removeDeny( *it ); end = allowsToAdd.end(); - for ( QStringList::ConstIterator it = allowsToAdd.begin(); it != end; ++it ) + for ( TQStringList::ConstIterator it = allowsToAdd.begin(); it != end; ++it ) addAllow( *it ); end = denysToAdd.end(); - for ( QStringList::ConstIterator it = denysToAdd.begin(); it != end; ++it ) + for ( TQStringList::ConstIterator it = denysToAdd.begin(); it != end; ++it ) addDeny( *it ); } -void PrivacyManager::slotGotPrivacySettings( bool locked, bool defaultDeny, const QStringList & allowList, const QStringList & denyList ) +void PrivacyManager::slotGotPrivacySettings( bool locked, bool defaultDeny, const TQStringList & allowList, const TQStringList & denyList ) { m_locked = locked; m_defaultDeny = defaultDeny; @@ -236,12 +236,12 @@ void PrivacyManager::slotDenyRemoved() } } -QStringList PrivacyManager::difference( const QStringList & lhs, const QStringList & rhs ) +TQStringList PrivacyManager::difference( const TQStringList & lhs, const TQStringList & rhs ) { - QStringList diff; - const QStringList::ConstIterator lhsEnd = lhs.end(); - const QStringList::ConstIterator rhsEnd = rhs.end(); - for ( QStringList::ConstIterator lhsIt = lhs.begin(); lhsIt != lhsEnd; ++lhsIt ) + TQStringList diff; + const TQStringList::ConstIterator lhsEnd = lhs.end(); + const TQStringList::ConstIterator rhsEnd = rhs.end(); + for ( TQStringList::ConstIterator lhsIt = lhs.begin(); lhsIt != lhsEnd; ++lhsIt ) { if ( rhs.find( *lhsIt ) == rhsEnd ) diff.append( *lhsIt ); diff --git a/kopete/protocols/groupwise/libgroupwise/privacymanager.h b/kopete/protocols/groupwise/libgroupwise/privacymanager.h index 102c2b0a..0f01eb89 100644 --- a/kopete/protocols/groupwise/libgroupwise/privacymanager.h +++ b/kopete/protocols/groupwise/libgroupwise/privacymanager.h @@ -19,8 +19,8 @@ #ifndef PRIVACYMANAGER_H #define PRIVACYMANAGER_H -#include <qobject.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstringlist.h> class Client; @@ -36,40 +36,40 @@ public: PrivacyManager( Client * client, const char *name = 0); ~PrivacyManager(); // accessors - bool isBlocked( const QString & dn ); - QStringList allowList(); - QStringList denyList(); + bool isBlocked( const TQString & dn ); + TQStringList allowList(); + TQStringList denyList(); bool isPrivacyLocked(); bool defaultDeny(); bool defaultAllow(); // mutators void setDefaultAllow( bool allow ); void setDefaultDeny( bool deny ); - void setAllow( const QString & dn ); - void setDeny( const QString & dn ); + void setAllow( const TQString & dn ); + void setDeny( const TQString & dn ); void getDetailsForPrivacyLists(); // change everything at once - void setPrivacy( bool defaultIsDeny, const QStringList & allowList, const QStringList & denyList ); + void setPrivacy( bool defaultIsDeny, const TQStringList & allowList, const TQStringList & denyList ); signals: - void privacyChanged( const QString &dn, bool allowed ); + void privacyChanged( const TQString &dn, bool allowed ); public slots: /** * Used to initialise the privacy manager using the server side privacy list */ - void slotGotPrivacySettings( bool locked, bool defaultDeny, const QStringList & allowList, const QStringList & denyList ); + void slotGotPrivacySettings( bool locked, bool defaultDeny, const TQStringList & allowList, const TQStringList & denyList ); protected: - void addAllow( const QString & dn ); - void addDeny( const QString & dn ); - void removeAllow( const QString & dn ); - void removeDeny( const QString & dn ); + void addAllow( const TQString & dn ); + void addDeny( const TQString & dn ); + void removeAllow( const TQString & dn ); + void removeDeny( const TQString & dn ); /** * A set difference function * @param lhs The set of strings to be subtracted from * @param rhs The set of string to subtract * @return The difference between the two sets */ - QStringList difference( const QStringList & lhs, const QStringList & rhs ); + TQStringList difference( const TQStringList & lhs, const TQStringList & rhs ); protected slots: // Receive the results of Tasks manipulating the privacy lists void slotDefaultPolicyChanged(); @@ -81,8 +81,8 @@ private: Client * m_client; bool m_locked; bool m_defaultDeny; - QStringList m_allowList; - QStringList m_denyList; + TQStringList m_allowList; + TQStringList m_denyList; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/qca/src/qca.cpp b/kopete/protocols/groupwise/libgroupwise/qca/src/qca.cpp index e660ef42..10cae6b8 100644 --- a/kopete/protocols/groupwise/libgroupwise/qca/src/qca.cpp +++ b/kopete/protocols/groupwise/libgroupwise/qca/src/qca.cpp @@ -20,15 +20,15 @@ #include"qca.h" -#include<qptrlist.h> -#include<qdir.h> -#include<qfileinfo.h> -#include<qstringlist.h> -#include<qlibrary.h> -#include<qtimer.h> -#include<qhostaddress.h> -#include<qapplication.h> -#include<qguardedptr.h> +#include<tqptrlist.h> +#include<tqdir.h> +#include<tqfileinfo.h> +#include<tqstringlist.h> +#include<tqlibrary.h> +#include<tqtimer.h> +#include<tqhostaddress.h> +#include<tqapplication.h> +#include<tqguardedptr.h> #include<stdlib.h> #include"qcaprovider.h" @@ -46,11 +46,11 @@ class ProviderItem { public: QCAProvider *p; - QString fname; + TQString fname; - static ProviderItem *load(const QString &fname) + static ProviderItem *load(const TQString &fname) { - QLibrary *lib = new QLibrary(fname); + TQLibrary *lib = new TQLibrary(fname); if(!lib->load()) { delete lib; return 0; @@ -92,10 +92,10 @@ public: } private: - QLibrary *lib; + TQLibrary *lib; bool init_done; - ProviderItem(QLibrary *_lib, QCAProvider *_p) + ProviderItem(TQLibrary *_lib, QCAProvider *_p) { lib = _lib; p = _p; @@ -103,12 +103,12 @@ private: } }; -static QPtrList<ProviderItem> providerList; +static TQPtrList<ProviderItem> providerList; static bool qca_init = false; -static bool plugin_have(const QString &fname) +static bool plugin_have(const TQString &fname) { - QPtrListIterator<ProviderItem> it(providerList); + TQPtrListIterator<ProviderItem> it(providerList); for(ProviderItem *i; (i = it.current()); ++it) { if(i->fname == fname) return true; @@ -118,21 +118,21 @@ static bool plugin_have(const QString &fname) static void plugin_scan() { - QStringList dirs = QApplication::libraryPaths(); - for(QStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) { - QDir libpath(*it); - QDir dir(libpath.filePath("crypto")); + TQStringList dirs = TQApplication::libraryPaths(); + for(TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) { + TQDir libpath(*it); + TQDir dir(libpath.filePath("crypto")); if(!dir.exists()) continue; - QStringList list = dir.entryList(); - for(QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { - QFileInfo fi(dir.filePath(*it)); + TQStringList list = dir.entryList(); + for(TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { + TQFileInfo fi(dir.filePath(*it)); if(fi.isDir()) continue; if(fi.extension() != PLUGIN_EXT) continue; - QString fname = fi.filePath(); + TQString fname = fi.filePath(); // don't load the same plugin again! if(plugin_have(fname)) @@ -166,26 +166,26 @@ static void plugin_unloadall() static int plugin_caps() { int caps = 0; - QPtrListIterator<ProviderItem> it(providerList); + TQPtrListIterator<ProviderItem> it(providerList); for(ProviderItem *i; (i = it.current()); ++it) caps |= i->p->capabilities(); return caps; } -QString QCA::arrayToHex(const QByteArray &a) +TQString QCA::arrayToHex(const TQByteArray &a) { - QString out; + TQString out; for(int n = 0; n < (int)a.size(); ++n) { - QString str; + TQString str; str.sprintf("%02x", (uchar)a[n]); out.append(str); } return out; } -QByteArray QCA::hexToArray(const QString &str) +TQByteArray QCA::hexToArray(const TQString &str) { - QByteArray out(str.length() / 2); + TQByteArray out(str.length() / 2); int at = 0; for(int n = 0; n + 1 < (int)str.length(); n += 2) { uchar a = str[n]; @@ -239,7 +239,7 @@ static void *getContext(int cap) if(!QCA::isSupported(cap)) return 0; - QPtrListIterator<ProviderItem> it(providerList); + TQPtrListIterator<ProviderItem> it(providerList); for(ProviderItem *i; (i = it.current()); ++it) { if(i->p->capabilities() & cap) { i->ensureInit(); @@ -303,14 +303,14 @@ void Hash::clear() d->reset(); } -void Hash::update(const QByteArray &a) +void Hash::update(const TQByteArray &a) { d->c->update(a.data(), a.size()); } -QByteArray Hash::final() +TQByteArray Hash::final() { - QByteArray buf; + TQByteArray buf; d->c->final(&buf); return buf; } @@ -343,11 +343,11 @@ public: QCA_CipherContext *c; int dir; int mode; - QByteArray key, iv; + TQByteArray key, iv; bool err; }; -Cipher::Cipher(QCA_CipherContext *c, int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +Cipher::Cipher(QCA_CipherContext *c, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) { d = new Private; d->c = c; @@ -377,27 +377,27 @@ Cipher::~Cipher() delete d; } -QByteArray Cipher::dyn_generateKey(int size) const +TQByteArray Cipher::dyn_generateKey(int size) const { - QByteArray buf; + TQByteArray buf; if(size != -1) buf.resize(size); else buf.resize(d->c->keySize()); if(!d->c->generateKey(buf.data(), size)) - return QByteArray(); + return TQByteArray(); return buf; } -QByteArray Cipher::dyn_generateIV() const +TQByteArray Cipher::dyn_generateIV() const { - QByteArray buf(d->c->blockSize()); + TQByteArray buf(d->c->blockSize()); if(!d->c->generateIV(buf.data())) - return QByteArray(); + return TQByteArray(); return buf; } -void Cipher::reset(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +void Cipher::reset(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) { d->reset(); @@ -411,7 +411,7 @@ void Cipher::reset(int dir, int mode, const QByteArray &key, const QByteArray &i } } -bool Cipher::update(const QByteArray &a) +bool Cipher::update(const TQByteArray &a) { if(d->err) return false; @@ -425,17 +425,17 @@ bool Cipher::update(const QByteArray &a) return true; } -QByteArray Cipher::final(bool *ok) +TQByteArray Cipher::final(bool *ok) { if(ok) *ok = false; if(d->err) - return QByteArray(); + return TQByteArray(); - QByteArray out; + TQByteArray out; if(!d->c->final(&out)) { d->err = true; - return QByteArray(); + return TQByteArray(); } if(ok) *ok = true; @@ -473,7 +473,7 @@ MD5::MD5() //---------------------------------------------------------------------------- // BlowFish //---------------------------------------------------------------------------- -BlowFish::BlowFish(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +BlowFish::BlowFish(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) :Cipher((QCA_CipherContext *)getContext(CAP_BlowFish), dir, mode, key, iv, pad) { } @@ -482,7 +482,7 @@ BlowFish::BlowFish(int dir, int mode, const QByteArray &key, const QByteArray &i //---------------------------------------------------------------------------- // TripleDES //---------------------------------------------------------------------------- -TripleDES::TripleDES(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +TripleDES::TripleDES(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) :Cipher((QCA_CipherContext *)getContext(CAP_TripleDES), dir, mode, key, iv, pad) { } @@ -491,7 +491,7 @@ TripleDES::TripleDES(int dir, int mode, const QByteArray &key, const QByteArray //---------------------------------------------------------------------------- // AES128 //---------------------------------------------------------------------------- -AES128::AES128(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +AES128::AES128(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) :Cipher((QCA_CipherContext *)getContext(CAP_AES128), dir, mode, key, iv, pad) { } @@ -500,7 +500,7 @@ AES128::AES128(int dir, int mode, const QByteArray &key, const QByteArray &iv, b //---------------------------------------------------------------------------- // AES256 //---------------------------------------------------------------------------- -AES256::AES256(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad) +AES256::AES256(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) :Cipher((QCA_CipherContext *)getContext(CAP_AES256), dir, mode, key, iv, pad) { } @@ -564,35 +564,35 @@ bool RSAKey::havePrivate() const return d->c->havePrivate(); } -QByteArray RSAKey::toDER(bool publicOnly) const +TQByteArray RSAKey::toDER(bool publicOnly) const { - QByteArray out; + TQByteArray out; if(!d->c->toDER(&out, publicOnly)) - return QByteArray(); + return TQByteArray(); return out; } -bool RSAKey::fromDER(const QByteArray &a) +bool RSAKey::fromDER(const TQByteArray &a) { return d->c->createFromDER(a.data(), a.size()); } -QString RSAKey::toPEM(bool publicOnly) const +TQString RSAKey::toPEM(bool publicOnly) const { - QByteArray out; + TQByteArray out; if(!d->c->toPEM(&out, publicOnly)) - return QByteArray(); + return TQByteArray(); - QCString cs; + TQCString cs; cs.resize(out.size()+1); memcpy(cs.data(), out.data(), out.size()); - return QString::fromLatin1(cs); + return TQString::fromLatin1(cs); } -bool RSAKey::fromPEM(const QString &str) +bool RSAKey::fromPEM(const TQString &str) { - QCString cs = str.latin1(); - QByteArray a(cs.length()); + TQCString cs = str.latin1(); + TQByteArray a(cs.length()); memcpy(a.data(), cs.data(), a.size()); return d->c->createFromPEM(a.data(), a.size()); } @@ -602,18 +602,18 @@ bool RSAKey::fromNative(void *p) return d->c->createFromNative(p); } -bool RSAKey::encrypt(const QByteArray &a, QByteArray *b, bool oaep) const +bool RSAKey::encrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const { - QByteArray out; + TQByteArray out; if(!d->c->encrypt(a, &out, oaep)) return false; *b = out; return true; } -bool RSAKey::decrypt(const QByteArray &a, QByteArray *b, bool oaep) const +bool RSAKey::decrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const { - QByteArray out; + TQByteArray out; if(!d->c->decrypt(a, &out, oaep)) return false; *b = out; @@ -647,14 +647,14 @@ void RSA::setKey(const RSAKey &k) v_key = k; } -bool RSA::encrypt(const QByteArray &a, QByteArray *b, bool oaep) const +bool RSA::encrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const { if(v_key.isNull()) return false; return v_key.encrypt(a, b, oaep); } -bool RSA::decrypt(const QByteArray &a, QByteArray *b, bool oaep) const +bool RSA::decrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const { if(v_key.isNull()) return false; @@ -727,84 +727,84 @@ bool Cert::isNull() const return d->c->isNull(); } -QString Cert::commonName() const +TQString Cert::commonName() const { CertProperties props = subject(); return props["CN"]; } -QString Cert::serialNumber() const +TQString Cert::serialNumber() const { return d->c->serialNumber(); } -QString Cert::subjectString() const +TQString Cert::subjectString() const { return d->c->subjectString(); } -QString Cert::issuerString() const +TQString Cert::issuerString() const { return d->c->issuerString(); } CertProperties Cert::subject() const { - QValueList<QCA_CertProperty> list = d->c->subject(); + TQValueList<QCA_CertProperty> list = d->c->subject(); CertProperties props; - for(QValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it) + for(TQValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it) props[(*it).var] = (*it).val; return props; } CertProperties Cert::issuer() const { - QValueList<QCA_CertProperty> list = d->c->issuer(); + TQValueList<QCA_CertProperty> list = d->c->issuer(); CertProperties props; - for(QValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it) + for(TQValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it) props[(*it).var] = (*it).val; return props; } -QDateTime Cert::notBefore() const +TQDateTime Cert::notBefore() const { return d->c->notBefore(); } -QDateTime Cert::notAfter() const +TQDateTime Cert::notAfter() const { return d->c->notAfter(); } -QByteArray Cert::toDER() const +TQByteArray Cert::toDER() const { - QByteArray out; + TQByteArray out; if(!d->c->toDER(&out)) - return QByteArray(); + return TQByteArray(); return out; } -bool Cert::fromDER(const QByteArray &a) +bool Cert::fromDER(const TQByteArray &a) { return d->c->createFromDER(a.data(), a.size()); } -QString Cert::toPEM() const +TQString Cert::toPEM() const { - QByteArray out; + TQByteArray out; if(!d->c->toPEM(&out)) - return QByteArray(); + return TQByteArray(); - QCString cs; + TQCString cs; cs.resize(out.size()+1); memcpy(cs.data(), out.data(), out.size()); - return QString::fromLatin1(cs); + return TQString::fromLatin1(cs); } -bool Cert::fromPEM(const QString &str) +bool Cert::fromPEM(const TQString &str) { - QCString cs = str.latin1(); - QByteArray a(cs.length()); + TQCString cs = str.latin1(); + TQByteArray a(cs.length()); memcpy(a.data(), cs.data(), a.size()); return d->c->createFromPEM(a.data(), a.size()); } @@ -842,7 +842,7 @@ public: tryMore = false; } - void appendArray(QByteArray *a, const QByteArray &b) + void appendArray(TQByteArray *a, const TQByteArray &b) { int oldsize = a->size(); a->resize(oldsize + b.size()); @@ -851,21 +851,21 @@ public: Cert cert; QCA_TLSContext *c; - QByteArray in, out, to_net, from_net; + TQByteArray in, out, to_net, from_net; int bytesEncoded; bool tryMore; bool handshaken; - QString host; + TQString host; bool hostMismatch; bool closing; Cert ourCert; RSAKey ourKey; - QPtrList<QCA_CertContext> store; + TQPtrList<QCA_CertContext> store; }; -TLS::TLS(QObject *parent) -:QObject(parent) +TLS::TLS(TQObject *parent) +:TQObject(parent) { d = new Private; } @@ -881,11 +881,11 @@ void TLS::setCertificate(const Cert &cert, const RSAKey &key) d->ourKey = key; } -void TLS::setCertificateStore(const QPtrList<Cert> &store) +void TLS::setCertificateStore(const TQPtrList<Cert> &store) { // convert the cert list into a context list d->store.clear(); - QPtrListIterator<Cert> it(store); + TQPtrListIterator<Cert> it(store); for(Cert *cert; (cert = it.current()); ++it) d->store.append(cert->d->c); } @@ -895,14 +895,14 @@ void TLS::reset() d->reset(); } -bool TLS::startClient(const QString &host) +bool TLS::startClient(const TQString &host) { d->reset(); d->host = host; if(!d->c->startClient(d->store, *d->ourCert.d->c, *d->ourKey.d->c)) return false; - QTimer::singleShot(0, this, SLOT(update())); + TQTimer::singleShot(0, this, TQT_SLOT(update())); return true; } @@ -912,7 +912,7 @@ bool TLS::startServer() if(!d->c->startServer(d->store, *d->ourCert.d->c, *d->ourKey.d->c)) return false; - QTimer::singleShot(0, this, SLOT(update())); + TQTimer::singleShot(0, this, TQT_SLOT(update())); return true; } @@ -922,7 +922,7 @@ void TLS::close() return; d->closing = true; - QTimer::singleShot(0, this, SLOT(update())); + TQTimer::singleShot(0, this, TQT_SLOT(update())); } bool TLS::isHandshaken() const @@ -930,35 +930,35 @@ bool TLS::isHandshaken() const return d->handshaken; } -void TLS::write(const QByteArray &a) +void TLS::write(const TQByteArray &a) { d->appendArray(&d->out, a); update(); } -QByteArray TLS::read() +TQByteArray TLS::read() { - QByteArray a = d->in.copy(); + TQByteArray a = d->in.copy(); d->in.resize(0); return a; } -void TLS::writeIncoming(const QByteArray &a) +void TLS::writeIncoming(const TQByteArray &a) { d->appendArray(&d->from_net, a); update(); } -QByteArray TLS::readOutgoing() +TQByteArray TLS::readOutgoing() { - QByteArray a = d->to_net.copy(); + TQByteArray a = d->to_net.copy(); d->to_net.resize(0); return a; } -QByteArray TLS::readUnprocessed() +TQByteArray TLS::readUnprocessed() { - QByteArray a = d->from_net.copy(); + TQByteArray a = d->from_net.copy(); d->from_net.resize(0); return a; } @@ -981,10 +981,10 @@ void TLS::update() bool force_read = false; bool eof = false; bool done = false; - QGuardedPtr<TLS> self = this; + TQGuardedPtr<TLS> self = this; if(d->closing) { - QByteArray a; + TQByteArray a; int r = d->c->shutdown(d->from_net, &a); d->from_net.resize(0); if(r == QCA_TLSContext::Error) { @@ -1000,7 +1000,7 @@ void TLS::update() } else { if(!d->handshaken) { - QByteArray a; + TQByteArray a; int r = d->c->handshake(d->from_net, &a); d->from_net.resize(0); if(r == QCA_TLSContext::Error) { @@ -1029,7 +1029,7 @@ void TLS::update() if(d->handshaken) { if(!d->out.isEmpty() || d->tryMore) { d->tryMore = false; - QByteArray a; + TQByteArray a; int enc; bool more = false; bool ok = d->c->encode(d->out, &a, &enc); @@ -1050,7 +1050,7 @@ void TLS::update() } } if(!d->from_net.isEmpty() || force_read) { - QByteArray a, b; + TQByteArray a, b; bool ok = d->c->decode(d->from_net, &a, &b); eof = d->c->eof(); d->from_net.resize(0); @@ -1096,7 +1096,7 @@ void TLS::update() //---------------------------------------------------------------------------- // SASL //---------------------------------------------------------------------------- -QString saslappname = "qca"; +TQString saslappname = "qca"; class SASL::Private { public: @@ -1118,22 +1118,22 @@ public: // security opts bool noPlain, noActive, noDict, noAnon, reqForward, reqCreds, reqMutual; int ssfmin, ssfmax; - QString ext_authid; + TQString ext_authid; int ext_ssf; bool tried; QCA_SASLContext *c; - QHostAddress localAddr, remoteAddr; + TQHostAddress localAddr, remoteAddr; int localPort, remotePort; - QByteArray stepData; + TQByteArray stepData; bool allowCSF; bool first, server; - QByteArray inbuf, outbuf; + TQByteArray inbuf, outbuf; }; -SASL::SASL(QObject *parent) -:QObject(parent) +SASL::SASL(TQObject *parent) +:TQObject(parent) { d = new Private; reset(); @@ -1144,7 +1144,7 @@ SASL::~SASL() delete d; } -void SASL::setAppName(const QString &name) +void SASL::setAppName(const TQString &name) { saslappname = name; } @@ -1222,7 +1222,7 @@ void SASL::setMaximumSSF(int x) d->ssfmax = x; } -void SASL::setExternalAuthID(const QString &authid) +void SASL::setExternalAuthID(const TQString &authid) { d->ext_authid = authid; } @@ -1232,19 +1232,19 @@ void SASL::setExternalSSF(int x) d->ext_ssf = x; } -void SASL::setLocalAddr(const QHostAddress &addr, Q_UINT16 port) +void SASL::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port) { d->localAddr = addr; d->localPort = port; } -void SASL::setRemoteAddr(const QHostAddress &addr, Q_UINT16 port) +void SASL::setRemoteAddr(const TQHostAddress &addr, Q_UINT16 port) { d->remoteAddr = addr; d->remotePort = port; } -bool SASL::startClient(const QString &service, const QString &host, const QStringList &mechlist, bool allowClientSendFirst) +bool SASL::startClient(const TQString &service, const TQString &host, const TQStringList &mechlist, bool allowClientSendFirst) { QCA_SASLHostPort la, ra; if(d->localPort != -1) { @@ -1265,11 +1265,11 @@ bool SASL::startClient(const QString &service, const QString &host, const QStrin d->first = true; d->server = false; d->tried = false; - QTimer::singleShot(0, this, SLOT(tryAgain())); + TQTimer::singleShot(0, this, TQT_SLOT(tryAgain())); return true; } -bool SASL::startServer(const QString &service, const QString &host, const QString &realm, QStringList *mechlist) +bool SASL::startServer(const TQString &service, const TQString &host, const TQString &realm, TQStringList *mechlist) { QCA_SASLHostPort la, ra; if(d->localPort != -1) { @@ -1292,13 +1292,13 @@ bool SASL::startServer(const QString &service, const QString &host, const QStrin return true; } -void SASL::putServerFirstStep(const QString &mech) +void SASL::putServerFirstStep(const TQString &mech) { int r = d->c->serverFirstStep(mech, 0); handleServerFirstStep(r); } -void SASL::putServerFirstStep(const QString &mech, const QByteArray &clientInit) +void SASL::putServerFirstStep(const TQString &mech, const TQByteArray &clientInit) { int r = d->c->serverFirstStep(mech, &clientInit); handleServerFirstStep(r); @@ -1316,28 +1316,28 @@ void SASL::handleServerFirstStep(int r) error(ErrAuth); } -void SASL::putStep(const QByteArray &stepData) +void SASL::putStep(const TQByteArray &stepData) { d->stepData = stepData.copy(); tryAgain(); } -void SASL::setUsername(const QString &user) +void SASL::setUsername(const TQString &user) { d->c->setClientParams(&user, 0, 0, 0); } -void SASL::setAuthzid(const QString &authzid) +void SASL::setAuthzid(const TQString &authzid) { d->c->setClientParams(0, &authzid, 0, 0); } -void SASL::setPassword(const QString &pass) +void SASL::setPassword(const TQString &pass) { d->c->setClientParams(0, 0, &pass, 0); } -void SASL::setRealm(const QString &realm) +void SASL::setRealm(const TQString &realm) { d->c->setClientParams(0, 0, 0, &realm); } @@ -1399,8 +1399,8 @@ void SASL::tryAgain() return; } - QString mech = d->c->mech(); - const QByteArray *clientInit = d->c->clientInit(); + TQString mech = d->c->mech(); + const TQByteArray *clientInit = d->c->clientInit(); d->first = false; d->tried = false; @@ -1443,9 +1443,9 @@ int SASL::ssf() const return d->c->security(); } -void SASL::write(const QByteArray &a) +void SASL::write(const TQByteArray &a) { - QByteArray b; + TQByteArray b; if(!d->c->encode(a, &b)) { error(ErrCrypt); return; @@ -1456,16 +1456,16 @@ void SASL::write(const QByteArray &a) readyReadOutgoing(a.size()); } -QByteArray SASL::read() +TQByteArray SASL::read() { - QByteArray a = d->inbuf.copy(); + TQByteArray a = d->inbuf.copy(); d->inbuf.resize(0); return a; } -void SASL::writeIncoming(const QByteArray &a) +void SASL::writeIncoming(const TQByteArray &a) { - QByteArray b; + TQByteArray b; if(!d->c->decode(a, &b)) { error(ErrCrypt); return; @@ -1476,9 +1476,9 @@ void SASL::writeIncoming(const QByteArray &a) readyRead(); } -QByteArray SASL::readOutgoing() +TQByteArray SASL::readOutgoing() { - QByteArray a = d->outbuf.copy(); + TQByteArray a = d->outbuf.copy(); d->outbuf.resize(0); return a; } diff --git a/kopete/protocols/groupwise/libgroupwise/qca/src/qca.h b/kopete/protocols/groupwise/libgroupwise/qca/src/qca.h index 1a52a826..46b25cc9 100644 --- a/kopete/protocols/groupwise/libgroupwise/qca/src/qca.h +++ b/kopete/protocols/groupwise/libgroupwise/qca/src/qca.h @@ -21,12 +21,12 @@ #ifndef QCA_H #define QCA_H -#include<qstring.h> -#include<qcstring.h> -#include<qdatetime.h> -#include<qmap.h> -#include<qptrlist.h> -#include<qobject.h> +#include<tqstring.h> +#include<tqcstring.h> +#include<tqdatetime.h> +#include<tqmap.h> +#include<tqptrlist.h> +#include<tqobject.h> #ifdef Q_OS_WIN32 # ifndef QCA_STATIC @@ -91,8 +91,8 @@ namespace QCA QCA_EXPORT void insertProvider(QCAProvider *); QCA_EXPORT void unloadAllPlugins(); - QCA_EXPORT QString arrayToHex(const QByteArray &); - QCA_EXPORT QByteArray hexToArray(const QString &); + QCA_EXPORT TQString arrayToHex(const TQByteArray &); + QCA_EXPORT TQByteArray hexToArray(const TQString &); class QCA_EXPORT Hash { @@ -102,8 +102,8 @@ namespace QCA ~Hash(); void clear(); - void update(const QByteArray &a); - QByteArray final(); + void update(const TQByteArray &a); + TQByteArray final(); protected: Hash(QCA_HashContext *); @@ -119,26 +119,26 @@ namespace QCA public: HashStatic<T>() {} - static QByteArray hash(const QByteArray &a) + static TQByteArray hash(const TQByteArray &a) { T obj; obj.update(a); return obj.final(); } - static QByteArray hash(const QCString &cs) + static TQByteArray hash(const TQCString &cs) { - QByteArray a(cs.length()); + TQByteArray a(cs.length()); memcpy(a.data(), cs.data(), a.size()); return hash(a); } - static QString hashToString(const QByteArray &a) + static TQString hashToString(const TQByteArray &a) { return arrayToHex(hash(a)); } - static QString hashToString(const QCString &cs) + static TQString hashToString(const TQCString &cs) { return arrayToHex(hash(cs)); } @@ -151,14 +151,14 @@ namespace QCA Cipher & operator=(const Cipher &); ~Cipher(); - QByteArray dyn_generateKey(int size=-1) const; - QByteArray dyn_generateIV() const; - void reset(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad=true); - bool update(const QByteArray &a); - QByteArray final(bool *ok=0); + TQByteArray dyn_generateKey(int size=-1) const; + TQByteArray dyn_generateIV() const; + void reset(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad=true); + bool update(const TQByteArray &a); + TQByteArray final(bool *ok=0); protected: - Cipher(QCA_CipherContext *, int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad); + Cipher(QCA_CipherContext *, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad); private: class Private; @@ -171,13 +171,13 @@ namespace QCA public: CipherStatic<T>() {} - static QByteArray generateKey(int size=-1) + static TQByteArray generateKey(int size=-1) { T obj; return obj.dyn_generateKey(size); } - static QByteArray generateIV() + static TQByteArray generateIV() { T obj; return obj.dyn_generateIV(); @@ -205,25 +205,25 @@ namespace QCA class QCA_EXPORT BlowFish : public Cipher, public CipherStatic<BlowFish> { public: - BlowFish(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true); + BlowFish(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true); }; class QCA_EXPORT TripleDES : public Cipher, public CipherStatic<TripleDES> { public: - TripleDES(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true); + TripleDES(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true); }; class QCA_EXPORT AES128 : public Cipher, public CipherStatic<AES128> { public: - AES128(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true); + AES128(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true); }; class QCA_EXPORT AES256 : public Cipher, public CipherStatic<AES256> { public: - AES256(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true); + AES256(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true); }; class RSA; @@ -239,11 +239,11 @@ namespace QCA bool havePublic() const; bool havePrivate() const; - QByteArray toDER(bool publicOnly=false) const; - bool fromDER(const QByteArray &a); + TQByteArray toDER(bool publicOnly=false) const; + bool fromDER(const TQByteArray &a); - QString toPEM(bool publicOnly=false) const; - bool fromPEM(const QString &); + TQString toPEM(bool publicOnly=false) const; + bool fromPEM(const TQString &); // only call if you know what you are doing bool fromNative(void *); @@ -254,8 +254,8 @@ namespace QCA friend class RSA; friend class TLS; - bool encrypt(const QByteArray &a, QByteArray *out, bool oaep) const; - bool decrypt(const QByteArray &a, QByteArray *out, bool oaep) const; + bool encrypt(const TQByteArray &a, TQByteArray *out, bool oaep) const; + bool decrypt(const TQByteArray &a, TQByteArray *out, bool oaep) const; bool generate(unsigned int bits); }; @@ -268,8 +268,8 @@ namespace QCA RSAKey key() const; void setKey(const RSAKey &); - bool encrypt(const QByteArray &a, QByteArray *out, bool oaep=false) const; - bool decrypt(const QByteArray &a, QByteArray *out, bool oaep=false) const; + bool encrypt(const TQByteArray &a, TQByteArray *out, bool oaep=false) const; + bool decrypt(const TQByteArray &a, TQByteArray *out, bool oaep=false) const; static RSAKey generateKey(unsigned int bits); @@ -277,7 +277,7 @@ namespace QCA RSAKey v_key; }; - typedef QMap<QString, QString> CertProperties; + typedef TQMap<TQString, TQString> CertProperties; class QCA_EXPORT Cert { public: @@ -288,20 +288,20 @@ namespace QCA bool isNull() const; - QString commonName() const; - QString serialNumber() const; - QString subjectString() const; - QString issuerString() const; + TQString commonName() const; + TQString serialNumber() const; + TQString subjectString() const; + TQString issuerString() const; CertProperties subject() const; CertProperties issuer() const; - QDateTime notBefore() const; - QDateTime notAfter() const; + TQDateTime notBefore() const; + TQDateTime notAfter() const; - QByteArray toDER() const; - bool fromDER(const QByteArray &a); + TQByteArray toDER() const; + bool fromDER(const TQByteArray &a); - QString toPEM() const; - bool fromPEM(const QString &); + TQString toPEM() const; + bool fromPEM(const TQString &); private: class Private; @@ -332,26 +332,26 @@ namespace QCA }; enum Error { ErrHandshake, ErrCrypt }; - TLS(QObject *parent=0); + TLS(TQObject *parent=0); ~TLS(); void setCertificate(const Cert &cert, const RSAKey &key); - void setCertificateStore(const QPtrList<Cert> &store); // note: store must persist + void setCertificateStore(const TQPtrList<Cert> &store); // note: store must persist void reset(); - bool startClient(const QString &host=""); + bool startClient(const TQString &host=""); bool startServer(); void close(); bool isHandshaken() const; // plain (application side) - void write(const QByteArray &a); - QByteArray read(); + void write(const TQByteArray &a); + TQByteArray read(); // encoded (socket side) - void writeIncoming(const QByteArray &a); - QByteArray readOutgoing(); - QByteArray readUnprocessed(); + void writeIncoming(const TQByteArray &a); + TQByteArray readOutgoing(); + TQByteArray readUnprocessed(); // cert related const Cert & peerCertificate() const; @@ -390,10 +390,10 @@ namespace QCA NoUser, RemoteUnavail }; - SASL(QObject *parent=0); + SASL(TQObject *parent=0); ~SASL(); - static void setAppName(const QString &name); + static void setAppName(const TQString &name); void reset(); int errorCondition() const; @@ -409,40 +409,40 @@ namespace QCA void setMinimumSSF(int); void setMaximumSSF(int); - void setExternalAuthID(const QString &authid); + void setExternalAuthID(const TQString &authid); void setExternalSSF(int); - void setLocalAddr(const QHostAddress &addr, Q_UINT16 port); - void setRemoteAddr(const QHostAddress &addr, Q_UINT16 port); + void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port); + void setRemoteAddr(const TQHostAddress &addr, Q_UINT16 port); // initialize - bool startClient(const QString &service, const QString &host, const QStringList &mechlist, bool allowClientSendFirst=true); - bool startServer(const QString &service, const QString &host, const QString &realm, QStringList *mechlist); + bool startClient(const TQString &service, const TQString &host, const TQStringList &mechlist, bool allowClientSendFirst=true); + bool startServer(const TQString &service, const TQString &host, const TQString &realm, TQStringList *mechlist); // authentication - void putStep(const QByteArray &stepData); - void putServerFirstStep(const QString &mech); - void putServerFirstStep(const QString &mech, const QByteArray &clientInit); - void setUsername(const QString &user); - void setAuthzid(const QString &auth); - void setPassword(const QString &pass); - void setRealm(const QString &realm); + void putStep(const TQByteArray &stepData); + void putServerFirstStep(const TQString &mech); + void putServerFirstStep(const TQString &mech, const TQByteArray &clientInit); + void setUsername(const TQString &user); + void setAuthzid(const TQString &auth); + void setPassword(const TQString &pass); + void setRealm(const TQString &realm); void continueAfterParams(); void continueAfterAuthCheck(); // security layer int ssf() const; - void write(const QByteArray &a); - QByteArray read(); - void writeIncoming(const QByteArray &a); - QByteArray readOutgoing(); + void write(const TQByteArray &a); + TQByteArray read(); + void writeIncoming(const TQByteArray &a); + TQByteArray readOutgoing(); signals: // for authentication - void clientFirstStep(const QString &mech, const QByteArray *clientInit); - void nextStep(const QByteArray &stepData); + void clientFirstStep(const TQString &mech, const TQByteArray *clientInit); + void nextStep(const TQByteArray &stepData); void needParams(bool user, bool authzid, bool pass, bool realm); - void authCheck(const QString &user, const QString &authzid); + void authCheck(const TQString &user, const TQString &authzid); void authenticated(); // for security layer diff --git a/kopete/protocols/groupwise/libgroupwise/qca/src/qcaprovider.h b/kopete/protocols/groupwise/libgroupwise/qca/src/qcaprovider.h index e6172434..6eda17f9 100644 --- a/kopete/protocols/groupwise/libgroupwise/qca/src/qcaprovider.h +++ b/kopete/protocols/groupwise/libgroupwise/qca/src/qcaprovider.h @@ -21,11 +21,11 @@ #ifndef QCAPROVIDER_H #define QCAPROVIDER_H -#include<qglobal.h> -#include<qstring.h> -#include<qdatetime.h> -#include<qobject.h> -#include<qhostaddress.h> +#include<tqglobal.h> +#include<tqstring.h> +#include<tqdatetime.h> +#include<tqobject.h> +#include<tqhostaddress.h> #include"qca.h" #define QCA_PLUGIN_VERSION 1 @@ -50,7 +50,7 @@ public: virtual QCA_HashContext *clone()=0; virtual void reset()=0; virtual void update(const char *in, unsigned int len)=0; - virtual void final(QByteArray *out)=0; + virtual void final(TQByteArray *out)=0; }; class QCA_CipherContext @@ -66,7 +66,7 @@ public: virtual bool setup(int dir, int mode, const char *key, int keysize, const char *iv, bool pad)=0; virtual bool update(const char *in, unsigned int len)=0; - virtual bool final(QByteArray *out)=0; + virtual bool final(TQByteArray *out)=0; }; class QCA_RSAKeyContext @@ -82,17 +82,17 @@ public: virtual bool createFromPEM(const char *in, unsigned int len)=0; virtual bool createFromNative(void *in)=0; virtual bool generate(unsigned int bits)=0; - virtual bool toDER(QByteArray *out, bool publicOnly)=0; - virtual bool toPEM(QByteArray *out, bool publicOnly)=0; + virtual bool toDER(TQByteArray *out, bool publicOnly)=0; + virtual bool toPEM(TQByteArray *out, bool publicOnly)=0; - virtual bool encrypt(const QByteArray &in, QByteArray *out, bool oaep)=0; - virtual bool decrypt(const QByteArray &in, QByteArray *out, bool oaep)=0; + virtual bool encrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0; + virtual bool decrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0; }; struct QCA_CertProperty { - QString var; - QString val; + TQString var; + TQString val; }; class QCA_CertContext @@ -104,17 +104,17 @@ public: virtual bool isNull() const=0; virtual bool createFromDER(const char *in, unsigned int len)=0; virtual bool createFromPEM(const char *in, unsigned int len)=0; - virtual bool toDER(QByteArray *out)=0; - virtual bool toPEM(QByteArray *out)=0; - - virtual QString serialNumber() const=0; - virtual QString subjectString() const=0; - virtual QString issuerString() const=0; - virtual QValueList<QCA_CertProperty> subject() const=0; - virtual QValueList<QCA_CertProperty> issuer() const=0; - virtual QDateTime notBefore() const=0; - virtual QDateTime notAfter() const=0; - virtual bool matchesAddress(const QString &realHost) const=0; + virtual bool toDER(TQByteArray *out)=0; + virtual bool toPEM(TQByteArray *out)=0; + + virtual TQString serialNumber() const=0; + virtual TQString subjectString() const=0; + virtual TQString issuerString() const=0; + virtual TQValueList<QCA_CertProperty> subject() const=0; + virtual TQValueList<QCA_CertProperty> issuer() const=0; + virtual TQDateTime notBefore() const=0; + virtual TQDateTime notAfter() const=0; + virtual bool matchesAddress(const TQString &realHost) const=0; }; class QCA_TLSContext @@ -124,15 +124,15 @@ public: virtual ~QCA_TLSContext() {} virtual void reset()=0; - virtual bool startClient(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; - virtual bool startServer(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; + virtual bool startClient(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; + virtual bool startServer(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; - virtual int handshake(const QByteArray &in, QByteArray *out)=0; - virtual int shutdown(const QByteArray &in, QByteArray *out)=0; - virtual bool encode(const QByteArray &plain, QByteArray *to_net, int *encoded)=0; - virtual bool decode(const QByteArray &from_net, QByteArray *plain, QByteArray *to_net)=0; + virtual int handshake(const TQByteArray &in, TQByteArray *out)=0; + virtual int shutdown(const TQByteArray &in, TQByteArray *out)=0; + virtual bool encode(const TQByteArray &plain, TQByteArray *to_net, int *encoded)=0; + virtual bool decode(const TQByteArray &from_net, TQByteArray *plain, TQByteArray *to_net)=0; virtual bool eof() const=0; - virtual QByteArray unprocessed()=0; + virtual TQByteArray unprocessed()=0; virtual QCA_CertContext *peerCertificate() const=0; virtual int validityResult() const=0; @@ -140,7 +140,7 @@ public: struct QCA_SASLHostPort { - QHostAddress addr; + TQHostAddress addr; Q_UINT16 port; }; @@ -157,35 +157,35 @@ public: // common virtual void reset()=0; - virtual void setCoreProps(const QString &service, const QString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0; - virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const QString &_ext_authid, int _ext_ssf)=0; + virtual void setCoreProps(const TQString &service, const TQString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0; + virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const TQString &_ext_authid, int _ext_ssf)=0; virtual int security() const=0; virtual int errorCond() const=0; // init / first step - virtual bool clientStart(const QStringList &mechlist)=0; + virtual bool clientStart(const TQStringList &mechlist)=0; virtual int clientFirstStep(bool allowClientSendFirst)=0; - virtual bool serverStart(const QString &realm, QStringList *mechlist, const QString &name)=0; - virtual int serverFirstStep(const QString &mech, const QByteArray *in)=0; + virtual bool serverStart(const TQString &realm, TQStringList *mechlist, const TQString &name)=0; + virtual int serverFirstStep(const TQString &mech, const TQByteArray *in)=0; // get / set params virtual QCA_SASLNeedParams clientParamsNeeded() const=0; - virtual void setClientParams(const QString *user, const QString *authzid, const QString *pass, const QString *realm)=0; - virtual QString username() const=0; - virtual QString authzid() const=0; + virtual void setClientParams(const TQString *user, const TQString *authzid, const TQString *pass, const TQString *realm)=0; + virtual TQString username() const=0; + virtual TQString authzid() const=0; // continue steps - virtual int nextStep(const QByteArray &in)=0; + virtual int nextStep(const TQByteArray &in)=0; virtual int tryAgain()=0; // results - virtual QString mech() const=0; - virtual const QByteArray *clientInit() const=0; - virtual QByteArray result() const=0; + virtual TQString mech() const=0; + virtual const TQByteArray *clientInit() const=0; + virtual TQByteArray result() const=0; // security layer - virtual bool encode(const QByteArray &in, QByteArray *out)=0; - virtual bool decode(const QByteArray &in, QByteArray *out)=0; + virtual bool encode(const TQByteArray &in, TQByteArray *out)=0; + virtual bool decode(const TQByteArray &in, TQByteArray *out)=0; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/qcatlshandler.cpp b/kopete/protocols/groupwise/libgroupwise/qcatlshandler.cpp index 366f2afa..0cf55684 100644 --- a/kopete/protocols/groupwise/libgroupwise/qcatlshandler.cpp +++ b/kopete/protocols/groupwise/libgroupwise/qcatlshandler.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include <qtimer.h> +#include <tqtimer.h> #include "qca.h" @@ -35,11 +35,11 @@ QCATLSHandler::QCATLSHandler(QCA::TLS *parent) { d = new Private; d->tls = parent; - connect(d->tls, SIGNAL(handshaken()), SLOT(tls_handshaken())); - connect(d->tls, SIGNAL(readyRead()), SLOT(tls_readyRead())); - connect(d->tls, SIGNAL(readyReadOutgoing(int)), SLOT(tls_readyReadOutgoing(int))); - connect(d->tls, SIGNAL(closed()), SLOT(tls_closed())); - connect(d->tls, SIGNAL(error(int)), SLOT(tls_error(int))); + connect(d->tls, TQT_SIGNAL(handshaken()), TQT_SLOT(tls_handshaken())); + connect(d->tls, TQT_SIGNAL(readyRead()), TQT_SLOT(tls_readyRead())); + connect(d->tls, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(tls_readyReadOutgoing(int))); + connect(d->tls, TQT_SIGNAL(closed()), TQT_SLOT(tls_closed())); + connect(d->tls, TQT_SIGNAL(error(int)), TQT_SLOT(tls_error(int))); d->state = 0; d->err = -1; } @@ -65,20 +65,20 @@ void QCATLSHandler::reset() d->state = 0; } -void QCATLSHandler::startClient(const QString &host) +void QCATLSHandler::startClient(const TQString &host) { d->state = 0; d->err = -1; if(!d->tls->startClient(host)) - QTimer::singleShot(0, this, SIGNAL(fail())); + TQTimer::singleShot(0, this, TQT_SIGNAL(fail())); } -void QCATLSHandler::write(const QByteArray &a) +void QCATLSHandler::write(const TQByteArray &a) { d->tls->write(a); } -void QCATLSHandler::writeIncoming(const QByteArray &a) +void QCATLSHandler::writeIncoming(const TQByteArray &a) { d->tls->writeIncoming(a); } diff --git a/kopete/protocols/groupwise/libgroupwise/qcatlshandler.h b/kopete/protocols/groupwise/libgroupwise/qcatlshandler.h index a550d54b..e7ac398e 100644 --- a/kopete/protocols/groupwise/libgroupwise/qcatlshandler.h +++ b/kopete/protocols/groupwise/libgroupwise/qcatlshandler.h @@ -20,7 +20,7 @@ #ifndef GWQCATLSHANDLER_H #define GWQCATLSHANDLER_H -//#include <qtimer.h> +//#include <tqtimer.h> #include "tlshandler.h" class QCA::TLS; @@ -36,9 +36,9 @@ public: int tlsError() const; void reset(); - void startClient(const QString &host); - void write(const QByteArray &a); - void writeIncoming(const QByteArray &a); + void startClient(const TQString &host); + void write(const TQByteArray &a); + void writeIncoming(const TQByteArray &a); signals: void tlsHandshaken(); diff --git a/kopete/protocols/groupwise/libgroupwise/request.cpp b/kopete/protocols/groupwise/libgroupwise/request.cpp index 508bf6a0..5a0782f5 100644 --- a/kopete/protocols/groupwise/libgroupwise/request.cpp +++ b/kopete/protocols/groupwise/libgroupwise/request.cpp @@ -17,7 +17,7 @@ #include "request.h" -Request::Request( const int transactionId, const QString &command ) +Request::Request( const int transactionId, const TQString &command ) : UserTransfer(transactionId), m_command( command ) { } @@ -26,7 +26,7 @@ Request::~Request() { } -QString Request::command() +TQString Request::command() { return m_command; } diff --git a/kopete/protocols/groupwise/libgroupwise/request.h b/kopete/protocols/groupwise/libgroupwise/request.h index 85a55e8a..21ef71f9 100644 --- a/kopete/protocols/groupwise/libgroupwise/request.h +++ b/kopete/protocols/groupwise/libgroupwise/request.h @@ -30,11 +30,11 @@ friend class RequestFactory; public: ~Request( ); - QString command(); + TQString command(); TransferType type() { return Transfer::RequestTransfer; } private: - Request( const int transactionId, const QString &command ); - QString m_command; + Request( const int transactionId, const TQString &command ); + TQString m_command; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/requestfactory.cpp b/kopete/protocols/groupwise/libgroupwise/requestfactory.cpp index 6387370f..2449f3fe 100644 --- a/kopete/protocols/groupwise/libgroupwise/requestfactory.cpp +++ b/kopete/protocols/groupwise/libgroupwise/requestfactory.cpp @@ -29,7 +29,7 @@ RequestFactory::~RequestFactory() { } -Request* RequestFactory::request( const QString &command ) +Request* RequestFactory::request( const TQString &command ) { return new Request( m_nextTransaction++, command ); } diff --git a/kopete/protocols/groupwise/libgroupwise/requestfactory.h b/kopete/protocols/groupwise/libgroupwise/requestfactory.h index e4ec073e..d2de78de 100644 --- a/kopete/protocols/groupwise/libgroupwise/requestfactory.h +++ b/kopete/protocols/groupwise/libgroupwise/requestfactory.h @@ -18,7 +18,7 @@ #ifndef REQUESTFACTORY_H #define REQUESTFACTORY_H -#include <qstring.h> +#include <tqstring.h> class Request; @@ -36,7 +36,7 @@ public: * The consumer is responsible for deleting this * TODO: Allow the user to provide the fields for the request in this call */ - Request * request( const QString &request); + Request * request( const TQString &request); private: int m_nextTransaction; }; diff --git a/kopete/protocols/groupwise/libgroupwise/response.cpp b/kopete/protocols/groupwise/libgroupwise/response.cpp index 837c7810..79d61a1e 100644 --- a/kopete/protocols/groupwise/libgroupwise/response.cpp +++ b/kopete/protocols/groupwise/libgroupwise/response.cpp @@ -14,7 +14,7 @@ * * ************************************************************************* */ -#include <qapplication.h> +#include <tqapplication.h> #include "response.h" diff --git a/kopete/protocols/groupwise/libgroupwise/responseprotocol.cpp b/kopete/protocols/groupwise/libgroupwise/responseprotocol.cpp index 6784fd15..48ee8b88 100644 --- a/kopete/protocols/groupwise/libgroupwise/responseprotocol.cpp +++ b/kopete/protocols/groupwise/libgroupwise/responseprotocol.cpp @@ -16,13 +16,13 @@ ************************************************************************* */ -#include <qbuffer.h> +#include <tqbuffer.h> #include "response.h" #include "responseprotocol.h" -ResponseProtocol::ResponseProtocol(QObject* parent, const char* name): InputProtocolBase(parent, name) +ResponseProtocol::ResponseProtocol(TQObject* parent, const char* name): InputProtocolBase(parent, name) { } @@ -31,15 +31,15 @@ ResponseProtocol::~ResponseProtocol() { } -Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes ) +Transfer * ResponseProtocol::parse( const TQByteArray & wire, uint & bytes ) { m_bytes = 0; m_collatingFields.clear(); - //m_din = new QDataStream( wire, IO_ReadOnly ); - QBuffer inBuf( wire ); + //m_din = new TQDataStream( wire, IO_ReadOnly ); + TQBuffer inBuf( wire ); inBuf.open( IO_ReadOnly); m_din.setDevice( &inBuf ); - m_din.setByteOrder( QDataStream::LittleEndian ); + m_din.setByteOrder( TQDataStream::LittleEndian ); // check that this begins with a HTTP (is a response) Q_UINT32 val; @@ -49,20 +49,20 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes ) Q_ASSERT( qstrncmp( (const char *)&val, "HTTP", strlen( "HTTP" ) ) == 0 ); // read rest of HTTP header and look for a 301 redirect. - QCString headerFirst; + TQCString headerFirst; if ( !readGroupWiseLine( headerFirst ) ) return 0; // pull out the HTTP return code int firstSpace = headerFirst.find( ' ' ); - QString rtnField = headerFirst.mid( firstSpace, headerFirst.find( ' ', firstSpace + 1 ) ); + TQString rtnField = headerFirst.mid( firstSpace, headerFirst.find( ' ', firstSpace + 1 ) ); bool ok = true; int rtnCode; int packetState = -1; rtnCode = rtnField.toInt( &ok ); debug( "CoreProtocol::readResponse() got HTTP return code " ); // read rest of header - QStringList headerRest; - QCString line; + TQStringList headerRest; + TQCString line; while ( line != "\r\n" ) { if ( !readGroupWiseLine( line ) ) @@ -71,7 +71,7 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes ) return 0; } headerRest.append( line ); - debug( QString( "- read header line - (%1) : %2" ).arg( line.length() ).arg( line.data() ) ); + debug( TQString( "- read header line - (%1) : %2" ).arg( line.length() ).arg( line.data() ) ); } debug( "ResponseProtocol::readResponse() header finished" ); // if it's a redirect, set flag @@ -85,14 +85,14 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes ) // other header processing ( 500! ) if ( ok && rtnCode == 500 ) { - debug( QString( "- server error %1" ).arg( rtnCode ) ); + debug( TQString( "- server error %1" ).arg( rtnCode ) ); packetState = ServerError; m_din.unsetDevice(); return 0; } if ( ok && rtnCode == 404 ) { - debug( QString( "- server error %1" ).arg( rtnCode ) ); + debug( TQString( "- server error %1" ).arg( rtnCode ) ); packetState = ServerError; m_din.unsetDevice(); return 0; @@ -123,7 +123,7 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes ) if ( sf ) { tId = sf->value().toInt(); - debug( QString( "ResponseProtocol::readResponse() - transaction ID is %1" ).arg( tId ) ); + debug( TQString( "ResponseProtocol::readResponse() - transaction ID is %1" ).arg( tId ) ); m_collatingFields.remove( it ); delete sf; } @@ -135,7 +135,7 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes ) if ( sf ) { resultCode = sf->value().toInt(); - debug( QString( "ResponseProtocol::readResponse() - result code is %1" ).arg( resultCode ) ); + debug( TQString( "ResponseProtocol::readResponse() - result code is %1" ).arg( resultCode ) ); m_collatingFields.remove( it ); delete sf; } @@ -143,7 +143,7 @@ Transfer * ResponseProtocol::parse( const QByteArray & wire, uint & bytes ) // append to inQueue if ( tId ) { - debug( QString( "ResponseProtocol::readResponse() - setting state Available, got %1 fields in base array" ).arg(m_collatingFields.count() ) ); + debug( TQString( "ResponseProtocol::readResponse() - setting state Available, got %1 fields in base array" ).arg(m_collatingFields.count() ) ); packetState = Available; bytes = m_bytes; m_din.unsetDevice(); @@ -169,7 +169,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list ) // if we find the beginning of a new nested list, push the current list onto m_collatingFields debug( "ResponseProtocol::readFields()" ); if ( fieldCount > 0 ) - debug( QString( "reading %1 fields" ).arg( fieldCount ) ); + debug( TQString( "reading %1 fields" ).arg( fieldCount ) ); Field::FieldList currentList; while ( fieldCount != 0 ) // prevents bad input data from ruining our day { @@ -177,7 +177,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list ) // read field Q_UINT8 type, method; Q_UINT32 val; - QCString tag; + TQCString tag; // read uint8 type if ( !okToProceed() ) { @@ -209,7 +209,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list ) return false; } - debug( QString( "- type: %1, method: %2, tag: %3," ).arg( type ).arg( method ).arg( tag.data() ) ); + debug( TQString( "- type: %1, method: %2, tag: %3," ).arg( type ).arg( method ).arg( tag.data() ) ); // if multivalue or array if ( type == NMFIELD_TYPE_MV || type == NMFIELD_TYPE_ARRAY ) { @@ -223,7 +223,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list ) m_bytes += sizeof( Q_UINT32 ); // create multifield - debug( QString( " multi field containing: %1" ).arg( val ) ); + debug( TQString( " multi field containing: %1" ).arg( val ) ); Field::MultiField* m = new Field::MultiField( tag, method, 0, type ); currentList.append( m ); if ( !readFields( val, ¤tList) ) @@ -237,7 +237,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list ) if ( type == NMFIELD_TYPE_UTF8 || type == NMFIELD_TYPE_DN ) { - QCString rawData; + TQCString rawData; if( !safeReadBytes( rawData, val ) ) { currentList.purge(); @@ -249,8 +249,8 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list ) break; } // convert to unicode - ignore the terminating NUL, because Qt<3.3.2 doesn't sanity check val. - QString fieldValue = QString::fromUtf8( rawData.data(), val - 1 ); - debug( QString( "- utf/dn single field: %1" ).arg( fieldValue ) ); + TQString fieldValue = TQString::fromUtf8( rawData.data(), val - 1 ); + debug( TQString( "- utf/dn single field: %1" ).arg( fieldValue ) ); // create singlefield Field::SingleField* s = new Field::SingleField( tag, method, 0, type, fieldValue ); currentList.append( s ); @@ -266,7 +266,7 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list ) } m_din >> val; m_bytes += sizeof( Q_UINT32 ); - debug( QString( "- numeric field: %1" ).arg( val ) ); + debug( TQString( "- numeric field: %1" ).arg( val ) ); Field::SingleField* s = new Field::SingleField( tag, method, 0, type, val ); currentList.append( s ); } @@ -293,9 +293,9 @@ bool ResponseProtocol::readFields( int fieldCount, Field::FieldList * list ) return true; } -bool ResponseProtocol::readGroupWiseLine( QCString & line ) +bool ResponseProtocol::readGroupWiseLine( TQCString & line ) { - line = QCString(); + line = TQCString(); while ( true ) { Q_UINT8 c; @@ -304,7 +304,7 @@ bool ResponseProtocol::readGroupWiseLine( QCString & line ) return false; m_din >> c; m_bytes++; - line += QChar(c); + line += TQChar(c); if ( c == '\n' ) break; } diff --git a/kopete/protocols/groupwise/libgroupwise/responseprotocol.h b/kopete/protocols/groupwise/libgroupwise/responseprotocol.h index 5957ad19..f64aee7d 100644 --- a/kopete/protocols/groupwise/libgroupwise/responseprotocol.h +++ b/kopete/protocols/groupwise/libgroupwise/responseprotocol.h @@ -43,7 +43,7 @@ public: */ enum PacketState { FieldsRead, ProtocolError }; - ResponseProtocol(QObject* parent, const char* name); + ResponseProtocol(TQObject* parent, const char* name); ~ResponseProtocol(); /** * Attempt to parse the supplied data into an @ref Response object. @@ -52,12 +52,12 @@ public: * @param bytes An integer used to return the number of bytes read. * @return A pointer to an Response object if successfull, otherwise 0. The caller is responsible for deleting this object. */ - Transfer * parse( const QByteArray &, uint & bytes ); + Transfer * parse( const TQByteArray &, uint & bytes ); protected: /** * read a line ending in \r\n, including the \r\n */ - bool readGroupWiseLine( QCString & ); + bool readGroupWiseLine( TQCString & ); /** * Read in a response */ @@ -68,7 +68,7 @@ protected: bool readFields( int fieldCount, Field::FieldList * list = 0 ); private: // fields from a packet being parsed, before it has been completely received - //QValueStack<Field::FieldList> m_collatingFields; + //TQValueStack<Field::FieldList> m_collatingFields; Field::FieldList m_collatingFields; int m_packetState; // represents the state of the parsing of the last incoming data received }; diff --git a/kopete/protocols/groupwise/libgroupwise/rtf.cc b/kopete/protocols/groupwise/libgroupwise/rtf.cc index 14a3005a..9a691ec9 100644 --- a/kopete/protocols/groupwise/libgroupwise/rtf.cc +++ b/kopete/protocols/groupwise/libgroupwise/rtf.cc @@ -1729,25 +1729,25 @@ void ParStyle::clearFormatting() // dir is not a formatting item. } -QString RTF2HTML::quoteString(const QString &_str, quoteMode mode) -{ - QString str = _str; - str.replace(QRegExp("&"), "&"); - str.replace(QRegExp("<"), "<"); - str.replace(QRegExp(">"), ">"); - str.replace(QRegExp("\""), """); - str.replace(QRegExp("\r"), ""); +TQString RTF2HTML::quoteString(const TQString &_str, quoteMode mode) +{ + TQString str = _str; + str.replace(TQRegExp("&"), "&"); + str.replace(TQRegExp("<"), "<"); + str.replace(TQRegExp(">"), ">"); + str.replace(TQRegExp("\""), """); + str.replace(TQRegExp("\r"), ""); switch (mode){ case quoteHTML: - str.replace(QRegExp("\n"), "<br>\n"); + str.replace(TQRegExp("\n"), "<br>\n"); break; case quoteXML: - str.replace(QRegExp("\n"), "<br/>\n"); + str.replace(TQRegExp("\n"), "<br/>\n"); break; default: break; } - QRegExp re(" +"); + TQRegExp re(" +"); int len; int pos = 0; @@ -1756,7 +1756,7 @@ QString RTF2HTML::quoteString(const QString &_str, quoteMode mode) if (len == 1) continue; - QString s = " "; + TQString s = " "; for (int i = 1; i < len; i++) s += " "; str.replace(pos, len, s); @@ -1792,7 +1792,7 @@ void RTF2HTML::FlushOutTags() // RTF colors are 1-based; colors[] is a 0-based array. if (t.param > colors.size() || t.param == 0) break; - QColor &c = colors[t.param-1]; + TQColor &c = colors[t.param-1]; PrintUnquoted("<span style=\"color:#%02X%02X%02X\">", c.red(), c.green(), c.blue()); } break; @@ -1811,7 +1811,7 @@ void RTF2HTML::FlushOutTags() case TAG_BG_COLOR:{ if (t.param > colors.size() || t.param == 0) break; - QColor &c = colors[t.param-1]; + TQColor &c = colors[t.param-1]; PrintUnquoted("<span style=\"background-color:#%02X%02X%02X;\">", c.red(), c.green(), c.blue()); break; } @@ -1982,7 +1982,7 @@ void RTF2HTML::PrintUnquoted(const char *str, ...) sParagraph += buff; } -void RTF2HTML::PrintQuoted(const QString &str) +void RTF2HTML::PrintQuoted(const TQString &str) { sParagraph += quoteString(str); } @@ -2214,7 +2214,7 @@ void Level::reset() resetTag(TAG_ALL); if (m_bColors){ if (m_bColorInit){ - QColor c(m_nRed, m_nGreen, m_nBlue); + TQColor c(m_nRed, m_nGreen, m_nBlue); p->colors.push_back(c); resetColors(); } @@ -2285,7 +2285,7 @@ void Level::flush() if (encoding == NULL) encoding = p->encoding; - QTextCodec *codec = ICQClient::_getCodec(encoding); + TQTextCodec *codec = ICQClient::_getCodec(encoding); */ //p->PrintQuoted(codec->toUnicode(text.c_str(), text.length())); p->PrintQuoted(text.c_str()); @@ -2349,7 +2349,7 @@ static char h2d(char c) return 0; } -QString RTF2HTML::Parse(const char *rtf, const char *_encoding) +TQString RTF2HTML::Parse(const char *rtf, const char *_encoding) { encoding = _encoding; YY_BUFFER_STATE yy_current_buffer = rtf_scan_string(rtf); @@ -2417,7 +2417,7 @@ QString RTF2HTML::Parse(const char *rtf, const char *_encoding) break; case UNICODE_CHAR:{ cur_level.flush(); - sParagraph += QChar((unsigned short)(atol(rtftext + 2))); + sParagraph += TQChar((unsigned short)(atol(rtftext + 2))); break; } case HEX:{ @@ -2516,7 +2516,7 @@ QString RTF2HTML::Parse(const char *rtf, const char *_encoding) } /* -bool ICQClient::parseRTF(const char *rtf, const char *encoding, QString &res) +bool ICQClient::parseRTF(const char *rtf, const char *encoding, TQString &res) { char _RTF[] = "{\\rtf"; if ((strlen(rtf) > strlen(_RTF)) && !memcmp(rtf, _RTF, strlen(_RTF))){ @@ -2524,7 +2524,7 @@ bool ICQClient::parseRTF(const char *rtf, const char *encoding, QString &res) res = p.Parse(rtf, encoding); return true; } - QTextCodec *codec = ICQClient::_getCodec(encoding); + TQTextCodec *codec = ICQClient::_getCodec(encoding); res = codec->toUnicode(rtf, strlen(rtf)); return false; } diff --git a/kopete/protocols/groupwise/libgroupwise/rtf2html.h b/kopete/protocols/groupwise/libgroupwise/rtf2html.h index a305b89d..5685e4a1 100644 --- a/kopete/protocols/groupwise/libgroupwise/rtf2html.h +++ b/kopete/protocols/groupwise/libgroupwise/rtf2html.h @@ -18,12 +18,12 @@ #ifndef RTF2HTML_H #define RTF2HTML_H -#include <qstring.h> +#include <tqstring.h> #include <stdio.h> -#include <qtextcodec.h> -#include <qcolor.h> -#include <qregexp.h> +#include <tqtextcodec.h> +#include <tqcolor.h> +#include <tqregexp.h> #include <kdebug.h> #include <vector> @@ -149,15 +149,15 @@ class RTF2HTML public: RTF2HTML(); - QString Parse(const char *rtf, const char *encoding); + TQString Parse(const char *rtf, const char *encoding); // Paragraph-specific functions: - QString quoteString(const QString &_str, quoteMode mode = quoteHTML); + TQString quoteString(const TQString &_str, quoteMode mode = quoteHTML); // Appends a string with formatting into the paragraph buffer. void PrintUnquoted(const char *str, ...); // Quotes and appends a string to the paragraph buffer. - void PrintQuoted(const QString &str); + void PrintQuoted(const TQString &str); // Writes down the tags from oTags into the paragraph buffer. void FlushOutTags(); // Retrieves the top not-yet-written tag. @@ -179,7 +179,7 @@ protected: // True if the paragraph was opened explicitly. bool bExplicitParagraph; // The paragraph's HTML buffer. - QString sParagraph; + TQString sParagraph; // Defines the paragraph's formatting. ParStyle parStyle; // Tags which weren't yet printed out. @@ -188,11 +188,11 @@ protected: // Document members // The document HTML buffer. - QString s; + TQString s; // Fonts table. vector<FontDef> fonts; // Colors table. - vector<QColor> colors; + vector<TQColor> colors; // Stack of tags (across all levels, not just current level) stack<TagEnum> tags; diff --git a/kopete/protocols/groupwise/libgroupwise/safedelete.cpp b/kopete/protocols/groupwise/libgroupwise/safedelete.cpp index 703e8ed3..5dde3725 100644 --- a/kopete/protocols/groupwise/libgroupwise/safedelete.cpp +++ b/kopete/protocols/groupwise/libgroupwise/safedelete.cpp @@ -19,7 +19,7 @@ #include "safedelete.h" -#include <qtimer.h> +#include <tqtimer.h> //---------------------------------------------------------------------------- // SafeDelete @@ -35,7 +35,7 @@ SafeDelete::~SafeDelete() lock->dying(); } -void SafeDelete::deleteLater(QObject *o) +void SafeDelete::deleteLater(TQObject *o) { if(!lock) deleteSingle(o); @@ -54,16 +54,16 @@ void SafeDelete::deleteAll() if(list.isEmpty()) return; - QObjectListIt it(list); - for(QObject *o; (o = it.current()); ++it) + TQObjectListIt it(list); + for(TQObject *o; (o = it.current()); ++it) deleteSingle(o); list.clear(); } -void SafeDelete::deleteSingle(QObject *o) +void SafeDelete::deleteSingle(TQObject *o) { #if QT_VERSION < 0x030000 - // roll our own QObject::deleteLater() + // roll our own TQObject::deleteLater() SafeDeleteLater *sdl = SafeDeleteLater::ensureExists(); sdl->deleteItLater(o); #else @@ -116,7 +116,7 @@ SafeDeleteLater::SafeDeleteLater() { list.setAutoDelete(true); self = this; - QTimer::singleShot(0, this, SLOT(explode())); + TQTimer::singleShot(0, this, TQT_SLOT(explode())); } SafeDeleteLater::~SafeDeleteLater() @@ -125,7 +125,7 @@ SafeDeleteLater::~SafeDeleteLater() self = 0; } -void SafeDeleteLater::deleteItLater(QObject *o) +void SafeDeleteLater::deleteItLater(TQObject *o) { list.append(o); } diff --git a/kopete/protocols/groupwise/libgroupwise/safedelete.h b/kopete/protocols/groupwise/libgroupwise/safedelete.h index e8215c06..0d4150d9 100644 --- a/kopete/protocols/groupwise/libgroupwise/safedelete.h +++ b/kopete/protocols/groupwise/libgroupwise/safedelete.h @@ -20,8 +20,8 @@ #ifndef SAFEDELETE_H #define SAFEDELETE_H -#include<qobject.h> -#include<qobjectlist.h> +#include<tqobject.h> +#include<tqobjectlist.h> class SafeDelete; class SafeDeleteLock @@ -43,13 +43,13 @@ public: SafeDelete(); ~SafeDelete(); - void deleteLater(QObject *o); + void deleteLater(TQObject *o); - // same as QObject::deleteLater() - static void deleteSingle(QObject *o); + // same as TQObject::deleteLater() + static void deleteSingle(TQObject *o); private: - QObjectList list; + TQObjectList list; void deleteAll(); friend class SafeDeleteLock; @@ -62,7 +62,7 @@ class SafeDeleteLater : public QObject Q_OBJECT public: static SafeDeleteLater *ensureExists(); - void deleteItLater(QObject *o); + void deleteItLater(TQObject *o); private slots: void explode(); @@ -71,7 +71,7 @@ private: SafeDeleteLater(); ~SafeDeleteLater(); - QObjectList list; + TQObjectList list; friend class SafeDelete; static SafeDeleteLater *self; }; diff --git a/kopete/protocols/groupwise/libgroupwise/securestream.cpp b/kopete/protocols/groupwise/libgroupwise/securestream.cpp index 583be03e..6898c18e 100644 --- a/kopete/protocols/groupwise/libgroupwise/securestream.cpp +++ b/kopete/protocols/groupwise/libgroupwise/securestream.cpp @@ -26,9 +26,9 @@ but future layers might not. */ -#include<qguardedptr.h> -#include<qvaluelist.h> -#include<qtimer.h> +#include<tqguardedptr.h> +#include<tqvaluelist.h> +#include<tqtimer.h> #include"securestream.h" @@ -66,7 +66,7 @@ void LayerTracker::specifyEncoded(int encoded, int plain) int LayerTracker::finished(int encoded) { int plain = 0; - for(QValueList<Item>::Iterator it = list.begin(); it != list.end();) { + for(TQValueList<Item>::Iterator it = list.begin(); it != list.end();) { Item &i = *it; // not enough? @@ -91,11 +91,11 @@ SecureLayer::SecureLayer(QCA::TLS *t) type = TLS; p.tls = t; init(); - connect(p.tls, SIGNAL(handshaken()), SLOT(tls_handshaken())); - connect(p.tls, SIGNAL(readyRead()), SLOT(tls_readyRead())); - connect(p.tls, SIGNAL(readyReadOutgoing(int)), SLOT(tls_readyReadOutgoing(int))); - connect(p.tls, SIGNAL(closed()), SLOT(tls_closed())); - connect(p.tls, SIGNAL(error(int)), SLOT(tls_error(int))); + connect(p.tls, TQT_SIGNAL(handshaken()), TQT_SLOT(tls_handshaken())); + connect(p.tls, TQT_SIGNAL(readyRead()), TQT_SLOT(tls_readyRead())); + connect(p.tls, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(tls_readyReadOutgoing(int))); + connect(p.tls, TQT_SIGNAL(closed()), TQT_SLOT(tls_closed())); + connect(p.tls, TQT_SIGNAL(error(int)), TQT_SLOT(tls_error(int))); } SecureLayer::SecureLayer(QCA::SASL *s) @@ -103,9 +103,9 @@ SecureLayer::SecureLayer(QCA::SASL *s) type = SASL; p.sasl = s; init(); - connect(p.sasl, SIGNAL(readyRead()), SLOT(sasl_readyRead())); - connect(p.sasl, SIGNAL(readyReadOutgoing(int)), SLOT(sasl_readyReadOutgoing(int))); - connect(p.sasl, SIGNAL(error(int)), SLOT(sasl_error(int))); + connect(p.sasl, TQT_SIGNAL(readyRead()), TQT_SLOT(sasl_readyRead())); + connect(p.sasl, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(sasl_readyReadOutgoing(int))); + connect(p.sasl, TQT_SIGNAL(error(int)), TQT_SLOT(sasl_error(int))); } #ifdef USE_TLSHANDLER @@ -114,11 +114,11 @@ SecureLayer::SecureLayer(TLSHandler *t) type = TLSH; p.tlsHandler = t; init(); - connect(p.tlsHandler, SIGNAL(success()), SLOT(tlsHandler_success())); - connect(p.tlsHandler, SIGNAL(fail()), SLOT(tlsHandler_fail())); - connect(p.tlsHandler, SIGNAL(closed()), SLOT(tlsHandler_closed())); - connect(p.tlsHandler, SIGNAL(readyRead(const QByteArray &)), SLOT(tlsHandler_readyRead(const QByteArray &))); - connect(p.tlsHandler, SIGNAL(readyReadOutgoing(const QByteArray &, int)), SLOT(tlsHandler_readyReadOutgoing(const QByteArray &, int))); + connect(p.tlsHandler, TQT_SIGNAL(success()), TQT_SLOT(tlsHandler_success())); + connect(p.tlsHandler, TQT_SIGNAL(fail()), TQT_SLOT(tlsHandler_fail())); + connect(p.tlsHandler, TQT_SIGNAL(closed()), TQT_SLOT(tlsHandler_closed())); + connect(p.tlsHandler, TQT_SIGNAL(readyRead(const TQByteArray &)), TQT_SLOT(tlsHandler_readyRead(const TQByteArray &))); + connect(p.tlsHandler, TQT_SIGNAL(readyReadOutgoing(const TQByteArray &, int)), TQT_SLOT(tlsHandler_readyReadOutgoing(const TQByteArray &, int))); } #endif @@ -128,7 +128,7 @@ void SecureLayer::init() prebytes = 0; } -void SecureLayer::write(const QByteArray &a) +void SecureLayer::write(const TQByteArray &a) { layer.addPlain(a.size()); switch(type) { @@ -140,7 +140,7 @@ void SecureLayer::write(const QByteArray &a) } } -void SecureLayer::writeIncoming(const QByteArray &a) +void SecureLayer::writeIncoming(const TQByteArray &a) { switch(type) { case TLS: { p.tls->writeIncoming(a); break; } @@ -184,13 +184,13 @@ void SecureLayer::tls_handshaken() void SecureLayer::tls_readyRead() { - QByteArray a = p.tls->read(); + TQByteArray a = p.tls->read(); readyRead(a); } void SecureLayer::tls_readyReadOutgoing(int plainBytes) { - QByteArray a = p.tls->readOutgoing(); + TQByteArray a = p.tls->readOutgoing(); if(tls_done) layer.specifyEncoded(a.size(), plainBytes); needWrite(a); @@ -198,7 +198,7 @@ void SecureLayer::tls_readyReadOutgoing(int plainBytes) void SecureLayer::tls_closed() { - QByteArray a = p.tls->readUnprocessed(); + TQByteArray a = p.tls->readUnprocessed(); tlsClosed(a); } @@ -209,13 +209,13 @@ void SecureLayer::tls_error(int x) void SecureLayer::sasl_readyRead() { - QByteArray a = p.sasl->read(); + TQByteArray a = p.sasl->read(); readyRead(a); } void SecureLayer::sasl_readyReadOutgoing(int plainBytes) { - QByteArray a = p.sasl->readOutgoing(); + TQByteArray a = p.sasl->readOutgoing(); layer.specifyEncoded(a.size(), plainBytes); needWrite(a); } @@ -239,15 +239,15 @@ void SecureLayer::tlsHandler_fail() void SecureLayer::tlsHandler_closed() { - tlsClosed(QByteArray()); + tlsClosed(TQByteArray()); } -void SecureLayer::tlsHandler_readyRead(const QByteArray &a) +void SecureLayer::tlsHandler_readyRead(const TQByteArray &a) { readyRead(a); } -void SecureLayer::tlsHandler_readyReadOutgoing(const QByteArray &a, int plainBytes) +void SecureLayer::tlsHandler_readyReadOutgoing(const TQByteArray &a, int plainBytes) { if(tls_done) layer.specifyEncoded(a.size(), plainBytes); @@ -259,7 +259,7 @@ class SecureStream::Private { public: ByteStream *bs; - QPtrList<SecureLayer> layers; + TQPtrList<SecureLayer> layers; int pending; int errorCode; bool active; @@ -267,7 +267,7 @@ public: bool haveTLS() const { - QPtrListIterator<SecureLayer> it(layers); + TQPtrListIterator<SecureLayer> it(layers); for(SecureLayer *s; (s = it.current()); ++it) { if(s->type == SecureLayer::TLS #ifdef USE_TLSHANDLER @@ -282,7 +282,7 @@ public: bool haveSASL() const { - QPtrListIterator<SecureLayer> it(layers); + TQPtrListIterator<SecureLayer> it(layers); for(SecureLayer *s; (s = it.current()); ++it) { if(s->type == SecureLayer::SASL) return true; @@ -297,8 +297,8 @@ SecureStream::SecureStream(ByteStream *s) d = new Private; d->bs = s; - connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead())); - connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int))); + connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead())); + connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int))); d->layers.setAutoDelete(true); d->pending = 0; @@ -311,25 +311,25 @@ SecureStream::~SecureStream() delete d; } -void SecureStream::linkLayer(QObject *s) +void SecureStream::linkLayer(TQObject *s) { - connect(s, SIGNAL(tlsHandshaken()), SLOT(layer_tlsHandshaken())); - connect(s, SIGNAL(tlsClosed(const QByteArray &)), SLOT(layer_tlsClosed(const QByteArray &))); - connect(s, SIGNAL(readyRead(const QByteArray &)), SLOT(layer_readyRead(const QByteArray &))); - connect(s, SIGNAL(needWrite(const QByteArray &)), SLOT(layer_needWrite(const QByteArray &))); - connect(s, SIGNAL(error(int)), SLOT(layer_error(int))); + connect(s, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(layer_tlsHandshaken())); + connect(s, TQT_SIGNAL(tlsClosed(const TQByteArray &)), TQT_SLOT(layer_tlsClosed(const TQByteArray &))); + connect(s, TQT_SIGNAL(readyRead(const TQByteArray &)), TQT_SLOT(layer_readyRead(const TQByteArray &))); + connect(s, TQT_SIGNAL(needWrite(const TQByteArray &)), TQT_SLOT(layer_needWrite(const TQByteArray &))); + connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(layer_error(int))); } int SecureStream::calcPrebytes() const { int x = 0; - QPtrListIterator<SecureLayer> it(d->layers); + TQPtrListIterator<SecureLayer> it(d->layers); for(SecureLayer *s; (s = it.current()); ++it) x += s->prebytes; return (d->pending - x); } -void SecureStream::startTLSClient(QCA::TLS *t, const QByteArray &spare) +void SecureStream::startTLSClient(QCA::TLS *t, const TQByteArray &spare) { if(!d->active || d->topInProgress || d->haveTLS()) return; @@ -343,7 +343,7 @@ void SecureStream::startTLSClient(QCA::TLS *t, const QByteArray &spare) insertData(spare); } -void SecureStream::startTLSServer(QCA::TLS *t, const QByteArray &spare) +void SecureStream::startTLSServer(QCA::TLS *t, const TQByteArray &spare) { if(!d->active || d->topInProgress || d->haveTLS()) return; @@ -357,7 +357,7 @@ void SecureStream::startTLSServer(QCA::TLS *t, const QByteArray &spare) insertData(spare); } -void SecureStream::setLayerSASL(QCA::SASL *sasl, const QByteArray &spare) +void SecureStream::setLayerSASL(QCA::SASL *sasl, const TQByteArray &spare) { if(!d->active || d->topInProgress || d->haveSASL()) return; @@ -371,7 +371,7 @@ void SecureStream::setLayerSASL(QCA::SASL *sasl, const QByteArray &spare) } #ifdef USE_TLSHANDLER -void SecureStream::startTLSClient(TLSHandler *t, const QString &server, const QByteArray &spare) +void SecureStream::startTLSClient(TLSHandler *t, const TQString &server, const TQByteArray &spare) { if(!d->active || d->topInProgress || d->haveTLS()) return; @@ -408,7 +408,7 @@ bool SecureStream::isOpen() const return d->active; } -void SecureStream::write(const QByteArray &a) +void SecureStream::write(const TQByteArray &a) { if(!isOpen()) return; @@ -430,7 +430,7 @@ int SecureStream::bytesToWrite() const void SecureStream::bs_readyRead() { - QByteArray a = d->bs->read(); + TQByteArray a = d->bs->read(); // send to the first layer SecureLayer *s = d->layers.getFirst(); @@ -442,7 +442,7 @@ void SecureStream::bs_readyRead() void SecureStream::bs_bytesWritten(int bytes) { - QPtrListIterator<SecureLayer> it(d->layers); + TQPtrListIterator<SecureLayer> it(d->layers); for(SecureLayer *s; (s = it.current()); ++it) bytes = s->finished(bytes); @@ -458,17 +458,17 @@ void SecureStream::layer_tlsHandshaken() tlsHandshaken(); } -void SecureStream::layer_tlsClosed(const QByteArray &) +void SecureStream::layer_tlsClosed(const TQByteArray &) { d->active = false; d->layers.clear(); tlsClosed(); } -void SecureStream::layer_readyRead(const QByteArray &a) +void SecureStream::layer_readyRead(const TQByteArray &a) { SecureLayer *s = (SecureLayer *)sender(); - QPtrListIterator<SecureLayer> it(d->layers); + TQPtrListIterator<SecureLayer> it(d->layers); while(it.current() != s) ++it; @@ -481,10 +481,10 @@ void SecureStream::layer_readyRead(const QByteArray &a) incomingData(a); } -void SecureStream::layer_needWrite(const QByteArray &a) +void SecureStream::layer_needWrite(const TQByteArray &a) { SecureLayer *s = (SecureLayer *)sender(); - QPtrListIterator<SecureLayer> it(d->layers); + TQPtrListIterator<SecureLayer> it(d->layers); while(it.current() != s) ++it; @@ -514,7 +514,7 @@ void SecureStream::layer_error(int x) #endif } -void SecureStream::insertData(const QByteArray &a) +void SecureStream::insertData(const TQByteArray &a) { if(!a.isEmpty()) { SecureLayer *s = d->layers.getLast(); @@ -525,12 +525,12 @@ void SecureStream::insertData(const QByteArray &a) } } -void SecureStream::writeRawData(const QByteArray &a) +void SecureStream::writeRawData(const TQByteArray &a) { d->bs->write(a); } -void SecureStream::incomingData(const QByteArray &a) +void SecureStream::incomingData(const TQByteArray &a) { appendRead(a); //qDebug( "SecureStream::incomingData() got %i bytes ", a.size() ); diff --git a/kopete/protocols/groupwise/libgroupwise/securestream.h b/kopete/protocols/groupwise/libgroupwise/securestream.h index 36999b14..82752cea 100644 --- a/kopete/protocols/groupwise/libgroupwise/securestream.h +++ b/kopete/protocols/groupwise/libgroupwise/securestream.h @@ -39,11 +39,11 @@ public: SecureStream(ByteStream *s); ~SecureStream(); - void startTLSClient(QCA::TLS *t, const QByteArray &spare=QByteArray()); - void startTLSServer(QCA::TLS *t, const QByteArray &spare=QByteArray()); - void setLayerSASL(QCA::SASL *s, const QByteArray &spare=QByteArray()); + void startTLSClient(QCA::TLS *t, const TQByteArray &spare=TQByteArray()); + void startTLSServer(QCA::TLS *t, const TQByteArray &spare=TQByteArray()); + void setLayerSASL(QCA::SASL *s, const TQByteArray &spare=TQByteArray()); #ifdef USE_TLSHANDLER - void startTLSClient(TLSHandler *t, const QString &server, const QByteArray &spare=QByteArray()); + void startTLSClient(TLSHandler *t, const TQString &server, const TQByteArray &spare=TQByteArray()); #endif void closeTLS(); @@ -51,7 +51,7 @@ public: // reimplemented bool isOpen() const; - void write(const QByteArray &); + void write(const TQByteArray &); int bytesToWrite() const; signals: @@ -63,17 +63,17 @@ private slots: void bs_bytesWritten(int); void layer_tlsHandshaken(); - void layer_tlsClosed(const QByteArray &); - void layer_readyRead(const QByteArray &); - void layer_needWrite(const QByteArray &); + void layer_tlsClosed(const TQByteArray &); + void layer_readyRead(const TQByteArray &); + void layer_needWrite(const TQByteArray &); void layer_error(int); private: - void linkLayer(QObject *); + void linkLayer(TQObject *); int calcPrebytes() const; - void insertData(const QByteArray &a); - void writeRawData(const QByteArray &a); - void incomingData(const QByteArray &a); + void insertData(const TQByteArray &a); + void writeRawData(const TQByteArray &a); + void incomingData(const TQByteArray &a); class Private; Private *d; @@ -96,7 +96,7 @@ USE_TLSHANDLER int finished(int encoded); int p; - QValueList<Item> list; + TQValueList<Item> list; }; @@ -110,8 +110,8 @@ public: SecureLayer(TLSHandler *t); #endif void init(); - void write(const QByteArray &a); - void writeIncoming(const QByteArray &a); + void write(const TQByteArray &a); + void writeIncoming(const TQByteArray &a); int finished(int plain); enum { TLS, SASL, TLSH }; @@ -129,9 +129,9 @@ public: signals: void tlsHandshaken(); - void tlsClosed(const QByteArray &); - void readyRead(const QByteArray &); - void needWrite(const QByteArray &); + void tlsClosed(const TQByteArray &); + void readyRead(const TQByteArray &); + void needWrite(const TQByteArray &); void error(int); private slots: @@ -147,8 +147,8 @@ private slots: void tlsHandler_success(); void tlsHandler_fail(); void tlsHandler_closed(); - void tlsHandler_readyRead(const QByteArray &a); - void tlsHandler_readyReadOutgoing(const QByteArray &a, int plainBytes); + void tlsHandler_readyRead(const TQByteArray &a); + void tlsHandler_readyReadOutgoing(const TQByteArray &a, int plainBytes); #endif }; diff --git a/kopete/protocols/groupwise/libgroupwise/stream.cpp b/kopete/protocols/groupwise/libgroupwise/stream.cpp index 5817f4c3..d3410578 100644 --- a/kopete/protocols/groupwise/libgroupwise/stream.cpp +++ b/kopete/protocols/groupwise/libgroupwise/stream.cpp @@ -19,8 +19,8 @@ #include "stream.h" -Stream::Stream(QObject *parent) -:QObject(parent) +Stream::Stream(TQObject *parent) +:TQObject(parent) { } diff --git a/kopete/protocols/groupwise/libgroupwise/stream.h b/kopete/protocols/groupwise/libgroupwise/stream.h index 37a63652..c06649fd 100644 --- a/kopete/protocols/groupwise/libgroupwise/stream.h +++ b/kopete/protocols/groupwise/libgroupwise/stream.h @@ -17,8 +17,8 @@ ************************************************************************* */ -#include <qdom.h> -#include "qobject.h" +#include <tqdom.h> +#include "tqobject.h" #include "gwerror.h" #include "gwfield.h" @@ -45,13 +45,13 @@ public: SystemShutdown }; - Stream(QObject *parent=0); + Stream(TQObject *parent=0); virtual ~Stream(); virtual void close()=0; virtual int errorCondition() const=0; - virtual QString errorText() const=0; - //virtual QDomElement errorAppSpec() const=0; + virtual TQString errorText() const=0; + //virtual TQDomElement errorAppSpec() const=0; /** * Are there any messages waiting to be read @@ -71,15 +71,15 @@ public: // # virtual Stanza read()=0; // # virtual void write(const Stanza &s)=0; -// # virtual QDomDocument & doc() const=0; -// # virtual QString baseNS() const=0; +// # virtual TQDomDocument & doc() const=0; +// # virtual TQString baseNS() const=0; // # virtual bool old() const=0; -// # Stanza createStanza(Stanza::Kind k, const Jid &to="", const QString &type="", const QString &id=""); -// # Stanza createStanza(const QDomElement &e); +// # Stanza createStanza(Stanza::Kind k, const Jid &to="", const TQString &type="", const TQString &id=""); +// # Stanza createStanza(const TQDomElement &e); -// static QString xmlToString(const static XmlProtocol *foo = 0; -//QDomElement &e, bool clip=false); +// static TQString xmlToString(const static XmlProtocol *foo = 0; +//TQDomElement &e, bool clip=false); signals: void connectionClosed(); diff --git a/kopete/protocols/groupwise/libgroupwise/task.cpp b/kopete/protocols/groupwise/libgroupwise/task.cpp index 786bf36b..96259254 100644 --- a/kopete/protocols/groupwise/libgroupwise/task.cpp +++ b/kopete/protocols/groupwise/libgroupwise/task.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include <qtimer.h> +#include <tqtimer.h> #include "client.h" #include "gwfield.h" @@ -31,10 +31,10 @@ class Task::TaskPrivate public: TaskPrivate() {} - QString id; + TQString id; bool success; int statusCode; - QString statusString; + TQString statusString; Client *client; bool insignificant, deleteme, autoDelete; bool done; @@ -42,22 +42,22 @@ public: }; Task::Task(Task *parent) -:QObject(parent) +:TQObject(parent) { init(); d->transfer = 0; d->client = parent->client(); d->id = client()->genUniqueId(); - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::Task(Client *parent, bool) -:QObject(0) +:TQObject(0) { init(); d->client = parent; - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::~Task() @@ -79,7 +79,7 @@ void Task::init() Task *Task::parent() const { - return (Task *)QObject::parent(); + return (Task *)TQObject::parent(); } Client *Task::client() const @@ -97,7 +97,7 @@ void Task::setTransfer( Transfer * transfer ) d->transfer = transfer; } -QString Task::id() const +TQString Task::id() const { return d->id; } @@ -112,7 +112,7 @@ int Task::statusCode() const return d->statusCode; } -const QString & Task::statusString() const +const TQString & Task::statusString() const { return d->statusString; } @@ -126,15 +126,15 @@ void Task::go(bool autoDelete) bool Task::take( Transfer * transfer) { - const QObjectList *p = children(); + const TQObjectList *p = children(); if(!p) return false; // pass along the transfer to our children - QObjectListIt it(*p); + TQObjectListIt it(*p); Task *t; for(; it.current(); ++it) { - QObject *obj = it.current(); + TQObject *obj = it.current(); if(!obj->inherits("Task")) continue; @@ -142,7 +142,7 @@ bool Task::take( Transfer * transfer) if(t->take( transfer )) { - client()->debug( QString( "Transfer ACCEPTED by: %1" ).arg( t->className() ) ); + client()->debug( TQString( "Transfer ACCEPTED by: %1" ).arg( t->className() ) ); return true; } } @@ -173,7 +173,7 @@ void Task::onDisconnect() d->statusString = tr("Disconnected"); // delay this so that tasks that react don't block the shutdown - QTimer::singleShot(0, this, SLOT(done())); + TQTimer::singleShot(0, this, TQT_SLOT(done())); } } @@ -182,7 +182,7 @@ void Task::send( Request * request ) client()->send( request ); } -void Task::setSuccess(int code, const QString &str) +void Task::setSuccess(int code, const TQString &str) { if(!d->done) { d->success = true; @@ -192,7 +192,7 @@ void Task::setSuccess(int code, const QString &str) } } -void Task::setError(int code, const QString &str) +void Task::setError(int code, const TQString &str) { if(!d->done) { d->success = false; @@ -232,7 +232,7 @@ void Task::clientDisconnected() // void Task::debug(const char *fmt, ...) // { // char *buf; -// QString str; +// TQString str; // int size = 1024; // int r; // @@ -244,7 +244,7 @@ void Task::clientDisconnected() // va_end(ap); // // if(r != -1) -// str = QString(buf); +// str = TQString(buf); // // delete [] buf; // @@ -254,9 +254,9 @@ void Task::clientDisconnected() // debug(str); // } -void Task::debug(const QString &str) +void Task::debug(const TQString &str) { - client()->debug(QString("%1: ").arg(className()) + str); + client()->debug(TQString("%1: ").arg(className()) + str); } bool Task::forMe( const Transfer * transfer ) const diff --git a/kopete/protocols/groupwise/libgroupwise/task.h b/kopete/protocols/groupwise/libgroupwise/task.h index 0a34cafa..b0b623d2 100644 --- a/kopete/protocols/groupwise/libgroupwise/task.h +++ b/kopete/protocols/groupwise/libgroupwise/task.h @@ -20,7 +20,7 @@ #ifndef GW_TASK_H #define GW_TASK_H -#include <qobject.h> +#include <tqobject.h> #include "gwerror.h" #include "gwfield.h" @@ -42,11 +42,11 @@ public: Client *client() const; Transfer *transfer() const; - QString id() const; + TQString id() const; bool success() const; int statusCode() const; - const QString & statusString() const; + const TQString & statusString() const; void go( bool autoDelete=false ); /** @@ -63,13 +63,13 @@ protected: virtual void onGo(); virtual void onDisconnect(); void send( Request * request ); - void setSuccess( int code=0, const QString &str="" ); + void setSuccess( int code=0, const TQString &str="" ); /** * If an empty string is passed, this sets the error string based on the error code using GroupWise::errorCodeToString */ - void setError( int code=0, const QString &str="" ); + void setError( int code=0, const TQString &str="" ); // void debug( const char *, ... ); - void debug( const QString & ); + void debug( const TQString & ); /** * Used in take() to check if the offered transfer is for this Task * @return true if this Task should take the Transfer. Default impl always returns false. @@ -78,7 +78,7 @@ protected: /** * Creates a transfer with the given command and field list */ - void createTransfer( const QString & command, const Field::FieldList fields ); + void createTransfer( const TQString & command, const Field::FieldList fields ); /** * Direct setter for Tasks which don't have any fields */ diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.cpp index 9e9837f7..fb028c44 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ -#include <qmap.h> +#include <tqmap.h> #include <kdebug.h> #include "gwfield.h" @@ -65,7 +65,7 @@ bool ChatCountsTask::take( Transfer * transfer ) { Field::MultiField * mf = static_cast<Field::MultiField *>( *it ); Field::FieldList chat = mf->fields(); - QString roomName; + TQString roomName; int participants; // read the supplied fields, set metadata and status. Field::SingleField * sf; @@ -79,7 +79,7 @@ bool ChatCountsTask::take( Transfer * transfer ) return true; } -QMap< QString, int > ChatCountsTask::results() +TQMap< TQString, int > ChatCountsTask::results() { return m_results; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.h b/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.h index c80a219a..6197352d 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/chatcountstask.h @@ -19,7 +19,7 @@ #ifndef CHATCOUNTSTASK_H #define CHATCOUNTSTASK_H -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "gwerror.h" #include "gwfield.h" @@ -41,9 +41,9 @@ class ChatCountsTask : public RequestTask /** * Contains a list of all the chatrooms that have participants on the server. If a chatroom exists but is empty, this task does not return a result, so update the participants count to 0. */ - QMap< QString, int > results(); + TQMap< TQString, int > results(); private: - QMap< QString, int > m_results; + TQMap< TQString, int > m_results; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.cpp index 66b2da42..7f60f3c5 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.cpp @@ -34,7 +34,7 @@ ChatPropertiesTask::~ChatPropertiesTask() { } -void ChatPropertiesTask::setChat( const QString &displayName ) +void ChatPropertiesTask::setChat( const TQString &displayName ) { Field::FieldList lst; m_chat = displayName; @@ -131,7 +131,7 @@ bool ChatPropertiesTask::take( Transfer * transfer ) return true; } -QValueList< ChatContact > ChatPropertiesTask::aclEntries() +TQValueList< ChatContact > ChatPropertiesTask::aclEntries() { return m_aclEntries; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.h b/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.h index c9f890dd..d52661f3 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/chatpropertiestask.h @@ -19,8 +19,8 @@ #ifndef CHATPROPERTIESTASK_H #define CHATPROPERTIESTASK_H -#include <qdatetime.h> -#include <qvaluelist.h> +#include <tqdatetime.h> +#include <tqvaluelist.h> #include "gwchatrooms.h" #include "gwerror.h" #include "gwfield.h" @@ -41,24 +41,24 @@ class ChatPropertiesTask : public RequestTask /** * Specify which chatroom to get properties for */ - void setChat( const QString & ); + void setChat( const TQString & ); bool take( Transfer * transfer ); /** * Contains a list of the ACL entries for the specified chatroom */ - QValueList< GroupWise::ChatContact > aclEntries(); - QString m_chat; - QString m_ownerDn; - QString m_description; - QString m_disclaimer; - QString m_query; - QString m_archive; - QString m_maxUsers; - QString m_topic; - QString m_creatorDn; - QDateTime m_creationTime; + TQValueList< GroupWise::ChatContact > aclEntries(); + TQString m_chat; + TQString m_ownerDn; + TQString m_description; + TQString m_disclaimer; + TQString m_query; + TQString m_archive; + TQString m_maxUsers; + TQString m_topic; + TQString m_creatorDn; + TQDateTime m_creationTime; uint m_rights; - QValueList< GroupWise::ChatContact > m_aclEntries; + TQValueList< GroupWise::ChatContact > m_aclEntries; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.cpp index 9773a622..c88e22b4 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.cpp @@ -42,8 +42,8 @@ ConferenceTask::ConferenceTask( Task* parent ) registerEvent( GroupWise::ReceivedSystemBroadcast ); // listen to the UserDetailsManager telling us that user details are available - connect( client()->userDetailsManager(), SIGNAL( gotContactDetails( const GroupWise::ContactDetails & ) ), - SLOT( slotReceiveUserDetails( const GroupWise::ContactDetails & ) ) ); + connect( client()->userDetailsManager(), TQT_SIGNAL( gotContactDetails( const GroupWise::ContactDetails & ) ), + TQT_SLOT( slotReceiveUserDetails( const GroupWise::ContactDetails & ) ) ); } @@ -53,10 +53,10 @@ ConferenceTask::~ConferenceTask() void ConferenceTask::dumpConferenceEvent( ConferenceEvent & evt ) { - client()->debug( QString( "Conference Event - guid: %1 user: %2 timestamp: %3:%4:%5" ).arg + client()->debug( TQString( "Conference Event - guid: %1 user: %2 timestamp: %3:%4:%5" ).arg ( evt.guid ).arg( evt.user.ascii() ).arg( evt.timeStamp.time().hour() ).arg ( evt.timeStamp.time().minute() ).arg( evt.timeStamp.time().second() ) ); - client()->debug( QString( " flags: %1" ).arg( evt.flags, 8 ) ); + client()->debug( TQString( " flags: %1" ).arg( evt.flags, 8 ) ); } bool ConferenceTask::take( Transfer * transfer ) @@ -103,7 +103,7 @@ bool ConferenceTask::take( Transfer * transfer ) Q_ASSERT( incomingEvent->hasMessage() ); event.message = incomingEvent->message(); client()->debug( "ReceiveMessage" ); - client()->debug( QString( "message: %1" ).arg( event.message ) ); + client()->debug( TQString( "message: %1" ).arg( event.message ) ); if ( !queueWhileAwaitingData( event ) ) emit message( event ); break; @@ -119,7 +119,7 @@ bool ConferenceTask::take( Transfer * transfer ) Q_ASSERT( incomingEvent->hasMessage() ); event.message = incomingEvent->message(); client()->debug( "ConferenceInvite" ); - client()->debug( QString( "message: %1" ).arg( event.message ) ); + client()->debug( TQString( "message: %1" ).arg( event.message ) ); if ( !queueWhileAwaitingData( event ) ) emit invited( event ); break; @@ -139,14 +139,14 @@ bool ConferenceTask::take( Transfer * transfer ) Q_ASSERT( incomingEvent->hasMessage() ); event.message = incomingEvent->message(); client()->debug( "ReceiveAutoReply" ); - client()->debug( QString( "message: %1" ).arg( event.message.ascii() ) ); + client()->debug( TQString( "message: %1" ).arg( event.message.ascii() ) ); emit autoReply( event ); break; case GroupWise::ReceivedBroadcast: Q_ASSERT( incomingEvent->hasMessage() ); event.message = incomingEvent->message(); client()->debug( "ReceivedBroadCast" ); - client()->debug( QString( "message: %1" ).arg( event.message ) ); + client()->debug( TQString( "message: %1" ).arg( event.message ) ); if ( !queueWhileAwaitingData( event ) ) emit broadcast( event ); break; @@ -154,11 +154,11 @@ bool ConferenceTask::take( Transfer * transfer ) Q_ASSERT( incomingEvent->hasMessage() ); event.message = incomingEvent->message(); client()->debug( "ReceivedSystemBroadCast" ); - client()->debug( QString( "message: %1" ).arg( event.message ) ); + client()->debug( TQString( "message: %1" ).arg( event.message ) ); emit systemBroadcast( event ); break; default: - client()->debug( QString( "WARNING: didn't handle registered event %1, on conference %2" ).arg( incomingEvent->eventType() ).arg( event.guid.ascii() ) ); + client()->debug( TQString( "WARNING: didn't handle registered event %1, on conference %2" ).arg( incomingEvent->eventType() ).arg( event.guid.ascii() ) ); } dumpConferenceEvent( event ); @@ -172,16 +172,16 @@ void ConferenceTask::slotReceiveUserDetails( const GroupWise::ContactDetails & d client()->debug( "ConferenceTask::slotReceiveUserDetails()" ); // dequeue any events which are deliverable now we have these details - QValueListIterator< ConferenceEvent > end = m_pendingEvents.end(); - QValueListIterator< ConferenceEvent > it = m_pendingEvents.begin(); + TQValueListIterator< ConferenceEvent > end = m_pendingEvents.end(); + TQValueListIterator< ConferenceEvent > it = m_pendingEvents.begin(); while ( it != end ) { - QValueListIterator< ConferenceEvent > current = it; + TQValueListIterator< ConferenceEvent > current = it; ++it; // if the details relate to event, try again to handle it if ( details.dn == (*current).user ) { - client()->debug( QString( " - got details for event involving %1" ).arg( (*current).user ) ); + client()->debug( TQString( " - got details for event involving %1" ).arg( (*current).user ) ); switch ( (*current).type ) { case GroupWise::ConferenceJoined: @@ -204,7 +204,7 @@ void ConferenceTask::slotReceiveUserDetails( const GroupWise::ContactDetails & d client()->debug( "Queued an event while waiting for more data, but didn't write a handler for the dequeue!" ); } m_pendingEvents.remove( current ); - client()->debug( QString( "Event handled - now %1 pending events" ).arg + client()->debug( TQString( "Event handled - now %1 pending events" ).arg ( (uint)m_pendingEvents.count() ) ); } } @@ -220,7 +220,7 @@ bool ConferenceTask::queueWhileAwaitingData( const ConferenceEvent & event ) } else { - client()->debug( QString( "ConferenceTask::queueWhileAwaitingData() - queueing event involving %1" ).arg( event.user ) ); + client()->debug( TQString( "ConferenceTask::queueWhileAwaitingData() - queueing event involving %1" ).arg( event.user ) ); client()->userDetailsManager()->requestDetails( event.user ); m_pendingEvents.append( event ); return true; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.h index 42f4fc2b..7f35d08b 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/conferencetask.h @@ -57,8 +57,8 @@ signals: protected slots: void slotReceiveUserDetails( const GroupWise::ContactDetails & ); protected: - Q_UINT32 readFlags( QDataStream & din ); - QString readMessage( QDataStream & din ); + Q_UINT32 readFlags( TQDataStream & din ); + TQString readMessage( TQDataStream & din ); /** * Checks to see if we need more data from the client before we can propagate this event * and queues the event if so @@ -68,7 +68,7 @@ protected: void dumpConferenceEvent( ConferenceEvent & evt ); private: // A list of events which are waiting for more data from the server before they can be exposed to the client - QValueList< ConferenceEvent > m_pendingEvents; + TQValueList< ConferenceEvent > m_pendingEvents; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.cpp index 8be16888..01d2fa05 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.cpp @@ -33,7 +33,7 @@ CreateConferenceTask::~CreateConferenceTask() { } -void CreateConferenceTask::conference( const int confId, const QStringList &participants ) +void CreateConferenceTask::conference( const int confId, const TQStringList &participants ) { m_confId = confId; Field::FieldList lst, tmp; @@ -41,8 +41,8 @@ void CreateConferenceTask::conference( const int confId, const QStringList &part tmp.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, m_guid ) ); lst.append( new Field::MultiField( NM_A_FA_CONVERSATION, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY, tmp ) ); // series of participants (may be empty ) - QValueListConstIterator<QString> end = participants.end(); - for ( QValueListConstIterator<QString> it = participants.begin(); it != end; ++it ) + TQValueListConstIterator<TQString> end = participants.end(); + for ( TQValueListConstIterator<TQString> it = participants.begin(); it != end; ++it ) lst.append( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_DN, *it ) ); lst.append( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_DN, client()->userDN() ) ); createTransfer( "createconf", lst ); diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.h index 48d5702e..de66f734 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/createconferencetask.h @@ -39,7 +39,7 @@ public: * @param confId The client-unique conference Id. * @param participants A list of Novell DNs of the people taking part in the conference. */ - void conference( const int confId, const QStringList &participants ); + void conference( const int confId, const TQStringList &participants ); bool take( Transfer * transfer ); int clientConfId() const; GroupWise::ConferenceGuid conferenceGUID() const; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.cpp index 832b5900..d41db4a9 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.cpp @@ -24,19 +24,19 @@ CreateContactInstanceTask::CreateContactInstanceTask(Task* parent) : NeedFolderTask(parent) { // make the client tell the client app (Kopete) when we receive a contact - connect( this, SIGNAL( gotContactAdded( const ContactItem & ) ), client(), SIGNAL( contactReceived( const ContactItem & ) ) ); + connect( this, TQT_SIGNAL( gotContactAdded( const ContactItem & ) ), client(), TQT_SIGNAL( contactReceived( const ContactItem & ) ) ); } CreateContactInstanceTask::~CreateContactInstanceTask() { } -void CreateContactInstanceTask::contactFromUserId( const QString & userId, const QString & displayName, const int parentFolder ) +void CreateContactInstanceTask::contactFromUserId( const TQString & userId, const TQString & displayName, const int parentFolder ) { contact( new Field::SingleField( NM_A_SZ_USERID, 0, NMFIELD_TYPE_UTF8, userId ), displayName, parentFolder ); } -void CreateContactInstanceTask::contactFromUserIdAndFolder( const QString & userId, const QString & displayName, const int folderSequence, const QString & folderDisplayName ) +void CreateContactInstanceTask::contactFromUserIdAndFolder( const TQString & userId, const TQString & displayName, const int folderSequence, const TQString & folderDisplayName ) { // record the user details m_userId = userId; @@ -46,12 +46,12 @@ void CreateContactInstanceTask::contactFromUserIdAndFolder( const QString & user m_folderDisplayName = folderDisplayName; } -void CreateContactInstanceTask::contactFromDN( const QString & dn, const QString & displayName, const int parentFolder ) +void CreateContactInstanceTask::contactFromDN( const TQString & dn, const TQString & displayName, const int parentFolder ) { contact( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_UTF8, dn ), displayName, parentFolder ); } -void CreateContactInstanceTask::contactFromDNAndFolder( const QString & dn, const QString & displayName, const int folderSequence, const QString & folderDisplayName ) +void CreateContactInstanceTask::contactFromDNAndFolder( const TQString & dn, const TQString & displayName, const int folderSequence, const TQString & folderDisplayName ) { // record the user details m_dn = dn; @@ -61,10 +61,10 @@ void CreateContactInstanceTask::contactFromDNAndFolder( const QString & dn, cons m_folderDisplayName = folderDisplayName; } -void CreateContactInstanceTask::contact( Field::SingleField * id, const QString & displayName, const int parentFolder ) +void CreateContactInstanceTask::contact( Field::SingleField * id, const TQString & displayName, const int parentFolder ) { Field::FieldList lst; - lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( parentFolder ) ) ); + lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( parentFolder ) ) ); // this is either a user Id or a DN lst.append( id ); if ( displayName.isEmpty() ) // fallback so that the contact is created diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.h index d6be5933..6c960a4c 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/createcontactinstancetask.h @@ -37,18 +37,18 @@ public: /** * Sets up the request message. */ - void contactFromUserId( const QString & userId, const QString & displayName, const int parentFolder ); - void contactFromDN( const QString & dn, const QString & displayName, const int parentFolder ); - void contactFromUserIdAndFolder( const QString & userId, const QString & displayName, const int folderSequence, const QString & folderDisplayName ); - void contactFromDNAndFolder( const QString & dn, const QString & displayName, const int folderSequence, const QString & folderDisplayName ); + void contactFromUserId( const TQString & userId, const TQString & displayName, const int parentFolder ); + void contactFromDN( const TQString & dn, const TQString & displayName, const int parentFolder ); + void contactFromUserIdAndFolder( const TQString & userId, const TQString & displayName, const int folderSequence, const TQString & folderDisplayName ); + void contactFromDNAndFolder( const TQString & dn, const TQString & displayName, const int folderSequence, const TQString & folderDisplayName ); void onGo(); protected: - void contact( Field::SingleField * id, const QString & displayName, const int parentFolder ); + void contact( Field::SingleField * id, const TQString & displayName, const int parentFolder ); void onFolderCreated(); private: - QString m_userId; - QString m_dn; - QString m_displayName; + TQString m_userId; + TQString m_dn; + TQString m_displayName; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.cpp index aac16042..0d167236 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.cpp @@ -32,17 +32,17 @@ CreateContactTask::~CreateContactTask() { } -QString CreateContactTask::userId() +TQString CreateContactTask::userId() { return m_userId; } -QString CreateContactTask::dn() +TQString CreateContactTask::dn() { return m_dn; } -QString CreateContactTask::displayName() +TQString CreateContactTask::displayName() { return m_displayName; } @@ -53,7 +53,7 @@ bool CreateContactTask::take( Transfer * transfer ) return false; } -void CreateContactTask::contactFromUserId( const QString & userId, const QString & displayName, const int firstSeqNo, const QValueList< FolderItem > folders, bool topLevel ) +void CreateContactTask::contactFromUserId( const TQString & userId, const TQString & displayName, const int firstSeqNo, const TQValueList< FolderItem > folders, bool topLevel ) { m_userId = userId; m_displayName = displayName; @@ -65,19 +65,19 @@ void CreateContactTask::contactFromUserId( const QString & userId, const QString void CreateContactTask::onGo() { client()->debug( "CreateContactTask::onGo() - Welcome to the Create Contact Task Show!"); - QValueList<FolderItem>::ConstIterator it = m_folders.begin(); - const QValueList<FolderItem>::ConstIterator end = m_folders.end(); + TQValueList<FolderItem>::ConstIterator it = m_folders.begin(); + const TQValueList<FolderItem>::ConstIterator end = m_folders.end(); // create contacts on the server for ( ; it != end; ++it ) { - client()->debug( QString( " - contact is in folder %1 with id %2" ).arg( (*it).name ).arg( (*it).id ) ); + client()->debug( TQString( " - contact is in folder %1 with id %2" ).arg( (*it).name ).arg( (*it).id ) ); CreateContactInstanceTask * ccit = new CreateContactInstanceTask( client()->rootTask() ); // the add contact action may cause other contacts' sequence numbers to change // CreateContactInstanceTask signals these changes, so we propagate the signal via the Client, to the GroupWiseAccount // This updates our local versions of those contacts using the same mechanism by which they are updated at login. - connect( ccit, SIGNAL( gotContactAdded( const ContactItem & ) ), SLOT( slotContactAdded( const ContactItem & ) ) ); - connect( ccit, SIGNAL( finished() ), SLOT( slotCheckContactInstanceCreated() ) ); + connect( ccit, TQT_SIGNAL( gotContactAdded( const ContactItem & ) ), TQT_SLOT( slotContactAdded( const ContactItem & ) ) ); + connect( ccit, TQT_SIGNAL( finished() ), TQT_SLOT( slotCheckContactInstanceCreated() ) ); if ( (*it).id == 0 ) // caller asserts that this isn't on the server... { ccit->contactFromDNAndFolder( m_userId, m_displayName, m_firstSequenceNumber++, ( *it ).name ); @@ -92,8 +92,8 @@ void CreateContactTask::onGo() { client()->debug( " - contact is in top level folder " ); CreateContactInstanceTask * ccit = new CreateContactInstanceTask( client()->rootTask() ); - connect( ccit, SIGNAL( gotContactAdded( const ContactItem & ) ), SLOT( slotContactAdded( const ContactItem & ) ) ); - connect( ccit, SIGNAL( finished() ), SLOT( slotCheckContactInstanceCreated() ) ); + connect( ccit, TQT_SIGNAL( gotContactAdded( const ContactItem & ) ), TQT_SLOT( slotContactAdded( const ContactItem & ) ) ); + connect( ccit, TQT_SIGNAL( finished() ), TQT_SLOT( slotCheckContactInstanceCreated() ) ); ccit->contactFromDN( m_userId, m_displayName, 0 ); ccit->go( true ); } @@ -112,7 +112,7 @@ void CreateContactTask::slotContactAdded( const ContactItem & addedContact ) client()->debug( " - addedContact is not the one we were trying to add, ignoring it ( Account will update it )" ); return; } - client()->debug( QString( "CreateContactTask::slotContactAdded() - Contact Instance %1 was created on the server, with objectId %2 in folder %3" ).arg + client()->debug( TQString( "CreateContactTask::slotContactAdded() - Contact Instance %1 was created on the server, with objectId %2 in folder %3" ).arg ( addedContact.displayName ).arg( addedContact.id ).arg( addedContact.parentId ) ); if ( m_dn.isEmpty() ) diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.h b/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.h index a9e4ab06..2a46a51c 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/createcontacttask.h @@ -21,7 +21,7 @@ #ifndef CREATECONTACTTASK_H #define CREATECONTACTTASK_H -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "gwerror.h" @@ -48,12 +48,12 @@ public: /** * Get the userId of the contact just created */ - QString userId(); + TQString userId(); /** * Get the DN of the contact just created */ - QString dn(); - QString displayName(); + TQString dn(); + TQString displayName(); /** * Sets up the task. @@ -63,8 +63,8 @@ public: * @param folders A list of folders that the contact should belong to - any folders that do not exist on the server should have a objectId of 0, and will be created * @param topLevel is the folder also in the top level folder? */ - void contactFromUserId( const QString & userId, const QString & displayName, const int firstSeqNo, const QValueList< FolderItem > folders, bool topLevel ); - //void contactFromDN( const QString & dn, const QString & displayName, const int parentFolder ); + void contactFromUserId( const TQString & userId, const TQString & displayName, const int firstSeqNo, const TQValueList< FolderItem > folders, bool topLevel ); + //void contactFromDN( const TQString & dn, const TQString & displayName, const int parentFolder ); /** * This task doesn't do any I/O itself, so this take prints an error and returns false; */ @@ -78,10 +78,10 @@ protected slots: void slotCheckContactInstanceCreated(); private: int m_firstSequenceNumber; - QString m_userId; - QString m_dn; - QString m_displayName; - QValueList< FolderItem > m_folders; + TQString m_userId; + TQString m_dn; + TQString m_displayName; + TQValueList< FolderItem > m_folders; bool m_topLevel; }; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.cpp index c7e9933b..c6e6a78a 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.cpp @@ -29,12 +29,12 @@ CreateFolderTask::~CreateFolderTask() { } -void CreateFolderTask::folder( const int parentId, const int sequence, const QString & displayName ) +void CreateFolderTask::folder( const int parentId, const int sequence, const TQString & displayName ) { Field::FieldList lst; - lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( parentId ) ) ); + lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( parentId ) ) ); lst.append( new Field::SingleField( NM_A_SZ_DISPLAY_NAME, 0, NMFIELD_TYPE_UTF8, displayName ) ); - lst.append( new Field::SingleField( NM_A_SZ_SEQUENCE_NUMBER, 0, NMFIELD_TYPE_UTF8, QString::number( sequence ) ) ); + lst.append( new Field::SingleField( NM_A_SZ_SEQUENCE_NUMBER, 0, NMFIELD_TYPE_UTF8, TQString::number( sequence ) ) ); createTransfer( "createfolder", lst ); } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.h b/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.h index f3c6ebb9..cac19900 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/createfoldertask.h @@ -34,7 +34,7 @@ Q_OBJECT public: CreateFolderTask(Task* parent); ~CreateFolderTask(); - void folder( const int parentId, const int sequence, const QString & displayName ); + void folder( const int parentId, const int sequence, const TQString & displayName ); }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/deleteitemtask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/deleteitemtask.cpp index 89480d10..04ce1fb4 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/deleteitemtask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/deleteitemtask.cpp @@ -37,9 +37,9 @@ void DeleteItemTask::item( const int parentFolder, const int objectId ) return; } Field::FieldList lst; - lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( parentFolder ) ) ); + lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( parentFolder ) ) ); // this is either a user Id or a DN - lst.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( objectId ) ) ); + lst.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( objectId ) ) ); createTransfer( "deletecontact", lst ); } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/eventtask.h b/kopete/protocols/groupwise/libgroupwise/tasks/eventtask.h index 50b84ac5..609728a4 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/eventtask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/eventtask.h @@ -21,7 +21,7 @@ #ifndef GW_EVENTTASK_H #define GW_EVENTTASK_H -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "eventtransfer.h" #include "task.h" @@ -37,7 +37,7 @@ Q_OBJECT bool forMe( Transfer * transfer, EventTransfer *& event ) const; void registerEvent( GroupWise::Event e ); private: - QValueList<int> m_eventCodes; + TQValueList<int> m_eventCodes; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.cpp index fe1d61f9..8104ec24 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.cpp @@ -92,7 +92,7 @@ bool GetChatSearchResultsTask::take( Transfer * transfer ) return true; } -QValueList< GroupWise::ChatroomSearchResult > GetChatSearchResultsTask::results() +TQValueList< GroupWise::ChatroomSearchResult > GetChatSearchResultsTask::results() { return m_results; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.h b/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.h index 31db19ed..e85c1e74 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/getchatsearchresultstask.h @@ -21,7 +21,7 @@ #ifndef CHATSEARCHRESULTSTASK_H #define CHATSEARCHRESULTSTASK_H -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "gwchatrooms.h" @@ -42,11 +42,11 @@ class GetChatSearchResultsTask : public RequestTask void poll( int queryHandle); bool take( Transfer * transfer ); int queryStatus(); - QValueList< GroupWise::ChatroomSearchResult > results(); + TQValueList< GroupWise::ChatroomSearchResult > results(); private: GroupWise::ChatroomSearchResult extractChatDetails( Field::FieldList & fields ); SearchResultCode m_queryStatus; - QValueList< GroupWise::ChatroomSearchResult > m_results; + TQValueList< GroupWise::ChatroomSearchResult > m_results; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp index 0b37efb4..61753d84 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp @@ -36,10 +36,10 @@ GetDetailsTask::~GetDetailsTask() { } -void GetDetailsTask::userDNs( const QStringList & userDNs ) +void GetDetailsTask::userDNs( const TQStringList & userDNs ) { Field::FieldList lst; - for ( QStringList::ConstIterator it = userDNs.begin(); it != userDNs.end(); ++it ) + for ( TQStringList::ConstIterator it = userDNs.begin(); it != userDNs.end(); ++it ) { lst.append( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_UTF8, *it ) ); } @@ -97,7 +97,7 @@ ContactDetails GetDetailsTask::extractUserDetails(Field::MultiField * details ) if ( ( sf = fields.findSingleField ( NM_A_SZ_MESSAGE_BODY ) ) ) cd.awayMessage = sf->value().toString(); Field::MultiField * mf; - QMap< QString, QString > propMap; + TQMap< TQString, TQString > propMap; if ( ( mf = fields.findMultiField ( NM_A_FA_INFO_DISPLAY_ARRAY ) ) ) { Field::FieldList fl = mf->fields(); @@ -106,8 +106,8 @@ ContactDetails GetDetailsTask::extractUserDetails(Field::MultiField * details ) { Field::SingleField * propField = dynamic_cast<Field::SingleField *>( *it ); if ( propField ) { - QString propName = propField->tag(); - QString propValue = propField->value().toString(); + TQString propName = propField->tag(); + TQString propValue = propField->value().toString(); propMap.insert( propName, propValue ); } else { Field::MultiField * mf2; @@ -118,8 +118,8 @@ ContactDetails GetDetailsTask::extractUserDetails(Field::MultiField * details ) { propField = dynamic_cast<Field::SingleField *>( *it2 ); if ( propField ) { - QString propName = propField->tag(); - QString propValue = propField->value().toString(); + TQString propName = propField->tag(); + TQString propValue = propField->value().toString(); propMap.insert( propName, propValue ); } } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.h b/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.h index d263f50b..747b494f 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.h @@ -38,7 +38,7 @@ public: GetDetailsTask( Task * parent ); ~GetDetailsTask(); bool take( Transfer * transfer ); - void userDNs( const QStringList & userDNs ); + void userDNs( const TQStringList & userDNs ); signals: void gotContactUserDetails( const GroupWise::ContactDetails & ); protected: diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.cpp index dde055a6..153746ea 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.cpp @@ -30,7 +30,7 @@ GetStatusTask::~GetStatusTask() { } -void GetStatusTask::userDN( const QString & dn ) +void GetStatusTask::userDN( const TQString & dn ) { m_userDN = dn; // set up Transfer @@ -60,8 +60,8 @@ bool GetStatusTask::take( Transfer * transfer ) // This must be because the sender is not on our contact list but has sent us a message. // TODO: Check that the change to sending DNs above has fixed this problem. status = sf->value().toInt(); - // unfortunately getstatus doesn't give us an away message so we pass QString::null here - emit gotStatus( m_userDN, status, QString::null ); + // unfortunately getstatus doesn't give us an away message so we pass TQString::null here + emit gotStatus( m_userDN, status, TQString::null ); setSuccess(); } else diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.h b/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.h index 59422342..6294f053 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/getstatustask.h @@ -33,12 +33,12 @@ Q_OBJECT public: GetStatusTask(Task* parent); ~GetStatusTask(); - void userDN( const QString & dn ); + void userDN( const TQString & dn ); bool take( Transfer * transfer ); signals: - void gotStatus( const QString & contactId, Q_UINT16 status, const QString & statusText ); + void gotStatus( const TQString & contactId, Q_UINT16 status, const TQString & statusText ); private: - QString m_userDN; + TQString m_userDN; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.cpp index 4e9e4f57..a14d6eec 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.cpp @@ -33,7 +33,7 @@ JoinChatTask::~JoinChatTask() { } -void JoinChatTask::join( const QString & displayName ) +void JoinChatTask::join( const TQString & displayName ) { m_displayName = displayName; Field::FieldList lst, tmp; @@ -67,7 +67,7 @@ bool JoinChatTask::take( Transfer * transfer ) if ( contact ) { // HACK: lowercased DN - QString dn = contact->value().toString().lower(); + TQString dn = contact->value().toString().lower(); m_participants.append( dn ); // need to ask for details for these contacts } @@ -91,7 +91,7 @@ bool JoinChatTask::take( Transfer * transfer ) if ( contact ) { // HACK: lowercased DN - QString dn = contact->value().toString().lower(); + TQString dn = contact->value().toString().lower(); m_invitees.append( dn ); // need to ask for details for these contacts if ( !client()->userDetailsManager()->known( dn ) ) @@ -113,17 +113,17 @@ bool JoinChatTask::take( Transfer * transfer ) return false; } -QStringList JoinChatTask::participants() const +TQStringList JoinChatTask::participants() const { return m_participants; } -QStringList JoinChatTask::invitees() const +TQStringList JoinChatTask::invitees() const { return m_invitees; } -QString JoinChatTask::displayName() const +TQString JoinChatTask::displayName() const { return m_displayName; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.h b/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.h index a7cc4119..9d6babe5 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/joinchattask.h @@ -37,16 +37,16 @@ class JoinChatTask : public RequestTask public: JoinChatTask(Task* parent); ~JoinChatTask(); - void join( const QString & displayName ); + void join( const TQString & displayName ); bool take( Transfer * transfer ); - QStringList participants() const; - QStringList invitees() const; - QString displayName() const; + TQStringList participants() const; + TQStringList invitees() const; + TQString displayName() const; private: ConferenceGuid m_displayName; - QStringList m_participants; - QStringList m_invitees; - QStringList m_unknowns; + TQStringList m_participants; + TQStringList m_invitees; + TQStringList m_unknowns; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.cpp index c2cf0f02..b7b1f1cc 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.cpp @@ -67,7 +67,7 @@ bool JoinConferenceTask::take( Transfer * transfer ) if ( contact ) { // HACK: lowercased DN - QString dn = contact->value().toString().lower(); + TQString dn = contact->value().toString().lower(); m_participants.append( dn ); // need to ask for details for these contacts if ( !client()->userDetailsManager()->known( dn ) ) @@ -93,7 +93,7 @@ bool JoinConferenceTask::take( Transfer * transfer ) if ( contact ) { // HACK: lowercased DN - QString dn = contact->value().toString().lower(); + TQString dn = contact->value().toString().lower(); m_invitees.append( dn ); // need to ask for details for these contacts if ( !client()->userDetailsManager()->known( dn ) ) @@ -113,8 +113,8 @@ bool JoinConferenceTask::take( Transfer * transfer ) { client()->debug( "JoinConferenceTask::slotReceiveUserDetails(), requesting details" ); connect( client()->userDetailsManager(), - SIGNAL( gotContactDetails( const GroupWise::ContactDetails & ) ), - SLOT( slotReceiveUserDetails( const GroupWise::ContactDetails & ) ) ); + TQT_SIGNAL( gotContactDetails( const GroupWise::ContactDetails & ) ), + TQT_SLOT( slotReceiveUserDetails( const GroupWise::ContactDetails & ) ) ); client()->userDetailsManager()->requestDetails( m_unknowns ); } } @@ -128,14 +128,14 @@ bool JoinConferenceTask::take( Transfer * transfer ) void JoinConferenceTask::slotReceiveUserDetails( const ContactDetails & details ) { - client()->debug( QString( "JoinConferenceTask::slotReceiveUserDetails() - got %1" ).arg( details.dn ) ); - QStringList::Iterator it = m_unknowns.begin(); - QStringList::Iterator end = m_unknowns.end(); + client()->debug( TQString( "JoinConferenceTask::slotReceiveUserDetails() - got %1" ).arg( details.dn ) ); + TQStringList::Iterator it = m_unknowns.begin(); + TQStringList::Iterator end = m_unknowns.end(); while( it != end ) { - QString current = *it; + TQString current = *it; ++it; - client()->debug( QString( " - can we remove %1?" ).arg(current ) ); + client()->debug( TQString( " - can we remove %1?" ).arg(current ) ); if ( current == details.dn ) { client()->debug( " - it's gone!" ); @@ -143,7 +143,7 @@ void JoinConferenceTask::slotReceiveUserDetails( const ContactDetails & details break; } } - client()->debug( QString( " - now %1 unknowns").arg( m_unknowns.count() ) ); + client()->debug( TQString( " - now %1 unknowns").arg( m_unknowns.count() ) ); if ( m_unknowns.empty() ) { client()->debug( " - finished()" ); @@ -157,12 +157,12 @@ void JoinConferenceTask::slotReceiveUserDetails( const ContactDetails & details // } } -QStringList JoinConferenceTask::participants() const +TQStringList JoinConferenceTask::participants() const { return m_participants; } -QStringList JoinConferenceTask::invitees() const +TQStringList JoinConferenceTask::invitees() const { return m_invitees; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.h index 68316147..d95e5084 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/joinconferencetask.h @@ -39,16 +39,16 @@ public: ~JoinConferenceTask(); void join( const ConferenceGuid & guid ); bool take( Transfer * transfer ); - QStringList participants() const; - QStringList invitees() const; + TQStringList participants() const; + TQStringList invitees() const; ConferenceGuid guid() const; public slots: void slotReceiveUserDetails( const GroupWise::ContactDetails & details ); private: ConferenceGuid m_guid; - QStringList m_participants; - QStringList m_invitees; - QStringList m_unknowns; + TQStringList m_participants; + TQStringList m_invitees; + TQStringList m_unknowns; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/logintask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/logintask.cpp index 1f679a6c..6a28124f 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/logintask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/logintask.cpp @@ -36,7 +36,7 @@ LoginTask::~LoginTask() void LoginTask::initialise() { - QString command = QString::fromLatin1("login:%1:%2").arg( client()->host() ).arg( client()->port() ); + TQString command = TQString::fromLatin1("login:%1:%2").arg( client()->host() ).arg( client()->port() ); Field::FieldList lst; lst.append( new Field::SingleField( NM_A_SZ_USERID, 0, NMFIELD_TYPE_UTF8, client()->userId() ) ); @@ -123,7 +123,7 @@ void LoginTask::extractFolder( Field::MultiField * folderContainer ) current = fl.findSingleField( NM_A_SZ_PARENT_ID ); folder.parentId = current->value().toInt(); - client()->debug( QString( "Got folder: %1, obj: %2, parent: %3, seq: %3." ).arg( folder.name ).arg( folder.id ).arg( folder.parentId ).arg( folder.sequence ) ); + client()->debug( TQString( "Got folder: %1, obj: %2, parent: %3, seq: %3." ).arg( folder.name ).arg( folder.id ).arg( folder.parentId ).arg( folder.sequence ) ); // tell the world about it emit gotFolder( folder ); } @@ -186,7 +186,7 @@ ContactDetails LoginTask::extractUserDetails( Field::FieldList & fields ) if ( ( sf = fields.findSingleField ( NM_A_SZ_MESSAGE_BODY ) ) ) cd.awayMessage = sf->value().toString(); Field::MultiField * mf; - QMap< QString, QString > propMap; + TQMap< TQString, TQString > propMap; if ( ( mf = fields.findMultiField ( NM_A_FA_INFO_DISPLAY_ARRAY ) ) ) { Field::FieldList fl = mf->fields(); @@ -196,8 +196,8 @@ ContactDetails LoginTask::extractUserDetails( Field::FieldList & fields ) Field::SingleField * propField = dynamic_cast<Field::SingleField *>( *it ); if ( propField ) { - QString propName = propField->tag(); - QString propValue = propField->value().toString(); + TQString propName = propField->tag(); + TQString propValue = propField->value().toString(); propMap.insert( propName, propValue ); } else @@ -206,7 +206,7 @@ ContactDetails LoginTask::extractUserDetails( Field::FieldList & fields ) if ( propList ) { // Hello A Nagappan. GW gave us a multiple field where we previously got a single field - QString parentName = propList->tag(); + TQString parentName = propList->tag(); Field::FieldList propFields = propList->fields(); const Field::FieldListIterator end = propFields.end(); for ( Field::FieldListIterator it = propFields.begin(); it != end; ++it ) @@ -214,8 +214,8 @@ ContactDetails LoginTask::extractUserDetails( Field::FieldList & fields ) propField = dynamic_cast<Field::SingleField *>( *it ); if ( propField /*&& propField->tag() == parentName */) { - QString propValue = propField->value().toString(); - QString contents = propMap[ propField->tag() ]; + TQString propValue = propField->value().toString(); + TQString contents = propMap[ propField->tag() ]; if ( !contents.isEmpty() ) contents.append( ", " ); contents.append( propField->value().toString()); @@ -237,8 +237,8 @@ void LoginTask::extractPrivacy( Field::FieldList & fields ) { bool privacyLocked = false; bool defaultDeny = false; - QStringList allowList; - QStringList denyList; + TQStringList allowList; + TQStringList denyList; // read blocking // may be a single field or may be an array Field::FieldListIterator it = fields.find( NM_A_LOCKED_ATTR_LIST ); @@ -280,9 +280,9 @@ void LoginTask::extractPrivacy( Field::FieldList & fields ) kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "locked is " << privacyLocked << ", default is " << defaultDeny << "\nallow list is: " << allowList << "\ndeny list is: " << denyList << endl; } -QStringList LoginTask::readPrivacyItems( const QCString & tag, Field::FieldList & fields ) +TQStringList LoginTask::readPrivacyItems( const TQCString & tag, Field::FieldList & fields ) { - QStringList items; + TQStringList items; Field::FieldListIterator it = fields.find( tag ); if ( it != fields.end() ) diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/logintask.h b/kopete/protocols/groupwise/libgroupwise/tasks/logintask.h index 0b2acdfd..3d745bf9 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/logintask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/logintask.h @@ -48,7 +48,7 @@ protected: void extractContact( Field::MultiField * contactContainer ); ContactDetails extractUserDetails( Field::FieldList & fields ); void extractPrivacy( Field::FieldList & fields ); - QStringList readPrivacyItems( const QCString & tag, Field::FieldList & fields ); + TQStringList readPrivacyItems( const TQCString & tag, Field::FieldList & fields ); void extractCustomStatuses( Field::FieldList & fields ); void extractKeepalivePeriod( Field::FieldList & fields ); signals: @@ -56,7 +56,7 @@ signals: void gotFolder( const FolderItem & ); void gotContact( const ContactItem & ); void gotContactUserDetails( const GroupWise::ContactDetails & ); - void gotPrivacySettings( bool locked, bool defaultDeny, const QStringList & allowList, const QStringList & denyList ); + void gotPrivacySettings( bool locked, bool defaultDeny, const TQStringList & allowList, const TQStringList & denyList ); void gotCustomStatus( const GroupWise::CustomStatus & ); void gotKeepalivePeriod( int ); }; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.cpp index 713315ee..4a24f44f 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.cpp @@ -25,7 +25,7 @@ MoveContactTask::MoveContactTask(Task* parent): NeedFolderTask(parent) { // make the client tell the client app (Kopete) when we receive a contact - connect( this, SIGNAL( gotContactAdded( const ContactItem & ) ), client(), SIGNAL( contactReceived( const ContactItem & ) ) ); + connect( this, TQT_SIGNAL( gotContactAdded( const ContactItem & ) ), client(), TQT_SIGNAL( contactReceived( const ContactItem & ) ) ); } @@ -52,11 +52,11 @@ void MoveContactTask::moveContact( const ContactItem & contact, const int newPar lst.append( new Field::MultiField( NM_A_FA_CONTACT_LIST, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY, contactList ) ); lst.append( new Field::SingleField( NM_A_SZ_SEQUENCE_NUMBER, 0, NMFIELD_TYPE_UTF8, "-1" ) ); - lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( newParent ) ) ); + lst.append( new Field::SingleField( NM_A_SZ_PARENT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( newParent ) ) ); createTransfer( "movecontact", lst ); } -void MoveContactTask::moveContactToNewFolder( const ContactItem & contact, const int newSequenceNumber, const QString & folderDisplayName ) +void MoveContactTask::moveContactToNewFolder( const ContactItem & contact, const int newSequenceNumber, const TQString & folderDisplayName ) { client()->debug("MoveContactTask::moveContactToNewFolder()" ); m_folderSequence = newSequenceNumber; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.h b/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.h index f423981a..ad3bce44 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/movecontacttask.h @@ -35,14 +35,14 @@ public: MoveContactTask(Task* parent); ~MoveContactTask(); void moveContact( const ContactItem & contact, const int newParent ); - void moveContactToNewFolder( const ContactItem & contact, const int newSequenceNumber, const QString & folderDisplayName ); + void moveContactToNewFolder( const ContactItem & contact, const int newSequenceNumber, const TQString & folderDisplayName ); void onGo(); protected: void onFolderCreated(); private: int m_targetFolder; - QString m_dn; - QString m_displayName; + TQString m_dn; + TQString m_displayName; ContactItem m_contactToMove; }; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.cpp index 810326ee..12c7382a 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.cpp @@ -27,9 +27,9 @@ void NeedFolderTask::createFolder() { CreateFolderTask * cct = new CreateFolderTask( client()->rootTask() ); cct->folder( 0, m_folderSequence, m_folderDisplayName ); - connect( cct, SIGNAL( gotFolderAdded( const FolderItem & ) ), client(), SIGNAL( folderReceived( const FolderItem & ) ) ); - connect( cct, SIGNAL( gotFolderAdded( const FolderItem & ) ), SLOT( slotFolderAdded( const FolderItem & ) ) ); - connect( cct, SIGNAL( finished() ), SLOT( slotFolderTaskFinished() ) ); + connect( cct, TQT_SIGNAL( gotFolderAdded( const FolderItem & ) ), client(), TQT_SIGNAL( folderReceived( const FolderItem & ) ) ); + connect( cct, TQT_SIGNAL( gotFolderAdded( const FolderItem & ) ), TQT_SLOT( slotFolderAdded( const FolderItem & ) ) ); + connect( cct, TQT_SIGNAL( finished() ), TQT_SLOT( slotFolderTaskFinished() ) ); cct->go( true ); } @@ -38,7 +38,7 @@ void NeedFolderTask::slotFolderAdded( const FolderItem & addedFolder ) // if this is the folder we were trying to create if ( m_folderDisplayName == addedFolder.name ) { - client()->debug( QString( "NeedFolderTask::slotFolderAdded() - Folder %1 was created on the server, now has objectId %2" ).arg( addedFolder.name ).arg( addedFolder.id ) ); + client()->debug( TQString( "NeedFolderTask::slotFolderAdded() - Folder %1 was created on the server, now has objectId %2" ).arg( addedFolder.name ).arg( addedFolder.id ) ); m_folderId = addedFolder.id; } } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.h b/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.h index 8d6278df..d1ad1a1e 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/needfoldertask.h @@ -33,7 +33,7 @@ protected slots: protected: int m_folderSequence; int m_folderId; - QString m_folderDisplayName; + TQString m_folderDisplayName; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.cpp index 772a0888..d65a5a20 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.cpp @@ -36,7 +36,7 @@ PollSearchResultsTask::~PollSearchResultsTask() { } -void PollSearchResultsTask::poll( const QString & queryHandle ) +void PollSearchResultsTask::poll( const TQString & queryHandle ) { Field::FieldList lst; lst.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, queryHandle ) ); @@ -97,7 +97,7 @@ bool PollSearchResultsTask::take( Transfer * transfer ) return true; } -QValueList< GroupWise::ContactDetails > PollSearchResultsTask::results() +TQValueList< GroupWise::ContactDetails > PollSearchResultsTask::results() { return m_results; } @@ -133,7 +133,7 @@ GroupWise::ContactDetails PollSearchResultsTask::extractUserDetails( Field::Fiel if ( ( sf = fields.findSingleField ( NM_A_SZ_MESSAGE_BODY ) ) ) cd.awayMessage = sf->value().toString(); Field::MultiField * mf; - QMap< QString, QString > propMap; + TQMap< TQString, TQString > propMap; if ( ( mf = fields.findMultiField ( NM_A_FA_INFO_DISPLAY_ARRAY ) ) ) { Field::FieldList fl = mf->fields(); @@ -146,8 +146,8 @@ GroupWise::ContactDetails PollSearchResultsTask::extractUserDetails( Field::Fiel Field::SingleField * propField = dynamic_cast<Field::SingleField *>( *it ); if ( propField ) { - QString propName = propField->tag(); - QString propValue = propField->value().toString(); + TQString propName = propField->tag(); + TQString propValue = propField->value().toString(); propMap.insert( propName, propValue ); } else @@ -155,7 +155,7 @@ GroupWise::ContactDetails PollSearchResultsTask::extractUserDetails( Field::Fiel Field::MultiField * propList = dynamic_cast<Field::MultiField*>( *it ); if ( propList ) { - QString parentName = propList->tag(); + TQString parentName = propList->tag(); Field::FieldList propFields = propList->fields(); const Field::FieldListIterator end = propFields.end(); for ( Field::FieldListIterator it = propFields.begin(); it != end; ++it ) @@ -163,8 +163,8 @@ GroupWise::ContactDetails PollSearchResultsTask::extractUserDetails( Field::Fiel propField = dynamic_cast<Field::SingleField *>( *it ); if ( propField ) { - QString propValue = propField->value().toString(); - QString contents = propMap[ propField->tag() ]; + TQString propValue = propField->value().toString(); + TQString contents = propMap[ propField->tag() ]; if ( !contents.isEmpty() ) contents.append( ", " ); contents.append( propField->value().toString()); diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.h b/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.h index 11f810c0..c03f75bb 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/pollsearchresultstask.h @@ -21,7 +21,7 @@ #ifndef POLLSEARCHRESULTSTASK_H #define POLLSEARCHRESULTSTASK_H -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "gwerror.h" @@ -39,14 +39,14 @@ public: enum SearchResultCode { Pending=0, InProgess=1, Completed=2, TimeOut=3, Cancelled=4, Error=5 }; PollSearchResultsTask(Task* parent); ~PollSearchResultsTask(); - void poll( const QString & queryHandle); + void poll( const TQString & queryHandle); bool take( Transfer * transfer ); int queryStatus(); - QValueList< GroupWise::ContactDetails > results(); + TQValueList< GroupWise::ContactDetails > results(); GroupWise::ContactDetails extractUserDetails( Field::FieldList & fields ); private: int m_queryStatus; - QValueList< GroupWise::ContactDetails > m_results; + TQValueList< GroupWise::ContactDetails > m_results; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.cpp index 003a6d60..508b3306 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.cpp @@ -28,7 +28,7 @@ PrivacyItemTask::~PrivacyItemTask() { } -QString PrivacyItemTask::dn() const +TQString PrivacyItemTask::dn() const { return m_dn; } @@ -38,7 +38,7 @@ bool PrivacyItemTask::defaultDeny() const return m_default; } -void PrivacyItemTask::allow( const QString & dn ) +void PrivacyItemTask::allow( const TQString & dn ) { m_dn = dn; Field::FieldList lst; @@ -46,7 +46,7 @@ void PrivacyItemTask::allow( const QString & dn ) createTransfer( "createblock", lst ); } -void PrivacyItemTask::deny( const QString & dn ) +void PrivacyItemTask::deny( const TQString & dn ) { m_dn = dn; Field::FieldList lst; @@ -54,7 +54,7 @@ void PrivacyItemTask::deny( const QString & dn ) createTransfer( "createblock", lst ); } -void PrivacyItemTask::removeAllow( const QString & dn ) +void PrivacyItemTask::removeAllow( const TQString & dn ) { m_dn = dn; Field::FieldList lst; @@ -63,7 +63,7 @@ void PrivacyItemTask::removeAllow( const QString & dn ) } -void PrivacyItemTask::removeDeny( const QString & dn ) +void PrivacyItemTask::removeDeny( const TQString & dn ) { m_dn = dn; Field::FieldList lst; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.h b/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.h index 809cb7a4..401dc765 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/privacyitemtask.h @@ -34,17 +34,17 @@ Q_OBJECT public: PrivacyItemTask( Task* parent); ~PrivacyItemTask(); - void allow( const QString & dn ); - void deny( const QString & dn ); - void removeAllow( const QString & dn ); - void removeDeny( const QString & dn ); + void allow( const TQString & dn ); + void deny( const TQString & dn ); + void removeAllow( const TQString & dn ); + void removeDeny( const TQString & dn ); void defaultPolicy( bool defaultDeny ); - QString dn() const; + TQString dn() const; bool defaultDeny() const; - // void contacts( const QStringList & contacts ); + // void contacts( const TQStringList & contacts ); private: bool m_default; - QString m_dn; + TQString m_dn; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.cpp index 3788bb6e..44f54124 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.cpp @@ -38,7 +38,7 @@ bool RequestTask::forMe( Transfer * transfer ) const return (theResponse && theResponse->transactionId() == m_transactionId ); } -void RequestTask::createTransfer( const QString & command, const Field::FieldList & fields ) +void RequestTask::createTransfer( const TQString & command, const Field::FieldList & fields ) { Request * request = client()->requestFactory()->request( command ); m_transactionId = request->transactionId(); @@ -50,7 +50,7 @@ void RequestTask::onGo() { if ( transfer() ) { - client()->debug( QString( "%1::onGo() - sending %2 fields" ).arg( className() ).arg( static_cast<Request *>( transfer() )->command() ) ); + client()->debug( TQString( "%1::onGo() - sending %2 fields" ).arg( className() ).arg( static_cast<Request *>( transfer() )->command() ) ); send( static_cast<Request *>( transfer() ) ); } else diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.h b/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.h index 30ee57ed..71101fab 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/requesttask.h @@ -34,7 +34,7 @@ Q_OBJECT virtual void onGo(); protected: bool forMe( Transfer * transfer ) const; - void createTransfer( const QString & command, const Field::FieldList & fields ); + void createTransfer( const TQString & command, const Field::FieldList & fields ); private: int m_transactionId; }; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.cpp index 4ee35549..87694eb4 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.cpp @@ -18,8 +18,8 @@ ************************************************************************* */ -#include <qdatetime.h> -#include <qtimer.h> +#include <tqdatetime.h> +#include <tqtimer.h> #include "client.h" #include "gwerror.h" @@ -75,7 +75,7 @@ bool SearchChatTask::take( Transfer * transfer ) m_objectId = sf->value().toInt(); // now start the results poll timer - QTimer::singleShot( GW_POLL_INITIAL_DELAY, this, SLOT( slotPollForResults() ) ); + TQTimer::singleShot( GW_POLL_INITIAL_DELAY, this, TQT_SLOT( slotPollForResults() ) ); return true; } @@ -84,7 +84,7 @@ void SearchChatTask::slotPollForResults() //create a PollSearchResultsTask GetChatSearchResultsTask * gcsrt = new GetChatSearchResultsTask( client()->rootTask() ); gcsrt->poll( m_objectId ); - connect( gcsrt, SIGNAL( finished() ), SLOT( slotGotPollResults() ) ); + connect( gcsrt, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotPollResults() ) ); gcsrt->go( true ); } @@ -97,14 +97,14 @@ void SearchChatTask::slotGotPollResults() { case GetChatSearchResultsTask::GettingData: if ( m_polls < GW_POLL_MAXIMUM ) // restart timer - QTimer::singleShot( GW_POLL_FREQUENCY_MS, this, SLOT( slotPollForResults() ) ); + TQTimer::singleShot( GW_POLL_FREQUENCY_MS, this, TQT_SLOT( slotPollForResults() ) ); else setSuccess( gcsrt->statusCode() ); break; case GetChatSearchResultsTask::DataRetrieved: // got some results, there may be more. m_results += gcsrt->results(); - QTimer::singleShot( 0, this, SLOT( slotPollForResults() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotPollForResults() ) ); break; case GetChatSearchResultsTask::Completed: m_results += gcsrt->results(); @@ -119,7 +119,7 @@ void SearchChatTask::slotGotPollResults() } } -QValueList< GroupWise::ChatroomSearchResult > SearchChatTask::results() +TQValueList< GroupWise::ChatroomSearchResult > SearchChatTask::results() { return m_results; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.h b/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.h index 2f24e075..fe8df7f4 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/searchchattask.h @@ -52,13 +52,13 @@ class SearchChatTask : public RequestTask /** * Access the results of the search */ - QValueList< GroupWise::ChatroomSearchResult > results(); + TQValueList< GroupWise::ChatroomSearchResult > results(); protected slots: void slotPollForResults(); void slotGotPollResults(); private: - QTimer * m_resultsPollTimer; - QValueList< GroupWise::ChatroomSearchResult > m_results; + TQTimer * m_resultsPollTimer; + TQValueList< GroupWise::ChatroomSearchResult > m_results; int m_polls; int m_objectId; // used to identify our query to the server, so we can poll for its results }; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.cpp index cd199ad8..1b64c47d 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.cpp @@ -18,8 +18,8 @@ ************************************************************************* */ -#include <qdatetime.h> -#include <qtimer.h> +#include <tqdatetime.h> +#include <tqtimer.h> #include "client.h" #include "gwerror.h" @@ -48,9 +48,9 @@ SearchUserTask::~SearchUserTask() { } -void SearchUserTask::search( const QValueList<UserSearchQueryTerm> & query ) +void SearchUserTask::search( const TQValueList<UserSearchQueryTerm> & query ) { - m_queryHandle = QString::number( QDateTime::currentDateTime().toTime_t () ); + m_queryHandle = TQString::number( TQDateTime::currentDateTime().toTime_t () ); Field::FieldList lst; if ( query.isEmpty() ) { @@ -59,8 +59,8 @@ void SearchUserTask::search( const QValueList<UserSearchQueryTerm> & query ) } // object Id identifies the search for later reference lst.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, m_queryHandle ) ); - QValueList<UserSearchQueryTerm>::ConstIterator it = query.begin(); - const QValueList<UserSearchQueryTerm>::ConstIterator end = query.end(); + TQValueList<UserSearchQueryTerm>::ConstIterator it = query.begin(); + const TQValueList<UserSearchQueryTerm>::ConstIterator end = query.end(); for ( ; it != end; ++it ) { Field::SingleField * fld = new Field::SingleField( (*it).field.ascii(), (*it).operation, 0, NMFIELD_TYPE_UTF8, (*it).argument ); @@ -86,7 +86,7 @@ bool SearchUserTask::take( Transfer * transfer ) return true; } // now start the results poll timer - QTimer::singleShot( GW_POLL_INITIAL_DELAY, this, SLOT( slotPollForResults() ) ); + TQTimer::singleShot( GW_POLL_INITIAL_DELAY, this, TQT_SLOT( slotPollForResults() ) ); return true; } @@ -95,7 +95,7 @@ void SearchUserTask::slotPollForResults() //create a PollSearchResultsTask PollSearchResultsTask * psrt = new PollSearchResultsTask( client()->rootTask() ); psrt->poll( m_queryHandle ); - connect( psrt, SIGNAL( finished() ), SLOT( slotGotPollResults() ) ); + connect( psrt, TQT_SIGNAL( finished() ), TQT_SLOT( slotGotPollResults() ) ); psrt->go( true ); } @@ -109,7 +109,7 @@ void SearchUserTask::slotGotPollResults() case PollSearchResultsTask::Pending: case PollSearchResultsTask::InProgess: if ( m_polls < GW_POLL_MAXIMUM ) // restart timer - QTimer::singleShot( GW_POLL_FREQUENCY_MS, this, SLOT( slotPollForResults() ) ); + TQTimer::singleShot( GW_POLL_FREQUENCY_MS, this, TQT_SLOT( slotPollForResults() ) ); else setSuccess( psrt->statusCode() ); break; @@ -129,7 +129,7 @@ void SearchUserTask::slotGotPollResults() } } -QValueList< GroupWise::ContactDetails > SearchUserTask::results() +TQValueList< GroupWise::ContactDetails > SearchUserTask::results() { return m_results; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.h b/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.h index 28c09b02..e99a1236 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/searchusertask.h @@ -41,7 +41,7 @@ public: * Create the search query * @param query a list of search terms */ - void search( const QValueList<GroupWise::UserSearchQueryTerm> & query); + void search( const TQValueList<GroupWise::UserSearchQueryTerm> & query); /** * If the query was accepted, start a timer to poll for results using PollSearchResultsTask */ @@ -49,14 +49,14 @@ public: /** * Access the results of the search */ - QValueList< GroupWise::ContactDetails > results(); + TQValueList< GroupWise::ContactDetails > results(); protected slots: void slotPollForResults(); void slotGotPollResults(); private: - QString m_queryHandle; // used to identify our query to the server, so we can poll for its results - QTimer * m_resultsPollTimer; - QValueList< GroupWise::ContactDetails > m_results; + TQString m_queryHandle; // used to identify our query to the server, so we can poll for its results + TQTimer * m_resultsPollTimer; + TQValueList< GroupWise::ContactDetails > m_results; int m_polls; }; diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.cpp index b3a9614f..9fa7d65e 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.cpp @@ -28,13 +28,13 @@ SendInviteTask::~SendInviteTask() { } -void SendInviteTask::invite( const GroupWise::ConferenceGuid & guid, const QStringList & invitees, const GroupWise::OutgoingMessage & msg) +void SendInviteTask::invite( const GroupWise::ConferenceGuid & guid, const TQStringList & invitees, const GroupWise::OutgoingMessage & msg) { Field::FieldList lst, tmp; tmp.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, guid ) ); lst.append( new Field::MultiField( NM_A_FA_CONVERSATION, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY, tmp ) ); - QValueListConstIterator<QString> end = invitees.end(); - for ( QValueListConstIterator<QString> it = invitees.begin(); it != end; ++it ) + TQValueListConstIterator<TQString> end = invitees.end(); + for ( TQValueListConstIterator<TQString> it = invitees.begin(); it != end; ++it ) lst.append( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_DN, *it ) ); if ( !msg.message.isEmpty() ) lst.append( new Field::SingleField( NM_A_SZ_MESSAGE_BODY, 0, NMFIELD_TYPE_UTF8, msg.message ) ); diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.h index c8cf1d9b..b08c7259 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/sendinvitetask.h @@ -35,9 +35,9 @@ class SendInviteTask : public RequestTask public: SendInviteTask(Task* parent); ~SendInviteTask(); - void invite( const GroupWise::ConferenceGuid & guid, const QStringList & invitees, const GroupWise::OutgoingMessage & msg ); + void invite( const GroupWise::ConferenceGuid & guid, const TQStringList & invitees, const GroupWise::OutgoingMessage & msg ); private: - QString m_confId; + TQString m_confId; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.cpp index 290b9d9b..fdf1173f 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.cpp @@ -29,7 +29,7 @@ SendMessageTask::~SendMessageTask() { } -void SendMessageTask::message( const QStringList & recipientDNList, const OutgoingMessage & msg ) +void SendMessageTask::message( const TQStringList & recipientDNList, const OutgoingMessage & msg ) { // Assumes the conference is instantiated, unlike Gaim's nm_send_message Field::FieldList lst, tmp, msgBodies; @@ -44,8 +44,8 @@ void SendMessageTask::message( const QStringList & recipientDNList, const Outgoi // list containing message bodies lst.append( new Field::MultiField( NM_A_FA_MESSAGE, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY, msgBodies ) ); // series of participants (may be empty ) - QValueListConstIterator<QString> end = recipientDNList.end(); - for ( QValueListConstIterator<QString> it = recipientDNList.begin(); it != end; ++it ) + TQValueListConstIterator<TQString> end = recipientDNList.end(); + for ( TQValueListConstIterator<TQString> it = recipientDNList.begin(); it != end; ++it ) lst.append( new Field::SingleField( NM_A_SZ_DN, 0, NMFIELD_TYPE_DN, *it ) ); createTransfer( "sendmessage", lst ); } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.h b/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.h index f45e491f..44559e15 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/sendmessagetask.h @@ -35,7 +35,7 @@ public: SendMessageTask(Task* parent); ~SendMessageTask(); - void message( const QStringList & recipientDNList, const OutgoingMessage & msg ); + void message( const TQStringList & recipientDNList, const OutgoingMessage & msg ); }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.cpp index 0744ff8a..bf463407 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.cpp @@ -30,7 +30,7 @@ SetStatusTask::~SetStatusTask() { } -void SetStatusTask::status( Status newStatus, const QString &awayMessage, const QString &autoReply ) +void SetStatusTask::status( Status newStatus, const TQString &awayMessage, const TQString &autoReply ) { if ( newStatus > GroupWise::Invalid ) { @@ -43,7 +43,7 @@ void SetStatusTask::status( Status newStatus, const QString &awayMessage, const m_autoReply = autoReply; Field::FieldList lst; - lst.append( new Field::SingleField( NM_A_SZ_STATUS, 0, NMFIELD_TYPE_UTF8, QString::number( newStatus ) ) ); + lst.append( new Field::SingleField( NM_A_SZ_STATUS, 0, NMFIELD_TYPE_UTF8, TQString::number( newStatus ) ) ); if ( !awayMessage.isNull() ) lst.append( new Field::SingleField( NM_A_SZ_STATUS_TEXT, 0, NMFIELD_TYPE_UTF8, awayMessage ) ); if ( !autoReply.isNull() ) @@ -56,12 +56,12 @@ Status SetStatusTask::requestedStatus() const return m_status; } -QString SetStatusTask::awayMessage() const +TQString SetStatusTask::awayMessage() const { return m_awayMessage; } -QString SetStatusTask::autoReply() const +TQString SetStatusTask::autoReply() const { return m_autoReply; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.h b/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.h index 2d3c53d7..4e41e681 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/setstatustask.h @@ -33,14 +33,14 @@ Q_OBJECT public: SetStatusTask(Task* parent); ~SetStatusTask(); - void status( GroupWise::Status newStatus, const QString &awayMessage, const QString &autoReply ); + void status( GroupWise::Status newStatus, const TQString &awayMessage, const TQString &autoReply ); GroupWise::Status requestedStatus() const; - QString awayMessage() const; - QString autoReply() const; + TQString awayMessage() const; + TQString autoReply() const; private: GroupWise::Status m_status; - QString m_awayMessage; - QString m_autoReply; + TQString m_awayMessage; + TQString m_autoReply; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/statustask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/statustask.cpp index 8f8eccd4..e7272402 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/statustask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/statustask.cpp @@ -37,7 +37,7 @@ bool StatusTask::take( Transfer * transfer ) if ( forMe( transfer, event ) ) { client()->debug( "Got a status change!" ); - client()->debug( QString( "%1 changed status to %2, message: %3" ).arg( event->source() ).arg( event->status() ).arg( event->statusText() ) ); + client()->debug( TQString( "%1 changed status to %2, message: %3" ).arg( event->source() ).arg( event->status() ).arg( event->statusText() ) ); emit gotStatus( event->source().lower(), event->status(), event->statusText() ); return true; } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/statustask.h b/kopete/protocols/groupwise/libgroupwise/tasks/statustask.h index 8e4994ff..2a57cd04 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/statustask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/statustask.h @@ -34,7 +34,7 @@ public: ~StatusTask(); bool take( Transfer * transfer ); signals: - void gotStatus( const QString & contactId, Q_UINT16 status, const QString & statusText ); + void gotStatus( const TQString & contactId, Q_UINT16 status, const TQString & statusText ); }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/typingtask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/typingtask.cpp index b835c525..2a421752 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/typingtask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/typingtask.cpp @@ -36,7 +36,7 @@ void TypingTask::typing( const GroupWise::ConferenceGuid & conferenceGuid, const Field::FieldList typingNotification, outgoingList; typingNotification.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, conferenceGuid ) ); typingNotification.append( new Field::SingleField( NM_A_SZ_TYPE, 0, NMFIELD_TYPE_UTF8, - QString::number( typing ? GroupWise::UserTyping : GroupWise::UserNotTyping ) ) ); + TQString::number( typing ? GroupWise::UserTyping : GroupWise::UserNotTyping ) ) ); outgoingList.append( new Field::MultiField( NM_A_FA_CONVERSATION, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY, typingNotification ) ); createTransfer( "sendtyping", outgoingList ); } diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.cpp index d8c1a68a..aa75441d 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.cpp @@ -33,18 +33,18 @@ UpdateContactTask::~UpdateContactTask() { } -QString UpdateContactTask::displayName() +TQString UpdateContactTask::displayName() { return m_name; } -void UpdateContactTask::renameContact( const QString & newName, const QValueList<ContactItem> & contactInstances ) +void UpdateContactTask::renameContact( const TQString & newName, const TQValueList<ContactItem> & contactInstances ) { m_name = newName; // build a list of delete, add fields that removes each instance on the server and then readds it with the new name Field::FieldList lst; - const QValueList<ContactItem>::ConstIterator end = contactInstances.end(); - for( QValueList<ContactItem>::ConstIterator it = contactInstances.begin(); it != end; ++it ) + const TQValueList<ContactItem>::ConstIterator end = contactInstances.end(); + for( TQValueList<ContactItem>::ConstIterator it = contactInstances.begin(); it != end; ++it ) { Field::FieldList contactFields; contactFields.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, (*it).id ) ); @@ -57,7 +57,7 @@ void UpdateContactTask::renameContact( const QString & newName, const QValueList lst.append( new Field::MultiField( NM_A_FA_CONTACT, NMFIELD_METHOD_DELETE, 0, NMFIELD_TYPE_ARRAY, contactFields ) ); } - for( QValueList<ContactItem>::ConstIterator it = contactInstances.begin(); it != end; ++it ) + for( TQValueList<ContactItem>::ConstIterator it = contactInstances.begin(); it != end; ++it ) { Field::FieldList contactFields; contactFields.append( new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, (*it).id ) ); diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.h b/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.h index 7e6ac899..4126658e 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/updatecontacttask.h @@ -35,10 +35,10 @@ Q_OBJECT public: UpdateContactTask(Task* parent); ~UpdateContactTask(); - void renameContact( const QString& newName, const QValueList<GroupWise::ContactItem> & contactInstances ); - QString displayName(); + void renameContact( const TQString& newName, const TQValueList<GroupWise::ContactItem> & contactInstances ); + TQString displayName(); private: - QString m_name; + TQString m_name; }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.cpp b/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.cpp index fef5d2fe..3f8ff7bf 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.cpp @@ -29,7 +29,7 @@ UpdateFolderTask::~UpdateFolderTask() { } -void UpdateFolderTask::renameFolder( const QString & newName, const GroupWise::FolderItem & existing ) +void UpdateFolderTask::renameFolder( const TQString & newName, const GroupWise::FolderItem & existing ) { Field::FieldList lst; // add the old version of the folder, marked delete diff --git a/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.h b/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.h index 230bd563..479a6bdd 100644 --- a/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.h +++ b/kopete/protocols/groupwise/libgroupwise/tasks/updatefoldertask.h @@ -34,7 +34,7 @@ Q_OBJECT public: UpdateFolderTask(Task* parent); ~UpdateFolderTask(); - void renameFolder( const QString & newName, const GroupWise::FolderItem & existing ); + void renameFolder( const TQString & newName, const GroupWise::FolderItem & existing ); protected: Field::FieldList folderToFields( const GroupWise::FolderItem & folder ); }; diff --git a/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.cpp b/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.cpp index bbd10ee8..4272d956 100644 --- a/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.cpp @@ -1,6 +1,6 @@ #include "clientstream_test.h" -ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, argv ) +ClientStreamTest::ClientStreamTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -12,15 +12,15 @@ ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, myTLSHandler = new QCATLSHandler( myTLS ); myTestObject = new ClientStream( myConnector, myTLSHandler, 0); // notify when the transport layer is connected - connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); // it's necessary to catch this signal and tell the TLS handler to proceed, even if we don't check cert validity - connect( myTLSHandler, SIGNAL(tlsHandshaken()), SLOT(slotTLSHandshaken()) ); + connect( myTLSHandler, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(slotTLSHandshaken()) ); // notify and start sending - connect( myTestObject, SIGNAL( securityLayerActivated(int) ), SLOT( slotSend(int) ) ); - connect( myTestObject, SIGNAL( warning(int) ), SLOT( slotWarning(int) ) ); + connect( myTestObject, TQT_SIGNAL( securityLayerActivated(int) ), TQT_SLOT( slotSend(int) ) ); + connect( myTestObject, TQT_SIGNAL( warning(int) ), TQT_SLOT( slotWarning(int) ) ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); } ClientStreamTest::~ClientStreamTest() @@ -58,7 +58,7 @@ void ClientStreamTest::slotsend(int layer) // we're not connecting... qDebug( "sending request" ); // send a request - QCString command("login"); + TQCString command("login"); Request * firstRequest = testFactory.request( command ); Field::FieldList lst; lst.append( new Field::SingleField( NM_A_SZ_USERID, 0, NMFIELD_TYPE_UTF8, "maeuschen" ) ); diff --git a/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.h b/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.h index 2c77f4e1..fcd540fc 100644 --- a/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.h +++ b/kopete/protocols/groupwise/libgroupwise/tests/clientstream_test.h @@ -13,9 +13,9 @@ #ifndef clientstream_test_h #define clientstream_test_h -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "gwclientstream.h" #include "gwconnector.h" diff --git a/kopete/protocols/groupwise/libgroupwise/tests/coreprotocol_test.cpp b/kopete/protocols/groupwise/libgroupwise/tests/coreprotocol_test.cpp index d1de6084..cb8b292e 100644 --- a/kopete/protocols/groupwise/libgroupwise/tests/coreprotocol_test.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tests/coreprotocol_test.cpp @@ -20,7 +20,7 @@ int main() { CoreProtocol testObject; RequestFactory testFactory; - QCString command("login"); + TQCString command("login"); Request * firstRequest = testFactory.request( command ); Field::FieldList lst; lst.append( new Field::SingleField( NM_A_SZ_USERID, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_UTF8, "blah@fasel.org" ) ); diff --git a/kopete/protocols/groupwise/libgroupwise/tests/field_test.cpp b/kopete/protocols/groupwise/libgroupwise/tests/field_test.cpp index eec3f1f2..2dace60b 100644 --- a/kopete/protocols/groupwise/libgroupwise/tests/field_test.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tests/field_test.cpp @@ -62,15 +62,15 @@ void buildList() // sf - contactlist (empty field array) // sf - message body - Field::SingleField* sf = new Field::SingleField( NM_A_FA_MESSAGE, 0, NMFIELD_TYPE_UTF8, QString::fromLatin1( "Da steh ich nun, ich armer Tor! Und bin so klug als wie zuvor..." ) ); + Field::SingleField* sf = new Field::SingleField( NM_A_FA_MESSAGE, 0, NMFIELD_TYPE_UTF8, TQString::fromLatin1( "Da steh ich nun, ich armer Tor! Und bin so klug als wie zuvor..." ) ); fl.append( sf ); - sf = new Field::SingleField( NM_A_SZ_TRANSACTION_ID, 0, NMFIELD_TYPE_UTF8, QString::fromLatin1( "maeuschen" ) ); + sf = new Field::SingleField( NM_A_SZ_TRANSACTION_ID, 0, NMFIELD_TYPE_UTF8, TQString::fromLatin1( "maeuschen" ) ); fl.append( sf ); // nested list Field::FieldList nl; sf = new Field::SingleField( NM_A_SZ_STATUS, 0, NMFIELD_TYPE_UDWORD, 123 ); nl.append( sf ); - sf = new Field::SingleField( NM_A_SZ_MESSAGE_BODY, 0, NMFIELD_TYPE_UTF8, QString::fromLatin1( "bla bla" ) ); + sf = new Field::SingleField( NM_A_SZ_MESSAGE_BODY, 0, NMFIELD_TYPE_UTF8, TQString::fromLatin1( "bla bla" ) ); nl.append( sf ); Field::MultiField* mf = new Field::MultiField( NM_A_FA_PARTICIPANTS, NMFIELD_METHOD_VALID, 0, NMFIELD_TYPE_ARRAY ); mf->setFields( nl ); @@ -91,7 +91,7 @@ void buildFakeContactList() for ( int i = 0; i < 6; i ++ ) { FieldList contact; - Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( i ) ); + Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( i ) ); contact.append( sf ); sf = new Field::SingleField( NM_A_SZ_DISPLAY_NAME, 0, NMFIELD_TYPE_UTF8, names[i] ); contact.append( sf ); @@ -102,7 +102,7 @@ void buildFakeContactList() // add a folder { FieldList folder; - Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( 1 ) ); + Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( 1 ) ); folder.append( sf ); sf = new Field::SingleField( NM_A_SZ_DISPLAY_NAME, 0, NMFIELD_TYPE_UTF8, "buddies" ); folder.append( sf ); @@ -115,7 +115,7 @@ void buildFakeContactList() for ( int i = 0; i < 3; i ++ ) { FieldList contact; - Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, QString::number( i ) ); + Field::SingleField* sf = new Field::SingleField( NM_A_SZ_OBJECT_ID, 0, NMFIELD_TYPE_UTF8, TQString::number( i ) ); contact.append( sf ); sf = new Field::SingleField( NM_A_SZ_DISPLAY_NAME, 0, NMFIELD_TYPE_UTF8, names[i] ); contact.append( sf ); diff --git a/kopete/protocols/groupwise/libgroupwise/tlshandler.cpp b/kopete/protocols/groupwise/libgroupwise/tlshandler.cpp index 290dba36..16527bba 100644 --- a/kopete/protocols/groupwise/libgroupwise/tlshandler.cpp +++ b/kopete/protocols/groupwise/libgroupwise/tlshandler.cpp @@ -19,8 +19,8 @@ #include "tlshandler.h" -TLSHandler::TLSHandler(QObject *parent) -:QObject(parent) +TLSHandler::TLSHandler(TQObject *parent) +:TQObject(parent) { } diff --git a/kopete/protocols/groupwise/libgroupwise/tlshandler.h b/kopete/protocols/groupwise/libgroupwise/tlshandler.h index 61c8fe7d..ede9d4e3 100644 --- a/kopete/protocols/groupwise/libgroupwise/tlshandler.h +++ b/kopete/protocols/groupwise/libgroupwise/tlshandler.h @@ -20,32 +20,32 @@ #ifndef GWTLSHANDLER_H #define GWTLSHANDLER_H -#include <qobject.h> -//#include<qstring.h> -//#include<qhostaddress.h> -//#include<qstring.h> -//#include<qcstring.h> -//#include<qxml.h> -//#include<qdom.h> +#include <tqobject.h> +//#include<tqstring.h> +//#include<tqhostaddress.h> +//#include<tqstring.h> +//#include<tqcstring.h> +//#include<tqxml.h> +//#include<tqdom.h> class TLSHandler : public QObject { Q_OBJECT public: - TLSHandler(QObject *parent=0); + TLSHandler(TQObject *parent=0); virtual ~TLSHandler(); virtual void reset()=0; - virtual void startClient(const QString &host)=0; - virtual void write(const QByteArray &a)=0; - virtual void writeIncoming(const QByteArray &a)=0; + virtual void startClient(const TQString &host)=0; + virtual void write(const TQByteArray &a)=0; + virtual void writeIncoming(const TQByteArray &a)=0; signals: void success(); void fail(); void closed(); - void readyRead(const QByteArray &a); - void readyReadOutgoing(const QByteArray &a, int plainBytes); + void readyRead(const TQByteArray &a); + void readyReadOutgoing(const TQByteArray &a, int plainBytes); }; #endif diff --git a/kopete/protocols/groupwise/libgroupwise/transfer.cpp b/kopete/protocols/groupwise/libgroupwise/transfer.cpp index 366deed0..68eb97b3 100644 --- a/kopete/protocols/groupwise/libgroupwise/transfer.cpp +++ b/kopete/protocols/groupwise/libgroupwise/transfer.cpp @@ -14,7 +14,7 @@ * * ************************************************************************* */ -#include <qapplication.h> +#include <tqapplication.h> #include "transfer.h" diff --git a/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.cpp b/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.cpp index 2527968e..ceb29632 100644 --- a/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.cpp +++ b/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.cpp @@ -21,7 +21,7 @@ #include "userdetailsmanager.h" UserDetailsManager::UserDetailsManager( Client * parent, const char *name) - : QObject(parent, name), m_client( parent ) + : TQObject(parent, name), m_client( parent ) { } @@ -29,30 +29,30 @@ UserDetailsManager::~UserDetailsManager() { } -void UserDetailsManager::dump( const QStringList & list ) +void UserDetailsManager::dump( const TQStringList & list ) { - for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { - m_client->debug( QString( " - %1" ).arg (*it) ); + m_client->debug( TQString( " - %1" ).arg (*it) ); } } -bool UserDetailsManager::known( const QString & dn ) +bool UserDetailsManager::known( const TQString & dn ) { if ( dn == m_client->userDN() ) return true; // TODO: replace with m_detailsMap.contains( dn ); - QStringList::Iterator found = m_detailsMap.keys().find( dn ); + TQStringList::Iterator found = m_detailsMap.keys().find( dn ); // we always know the local user's details, so don't look them up return ( found !=m_detailsMap.keys().end() ); } -ContactDetails UserDetailsManager::details( const QString & dn ) +ContactDetails UserDetailsManager::details( const TQString & dn ) { return m_detailsMap[ dn ]; } -QStringList UserDetailsManager::knownDNs() +TQStringList UserDetailsManager::knownDNs() { return m_detailsMap.keys(); } @@ -61,23 +61,23 @@ void UserDetailsManager::addDetails( const ContactDetails & details ) { //qDebug( "UserDetailsManager::addContact, got %s, we now know: ", details.dn.ascii() ); m_detailsMap.insert( details.dn, details ); -/* QStringList keys = m_detailsMap.keys(); +/* TQStringList keys = m_detailsMap.keys(); dump( keys ); qDebug( "UserDetailsManager::addContact, pending: " ); dump( m_pendingDNs );*/ } -void UserDetailsManager::removeContact( const QString & dn ) +void UserDetailsManager::removeContact( const TQString & dn ) { m_detailsMap.remove( dn ); } -void UserDetailsManager::requestDetails( const QStringList & dnList, bool onlyUnknown ) +void UserDetailsManager::requestDetails( const TQStringList & dnList, bool onlyUnknown ) { // build a list of DNs that are not already subject to a pending request - QStringList requestList; - QValueListConstIterator<QString> end = dnList.end(); - for ( QValueListConstIterator<QString> it = dnList.begin(); it != end; ++it ) + TQStringList requestList; + TQValueListConstIterator<TQString> end = dnList.end(); + for ( TQValueListConstIterator<TQString> it = dnList.begin(); it != end; ++it ) { // don't request our own details if ( *it == m_client->userDN() ) @@ -85,10 +85,10 @@ void UserDetailsManager::requestDetails( const QStringList & dnList, bool onlyUn // don't request details we already have unless the caller specified this if ( onlyUnknown && known( *it ) ) break; - QStringList::Iterator found = m_pendingDNs.find( *it ); + TQStringList::Iterator found = m_pendingDNs.find( *it ); if ( found == m_pendingDNs.end() ) { - m_client->debug( QString( "UserDetailsManager::requestDetails - including %1" ).arg( (*it) ) ); + m_client->debug( TQString( "UserDetailsManager::requestDetails - including %1" ).arg( (*it) ) ); requestList.append( *it ); m_pendingDNs.append( *it ); } @@ -97,8 +97,8 @@ void UserDetailsManager::requestDetails( const QStringList & dnList, bool onlyUn { GetDetailsTask * gdt = new GetDetailsTask( m_client->rootTask() ); gdt->userDNs( requestList ); - connect( gdt, SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ), - SLOT( slotReceiveContactDetails( const GroupWise::ContactDetails & ) ) ); + connect( gdt, TQT_SIGNAL( gotContactUserDetails( const GroupWise::ContactDetails & ) ), + TQT_SLOT( slotReceiveContactDetails( const GroupWise::ContactDetails & ) ) ); // TODO: connect to gdt's finished() signal, check for failures, expand gdt to maintain a list of not found DNs? gdt->go( true ); } @@ -108,10 +108,10 @@ void UserDetailsManager::requestDetails( const QStringList & dnList, bool onlyUn } } -void UserDetailsManager::requestDetails( const QString & dn, bool onlyUnknown ) +void UserDetailsManager::requestDetails( const TQString & dn, bool onlyUnknown ) { - m_client->debug( QString( "UserDetailsManager::requestDetails for %1" ).arg( dn ) ); - QStringList list; + m_client->debug( TQString( "UserDetailsManager::requestDetails for %1" ).arg( dn ) ); + TQStringList list; list.append( dn ); requestDetails( list, onlyUnknown ); } diff --git a/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.h b/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.h index 4e9b6022..f5a5ff6c 100644 --- a/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.h +++ b/kopete/protocols/groupwise/libgroupwise/userdetailsmanager.h @@ -18,9 +18,9 @@ #ifndef USERDETAILSMANAGER_H #define USERDETAILSMANAGER_H -#include <qmap.h> -#include <qobject.h> -#include <qstringlist.h> +#include <tqmap.h> +#include <tqobject.h> +#include <tqstringlist.h> #include "gwerror.h" class Client; @@ -40,15 +40,15 @@ public: /** * List of DNs that we have already received details for */ - QStringList knownDNs(); + TQStringList knownDNs(); /** * Check if we have details for a single DN */ - bool known( const QString &dn ); + bool known( const TQString &dn ); /** * Get details for a given DN */ - ContactDetails details( const QString &dn ); + ContactDetails details( const TQString &dn ); /** * Add a ContactDetails object to our cache. * This SHOULD be called when receiving details in contactlist receive and manipulation, to prevent unnecessary additional requests. @@ -58,27 +58,27 @@ public: * Remove a contact from the list of known DNs. This MUST be performed when a client removes a DN from its local contact list, * otherwise new events from this DN will not receive user details. */ - void removeContact( const QString & dn ); + void removeContact( const TQString & dn ); /** * Explicitly request details for a set of contacts from the server. * Will signal @ref gotContactUserDetails for each one when they are available. */ - void requestDetails( const QStringList & dnList, bool onlyUnknown = true ); + void requestDetails( const TQStringList & dnList, bool onlyUnknown = true ); /** * Explicitly request a contact's details from the server. Will signal @ref gotContactUserDetails when they are available. */ - void requestDetails( const QString & dn, bool onlyUnknown = true ); + void requestDetails( const TQString & dn, bool onlyUnknown = true ); signals: void gotContactDetails( const GroupWise::ContactDetails & ); protected slots: void slotReceiveContactDetails( const GroupWise::ContactDetails & ); protected: - void dump( const QStringList & list ); + void dump( const TQStringList & list ); private: - QStringList m_pendingDNs; // a list of DNs that have pending requests + TQStringList m_pendingDNs; // a list of DNs that have pending requests Client * m_client; - QMap< QString, GroupWise::ContactDetails > m_detailsMap; + TQMap< TQString, GroupWise::ContactDetails > m_detailsMap; }; #endif |