diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/oscar/liboscar | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/oscar/liboscar')
141 files changed, 533 insertions, 493 deletions
diff --git a/kopete/protocols/oscar/liboscar/HACKING b/kopete/protocols/oscar/liboscar/HACKING index 9bd25476..36a6edf5 100644 --- a/kopete/protocols/oscar/liboscar/HACKING +++ b/kopete/protocols/oscar/liboscar/HACKING @@ -101,7 +101,7 @@ Spaces ================================================================================ Spaces should be used between the conditional / loop type and the -conditional statement. They should also not be used after parenthesis. However +conditional statement. They should also not be used after tqparenthesis. However the should be to mark of mathematical or comparative operators. if ( foo == bar ) @@ -122,15 +122,15 @@ not be inline in the headers. The organization of the members in a class should roughly as follows: public: -public slots: +public Q_SLOTS: protected: -protected slots: -signals: +protected Q_SLOTS: +Q_SIGNALS: private: // member funtions -private slots: +private Q_SLOTS: private: // member variables -If there are no private slots there is no need for two private sections, however +If there are no private Q_SLOTS there is no need for two private sections, however private functions and private variables should be clearly separated. The implementations files -- .cpp files -- should follow (when possible) the @@ -188,7 +188,7 @@ written in this document. Those files that don't match will be corrected eventua To make things easier on you, kate modelines are provided at the end of certain files to help enforce the coding style. If you're using the new C S&S Indenter that will be in KDE 3.4, I can provide a patch that will automatically implement the space padding around -parenthesis. Please mail me so I can send it to you. +tqparenthesis. Please mail me so I can send it to you. Matt Rogers <mattr@kde.org> diff --git a/kopete/protocols/oscar/liboscar/aimlogintask.cpp b/kopete/protocols/oscar/liboscar/aimlogintask.cpp index da066333..05a63198 100644 --- a/kopete/protocols/oscar/liboscar/aimlogintask.cpp +++ b/kopete/protocols/oscar/liboscar/aimlogintask.cpp @@ -29,8 +29,8 @@ using namespace Oscar; -AimLoginTask::AimLoginTask( Task* parent ) - : Task ( parent ) +AimLoginTask::AimLoginTask( Task* tqparent ) + : Task ( tqparent ) { } @@ -158,7 +158,7 @@ void AimLoginTask::sendLoginRequest() outbuf->addTLV(0x0001, client()->userId().length(), client()->userId().latin1()); - TQByteArray digest( 17 ); //apparently MD5 digests are 16 bytes long + TQByteArray digest( 17 ); //aptqparently MD5 digests are 16 bytes long encodePassword( digest ); digest[16] = '\0'; //do this so that addTLV sees a NULL-terminator @@ -189,7 +189,7 @@ void AimLoginTask::handleLoginResponse() if ( !st ) { - setError( -1 , TQString::null ); + setError( -1 , TQString() ); return; } @@ -211,7 +211,7 @@ void AimLoginTask::handleLoginResponse() errorNum << endl; Oscar::SNAC s = { 0, 0, 0, 0 }; client()->fatalTaskError( s, errorNum ); - setError( errorNum, TQString::null ); + setError( errorNum, TQString() ); return; //if there's an error, we'll need to disconnect anyways } @@ -220,7 +220,7 @@ void AimLoginTask::handleLoginResponse() { TQString ip = TQString( server.data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(5) [SERVER] " << ip << endl; - int index = ip.find( ':' ); + int index = ip.tqfind( ':' ); m_bosHost = ip.left( index ); ip.remove( 0 , index+1 ); //get rid of the colon and everything before it m_bosPort = ip.left(4); //we only need 4 bytes @@ -233,7 +233,7 @@ void AimLoginTask::handleLoginResponse() { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(6) [COOKIE]" << endl; m_cookie.duplicate( cookie.data ); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } tlvList.clear(); } diff --git a/kopete/protocols/oscar/liboscar/aimlogintask.h b/kopete/protocols/oscar/liboscar/aimlogintask.h index cc564592..11761ad5 100644 --- a/kopete/protocols/oscar/liboscar/aimlogintask.h +++ b/kopete/protocols/oscar/liboscar/aimlogintask.h @@ -26,8 +26,9 @@ using namespace Oscar; class AimLoginTask : public Task { Q_OBJECT + TQ_OBJECT public: - AimLoginTask( Task* parent ); + AimLoginTask( Task* tqparent ); ~AimLoginTask(); bool take( Transfer* transfer ); virtual void onGo(); diff --git a/kopete/protocols/oscar/liboscar/blmlimitstask.cpp b/kopete/protocols/oscar/liboscar/blmlimitstask.cpp index 0b866de8..b61c5cdd 100644 --- a/kopete/protocols/oscar/liboscar/blmlimitstask.cpp +++ b/kopete/protocols/oscar/liboscar/blmlimitstask.cpp @@ -23,8 +23,8 @@ #include "oscartypes.h" #include "oscarutils.h" -BLMLimitsTask::BLMLimitsTask( Task* parent ) - : Task( parent ) +BLMLimitsTask::BLMLimitsTask( Task* tqparent ) + : Task( tqparent ) { } @@ -71,7 +71,7 @@ bool BLMLimitsTask::take(Transfer* transfer) break; } } - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); return true; } else diff --git a/kopete/protocols/oscar/liboscar/blmlimitstask.h b/kopete/protocols/oscar/liboscar/blmlimitstask.h index 7ded03a7..49fa11d0 100644 --- a/kopete/protocols/oscar/liboscar/blmlimitstask.h +++ b/kopete/protocols/oscar/liboscar/blmlimitstask.h @@ -28,7 +28,7 @@ Fetch the limits for the BLM service class BLMLimitsTask : public Task { public: - BLMLimitsTask( Task* parent ); + BLMLimitsTask( Task* tqparent ); ~BLMLimitsTask(); diff --git a/kopete/protocols/oscar/liboscar/buddyicontask.cpp b/kopete/protocols/oscar/liboscar/buddyicontask.cpp index facaae1a..1feccdc4 100644 --- a/kopete/protocols/oscar/liboscar/buddyicontask.cpp +++ b/kopete/protocols/oscar/liboscar/buddyicontask.cpp @@ -27,8 +27,8 @@ #include "oscarutils.h" #include <typeinfo> -BuddyIconTask::BuddyIconTask( Task* parent ) - :Task( parent ) +BuddyIconTask::BuddyIconTask( Task* tqparent ) + :Task( tqparent ) { m_seq = 0; m_refNum = -1; @@ -125,7 +125,7 @@ bool BuddyIconTask::take( Transfer* transfer ) else handleICQBuddyIconResponse(); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); setTransfer( 0 ); return true; } @@ -153,7 +153,7 @@ void BuddyIconTask::handleUploadResponse() TQByteArray hash( b->getBlock( iconHashSize ) ); //check the hash kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "hash " << hash << endl; - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } diff --git a/kopete/protocols/oscar/liboscar/buddyicontask.h b/kopete/protocols/oscar/liboscar/buddyicontask.h index f00a5b23..2eb5294a 100644 --- a/kopete/protocols/oscar/liboscar/buddyicontask.h +++ b/kopete/protocols/oscar/liboscar/buddyicontask.h @@ -28,8 +28,9 @@ class Transfer; class BuddyIconTask : public Task { Q_OBJECT + TQ_OBJECT public: - BuddyIconTask( Task* parent ); + BuddyIconTask( Task* tqparent ); void uploadIcon( WORD length, const TQByteArray& data ); void setReferenceNum( WORD num ); diff --git a/kopete/protocols/oscar/liboscar/buffer.cpp b/kopete/protocols/oscar/liboscar/buffer.cpp index 23dca1bb..c778d382 100644 --- a/kopete/protocols/oscar/liboscar/buffer.cpp +++ b/kopete/protocols/oscar/liboscar/buffer.cpp @@ -34,7 +34,7 @@ Buffer::Buffer( const Buffer& other ) mReadPos = other.mReadPos; } -Buffer::Buffer(const char *b, Q_ULONG len) +Buffer::Buffer(const char *b, TQ_ULONG len) { mBuffer.duplicate(b, len); mReadPos=0; @@ -376,7 +376,7 @@ int Buffer::addChatTLV(const WORD type, const WORD exchange, void Buffer::expandBuffer(unsigned int inc) { - mBuffer.resize(mBuffer.size()+inc, TQGArray::SpeedOptim); + mBuffer.tqresize(mBuffer.size()+inc, TQGArray::SpeedOptim); } TQCString Buffer::getLNTS() @@ -451,7 +451,7 @@ TQByteArray Buffer::getBUIN() char *Buffer::buffer() const { - return mBuffer.data(); + return const_cast<char*>(mBuffer.data()); } int Buffer::length() const @@ -477,7 +477,7 @@ TQString Buffer::toString() const if ( c < 0x10 ) hex.append("0"); - hex.append(TQString("%1 ").arg(c, 0, 16)); + hex.append(TQString("%1 ").tqarg(c, 0, 16)); ascii.append(isprint(c) ? c : '.'); @@ -485,8 +485,8 @@ TQString Buffer::toString() const { output += hex + " |" + ascii + "|\n"; i=0; - hex=TQString::null; - ascii=TQString::null; + hex=TQString(); + ascii=TQString(); } } diff --git a/kopete/protocols/oscar/liboscar/buffer.h b/kopete/protocols/oscar/liboscar/buffer.h index 1bcf91d9..1bcce492 100644 --- a/kopete/protocols/oscar/liboscar/buffer.h +++ b/kopete/protocols/oscar/liboscar/buffer.h @@ -45,7 +45,7 @@ class Buffer * Constructor that creates a prefilled buffer of @p len length * that contains the data from @p b. */ - Buffer(const char *b, Q_ULONG len); + Buffer(const char *b, TQ_ULONG len); /** * \brief Create a prefilled buffer diff --git a/kopete/protocols/oscar/liboscar/bytestream.cpp b/kopete/protocols/oscar/liboscar/bytestream.cpp index 87603c76..f2fb8e51 100644 --- a/kopete/protocols/oscar/liboscar/bytestream.cpp +++ b/kopete/protocols/oscar/liboscar/bytestream.cpp @@ -63,9 +63,9 @@ public: }; //! -//! Constructs a ByteStream object with parent \a parent. -ByteStream::ByteStream(TQObject *parent) -:TQObject(parent) +//! Constructs a ByteStream object with tqparent \a tqparent. +ByteStream::ByteStream(TQObject *tqparent) +:TQObject(tqparent) { d = new Private; } diff --git a/kopete/protocols/oscar/liboscar/bytestream.h b/kopete/protocols/oscar/liboscar/bytestream.h index a990a940..c4dc96e1 100644 --- a/kopete/protocols/oscar/liboscar/bytestream.h +++ b/kopete/protocols/oscar/liboscar/bytestream.h @@ -27,12 +27,13 @@ // CS_NAMESPACE_BEGIN // CS_EXPORT_BEGIN -class ByteStream : public QObject +class ByteStream : public TQObject { Q_OBJECT + TQ_OBJECT public: enum Error { ErrRead, ErrWrite, ErrCustom = 10 }; - ByteStream(TQObject *parent=0); + ByteStream(TQObject *tqparent=0); virtual ~ByteStream()=0; virtual bool isOpen() const; diff --git a/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp b/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp index 7c6ff26a..b4dfff4a 100644 --- a/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp +++ b/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp @@ -30,7 +30,7 @@ #include "transfer.h" -ChangeVisibilityTask::ChangeVisibilityTask(Task* parent): Task(parent) +ChangeVisibilityTask::ChangeVisibilityTask(Task* tqparent): Task(tqparent) { m_sequence = 0; m_visible = true; @@ -64,13 +64,13 @@ bool ChangeVisibilityTask::take(Transfer* transfer) if ( forMe( transfer ) ) { setTransfer( transfer ); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); setTransfer( 0 ); return true; } else { - setError( 0, TQString::null ); + setError( 0, TQString() ); return false; } } @@ -82,7 +82,7 @@ void ChangeVisibilityTask::onGo() if ( !item ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Didn't find a visibility item" << endl; - setError( 0, TQString::null ); + setError( 0, TQString() ); return; } @@ -97,7 +97,7 @@ void ChangeVisibilityTask::onGo() if ( Oscar::uptateTLVs( newSSI, tList ) == false ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Visibility didn't change, don't update" << endl; - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); return; } @@ -147,4 +147,4 @@ void ChangeVisibilityTask::sendEditEnd() send( t5 ); } -//kate: indent-mode csands; space-indent off; replace-tabs off; tab-width 4; +//kate: indent-mode csands; space-indent off; tqreplace-tabs off; tab-width 4; diff --git a/kopete/protocols/oscar/liboscar/changevisibilitytask.h b/kopete/protocols/oscar/liboscar/changevisibilitytask.h index 0ec5ab04..9d8676b3 100644 --- a/kopete/protocols/oscar/liboscar/changevisibilitytask.h +++ b/kopete/protocols/oscar/liboscar/changevisibilitytask.h @@ -30,7 +30,7 @@ class ChangeVisibilityTask : public Task { public: - ChangeVisibilityTask( Task* parent ); + ChangeVisibilityTask( Task* tqparent ); ~ChangeVisibilityTask(); void setVisible( bool visible = true ); @@ -55,4 +55,4 @@ private: #endif -//kate: indent-mode csands; space-indent off; replace-tabs off; tab-width 4; +//kate: indent-mode csands; space-indent off; tqreplace-tabs off; tab-width 4; diff --git a/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp b/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp index 914de496..350c58d1 100644 --- a/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp +++ b/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp @@ -25,7 +25,7 @@ #include "connection.h" -ChatNavServiceTask::ChatNavServiceTask( Task* parent ) : Task( parent ) +ChatNavServiceTask::ChatNavServiceTask( Task* tqparent ) : Task( tqparent ) { m_type = Limits; } @@ -97,7 +97,7 @@ bool ChatNavServiceTask::take( Transfer* transfer ) } - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); setTransfer( 0 ); return true; @@ -262,7 +262,7 @@ void ChatNavServiceTask::handleBasicRoomInfo( const TLV& t ) kdDebug(OSCAR_RAW_DEBUG) << "moderator" << endl; break; case 0x6D: - kdDebug(OSCAR_RAW_DEBUG) << "num children" << endl; + kdDebug(OSCAR_RAW_DEBUG) << "num tqchildren" << endl; break; case 0x06F: kdDebug(OSCAR_RAW_DEBUG) << "occupancy" << endl; diff --git a/kopete/protocols/oscar/liboscar/chatnavservicetask.h b/kopete/protocols/oscar/liboscar/chatnavservicetask.h index 8af63247..4c417e3b 100644 --- a/kopete/protocols/oscar/liboscar/chatnavservicetask.h +++ b/kopete/protocols/oscar/liboscar/chatnavservicetask.h @@ -30,8 +30,9 @@ class Transfer; class ChatNavServiceTask : public Task { Q_OBJECT + TQ_OBJECT public: - ChatNavServiceTask( Task* parent ); + ChatNavServiceTask( Task* tqparent ); ~ChatNavServiceTask(); enum RequestType { Limits = 0x0002, Exchange, Room, ExtRoom, Members, diff --git a/kopete/protocols/oscar/liboscar/chatservicetask.cpp b/kopete/protocols/oscar/liboscar/chatservicetask.cpp index c8998495..8d9c55e8 100644 --- a/kopete/protocols/oscar/liboscar/chatservicetask.cpp +++ b/kopete/protocols/oscar/liboscar/chatservicetask.cpp @@ -30,8 +30,8 @@ #include "buffer.h" #include "oscartypes.h" -ChatServiceTask::ChatServiceTask( Task* parent, Oscar::WORD exchange, const TQString& room ) - : Task( parent ), m_encoding( "us-ascii" ) +ChatServiceTask::ChatServiceTask( Task* tqparent, Oscar::WORD exchange, const TQString& room ) + : Task( tqparent ), m_encoding( "us-ascii" ) { m_exchange = exchange; m_room = room; @@ -56,7 +56,7 @@ void ChatServiceTask::onGo() { if ( !m_message ) { - setSuccess( true, TQString::null ); + setSuccess( true, TQString() ); return; } @@ -158,7 +158,7 @@ bool ChatServiceTask::take( Transfer* t ) break; }; - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); setTransfer( 0 ); return true; } @@ -341,7 +341,7 @@ void ChatServiceTask::parseChatMessage() Oscar::Message omessage; omessage.setReceiver( client()->userId() ); omessage.setSender( sender ); - omessage.setTimestamp( TQDateTime::currentDateTime() ); + omessage.setTimestamp( TQDateTime::tqcurrentDateTime() ); omessage.setText( Oscar::Message::UTF8, msgText ); omessage.setType( 0x03 ); omessage.setExchange( m_exchange ); diff --git a/kopete/protocols/oscar/liboscar/chatservicetask.h b/kopete/protocols/oscar/liboscar/chatservicetask.h index 5f19fcae..d9805068 100644 --- a/kopete/protocols/oscar/liboscar/chatservicetask.h +++ b/kopete/protocols/oscar/liboscar/chatservicetask.h @@ -28,8 +28,9 @@ class Transfer; class ChatServiceTask : public Task { Q_OBJECT + TQ_OBJECT public: - ChatServiceTask( Task* parent, Oscar::WORD exchange, const TQString& room ); + ChatServiceTask( Task* tqparent, Oscar::WORD exchange, const TQString& room ); ~ChatServiceTask(); void onGo(); diff --git a/kopete/protocols/oscar/liboscar/client.cpp b/kopete/protocols/oscar/liboscar/client.cpp index 222d9d69..53e38ed1 100644 --- a/kopete/protocols/oscar/liboscar/client.cpp +++ b/kopete/protocols/oscar/liboscar/client.cpp @@ -98,7 +98,7 @@ public: TQValueList<WORD> redirectionServices; WORD currentRedirect; TQByteArray cookie; - DWORD connectAsStatus; // icq only + DWORD connectAstqStatus; // icq only TQString connectWithMessage; // icq only Oscar::Settings* settings; @@ -128,7 +128,7 @@ public: struct AwayMsgRequest { TQString contact; - ICQStatus contactStatus; + ICQtqStatus contacttqStatus; }; TQValueList<AwayMsgRequest> awayMsgRequestQueue; TQTimer* awayMsgRequestTimer; @@ -137,8 +137,8 @@ public: const Oscar::ClientVersion* version; }; -Client::Client( TQObject* parent ) -:TQObject( parent, "oscarclient" ) +Client::Client( TQObject* tqparent ) +:TQObject( tqparent, "oscarclient" ) { m_loginTask = 0L; m_loginTaskTwo = 0L; @@ -149,7 +149,7 @@ Client::Client( TQObject* parent ) d->isIcq = false; //default to AIM d->redirectRequested = false; d->currentRedirect = 0; - d->connectAsStatus = 0x0; // default to online + d->connectAstqStatus = 0x0; // default to online d->ssiManager = new SSIManager( this ); d->settings = new Oscar::Settings(); d->errorTask = 0L; @@ -222,8 +222,8 @@ void Client::close() //don't clear the stored status between stage one and two if ( d->stage == ClientPrivate::StageTwo ) { - d->connectAsStatus = 0x0; - d->connectWithMessage = TQString::null; + d->connectAstqStatus = 0x0; + d->connectWithMessage = TQString(); } d->exchanges.clear(); @@ -233,10 +233,10 @@ void Client::close() d->ssiManager->clear(); } -void Client::setStatus( AIMStatus status, const TQString &_message ) +void Client::settqStatus( AIMtqStatus status, const TQString &_message ) { // AIM: you're away exactly when your away message isn't empty. - // can't use TQString::null as a message either; ProfileTask + // can't use TQString() as a message either; ProfileTask // interprets null as "don't change". TQString message; if ( status == Online ) @@ -257,7 +257,7 @@ void Client::setStatus( AIMStatus status, const TQString &_message ) pt->go( true ); } -void Client::setStatus( DWORD status, const TQString &message ) +void Client::settqStatus( DWORD status, const TQString &message ) { // remember the message to reply with, when requested kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Setting status message to "<< message << endl; @@ -292,7 +292,7 @@ void Client::setStatus( DWORD status, const TQString &message ) } else { - d->connectAsStatus = status; + d->connectAstqStatus = status; d->connectWithMessage = message; } } @@ -399,7 +399,7 @@ void Client::serviceSetupFinished() d->active = true; if ( isIcq() ) - setStatus( d->connectAsStatus, d->connectWithMessage ); + settqStatus( d->connectAstqStatus, d->connectWithMessage ); d->ownStatusTask->go(); @@ -431,7 +431,7 @@ void Client::receivedIcqInfo( const TQString& contact, unsigned int type ) emit receivedIcqLongInfo( contact ); } -void Client::receivedInfo( Q_UINT16 sequence ) +void Client::receivedInfo( TQ_UINT16 sequence ) { UserDetails details = d->userInfoTask->getInfoFor( sequence ); emit receivedUserInfo( details.userId(), details ); @@ -807,8 +807,8 @@ void Client::sendWarning( const TQString& contact, bool anonymous ) WarningTask* warnTask = new WarningTask( c->rootTask() ); warnTask->setContact( contact ); warnTask->setAnonymous( anonymous ); - TQObject::connect( warnTask, TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ), - this, TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ) ); + TQObject::connect( warnTask, TQT_SIGNAL( userWarned( const TQString&, TQ_UINT16, TQ_UINT16 ) ), + this, TQT_SIGNAL( userWarned( const TQString&, TQ_UINT16, TQ_UINT16 ) ) ); warnTask->go( true ); } @@ -862,14 +862,14 @@ void Client::requestAIMAwayMessage( const TQString& contact ) d->userInfoTask->requestInfoFor( contact, UserInfoTask::AwayMessage ); } -void Client::requestICQAwayMessage( const TQString& contact, ICQStatus contactStatus ) +void Client::requestICQAwayMessage( const TQString& contact, ICQtqStatus contacttqStatus ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "requesting away message for " << contact << endl; Oscar::Message msg; msg.setType( 2 ); msg.setReceiver( contact ); msg.addProperty( Oscar::Message::StatusMessageRequest ); - switch ( contactStatus ) + switch ( contacttqStatus ) { case ICQAway: msg.setMessageType( 0xE8 ); // away @@ -894,7 +894,7 @@ void Client::requestICQAwayMessage( const TQString& contact, ICQStatus contactSt sendMessage( msg ); } -void Client::addICQAwayMessageRequest( const TQString& contact, ICQStatus contactStatus ) +void Client::addICQAwayMessageRequest( const TQString& contact, ICQtqStatus contacttqStatus ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "adding away message request for " << contact << " to queue" << endl; @@ -902,7 +902,7 @@ void Client::addICQAwayMessageRequest( const TQString& contact, ICQStatus contac //remove old request if still exists removeICQAwayMessageRequest( contact ); - ClientPrivate::AwayMsgRequest amr = { contact, contactStatus }; + ClientPrivate::AwayMsgRequest amr = { contact, contacttqStatus }; d->awayMsgRequestQueue.prepend( amr ); if ( !d->awayMsgRequestTimer->isActive() ) @@ -959,7 +959,7 @@ void Client::nextICQAwayMessageRequest() amr = d->awayMsgRequestQueue.back(); d->awayMsgRequestQueue.pop_back(); - requestICQAwayMessage( amr.contact, amr.contactStatus ); + requestICQAwayMessage( amr.contact, amr.contacttqStatus ); } void Client::requestStatusInfo( const TQString& contact ) @@ -1099,7 +1099,7 @@ void Client::requestServerRedirect( WORD family, WORD exchange, if ( !c ) return; - if ( d->redirectionServices.findIndex( family ) == -1 ) + if ( d->redirectionServices.tqfindIndex( family ) == -1 ) d->redirectionServices.append( family ); //don't add families twice if ( d->currentRedirect != 0 ) @@ -1125,11 +1125,11 @@ void Client::requestServerRedirect( WORD family, WORD exchange, void Client::haveServerForRedirect( const TQString& host, const TQByteArray& cookie, WORD ) { //nasty sender() usage to get the task with chat room info - TQObject* o = const_cast<TQObject*>( sender() ); + TQObject* o = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>( sender() )); ServerRedirectTask* srt = dynamic_cast<ServerRedirectTask*>( o ); //create a new connection and set it up - int colonPos = host.find(':'); + int colonPos = host.tqfind(':'); TQString realHost, realPort; if ( colonPos != -1 ) { @@ -1139,7 +1139,7 @@ void Client::haveServerForRedirect( const TQString& host, const TQByteArray& coo else { realHost = host; - realPort = TQString::fromLatin1("5190"); + realPort = TQString::tqfromLatin1("5190"); } Connection* c = createConnection( realHost, realPort ); @@ -1246,7 +1246,7 @@ void Client::determineDisconnection( int code, const TQString& string ) return; //yay for the sender() hack! - TQObject* obj = const_cast<TQObject*>( sender() ); + TQObject* obj = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>( sender() )); Connection* c = dynamic_cast<Connection*>( obj ); if ( !c ) return; @@ -1350,4 +1350,4 @@ bool Client::hasIconConnection( ) const } #include "client.moc" -//kate: tab-width 4; indent-mode csands; space-indent off; replace-tabs off; +//kate: tab-width 4; indent-mode csands; space-indent off; tqreplace-tabs off; diff --git a/kopete/protocols/oscar/liboscar/client.h b/kopete/protocols/oscar/liboscar/client.h index 78597746..5e9cc61b 100644 --- a/kopete/protocols/oscar/liboscar/client.h +++ b/kopete/protocols/oscar/liboscar/client.h @@ -47,9 +47,10 @@ namespace Oscar class Settings; } -class KOPETE_EXPORT Client : public QObject +class KOPETE_EXPORT Client : public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -67,14 +68,14 @@ public: FatalProtocolError = 3 }; - enum AIMStatus { Online = 0, Away }; - enum ICQStatus { ICQOnline = 0, ICQAway, ICQNotAvailable, ICQOccupied, ICQDoNotDisturb, ICQFreeForChat }; + enum AIMtqStatus { Online = 0, Away }; + enum ICQtqStatus { ICQOnline = 0, ICQAway, ICQNotAvailable, ICQOccupied, ICQDoNotDisturb, ICQFreeForChat }; /************* EXTERNAL API *************/ - Client(TQObject *parent=0); + Client(TQObject *tqparent=0); ~Client(); /** @@ -102,9 +103,9 @@ public: /** Logout and disconnect */ void close(); /** Set our status for AIM */ - void setStatus( AIMStatus status, const TQString &message = TQString::null ); + void settqStatus( AIMtqStatus status, const TQString &message = TQString() ); /** Set our status for ICQ */ - void setStatus( DWORD status, const TQString &message = TQString::null ); + void settqStatus( DWORD status, const TQString &message = TQString() ); /** Retrieve our user info */ UserDetails ourInfo() const; @@ -255,7 +256,7 @@ public: * Add the icq away message request to queue * \param contact the contact to get info for */ - void addICQAwayMessageRequest( const TQString& contact, ICQStatus contactStatus ); + void addICQAwayMessageRequest( const TQString& contact, ICQtqStatus contacttqStatus ); /** * Remove the icq away message request from queue @@ -280,7 +281,7 @@ public: //! Start a server redirect for a different service void requestServerRedirect( WORD family, WORD e = 0, TQByteArray c = TQByteArray(), - WORD instance = 0, const TQString& room = TQString::null ); + WORD instance = 0, const TQString& room = TQString() ); //! Start uploading a buddy icon void sendBuddyIcon( const TQByteArray& imageData ); @@ -411,7 +412,7 @@ signals: void receivedUserInfo( const TQString& contact, const UserDetails& details ); /** We warned a user */ - void userWarned( const TQString& contact, Q_UINT16 increase, Q_UINT16 newLevel ); + void userWarned( const TQString& contact, TQ_UINT16 increase, TQ_UINT16 newLevel ); /** Search signals */ void gotSearchResults( const ICQSearchResult& ); @@ -462,7 +463,7 @@ protected slots: void receivedIcqInfo( const TQString& contact, unsigned int type ); /** we have normal user info for a contact */ - void receivedInfo( Q_UINT16 sequence ); + void receivedInfo( TQ_UINT16 sequence ); /** received a message of some kind */ void receivedMessage( const Oscar::Message& msg ); @@ -504,7 +505,7 @@ private: * \param contact the contact to get info for */ //TODO only made a default for testing w/o frontend - void requestICQAwayMessage( const TQString& contact, ICQStatus contactStatus = ICQAway ); + void requestICQAwayMessage( const TQString& contact, ICQtqStatus contacttqStatus = ICQAway ); private: class ClientPrivate; diff --git a/kopete/protocols/oscar/liboscar/clientreadytask.cpp b/kopete/protocols/oscar/liboscar/clientreadytask.cpp index d5b65069..0f324f1a 100644 --- a/kopete/protocols/oscar/liboscar/clientreadytask.cpp +++ b/kopete/protocols/oscar/liboscar/clientreadytask.cpp @@ -28,7 +28,7 @@ using namespace Oscar; -ClientReadyTask::ClientReadyTask(Task* parent): Task(parent) +ClientReadyTask::ClientReadyTask(Task* tqparent): Task(tqparent) { m_classList = client()->rateManager()->classList(); } @@ -102,7 +102,7 @@ void ClientReadyTask::onGo() //with the hell that is oscar login. (just wait until you get a message) Transfer* t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } diff --git a/kopete/protocols/oscar/liboscar/clientreadytask.h b/kopete/protocols/oscar/liboscar/clientreadytask.h index d632351f..ac570895 100644 --- a/kopete/protocols/oscar/liboscar/clientreadytask.h +++ b/kopete/protocols/oscar/liboscar/clientreadytask.h @@ -30,7 +30,7 @@ Fire and forget task to let the server know we're ready class ClientReadyTask : public Task { public: - ClientReadyTask( Task* parent ); + ClientReadyTask( Task* tqparent ); ~ClientReadyTask(); virtual void onGo(); diff --git a/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp b/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp index 3b062b2a..d85ca4df 100644 --- a/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp +++ b/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp @@ -28,8 +28,8 @@ using namespace Oscar; -CloseConnectionTask::CloseConnectionTask( Task* parent ) - : Task(parent) +CloseConnectionTask::CloseConnectionTask( Task* tqparent ) + : Task(tqparent) { } @@ -98,7 +98,7 @@ bool CloseConnectionTask::take( Transfer* transfer ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(5) [SERVER] " << TQString( server.data ) << endl; TQString ip = server.data; - int index = ip.find( ':' ); + int index = ip.tqfind( ':' ); m_bosHost = ip.left( index ); ip.remove( 0 , index+1 ); //get rid of the colon and everything before it m_bosPort = ip; diff --git a/kopete/protocols/oscar/liboscar/closeconnectiontask.h b/kopete/protocols/oscar/liboscar/closeconnectiontask.h index c3001ba7..8bda062f 100644 --- a/kopete/protocols/oscar/liboscar/closeconnectiontask.h +++ b/kopete/protocols/oscar/liboscar/closeconnectiontask.h @@ -31,7 +31,7 @@ class TQString; class CloseConnectionTask : public Task { public: - CloseConnectionTask(Task* parent); + CloseConnectionTask(Task* tqparent); ~CloseConnectionTask(); @@ -59,4 +59,4 @@ private: #endif -//kate: indent-mode csands; space-indent off; tab-width 4; replace-tabs off; +//kate: indent-mode csands; space-indent off; tab-width 4; tqreplace-tabs off; diff --git a/kopete/protocols/oscar/liboscar/connection.cpp b/kopete/protocols/oscar/liboscar/connection.cpp index a4bc4877..03452153 100644 --- a/kopete/protocols/oscar/liboscar/connection.cpp +++ b/kopete/protocols/oscar/liboscar/connection.cpp @@ -96,7 +96,7 @@ void Connection::close() bool Connection::isSupported( int family ) const { - return ( d->familyList.findIndex( family ) != -1 ); + return ( d->familyList.tqfindIndex( family ) != -1 ); } TQValueList<int> Connection::supportedFamilies() const @@ -129,7 +129,7 @@ Oscar::Settings* Connection::settings() const return d->client->clientSettings(); } -Q_UINT16 Connection::flapSequence() +TQ_UINT16 Connection::flapSequence() { d->flapSequence++; if ( d->flapSequence >= 0x8000 ) //the max flap sequence is 0x8000 ( HEX ) @@ -138,7 +138,7 @@ Q_UINT16 Connection::flapSequence() return d->flapSequence; } -Q_UINT32 Connection::snacSequence() +TQ_UINT32 Connection::snacSequence() { d->snacSequence++; return d->snacSequence; diff --git a/kopete/protocols/oscar/liboscar/connection.h b/kopete/protocols/oscar/liboscar/connection.h index f2c1da75..b840a597 100644 --- a/kopete/protocols/oscar/liboscar/connection.h +++ b/kopete/protocols/oscar/liboscar/connection.h @@ -45,9 +45,10 @@ class Settings; * connection to an OSCAR server * @author Matt Rogers */ -class Connection : public QObject +class Connection : public TQObject { Q_OBJECT + TQ_OBJECT public: Connection( Connector* connector, ClientStream* cs, const char* name = 0 ); @@ -125,17 +126,17 @@ public: /** * Get the chat room name for this connection. - * @return the name of the room or TQString::null if not connected to a room + * @return the name of the room or TQString() if not connected to a room */ /** Get the user settings object */ Oscar::Settings* settings() const; /** Get the current FLAP sequence for this connection */ - Q_UINT16 flapSequence(); + TQ_UINT16 flapSequence(); /** Get the current SNAC sequence for this connection */ - Q_UINT32 snacSequence(); + TQ_UINT32 snacSequence(); /** Get the cookie for this connection */ TQByteArray cookie() const; diff --git a/kopete/protocols/oscar/liboscar/connectionhandler.cpp b/kopete/protocols/oscar/liboscar/connectionhandler.cpp index bd4df3c5..3f2c1eff 100644 --- a/kopete/protocols/oscar/liboscar/connectionhandler.cpp +++ b/kopete/protocols/oscar/liboscar/connectionhandler.cpp @@ -112,16 +112,16 @@ Connection* ConnectionHandler::defaultConnection() const void ConnectionHandler::addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const TQString& room ) { - if ( d->connections.findIndex( c ) == -1 ) + if ( d->connections.tqfindIndex( c ) == -1 ) d->connections.append( c ); - ConnectionRoomInfo info = qMakePair( exchange, room ); + ConnectionRoomInfo info = tqMakePair( exchange, room ); d->chatRoomConnections[c] = info; } Connection* ConnectionHandler::connectionForChatRoom( Oscar::WORD exchange, const TQString& room ) { - ConnectionRoomInfo infoToFind = qMakePair( exchange, room ); + ConnectionRoomInfo infoToFind = tqMakePair( exchange, room ); TQMap<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end(); for ( it = d->chatRoomConnections.begin(); it != itEnd; ++it ) { @@ -137,8 +137,8 @@ Connection* ConnectionHandler::connectionForChatRoom( Oscar::WORD exchange, cons TQString ConnectionHandler::chatRoomForConnection( Connection* c ) { - if ( d->connections.findIndex( c ) == -1 ) - return TQString::null; + if ( d->connections.tqfindIndex( c ) == -1 ) + return TQString(); TQMap<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end(); for ( it = d->chatRoomConnections.begin(); it != itEnd; ++it ) @@ -150,13 +150,13 @@ TQString ConnectionHandler::chatRoomForConnection( Connection* c ) } } - return TQString::null; + return TQString(); } Oscar::WORD ConnectionHandler::exchangeForConnection( Connection* c ) { - if ( d->connections.findIndex( c ) == -1 ) + if ( d->connections.tqfindIndex( c ) == -1 ) return 0xFFFF; TQMap<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end(); diff --git a/kopete/protocols/oscar/liboscar/connectionhandler.h b/kopete/protocols/oscar/liboscar/connectionhandler.h index e8c50b12..c87ee298 100644 --- a/kopete/protocols/oscar/liboscar/connectionhandler.h +++ b/kopete/protocols/oscar/liboscar/connectionhandler.h @@ -26,7 +26,7 @@ class Connection; -typedef QPair<Oscar::WORD, TQString> ConnectionRoomInfo; +typedef TQPair<Oscar::WORD, TQString> ConnectionRoomInfo; /** @author Kopete Developers @@ -98,7 +98,7 @@ public: * Get the room name for the chat room based the connection * @return The name of the chat room that this connection is connected to * If the connection passed in by @p c is not a chat room connection then - * TQString::null is returned. + * TQString() is returned. */ TQString chatRoomForConnection( Connection* c ); diff --git a/kopete/protocols/oscar/liboscar/connector.cpp b/kopete/protocols/oscar/liboscar/connector.cpp index c754e2d3..fff59980 100644 --- a/kopete/protocols/oscar/liboscar/connector.cpp +++ b/kopete/protocols/oscar/liboscar/connector.cpp @@ -20,8 +20,8 @@ #include "connector.h" -Connector::Connector(TQObject *parent) -:TQObject(parent) +Connector::Connector(TQObject *tqparent) +:TQObject(tqparent) { setPeerAddressNone(); } @@ -40,7 +40,7 @@ TQHostAddress Connector::peerAddress() const return addr; } -Q_UINT16 Connector::peerPort() const +TQ_UINT16 Connector::peerPort() const { return port; } @@ -52,7 +52,7 @@ void Connector::setPeerAddressNone() port = 0; } -void Connector::setPeerAddress(const TQHostAddress &_addr, Q_UINT16 _port) +void Connector::setPeerAddress(const TQHostAddress &_addr, TQ_UINT16 _port) { haveaddr = true; addr = _addr; diff --git a/kopete/protocols/oscar/liboscar/connector.h b/kopete/protocols/oscar/liboscar/connector.h index 3844ba49..d1d96e4d 100644 --- a/kopete/protocols/oscar/liboscar/connector.h +++ b/kopete/protocols/oscar/liboscar/connector.h @@ -27,11 +27,12 @@ class ByteStream; -class Connector : public QObject +class Connector : public TQObject { Q_OBJECT + TQ_OBJECT public: - Connector(TQObject *parent=0); + Connector(TQObject *tqparent=0); virtual ~Connector(); virtual void connectToServer(const TQString &server)=0; @@ -40,7 +41,7 @@ public: bool havePeerAddress() const; TQHostAddress peerAddress() const; - Q_UINT16 peerPort() const; + TQ_UINT16 peerPort() const; signals: void connected(); @@ -48,12 +49,12 @@ signals: protected: void setPeerAddressNone(); - void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port); + void setPeerAddress(const TQHostAddress &addr, TQ_UINT16 port); private: bool haveaddr; TQHostAddress addr; - Q_UINT16 port; + TQ_UINT16 port; }; #endif diff --git a/kopete/protocols/oscar/liboscar/coreprotocol.cpp b/kopete/protocols/oscar/liboscar/coreprotocol.cpp index 918b3751..472618fe 100644 --- a/kopete/protocols/oscar/liboscar/coreprotocol.cpp +++ b/kopete/protocols/oscar/liboscar/coreprotocol.cpp @@ -54,7 +54,7 @@ static TQString toString( const TQByteArray& buffer ) if ( c < 0x10 ) hex.append("0"); - hex.append(TQString("%1 ").arg(c, 0, 16)); + hex.append(TQString("%1 ").tqarg(c, 0, 16)); ascii.append(isprint(c) ? c : '.'); @@ -62,8 +62,8 @@ static TQString toString( const TQByteArray& buffer ) { output += hex + " |" + ascii + "|\n"; i=0; - hex=TQString::null; - ascii=TQString::null; + hex=TQString(); + ascii=TQString(); } } @@ -152,7 +152,7 @@ Transfer* CoreProtocol::incomingTransfer() void cp_dump( const TQByteArray &bytes ) { #ifdef OSCAR_COREPROTOCOL_DEBUG - kdDebug(OSCAR_RAW_DEBUG) << "contains: " << bytes.count() << " bytes" << endl; + kdDebug(OSCAR_RAW_DEBUG) << "tqcontains: " << bytes.count() << " bytes" << endl; for ( uint i = 0; i < bytes.count(); ++i ) { printf( "%02x ", bytes[ i ] ); diff --git a/kopete/protocols/oscar/liboscar/coreprotocol.h b/kopete/protocols/oscar/liboscar/coreprotocol.h index bbc9b693..807679ba 100644 --- a/kopete/protocols/oscar/liboscar/coreprotocol.h +++ b/kopete/protocols/oscar/liboscar/coreprotocol.h @@ -29,9 +29,10 @@ class FlapProtocol; class SnacProtocol; class Transfer; -class CoreProtocol : public QObject +class CoreProtocol : public TQObject { Q_OBJECT + TQ_OBJECT public: enum State { NeedMore, Available, NoData, OutOfSync }; diff --git a/kopete/protocols/oscar/liboscar/errortask.cpp b/kopete/protocols/oscar/liboscar/errortask.cpp index 9e9ce95b..3620addb 100644 --- a/kopete/protocols/oscar/liboscar/errortask.cpp +++ b/kopete/protocols/oscar/liboscar/errortask.cpp @@ -20,8 +20,8 @@ #include "oscartypes.h" #include "transfer.h" -ErrorTask::ErrorTask( Task* parent ) - : Task( parent ) +ErrorTask::ErrorTask( Task* tqparent ) + : Task( tqparent ) { } diff --git a/kopete/protocols/oscar/liboscar/errortask.h b/kopete/protocols/oscar/liboscar/errortask.h index f74152db..1199eb92 100644 --- a/kopete/protocols/oscar/liboscar/errortask.h +++ b/kopete/protocols/oscar/liboscar/errortask.h @@ -27,7 +27,7 @@ Handles OSCAR protocol errors received from the server on snac subtype 0x01 class ErrorTask : public Task { public: - ErrorTask( Task* parent ); + ErrorTask( Task* tqparent ); ~ErrorTask(); bool take( Transfer* transfer ); diff --git a/kopete/protocols/oscar/liboscar/flapprotocol.cpp b/kopete/protocols/oscar/liboscar/flapprotocol.cpp index f5e9fa03..eaa12166 100644 --- a/kopete/protocols/oscar/liboscar/flapprotocol.cpp +++ b/kopete/protocols/oscar/liboscar/flapprotocol.cpp @@ -28,8 +28,8 @@ using namespace Oscar; -FlapProtocol::FlapProtocol(TQObject *parent, const char *name) - : InputProtocolBase(parent, name) +FlapProtocol::FlapProtocol(TQObject *tqparent, const char *name) + : InputProtocolBase(tqparent, name) { } @@ -57,7 +57,7 @@ Transfer* FlapProtocol::parse( const TQByteArray & packet, uint& bytes ) << " sequence: " << f.sequence << " length: " << f.length << endl; //use pointer arithmatic to skip the flap and snac headers //so we don't have to do double parsing in the tasks - char* charPacket = packet.data(); + char* charPacket = const_cast<char*>(packet.data()); char* snacData = charPacket + 6; Buffer *snacBuffer = new Buffer( snacData, f.length ); diff --git a/kopete/protocols/oscar/liboscar/flapprotocol.h b/kopete/protocols/oscar/liboscar/flapprotocol.h index 3d6de53b..2574df50 100644 --- a/kopete/protocols/oscar/liboscar/flapprotocol.h +++ b/kopete/protocols/oscar/liboscar/flapprotocol.h @@ -28,8 +28,9 @@ class FlapTransfer; class FlapProtocol : public InputProtocolBase { Q_OBJECT + TQ_OBJECT public: - FlapProtocol( TQObject *parent = 0, const char *name = 0 ); + FlapProtocol( TQObject *tqparent = 0, const char *name = 0 ); ~FlapProtocol(); /** diff --git a/kopete/protocols/oscar/liboscar/icbmparamstask.cpp b/kopete/protocols/oscar/liboscar/icbmparamstask.cpp index 5b00a8fd..0aee0f98 100644 --- a/kopete/protocols/oscar/liboscar/icbmparamstask.cpp +++ b/kopete/protocols/oscar/liboscar/icbmparamstask.cpp @@ -24,8 +24,8 @@ #include "oscarutils.h" #include "buffer.h" -ICBMParamsTask::ICBMParamsTask( Task* parent ) - : Task( parent ) +ICBMParamsTask::ICBMParamsTask( Task* tqparent ) + : Task( tqparent ) {} @@ -137,7 +137,7 @@ void ICBMParamsTask::sendMessageParams( int channel ) Transfer* st = createTransfer( f, s, buffer ); send( st ); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } //kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/icbmparamstask.h b/kopete/protocols/oscar/liboscar/icbmparamstask.h index c7bdfb16..b3091fa8 100644 --- a/kopete/protocols/oscar/liboscar/icbmparamstask.h +++ b/kopete/protocols/oscar/liboscar/icbmparamstask.h @@ -28,7 +28,7 @@ Get the parameters we need to follow for instant messages class ICBMParamsTask : public Task { public: - ICBMParamsTask( Task* parent ); + ICBMParamsTask( Task* tqparent ); ~ICBMParamsTask(); bool forMe( const Transfer* transfer ) const; diff --git a/kopete/protocols/oscar/liboscar/icqlogintask.cpp b/kopete/protocols/oscar/liboscar/icqlogintask.cpp index 76feaf42..9bc58452 100644 --- a/kopete/protocols/oscar/liboscar/icqlogintask.cpp +++ b/kopete/protocols/oscar/liboscar/icqlogintask.cpp @@ -26,8 +26,8 @@ using namespace Oscar; -IcqLoginTask::IcqLoginTask( Task* parent ) - : Task( parent ) +IcqLoginTask::IcqLoginTask( Task* tqparent ) + : Task( tqparent ) { } @@ -85,7 +85,7 @@ TQString IcqLoginTask::encodePassword( const TQString& loginPassword ) // TODO: check if latin1 is the right conversion const char *password = loginPassword.latin1(); unsigned int i = 0; - TQString encodedPassword = TQString::null; + TQString encodedPassword = TQString(); //encoding table used in ICQ password XOR transformation unsigned char encoding_table[] = diff --git a/kopete/protocols/oscar/liboscar/icqlogintask.h b/kopete/protocols/oscar/liboscar/icqlogintask.h index 3d865756..e13b1f99 100644 --- a/kopete/protocols/oscar/liboscar/icqlogintask.h +++ b/kopete/protocols/oscar/liboscar/icqlogintask.h @@ -30,8 +30,9 @@ using namespace Oscar; class IcqLoginTask : public Task { Q_OBJECT + TQ_OBJECT public: - IcqLoginTask( Task* parent ); + IcqLoginTask( Task* tqparent ); ~IcqLoginTask(); bool take( Transfer* transfer ); virtual void onGo(); diff --git a/kopete/protocols/oscar/liboscar/icqtask.cpp b/kopete/protocols/oscar/liboscar/icqtask.cpp index bb58a9c4..ccedd0d9 100644 --- a/kopete/protocols/oscar/liboscar/icqtask.cpp +++ b/kopete/protocols/oscar/liboscar/icqtask.cpp @@ -24,8 +24,8 @@ #include <kdebug.h> -ICQTask::ICQTask( Task * parent ) - : Task( parent ) +ICQTask::ICQTask( Task * tqparent ) + : Task( tqparent ) { m_icquin = client()->userId().toULong(); m_sequence = 0; @@ -148,4 +148,4 @@ void ICQTask::setRequestSubType( WORD subType ) #include "icqtask.moc" -//kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; +//kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/icqtask.h b/kopete/protocols/oscar/liboscar/icqtask.h index 7d134b49..9397163a 100644 --- a/kopete/protocols/oscar/liboscar/icqtask.h +++ b/kopete/protocols/oscar/liboscar/icqtask.h @@ -28,8 +28,9 @@ class Buffer; class ICQTask : public Task { Q_OBJECT + TQ_OBJECT public: - ICQTask( Task* parent ); + ICQTask( Task* tqparent ); ~ICQTask(); virtual void onGo(); diff --git a/kopete/protocols/oscar/liboscar/icquserinfo.cpp b/kopete/protocols/oscar/liboscar/icquserinfo.cpp index bc37d313..a4a5f78c 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfo.cpp +++ b/kopete/protocols/oscar/liboscar/icquserinfo.cpp @@ -259,4 +259,4 @@ ICQWPSearchInfo::ICQWPSearchInfo() -//kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; +//kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/icquserinfo.h b/kopete/protocols/oscar/liboscar/icquserinfo.h index 3c3510f4..685859a6 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfo.h +++ b/kopete/protocols/oscar/liboscar/icquserinfo.h @@ -164,7 +164,7 @@ class KOPETE_EXPORT ICQSearchResult public: ICQSearchResult(); void fill( Buffer* buffer ); - Q_UINT32 uin; + TQ_UINT32 uin; TQCString firstName; TQCString lastName; TQCString nickName; @@ -172,7 +172,7 @@ public: bool auth; bool online; char gender; - Q_UINT16 age; + TQ_UINT16 age; }; class KOPETE_EXPORT ICQWPSearchInfo @@ -210,4 +210,4 @@ typedef TQValueList<ICQInfoItem> ICQInfoItemList; */ #endif -//kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands; +//kate: space-indent off; tab-width 4; tqreplace-tabs off; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/icquserinfotask.cpp b/kopete/protocols/oscar/liboscar/icquserinfotask.cpp index 3635bc71..6a915ca8 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/icquserinfotask.cpp @@ -23,7 +23,7 @@ #include "buffer.h" -ICQUserInfoRequestTask::ICQUserInfoRequestTask( Task* parent ) : ICQTask( parent ) +ICQUserInfoRequestTask::ICQUserInfoRequestTask( Task* tqparent ) : ICQTask( tqparent ) { //by default, request short info. it saves bandwidth m_type = Short; @@ -231,4 +231,4 @@ TQString ICQUserInfoRequestTask::notesInfoFor( const TQString& contact ) #include "icquserinfotask.moc" -//kate: indent-mode csands; tab-width 4; space-indent off; replace-tabs off; +//kate: indent-mode csands; tab-width 4; space-indent off; tqreplace-tabs off; diff --git a/kopete/protocols/oscar/liboscar/icquserinfotask.h b/kopete/protocols/oscar/liboscar/icquserinfotask.h index 613608fd..27aa4a68 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfotask.h +++ b/kopete/protocols/oscar/liboscar/icquserinfotask.h @@ -33,8 +33,9 @@ class Transfer; class ICQUserInfoRequestTask : public ICQTask { Q_OBJECT + TQ_OBJECT public: - ICQUserInfoRequestTask( Task* parent ); + ICQUserInfoRequestTask( Task* tqparent ); ~ICQUserInfoRequestTask(); enum { Long = 0, Short }; @@ -74,4 +75,4 @@ private: }; #endif -//kate: indent-mode csands; tab-width 4; space-indent off; replace-tabs off; +//kate: indent-mode csands; tab-width 4; space-indent off; tqreplace-tabs off; diff --git a/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp b/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp index b93ede3f..2054ace7 100644 --- a/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp +++ b/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp @@ -18,8 +18,8 @@ #include "inputprotocolbase.h" -InputProtocolBase::InputProtocolBase(TQObject *parent, const char *name) - : TQObject(parent, name) +InputProtocolBase::InputProtocolBase(TQObject *tqparent, const char *name) + : TQObject(tqparent, name) { m_state = NeedMore; m_bytes = 0; @@ -64,11 +64,11 @@ bool InputProtocolBase::okToProceed() bool InputProtocolBase::safeReadBytes( TQCString & data, uint & len ) { // read the length of the bytes - Q_UINT32 val; + TQ_UINT32 val; if ( !okToProceed() ) return false; *m_din >> val; - m_bytes += sizeof( Q_UINT32 ); + m_bytes += sizeof( TQ_UINT32 ); if ( val > 1024 ) return false; //qDebug( "EventProtocol::safeReadBytes() - expecting %i bytes", val ); @@ -83,7 +83,7 @@ bool InputProtocolBase::safeReadBytes( TQCString & data, uint & len ) // the rest of the string will be filled with FF, // so look for that in the last position instead of \0 // this caused a crash - guessing that temp.length() is set to the number of bytes actually read... - // if ( (Q_UINT8)( * ( temp.data() + ( temp.length() - 1 ) ) ) == 0xFF ) + // if ( (TQ_UINT8)( * ( temp.data() + ( temp.length() - 1 ) ) ) == 0xFF ) if ( temp.length() < ( val - 1 ) ) { qDebug( "InputProtocol::safeReadBytes() - string broke, giving up, only got: %i bytes out of %i", temp.length(), val ); diff --git a/kopete/protocols/oscar/liboscar/inputprotocolbase.h b/kopete/protocols/oscar/liboscar/inputprotocolbase.h index 94072e00..bf2235ef 100644 --- a/kopete/protocols/oscar/liboscar/inputprotocolbase.h +++ b/kopete/protocols/oscar/liboscar/inputprotocolbase.h @@ -27,12 +27,13 @@ Defines a basic interface for protocols dealing with input from the GroupWise se @author Matt Rogers */ -class InputProtocolBase : public QObject +class InputProtocolBase : public TQObject { Q_OBJECT + TQ_OBJECT public: enum EventProtocolState { Success, NeedMore, OutOfSync, ProtocolError }; - InputProtocolBase(TQObject *parent = 0, const char *name = 0); + InputProtocolBase(TQObject *tqparent = 0, const char *name = 0); ~InputProtocolBase(); /** * Returns a value describing the state of the object. @@ -57,7 +58,7 @@ protected: */ bool okToProceed(); /** - * read a Q_UINT32 giving the number of following bytes, then a string of that length + * read a TQ_UINT32 giving the number of following bytes, then a string of that length * updates the bytes parsed counter * @return false if the string was broken or there was no data available at all */ diff --git a/kopete/protocols/oscar/liboscar/locationrightstask.cpp b/kopete/protocols/oscar/liboscar/locationrightstask.cpp index f019b961..dec65031 100644 --- a/kopete/protocols/oscar/liboscar/locationrightstask.cpp +++ b/kopete/protocols/oscar/liboscar/locationrightstask.cpp @@ -26,8 +26,8 @@ using namespace Oscar; -LocationRightsTask::LocationRightsTask( Task* parent ) - : Task( parent ) +LocationRightsTask::LocationRightsTask( Task* tqparent ) + : Task( tqparent ) { } @@ -80,7 +80,7 @@ void LocationRightsTask::sendLocationRightsRequest() void LocationRightsTask::handleLocationRightsResponse() { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Ignoring location rights response" << endl; - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } diff --git a/kopete/protocols/oscar/liboscar/locationrightstask.h b/kopete/protocols/oscar/liboscar/locationrightstask.h index a3e82767..cbc17e10 100644 --- a/kopete/protocols/oscar/liboscar/locationrightstask.h +++ b/kopete/protocols/oscar/liboscar/locationrightstask.h @@ -36,7 +36,7 @@ This task implements the following SNACS: class LocationRightsTask : public Task { public: - LocationRightsTask( Task* parent ); + LocationRightsTask( Task* tqparent ); ~LocationRightsTask(); bool take( Transfer* transfer ); diff --git a/kopete/protocols/oscar/liboscar/logintask.cpp b/kopete/protocols/oscar/liboscar/logintask.cpp index a153f8f7..10d62e6d 100644 --- a/kopete/protocols/oscar/liboscar/logintask.cpp +++ b/kopete/protocols/oscar/liboscar/logintask.cpp @@ -37,8 +37,8 @@ * Stage One Task Implementation */ -StageOneLoginTask::StageOneLoginTask( Task* parent ) - : Task ( parent ) +StageOneLoginTask::StageOneLoginTask( Task* tqparent ) + : Task ( tqparent ) { m_aimTask = 0L; m_icqTask = 0L; @@ -137,8 +137,8 @@ const TQString& StageOneLoginTask::bosPort() const /** * Stage Two Task Implementation */ -StageTwoLoginTask::StageTwoLoginTask( Task* parent ) - : Task( parent ) +StageTwoLoginTask::StageTwoLoginTask( Task* tqparent ) + : Task( tqparent ) { //Create our tasks Task* rootTask = client()->rootTask(); @@ -188,7 +188,7 @@ void StageTwoLoginTask::onGo() send( ft ); } else - setError( -1, TQString::null ); + setError( -1, TQString() ); return; } @@ -210,7 +210,7 @@ void StageTwoLoginTask::versionTaskFinished() void StageTwoLoginTask::rateTaskFinished() { - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } #include "logintask.moc" diff --git a/kopete/protocols/oscar/liboscar/logintask.h b/kopete/protocols/oscar/liboscar/logintask.h index 77ee7690..6a61dc9f 100644 --- a/kopete/protocols/oscar/liboscar/logintask.h +++ b/kopete/protocols/oscar/liboscar/logintask.h @@ -44,8 +44,9 @@ class Transfer; class StageOneLoginTask : public Task { Q_OBJECT + TQ_OBJECT public: - StageOneLoginTask( Task* parent ); + StageOneLoginTask( Task* tqparent ); ~StageOneLoginTask(); bool take( Transfer* transfer ); @@ -103,8 +104,9 @@ class RateInfoTask; class StageTwoLoginTask : public Task { Q_OBJECT + TQ_OBJECT public: - StageTwoLoginTask( Task* parent ); + StageTwoLoginTask( Task* tqparent ); ~StageTwoLoginTask(); bool take( Transfer* transfer ); void onGo(); diff --git a/kopete/protocols/oscar/liboscar/md5.c b/kopete/protocols/oscar/liboscar/md5.c index e6273585..1ca18d13 100644 --- a/kopete/protocols/oscar/liboscar/md5.c +++ b/kopete/protocols/oscar/liboscar/md5.c @@ -55,7 +55,7 @@ main() "abc", /*900150983cd24fb0d6963f7d28e17f72*/ "message digest", /*f96b697d7cb7938d525a2f31aaf161d0*/ "abcdefghijklmnopqrstuvwxyz", /*c3fcd3d76192e4007dfb496cca67e13b*/ - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", + "ABCDEFGHIJKLMNOPTQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", /*d174ab98d277d9f5a5611c2c9f419d9f*/ "12345678901234567890123456789012345678901234567890123456789012345678901234567890" /*57edf4a22be3c955ac49da2e2107b67a*/ }; diff --git a/kopete/protocols/oscar/liboscar/messagereceivertask.cpp b/kopete/protocols/oscar/liboscar/messagereceivertask.cpp index 0dd26e3d..bf8e2350 100644 --- a/kopete/protocols/oscar/liboscar/messagereceivertask.cpp +++ b/kopete/protocols/oscar/liboscar/messagereceivertask.cpp @@ -25,7 +25,7 @@ #include "userdetails.h" -MessageReceiverTask::MessageReceiverTask( Task* parent ) : Task( parent ) +MessageReceiverTask::MessageReceiverTask( Task* tqparent ) : Task( tqparent ) { } @@ -176,7 +176,7 @@ void MessageReceiverTask::handleType1Message() msg.setSender( m_fromUser ); msg.setReceiver( client()->userId() ); - msg.setTimestamp( TQDateTime::currentDateTime() ); + msg.setTimestamp( TQDateTime::tqcurrentDateTime() ); msg.setType( 0x01 ); emit receivedMessage( msg ); @@ -332,7 +332,7 @@ void MessageReceiverTask::handleType4Message() } msg.setType( 0x04 ); - msg.setTimestamp( TQDateTime::currentDateTime() ); + msg.setTimestamp( TQDateTime::tqcurrentDateTime() ); msg.setSender( msgSender ); msg.setReceiver( client()->userId() ); msg.setEncoding( Oscar::Message::UserDefined ); @@ -422,7 +422,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) break; TQByteArray cap( b->getBlock( capLength ) ); - if ( qstrncmp ( cap.data(), "{0946134E-4C7F-11D1-8222-444553540000}", capLength ) == 0 ) + if ( tqstrncmp ( cap.data(), "{0946134E-4C7F-11D1-8222-444553540000}", capLength ) == 0 ) encoding = Oscar::Message::UTF8; } } @@ -437,7 +437,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) msg->setSender( m_fromUser ); msg->setReceiver( client()->userId() ); - msg->setTimestamp( TQDateTime::currentDateTime() ); + msg->setTimestamp( TQDateTime::tqcurrentDateTime() ); msg->setType( 0x02 ); msg->setIcbmCookie( m_icbmCookie ); msg->setProtocolVersion( protocolVersion ); diff --git a/kopete/protocols/oscar/liboscar/messagereceivertask.h b/kopete/protocols/oscar/liboscar/messagereceivertask.h index 011243be..55df700a 100644 --- a/kopete/protocols/oscar/liboscar/messagereceivertask.h +++ b/kopete/protocols/oscar/liboscar/messagereceivertask.h @@ -32,9 +32,10 @@ class TQTextCodec; class MessageReceiverTask : public Task { Q_OBJECT + TQ_OBJECT public: - MessageReceiverTask( Task* parent ); + MessageReceiverTask( Task* tqparent ); ~MessageReceiverTask(); virtual bool forMe( const Transfer* transfer ) const; diff --git a/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp b/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp index 88d41a84..2fc70b45 100644 --- a/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp +++ b/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp @@ -26,8 +26,8 @@ #include <kdebug.h> -OfflineMessagesTask::OfflineMessagesTask( Task* parent ) - : ICQTask( parent ) +OfflineMessagesTask::OfflineMessagesTask( Task* tqparent ) + : ICQTask( tqparent ) { tzset(); m_sequence = 0; diff --git a/kopete/protocols/oscar/liboscar/offlinemessagestask.h b/kopete/protocols/oscar/liboscar/offlinemessagestask.h index da2454d3..3433d762 100644 --- a/kopete/protocols/oscar/liboscar/offlinemessagestask.h +++ b/kopete/protocols/oscar/liboscar/offlinemessagestask.h @@ -30,8 +30,9 @@ ICQ Offline messages handling class OfflineMessagesTask : public ICQTask { Q_OBJECT + TQ_OBJECT public: - OfflineMessagesTask( Task* parent ); + OfflineMessagesTask( Task* tqparent ); ~OfflineMessagesTask(); diff --git a/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp b/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp index 6b6b3d05..c3419740 100644 --- a/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp +++ b/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp @@ -26,7 +26,7 @@ #include <kdebug.h> -OnlineNotifierTask::OnlineNotifierTask( Task* parent ) : Task( parent ) +OnlineNotifierTask::OnlineNotifierTask( Task* tqparent ) : Task( tqparent ) { } diff --git a/kopete/protocols/oscar/liboscar/onlinenotifiertask.h b/kopete/protocols/oscar/liboscar/onlinenotifiertask.h index 03c1ed43..bc200611 100644 --- a/kopete/protocols/oscar/liboscar/onlinenotifiertask.h +++ b/kopete/protocols/oscar/liboscar/onlinenotifiertask.h @@ -35,8 +35,9 @@ Implements SNACS (0x03, 0x11) and (0x03, 0x12) class OnlineNotifierTask : public Task { Q_OBJECT + TQ_OBJECT public: - OnlineNotifierTask( Task* parent ); + OnlineNotifierTask( Task* tqparent ); ~OnlineNotifierTask(); diff --git a/kopete/protocols/oscar/liboscar/oscarbytestream.cpp b/kopete/protocols/oscar/liboscar/oscarbytestream.cpp index 5f39d205..e2387368 100644 --- a/kopete/protocols/oscar/liboscar/oscarbytestream.cpp +++ b/kopete/protocols/oscar/liboscar/oscarbytestream.cpp @@ -24,8 +24,8 @@ #include "oscarbytestream.h" -KNetworkByteStream::KNetworkByteStream( TQObject *parent, const char */*name*/ ) - : ByteStream ( parent ) +KNetworkByteStream::KNetworkByteStream( TQObject *tqparent, const char */*name*/ ) + : ByteStream ( tqparent ) { kdDebug( 14151 ) << k_funcinfo << "Instantiating new KNetwork byte stream." << endl; @@ -102,7 +102,7 @@ void KNetworkByteStream::slotConnectionClosed() if ( mClosing ) { kdDebug( 14151 ) << "..by ourselves!" << endl; - kdDebug( 14151 ) << "socket error is " << socket()->errorString( socket()->error() ) << endl; + kdDebug( 14151 ) << "socket error is " << socket()->KSocketBase::errorString( socket()->error() ) << endl; emit connectionClosed (); } else @@ -138,4 +138,4 @@ void KNetworkByteStream::slotError( int code ) #include "oscarbytestream.moc" -// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off; +// kate: indent-width 4; tqreplace-tabs off; tab-width 4; space-indent off; diff --git a/kopete/protocols/oscar/liboscar/oscarbytestream.h b/kopete/protocols/oscar/liboscar/oscarbytestream.h index 2ecd92d9..3b310eab 100644 --- a/kopete/protocols/oscar/liboscar/oscarbytestream.h +++ b/kopete/protocols/oscar/liboscar/oscarbytestream.h @@ -35,9 +35,10 @@ class KNetworkByteStream : public ByteStream { Q_OBJECT + TQ_OBJECT public: - KNetworkByteStream ( TQObject *parent = 0, const char *name = 0 ); + KNetworkByteStream ( TQObject *tqparent = 0, const char *name = 0 ); ~KNetworkByteStream (); @@ -68,5 +69,5 @@ private: #endif -// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off; +// kate: indent-width 4; tqreplace-tabs off; tab-width 4; space-indent off; diff --git a/kopete/protocols/oscar/liboscar/oscarclientstream.cpp b/kopete/protocols/oscar/liboscar/oscarclientstream.cpp index 87da6020..085bac9e 100644 --- a/kopete/protocols/oscar/liboscar/oscarclientstream.cpp +++ b/kopete/protocols/oscar/liboscar/oscarclientstream.cpp @@ -59,9 +59,9 @@ public: bs = 0; connection = 0; - username = TQString::null; - password = TQString::null; - server = TQString::null; + username = TQString(); + password = TQString(); + server = TQString(); haveLocalAddr = false; doBinding = true; @@ -80,7 +80,7 @@ public: bool doAuth; //send the initial login sequences to get the cookie bool haveLocalAddr; TQHostAddress localAddr; - Q_UINT16 localPort; + TQ_UINT16 localPort; bool doBinding; Connector *conn; @@ -104,8 +104,8 @@ public: int noop_time; }; -ClientStream::ClientStream(Connector *conn, TQObject *parent) -:Stream(parent) +ClientStream::ClientStream(Connector *conn, TQObject *tqparent) +:Stream(tqparent) { //qDebug("CLIENTSTREAM::ClientStream"); @@ -205,7 +205,7 @@ void ClientStream::setNoopTime(int mills) d->noopTimer.start( d->noop_time ); } -void ClientStream::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port) +void ClientStream::setLocalAddr(const TQHostAddress &addr, TQ_UINT16 port) { d->haveLocalAddr = true; d->localAddr = addr; @@ -266,7 +266,7 @@ void ClientStream::write( Transfer *request ) void cs_dump( const TQByteArray &bytes ) { #if 0 - qDebug( "contains: %i bytes ", bytes.count() ); + qDebug( "tqcontains: %i bytes ", bytes.count() ); uint count = 0; while ( count < bytes.count() ) { diff --git a/kopete/protocols/oscar/liboscar/oscarclientstream.h b/kopete/protocols/oscar/liboscar/oscarclientstream.h index fc08f158..f5ab752d 100644 --- a/kopete/protocols/oscar/liboscar/oscarclientstream.h +++ b/kopete/protocols/oscar/liboscar/oscarclientstream.h @@ -34,6 +34,7 @@ class TQHostAddress; class ClientStream : public Stream { Q_OBJECT + TQ_OBJECT public: enum Error { ErrConnection = ErrCustom, // Connection error, ask Connector-subclass what's up @@ -73,7 +74,7 @@ public: BindConflict // resource in-use }; - ClientStream(Connector *conn, TQObject *parent=0); + ClientStream(Connector *conn, TQObject *tqparent=0); ~ClientStream(); void connectToServer(const TQString& server, bool auth=true); @@ -85,7 +86,7 @@ public: void setUsername(const TQString &s); void setPassword(const TQString &s); - void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port); + void setLocalAddr(const TQHostAddress &addr, TQ_UINT16 port); void close(); @@ -158,7 +159,7 @@ private: /** * convert internal method representation to wire */ - static char* encode_method(Q_UINT8 method); + static char* encode_method(TQ_UINT8 method); }; #endif diff --git a/kopete/protocols/oscar/liboscar/oscarconnector.cpp b/kopete/protocols/oscar/liboscar/oscarconnector.cpp index ec649e08..03db367d 100644 --- a/kopete/protocols/oscar/liboscar/oscarconnector.cpp +++ b/kopete/protocols/oscar/liboscar/oscarconnector.cpp @@ -24,8 +24,8 @@ #include "oscarconnector.h" #include "oscarbytestream.h" -KNetworkConnector::KNetworkConnector( TQObject *parent, const char */*name*/ ) - : Connector( parent ) +KNetworkConnector::KNetworkConnector( TQObject *tqparent, const char */*name*/ ) + : Connector( tqparent ) { kdDebug( 14151 ) << k_funcinfo << "New KNetwork connector." << endl; @@ -94,7 +94,7 @@ void KNetworkConnector::done() mByteStream->close (); } -void KNetworkConnector::setOptHostPort( const TQString &host, Q_UINT16 port ) +void KNetworkConnector::setOptHostPort( const TQString &host, TQ_UINT16 port ) { kdDebug ( 14151 ) << k_funcinfo << "Manually specifying host " << host << " and port " << port << endl; @@ -105,4 +105,4 @@ void KNetworkConnector::setOptHostPort( const TQString &host, Q_UINT16 port ) #include "oscarconnector.moc" -// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off; +// kate: indent-width 4; tqreplace-tabs off; tab-width 4; space-indent off; diff --git a/kopete/protocols/oscar/liboscar/oscarconnector.h b/kopete/protocols/oscar/liboscar/oscarconnector.h index 39696a35..20a44123 100644 --- a/kopete/protocols/oscar/liboscar/oscarconnector.h +++ b/kopete/protocols/oscar/liboscar/oscarconnector.h @@ -37,9 +37,10 @@ class KNetworkConnector : public Connector { Q_OBJECT + TQ_OBJECT public: - KNetworkConnector( TQObject *parent = 0, const char *name = 0 ); + KNetworkConnector( TQObject *tqparent = 0, const char *name = 0 ); virtual ~KNetworkConnector(); @@ -47,7 +48,7 @@ public: virtual ByteStream *stream() const; virtual void done(); - void setOptHostPort( const TQString &host, Q_UINT16 port ); + void setOptHostPort( const TQString &host, TQ_UINT16 port ); int errorCode(); @@ -57,7 +58,7 @@ private slots: private: TQString mHost; - Q_UINT16 mPort; + TQ_UINT16 mPort; int mErrorCode; KNetworkByteStream *mByteStream; @@ -66,4 +67,4 @@ private: #endif -// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off; +// kate: indent-width 4; tqreplace-tabs off; tab-width 4; space-indent off; diff --git a/kopete/protocols/oscar/liboscar/oscarmessage.cpp b/kopete/protocols/oscar/liboscar/oscarmessage.cpp index 1f263be0..c0b5a1b8 100644 --- a/kopete/protocols/oscar/liboscar/oscarmessage.cpp +++ b/kopete/protocols/oscar/liboscar/oscarmessage.cpp @@ -122,7 +122,7 @@ TQString Oscar::Message::text( TQTextCodec *codec ) const default: break; // Should never happen. } - return TQString::null; + return TQString(); //FIXME: warn at least with kdWarning if an unrecognised encoding style was seen. } diff --git a/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp b/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp index be862872..958a5d49 100644 --- a/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp +++ b/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp @@ -32,7 +32,7 @@ Oscar::TLV::TLV() length = 0; } -Oscar::TLV::TLV( Q_UINT16 newType, Q_UINT16 newLength, char* newData ) +Oscar::TLV::TLV( TQ_UINT16 newType, TQ_UINT16 newLength, char* newData ) { type = newType; length = newLength; @@ -40,7 +40,7 @@ Oscar::TLV::TLV( Q_UINT16 newType, Q_UINT16 newLength, char* newData ) data.duplicate( newData, length ); } -Oscar::TLV::TLV( Q_UINT16 newType, Q_UINT16 newLength, const TQByteArray& newData ) +Oscar::TLV::TLV( TQ_UINT16 newType, TQ_UINT16 newLength, const TQByteArray& newData ) { type = newType; length = newLength; @@ -114,17 +114,17 @@ TQString Oscar::SSI::name() const return m_name; } -Q_UINT16 Oscar::SSI::gid() const +TQ_UINT16 Oscar::SSI::gid() const { return m_gid; } -Q_UINT16 Oscar::SSI::bid() const +TQ_UINT16 Oscar::SSI::bid() const { return m_bid; } -Q_UINT16 Oscar::SSI::type() const +TQ_UINT16 Oscar::SSI::type() const { return m_type; } @@ -134,12 +134,12 @@ const TQValueList<TLV>& Oscar::SSI::tlvList() const return m_tlvList; } -void Oscar::SSI::setTLVListLength( Q_UINT16 newLength ) +void Oscar::SSI::setTLVListLength( TQ_UINT16 newLength ) { m_tlvLength = newLength; } -Q_UINT16 Oscar::SSI::tlvListLength() const +TQ_UINT16 Oscar::SSI::tlvListLength() const { return m_tlvLength; } @@ -224,7 +224,7 @@ TQByteArray Oscar::SSI::iconHash( ) const TQString Oscar::SSI::toString() const { - TQString ssiString = TQString::fromLatin1( "name: " ); + TQString ssiString = TQString::tqfromLatin1( "name: " ); ssiString += m_name; ssiString += " gid: "; ssiString += TQString::number( m_gid ); @@ -263,7 +263,7 @@ Oscar::SSI::operator TQByteArray() const // We must provide the explicit length argument to addString() because // we don't need trailing null byte to be added when automatic // conversion from TQCString to TQByteArray is performed. - // This hack will not be needed with Qt 4. + // This hack will not be needed with TQt 4. b.addString( namedata, namelen ); b.addWord( m_gid ); b.addWord( m_bid ); diff --git a/kopete/protocols/oscar/liboscar/oscartypeclasses.h b/kopete/protocols/oscar/liboscar/oscartypeclasses.h index e4ec6ded..dec69c37 100644 --- a/kopete/protocols/oscar/liboscar/oscartypeclasses.h +++ b/kopete/protocols/oscar/liboscar/oscartypeclasses.h @@ -33,14 +33,14 @@ class KOPETE_EXPORT TLV public: TLV(); - TLV( Q_UINT16, Q_UINT16, char* data ); - TLV( Q_UINT16, Q_UINT16, const TQByteArray& ); + TLV( TQ_UINT16, TQ_UINT16, char* data ); + TLV( TQ_UINT16, TQ_UINT16, const TQByteArray& ); TLV( const TLV& t ); operator bool() const; - Q_UINT16 type; - Q_UINT16 length; + TQ_UINT16 type; + TQ_UINT16 length; TQByteArray data; }; @@ -60,17 +60,17 @@ public: TQString name() const; /** \brief The group id of the SSI item */ - Q_UINT16 gid() const; + TQ_UINT16 gid() const; /** \brief The buddy id of the SSI item */ - Q_UINT16 bid() const; + TQ_UINT16 bid() const; /** * \brief The type of the SSI Item. * see ROSTER_* defines on oscartypes.h * Use a value of 0xFFFF for an SSI item not on the server list */ - Q_UINT16 type() const; + TQ_UINT16 type() const; /** \brief the TLV list for the item */ const TQValueList<TLV>& tlvList() const; @@ -84,10 +84,10 @@ public: * This is not the number of items in the list!! It's the aggregation of the * sizes of the TLVs */ - void setTLVListLength( Q_UINT16 newLength ); + void setTLVListLength( TQ_UINT16 newLength ); /** \brief Get the TLV list length */ - Q_UINT16 tlvListLength() const; + TQ_UINT16 tlvListLength() const; /** * Get the alias for the SSI item diff --git a/kopete/protocols/oscar/liboscar/oscartypes.h b/kopete/protocols/oscar/liboscar/oscartypes.h index 3819b555..4e13a509 100644 --- a/kopete/protocols/oscar/liboscar/oscartypes.h +++ b/kopete/protocols/oscar/liboscar/oscartypes.h @@ -172,9 +172,9 @@ const cap oscar_caps[] = }; //! Oscar Data Types -typedef Q_UINT8 BYTE; -typedef Q_UINT16 WORD; -typedef Q_UINT32 DWORD; +typedef TQ_UINT8 BYTE; +typedef TQ_UINT16 WORD; +typedef TQ_UINT32 DWORD; struct FLAP diff --git a/kopete/protocols/oscar/liboscar/oscarutils.cpp b/kopete/protocols/oscar/liboscar/oscarutils.cpp index e07e0e12..8dc7d9df 100644 --- a/kopete/protocols/oscar/liboscar/oscarutils.cpp +++ b/kopete/protocols/oscar/liboscar/oscarutils.cpp @@ -291,7 +291,7 @@ DWORD Oscar::getNumericalIP(const TQString &address) TQString Oscar::getDottedDecimal( DWORD address ) { TQHostAddress addr; - addr.setAddress((Q_UINT32)address); + addr.setAddress((TQ_UINT32)address); return addr.toString(); } diff --git a/kopete/protocols/oscar/liboscar/oscarutils.h b/kopete/protocols/oscar/liboscar/oscarutils.h index a9cd921c..1e6b539e 100644 --- a/kopete/protocols/oscar/liboscar/oscarutils.h +++ b/kopete/protocols/oscar/liboscar/oscarutils.h @@ -63,7 +63,7 @@ const TQString capToString(char *cap); * Parse the character array for validness and a version string * \param buffer the buffer we'll be parsing for capabilities * \param versionString a TQString reference that will contain the - * version string of the detected client. Will be TQString::null if + * version string of the detected client. Will be TQString() if * no client is found * \return a DWORD containg a bit array of the capabilities we found */ diff --git a/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp b/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp index 2cf57d53..7731aa51 100644 --- a/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp @@ -29,7 +29,7 @@ using namespace Oscar; -OwnUserInfoTask::OwnUserInfoTask( Task* parent ) : Task( parent ) +OwnUserInfoTask::OwnUserInfoTask( Task* tqparent ) : Task( tqparent ) { } @@ -70,7 +70,7 @@ bool OwnUserInfoTask::take( Transfer* transfer ) ud.fill( b ); m_details = ud; emit gotInfo(); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); return true; } else @@ -108,7 +108,7 @@ bool OwnUserInfoTask::take( Transfer* transfer ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "self available message: " << endl; } - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); return true; } diff --git a/kopete/protocols/oscar/liboscar/ownuserinfotask.h b/kopete/protocols/oscar/liboscar/ownuserinfotask.h index 35314df0..6b162d00 100644 --- a/kopete/protocols/oscar/liboscar/ownuserinfotask.h +++ b/kopete/protocols/oscar/liboscar/ownuserinfotask.h @@ -29,8 +29,9 @@ Request our user info from the server and handle our user info when it comes bac class OwnUserInfoTask : public Task { Q_OBJECT + TQ_OBJECT public: - OwnUserInfoTask( Task* parent ); + OwnUserInfoTask( Task* tqparent ); ~OwnUserInfoTask(); diff --git a/kopete/protocols/oscar/liboscar/prmparamstask.cpp b/kopete/protocols/oscar/liboscar/prmparamstask.cpp index 43580206..cd4cfddc 100644 --- a/kopete/protocols/oscar/liboscar/prmparamstask.cpp +++ b/kopete/protocols/oscar/liboscar/prmparamstask.cpp @@ -24,8 +24,8 @@ using namespace Oscar; -PRMParamsTask::PRMParamsTask( Task* parent ) - : Task( parent ) +PRMParamsTask::PRMParamsTask( Task* tqparent ) + : Task( tqparent ) { } @@ -52,7 +52,7 @@ bool PRMParamsTask::take( Transfer* transfer ) if ( forMe( transfer ) ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Ignoring PRM Parameters. We don't use them" << endl; - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); return true; } diff --git a/kopete/protocols/oscar/liboscar/prmparamstask.h b/kopete/protocols/oscar/liboscar/prmparamstask.h index eebfdc61..fe0f25c0 100644 --- a/kopete/protocols/oscar/liboscar/prmparamstask.h +++ b/kopete/protocols/oscar/liboscar/prmparamstask.h @@ -28,7 +28,7 @@ class Transfer; class PRMParamsTask : public Task { public: - PRMParamsTask( Task* parent ); + PRMParamsTask( Task* tqparent ); ~PRMParamsTask(); virtual bool forMe( const Transfer* transfer ) const; diff --git a/kopete/protocols/oscar/liboscar/profiletask.cpp b/kopete/protocols/oscar/liboscar/profiletask.cpp index 4b0949ea..09a8b3a0 100644 --- a/kopete/protocols/oscar/liboscar/profiletask.cpp +++ b/kopete/protocols/oscar/liboscar/profiletask.cpp @@ -28,8 +28,8 @@ using namespace Oscar; -ProfileTask::ProfileTask( Task* parent ) - : Task( parent ) +ProfileTask::ProfileTask( Task* tqparent ) + : Task( tqparent ) { } @@ -112,7 +112,7 @@ void ProfileTask::sendProfileUpdate() buffer->addTLV(0x0005, capBuf.length(), capBuf.buffer()); Transfer* st = createTransfer( f, s , buffer ); send( st ); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } diff --git a/kopete/protocols/oscar/liboscar/profiletask.h b/kopete/protocols/oscar/liboscar/profiletask.h index a51075a5..d16a05de 100644 --- a/kopete/protocols/oscar/liboscar/profiletask.h +++ b/kopete/protocols/oscar/liboscar/profiletask.h @@ -32,7 +32,7 @@ The away message will be set only if the away message has been set non-null. class ProfileTask : public Task { public: - ProfileTask( Task* parent ); + ProfileTask( Task* tqparent ); ~ProfileTask(); bool forMe( const Transfer* transfer ) const; diff --git a/kopete/protocols/oscar/liboscar/rateclass.cpp b/kopete/protocols/oscar/liboscar/rateclass.cpp index d035c810..6d050643 100644 --- a/kopete/protocols/oscar/liboscar/rateclass.cpp +++ b/kopete/protocols/oscar/liboscar/rateclass.cpp @@ -22,8 +22,8 @@ using namespace Oscar; -RateClass::RateClass( TQObject* parent ) -: TQObject( parent, 0 ) +RateClass::RateClass( TQObject* tqparent ) +: TQObject( tqparent, 0 ) { m_waitingToSend = false; m_packetTimer.start(); diff --git a/kopete/protocols/oscar/liboscar/rateclass.h b/kopete/protocols/oscar/liboscar/rateclass.h index 78ad8917..122bde8d 100644 --- a/kopete/protocols/oscar/liboscar/rateclass.h +++ b/kopete/protocols/oscar/liboscar/rateclass.h @@ -34,11 +34,12 @@ struct SnacPair class Transfer; -class RateClass : public QObject +class RateClass : public TQObject { Q_OBJECT + TQ_OBJECT public: - RateClass( TQObject* parent = 0 ); + RateClass( TQObject* tqparent = 0 ); ~RateClass(); /** Accessor for classid */ diff --git a/kopete/protocols/oscar/liboscar/rateclassmanager.cpp b/kopete/protocols/oscar/liboscar/rateclassmanager.cpp index 59ef735e..0b14c9ec 100644 --- a/kopete/protocols/oscar/liboscar/rateclassmanager.cpp +++ b/kopete/protocols/oscar/liboscar/rateclassmanager.cpp @@ -34,11 +34,11 @@ public: Connection* client; }; -RateClassManager::RateClassManager( Connection* parent, const char* name ) -: TQObject( parent, name ) +RateClassManager::RateClassManager( Connection* tqparent, const char* name ) +: TQObject( tqparent, name ) { d = new RateClassManagerPrivate(); - d->client = parent; + d->client = tqparent; } RateClassManager::~RateClassManager() diff --git a/kopete/protocols/oscar/liboscar/rateclassmanager.h b/kopete/protocols/oscar/liboscar/rateclassmanager.h index b1240f07..fe2a8433 100644 --- a/kopete/protocols/oscar/liboscar/rateclassmanager.h +++ b/kopete/protocols/oscar/liboscar/rateclassmanager.h @@ -31,11 +31,12 @@ class Connection; class RateClassManagerPrivate; -class RateClassManager : public QObject +class RateClassManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - RateClassManager( Connection* parent, const char* name = 0 ); + RateClassManager( Connection* tqparent, const char* name = 0 ); ~RateClassManager(); /** Reset the rate manager */ diff --git a/kopete/protocols/oscar/liboscar/rateinfotask.cpp b/kopete/protocols/oscar/liboscar/rateinfotask.cpp index 08002b8a..a7249a74 100644 --- a/kopete/protocols/oscar/liboscar/rateinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/rateinfotask.cpp @@ -29,8 +29,8 @@ using namespace Oscar; -RateInfoTask::RateInfoTask( Task* parent ) - : Task( parent ) +RateInfoTask::RateInfoTask( Task* tqparent ) + : Task( tqparent ) { connect( this, TQT_SIGNAL( gotRateLimits() ), this, TQT_SLOT( sendRateInfoAck() ) ); } @@ -164,7 +164,7 @@ void RateInfoTask::sendRateInfoAck() Transfer* st = createTransfer( f, s, buffer ); send( st ); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } #include "rateinfotask.moc" diff --git a/kopete/protocols/oscar/liboscar/rateinfotask.h b/kopete/protocols/oscar/liboscar/rateinfotask.h index 013559f6..407e91b4 100644 --- a/kopete/protocols/oscar/liboscar/rateinfotask.h +++ b/kopete/protocols/oscar/liboscar/rateinfotask.h @@ -30,8 +30,9 @@ using namespace Oscar; class RateInfoTask : public Task { Q_OBJECT + TQ_OBJECT public: - RateInfoTask( Task* parent ); + RateInfoTask( Task* tqparent ); ~RateInfoTask(); bool take( Transfer* transfer ); diff --git a/kopete/protocols/oscar/liboscar/rtf.cc b/kopete/protocols/oscar/liboscar/rtf.cc index 39c16bc4..7559a253 100644 --- a/kopete/protocols/oscar/liboscar/rtf.cc +++ b/kopete/protocols/oscar/liboscar/rtf.cc @@ -1630,17 +1630,17 @@ void ParStyle::clearFormatting() 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"), ""); + str.tqreplace(TQRegExp("&"), "&"); + str.tqreplace(TQRegExp("<"), "<"); + str.tqreplace(TQRegExp(">"), ">"); + str.tqreplace(TQRegExp("\""), """); + str.tqreplace(TQRegExp("\r"), ""); switch (mode){ case quoteHTML: - str.replace(TQRegExp("\n"), "<br>\n"); + str.tqreplace(TQRegExp("\n"), "<br>\n"); break; case quoteXML: - str.replace(TQRegExp("\n"), "<br/>\n"); + str.tqreplace(TQRegExp("\n"), "<br/>\n"); break; default: break; @@ -1657,7 +1657,7 @@ TQString RTF2HTML::quoteString(const TQString &_str, quoteMode mode) TQString s = " "; for (int i = 1; i < len; i++) s += " "; - str.replace(pos, len, s); + str.tqreplace(pos, len, s); } return str; } @@ -1890,7 +1890,7 @@ void RTF2HTML::FlushParagraph() /* s += "<p dir=\""; - // Note: Lower-case 'ltr' and 'rtl' are important for Qt. + // Note: Lower-case 'ltr' and 'rtl' are important for TQt. s += (parStyle.dir == ParStyle::DirRTL ? "rtl" : "ltr"); s += "\">"; s += sParagraph; @@ -2078,7 +2078,7 @@ void Level::clearParagraphFormatting() // implicitly start a paragraph if (!isParagraphOpen()) startParagraph(); - // Since we don't implement any of the paragraph formatting tags (e.g. alignment), + // Since we don't implement any of the paragraph formatting tags (e.g. tqalignment), // we don't clean up anything here. Note that \pard does NOT clean character // formatting (such as font size, font weight, italics...). p->parStyle.clearFormatting(); diff --git a/kopete/protocols/oscar/liboscar/rtf.ll b/kopete/protocols/oscar/liboscar/rtf.ll index c43aeaea..63c04c96 100644 --- a/kopete/protocols/oscar/liboscar/rtf.ll +++ b/kopete/protocols/oscar/liboscar/rtf.ll @@ -67,17 +67,17 @@ void ParStyle::clearFormatting() 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"), ""); + str.tqreplace(QRegExp("&"), "&"); + str.tqreplace(QRegExp("<"), "<"); + str.tqreplace(QRegExp(">"), ">"); + str.tqreplace(QRegExp("\""), """); + str.tqreplace(QRegExp("\r"), ""); switch (mode){ case quoteHTML: - str.replace(QRegExp("\n"), "<br>\n"); + str.tqreplace(QRegExp("\n"), "<br>\n"); break; case quoteXML: - str.replace(QRegExp("\n"), "<br/>\n"); + str.tqreplace(QRegExp("\n"), "<br/>\n"); break; default: break; @@ -94,7 +94,7 @@ QString RTF2HTML::quoteString(const QString &_str, quoteMode mode) QString s = " "; for (int i = 1; i < len; i++) s += " "; - str.replace(pos, len, s); + str.tqreplace(pos, len, s); } return str; } @@ -515,7 +515,7 @@ void Level::clearParagraphFormatting() // implicitly start a paragraph if (!isParagraphOpen()) startParagraph(); - // Since we don't implement any of the paragraph formatting tags (e.g. alignment), + // Since we don't implement any of the paragraph formatting tags (e.g. tqalignment), // we don't clean up anything here. Note that \pard does NOT clean character // formatting (such as font size, font weight, italics...). p->parStyle.clearFormatting(); diff --git a/kopete/protocols/oscar/liboscar/safedelete.cpp b/kopete/protocols/oscar/liboscar/safedelete.cpp index 5dde3725..9de147f0 100644 --- a/kopete/protocols/oscar/liboscar/safedelete.cpp +++ b/kopete/protocols/oscar/liboscar/safedelete.cpp @@ -62,13 +62,7 @@ void SafeDelete::deleteAll() void SafeDelete::deleteSingle(TQObject *o) { -#if QT_VERSION < 0x030000 - // roll our own TQObject::deleteLater() - SafeDeleteLater *sdl = SafeDeleteLater::ensureExists(); - sdl->deleteItLater(o); -#else o->deleteLater(); -#endif } //---------------------------------------------------------------------------- diff --git a/kopete/protocols/oscar/liboscar/safedelete.h b/kopete/protocols/oscar/liboscar/safedelete.h index 0d4150d9..88cfb3d4 100644 --- a/kopete/protocols/oscar/liboscar/safedelete.h +++ b/kopete/protocols/oscar/liboscar/safedelete.h @@ -57,9 +57,10 @@ private: void unlock(); }; -class SafeDeleteLater : public QObject +class SafeDeleteLater : public TQObject { Q_OBJECT + TQ_OBJECT public: static SafeDeleteLater *ensureExists(); void deleteItLater(TQObject *o); diff --git a/kopete/protocols/oscar/liboscar/senddcinfotask.cpp b/kopete/protocols/oscar/liboscar/senddcinfotask.cpp index 2b5dbbae..02dd0ba6 100644 --- a/kopete/protocols/oscar/liboscar/senddcinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/senddcinfotask.cpp @@ -25,7 +25,7 @@ #include "oscarutils.h" #include "transfer.h" -SendDCInfoTask::SendDCInfoTask(Task* parent, DWORD status): Task(parent), mStatus(status) +SendDCInfoTask::SendDCInfoTask(Task* tqparent, DWORD status): Task(tqparent), mtqStatus(status) { } @@ -70,7 +70,7 @@ void SendDCInfoTask::onGo() statusFlag |= 0x10000000; // Direct connection upon authorization, hides IP } - buffer->addDWord( statusFlag | mStatus ); + buffer->addDWord( statusFlag | mtqStatus ); /* Fill in the DC Info * We don't support Direct Connection yet. So fill in some @@ -100,7 +100,7 @@ void SendDCInfoTask::onGo() Transfer* t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } diff --git a/kopete/protocols/oscar/liboscar/senddcinfotask.h b/kopete/protocols/oscar/liboscar/senddcinfotask.h index d130cc40..e967cb18 100644 --- a/kopete/protocols/oscar/liboscar/senddcinfotask.h +++ b/kopete/protocols/oscar/liboscar/senddcinfotask.h @@ -28,12 +28,12 @@ Fire and forget task that sends our direct connection info class SendDCInfoTask : public Task { public: - SendDCInfoTask( Task* parent, DWORD status ); + SendDCInfoTask( Task* tqparent, DWORD status ); ~SendDCInfoTask(); virtual void onGo(); private: - DWORD mStatus; + DWORD mtqStatus; }; #endif diff --git a/kopete/protocols/oscar/liboscar/sendidletimetask.cpp b/kopete/protocols/oscar/liboscar/sendidletimetask.cpp index ba753471..a4bc61e2 100644 --- a/kopete/protocols/oscar/liboscar/sendidletimetask.cpp +++ b/kopete/protocols/oscar/liboscar/sendidletimetask.cpp @@ -23,7 +23,7 @@ #include "oscarutils.h" #include "transfer.h" -SendIdleTimeTask::SendIdleTimeTask( Task* parent ) : Task( parent ) +SendIdleTimeTask::SendIdleTimeTask( Task* tqparent ) : Task( tqparent ) { m_idleTime = 0; } @@ -45,7 +45,7 @@ void SendIdleTimeTask::onGo() Transfer *t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } diff --git a/kopete/protocols/oscar/liboscar/sendidletimetask.h b/kopete/protocols/oscar/liboscar/sendidletimetask.h index beba74c2..4ba9e588 100644 --- a/kopete/protocols/oscar/liboscar/sendidletimetask.h +++ b/kopete/protocols/oscar/liboscar/sendidletimetask.h @@ -29,7 +29,7 @@ Sends the idle time to the server class SendIdleTimeTask : public Task { public: - SendIdleTimeTask( Task* parent ); + SendIdleTimeTask( Task* tqparent ); ~SendIdleTimeTask(); virtual void onGo(); diff --git a/kopete/protocols/oscar/liboscar/sendmessagetask.cpp b/kopete/protocols/oscar/liboscar/sendmessagetask.cpp index 1b8cbfbc..b3a4a36e 100644 --- a/kopete/protocols/oscar/liboscar/sendmessagetask.cpp +++ b/kopete/protocols/oscar/liboscar/sendmessagetask.cpp @@ -23,7 +23,7 @@ #include "transfer.h" -SendMessageTask::SendMessageTask(Task* parent): Task(parent) +SendMessageTask::SendMessageTask(Task* tqparent): Task(tqparent) { m_autoResponse = false; m_cookieCount = 0x7FFF; @@ -379,8 +379,8 @@ if ( !codec && ( contact->hasCap(CAP_UTF8) || !contact->encoding() ) ) utfMessage=new unsigned char[length]; for(unsigned int l=0; l<message.length(); l++) { - utfMessage[l*2]=message.unicode()[l].row(); - utfMessage[(l*2)+1]=message.unicode()[l].cell(); + utfMessage[l*2]=message.tqunicode()[l].row(); + utfMessage[(l*2)+1]=message.tqunicode()[l].cell(); } charset=0x0002; // send UTF-16BE } @@ -393,7 +393,7 @@ if(!codec && charset != 0x0002 && contact->encoding() != 0) charset=0x0003; //send as ISO-8859-1 } -if(!codec && charset != 0x0002) // it's neither unicode nor did we find a codec so far! +if(!codec && charset != 0x0002) // it's neither tqunicode nor did we find a codec so far! { kdDebug(14151) << k_funcinfo << "Couldn't find suitable encoding for outgoing message, " << diff --git a/kopete/protocols/oscar/liboscar/sendmessagetask.h b/kopete/protocols/oscar/liboscar/sendmessagetask.h index 18e03c73..a6a0e598 100644 --- a/kopete/protocols/oscar/liboscar/sendmessagetask.h +++ b/kopete/protocols/oscar/liboscar/sendmessagetask.h @@ -26,7 +26,7 @@ class SendMessageTask : public Task { public: - SendMessageTask( Task* parent ); + SendMessageTask( Task* tqparent ); ~SendMessageTask(); //! Set the message to be sent diff --git a/kopete/protocols/oscar/liboscar/serverredirecttask.cpp b/kopete/protocols/oscar/liboscar/serverredirecttask.cpp index 5875e6a8..4e3ffa86 100644 --- a/kopete/protocols/oscar/liboscar/serverredirecttask.cpp +++ b/kopete/protocols/oscar/liboscar/serverredirecttask.cpp @@ -25,8 +25,8 @@ #include "connection.h" #include "transfer.h" -ServerRedirectTask::ServerRedirectTask( Task* parent ) - :Task( parent ), m_service( 0 ) +ServerRedirectTask::ServerRedirectTask( Task* tqparent ) + :Task( tqparent ), m_service( 0 ) { } @@ -75,7 +75,7 @@ bool ServerRedirectTask::take( Transfer* transfer ) setTransfer( transfer ); bool value = handleRedirect(); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); setTransfer( 0 ); return value; } diff --git a/kopete/protocols/oscar/liboscar/serverredirecttask.h b/kopete/protocols/oscar/liboscar/serverredirecttask.h index 972e28ce..936ff582 100644 --- a/kopete/protocols/oscar/liboscar/serverredirecttask.h +++ b/kopete/protocols/oscar/liboscar/serverredirecttask.h @@ -32,8 +32,9 @@ class Transfer; class ServerRedirectTask : public Task { Q_OBJECT + TQ_OBJECT public: - ServerRedirectTask( Task* parent ); + ServerRedirectTask( Task* tqparent ); void setService( WORD family ); void setChatParams( WORD exchange, TQByteArray cookie, WORD instance ); diff --git a/kopete/protocols/oscar/liboscar/serverversionstask.cpp b/kopete/protocols/oscar/liboscar/serverversionstask.cpp index b2e7dfa6..a6dc557c 100644 --- a/kopete/protocols/oscar/liboscar/serverversionstask.cpp +++ b/kopete/protocols/oscar/liboscar/serverversionstask.cpp @@ -29,8 +29,8 @@ using namespace Oscar; -ServerVersionsTask::ServerVersionsTask( Task* parent ) - : Task( parent ) +ServerVersionsTask::ServerVersionsTask( Task* tqparent ) + : Task( tqparent ) { m_family = 0; } @@ -101,7 +101,7 @@ void ServerVersionsTask::handleFamilies() Buffer* outbuf = transfer()->buffer(); if ( outbuf->length() % 2 != 0 ) { - setError( -1, TQString::null ); + setError( -1, TQString() ); return; } @@ -163,7 +163,7 @@ void ServerVersionsTask::handleServerVersions() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "server version=" << buffer->getWord() << ", server family=" << buffer->getWord() << endl; } - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } #include "serverversionstask.moc" diff --git a/kopete/protocols/oscar/liboscar/serverversionstask.h b/kopete/protocols/oscar/liboscar/serverversionstask.h index f3a72a38..532fcec0 100644 --- a/kopete/protocols/oscar/liboscar/serverversionstask.h +++ b/kopete/protocols/oscar/liboscar/serverversionstask.h @@ -31,8 +31,9 @@ class Transfer; class ServerVersionsTask : public Task { Q_OBJECT + TQ_OBJECT public: - ServerVersionsTask( Task* parent ); + ServerVersionsTask( Task* tqparent ); ~ServerVersionsTask(); diff --git a/kopete/protocols/oscar/liboscar/servicesetuptask.cpp b/kopete/protocols/oscar/liboscar/servicesetuptask.cpp index 61f53279..39da3531 100644 --- a/kopete/protocols/oscar/liboscar/servicesetuptask.cpp +++ b/kopete/protocols/oscar/liboscar/servicesetuptask.cpp @@ -34,18 +34,18 @@ #include "ssiparamstask.h" #include "transfer.h" -ServiceSetupTask::ServiceSetupTask( Task* parent ) - : Task( parent ) +ServiceSetupTask::ServiceSetupTask( Task* tqparent ) + : Task( tqparent ) { m_finishedTaskCount = 0; - m_locRightsTask = new LocationRightsTask( parent ); - m_profileTask = new ProfileTask( parent ); - m_blmLimitsTask = new BLMLimitsTask( parent ); - m_icbmTask = new ICBMParamsTask( parent ); - m_prmTask = new PRMParamsTask( parent ); - m_ssiParamTask = new SSIParamsTask( parent ); - m_ssiListTask = new SSIListTask( parent ); - m_ssiActivateTask = new SSIActivateTask( parent ); + m_locRightsTask = new LocationRightsTask( tqparent ); + m_profileTask = new ProfileTask( tqparent ); + m_blmLimitsTask = new BLMLimitsTask( tqparent ); + m_icbmTask = new ICBMParamsTask( tqparent ); + m_prmTask = new PRMParamsTask( tqparent ); + m_ssiParamTask = new SSIParamsTask( tqparent ); + m_ssiListTask = new SSIListTask( tqparent ); + m_ssiActivateTask = new SSIActivateTask( tqparent ); TQObject::connect( m_ssiListTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); TQObject::connect( m_ssiParamTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); @@ -114,7 +114,7 @@ void ServiceSetupTask::childTaskFinished() if ( m_finishedTaskCount == 8 ) { kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Service setup finished" << endl; - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } } diff --git a/kopete/protocols/oscar/liboscar/servicesetuptask.h b/kopete/protocols/oscar/liboscar/servicesetuptask.h index c5bf5a70..ed364353 100644 --- a/kopete/protocols/oscar/liboscar/servicesetuptask.h +++ b/kopete/protocols/oscar/liboscar/servicesetuptask.h @@ -38,8 +38,9 @@ Set up the various services for the BOS connection class ServiceSetupTask : public Task { Q_OBJECT + TQ_OBJECT public: - ServiceSetupTask( Task* parent ); + ServiceSetupTask( Task* tqparent ); ~ServiceSetupTask(); bool forMe( const Transfer* transfer ) const; diff --git a/kopete/protocols/oscar/liboscar/snacprotocol.cpp b/kopete/protocols/oscar/liboscar/snacprotocol.cpp index 3ec5c348..e7021c4f 100644 --- a/kopete/protocols/oscar/liboscar/snacprotocol.cpp +++ b/kopete/protocols/oscar/liboscar/snacprotocol.cpp @@ -29,8 +29,8 @@ using namespace Oscar; -SnacProtocol::SnacProtocol(TQObject *parent, const char *name) - : InputProtocolBase(parent, name) +SnacProtocol::SnacProtocol(TQObject *tqparent, const char *name) + : InputProtocolBase(tqparent, name) { } @@ -82,7 +82,7 @@ Transfer* SnacProtocol::parse( const TQByteArray & packet, uint& bytes ) //use pointer arithmatic to skip the flap and snac headers //so we don't have to do double parsing in the tasks - char* charPacket = packet.data(); + char* charPacket = const_cast<char*>(packet.data()); char* snacData; int snacOffset = 10; //default if ( s.flags >= 0x8000 ) //skip the next 8 bytes, we don't care about the snac version ATM diff --git a/kopete/protocols/oscar/liboscar/snacprotocol.h b/kopete/protocols/oscar/liboscar/snacprotocol.h index 18c6aaaa..a9b10cbd 100644 --- a/kopete/protocols/oscar/liboscar/snacprotocol.h +++ b/kopete/protocols/oscar/liboscar/snacprotocol.h @@ -28,8 +28,9 @@ class SnacTransfer; class SnacProtocol : public InputProtocolBase { Q_OBJECT + TQ_OBJECT public: - SnacProtocol( TQObject *parent = 0, const char *name = 0 ); + SnacProtocol( TQObject *tqparent = 0, const char *name = 0 ); ~SnacProtocol(); /** diff --git a/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp b/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp index 795d9999..c03d70d4 100644 --- a/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp +++ b/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp @@ -26,7 +26,7 @@ -SSIActivateTask::SSIActivateTask(Task* parent): Task(parent) +SSIActivateTask::SSIActivateTask(Task* tqparent): Task(tqparent) { } @@ -44,7 +44,7 @@ void SSIActivateTask::onGo() Buffer* buffer = new Buffer(); Transfer* t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } // kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/ssiactivatetask.h b/kopete/protocols/oscar/liboscar/ssiactivatetask.h index 66f0a67b..7ca44896 100644 --- a/kopete/protocols/oscar/liboscar/ssiactivatetask.h +++ b/kopete/protocols/oscar/liboscar/ssiactivatetask.h @@ -28,7 +28,7 @@ A fire and forget task to send the activation SNAC for the SSI list to the serve class SSIActivateTask : public Task { public: - SSIActivateTask( Task* parent ); + SSIActivateTask( Task* tqparent ); ~SSIActivateTask(); void onGo(); }; diff --git a/kopete/protocols/oscar/liboscar/ssiauthtask.cpp b/kopete/protocols/oscar/liboscar/ssiauthtask.cpp index bccb754e..8a33bb56 100644 --- a/kopete/protocols/oscar/liboscar/ssiauthtask.cpp +++ b/kopete/protocols/oscar/liboscar/ssiauthtask.cpp @@ -25,10 +25,10 @@ #include <kdebug.h> -SSIAuthTask::SSIAuthTask( Task* parent ) - : Task( parent ) +SSIAuthTask::SSIAuthTask( Task* tqparent ) + : Task( tqparent ) { - m_manager = parent->client()->ssiManager(); + m_manager = tqparent->client()->ssiManager(); } SSIAuthTask::~SSIAuthTask() diff --git a/kopete/protocols/oscar/liboscar/ssiauthtask.h b/kopete/protocols/oscar/liboscar/ssiauthtask.h index 1760f344..d7e7c78a 100644 --- a/kopete/protocols/oscar/liboscar/ssiauthtask.h +++ b/kopete/protocols/oscar/liboscar/ssiauthtask.h @@ -29,8 +29,9 @@ class SSIManager; class SSIAuthTask : public Task { Q_OBJECT + TQ_OBJECT public: - SSIAuthTask( Task* parent ); + SSIAuthTask( Task* tqparent ); ~SSIAuthTask(); diff --git a/kopete/protocols/oscar/liboscar/ssilisttask.cpp b/kopete/protocols/oscar/liboscar/ssilisttask.cpp index d52f7f4e..6b10e3fa 100644 --- a/kopete/protocols/oscar/liboscar/ssilisttask.cpp +++ b/kopete/protocols/oscar/liboscar/ssilisttask.cpp @@ -23,7 +23,7 @@ #include "ssimanager.h" #include "transfer.h" -SSIListTask::SSIListTask( Task* parent ) : Task( parent ) +SSIListTask::SSIListTask( Task* tqparent ) : Task( tqparent ) { m_ssiManager = client()->ssiManager(); TQObject::connect( this, TQT_SIGNAL( newContact( const Oscar::SSI& ) ), m_ssiManager, TQT_SLOT( newContact( const Oscar::SSI& ) ) ); @@ -136,7 +136,7 @@ void SSIListTask::handleSSIListReply() { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "SSI List complete" << endl; client()->ssiManager()->setListComplete( true ); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } else kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Awaiting another SSI packet" << endl; @@ -154,7 +154,7 @@ void SSIListTask::handleSSIUpToDate() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Number of items in SSI list: " << ssiItems << endl; client()->ssiManager()->setListComplete( true ); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } void SSIListTask::checkSSITimestamp() diff --git a/kopete/protocols/oscar/liboscar/ssilisttask.h b/kopete/protocols/oscar/liboscar/ssilisttask.h index 96a4c3d8..24ee179d 100644 --- a/kopete/protocols/oscar/liboscar/ssilisttask.h +++ b/kopete/protocols/oscar/liboscar/ssilisttask.h @@ -35,8 +35,9 @@ class SSIManager; class SSIListTask : public Task { Q_OBJECT + TQ_OBJECT public: - SSIListTask( Task* parent ); + SSIListTask( Task* tqparent ); ~SSIListTask(); virtual bool take( Transfer* transfer ); diff --git a/kopete/protocols/oscar/liboscar/ssimanager.cpp b/kopete/protocols/oscar/liboscar/ssimanager.cpp index 1351c237..630b8f6b 100644 --- a/kopete/protocols/oscar/liboscar/ssimanager.cpp +++ b/kopete/protocols/oscar/liboscar/ssimanager.cpp @@ -42,8 +42,8 @@ public: WORD nextGroupId; }; -SSIManager::SSIManager( TQObject *parent, const char *name ) - : TQObject( parent, name ) +SSIManager::SSIManager( TQObject *tqparent, const char *name ) + : TQObject( tqparent, name ) { d = new SSIManagerPrivate; d->complete = false; @@ -97,7 +97,7 @@ WORD SSIManager::nextContactId() return 0xFFFF; } - if ( d->itemIdList.contains( d->nextContactId ) == 0 ) + if ( d->itemIdList.tqcontains( d->nextContactId ) == 0 ) d->itemIdList.append( d->nextContactId ); return d->nextContactId++; @@ -116,7 +116,7 @@ WORD SSIManager::nextGroupId() return 0xFFFF; } - if ( d->groupIdList.contains( d->nextGroupId ) == 0 ) + if ( d->groupIdList.tqcontains( d->nextGroupId ) == 0 ) d->groupIdList.append( d->nextGroupId ); return d->nextGroupId++; @@ -141,7 +141,7 @@ void SSIManager::setParameters( WORD maxContacts, WORD maxGroups, WORD maxVisibl { //I'm not using k_funcinfo for these debug statements because of //the function's long signature - TQString funcName = TQString::fromLatin1( "[void SSIManager::setParameters] " ); + TQString funcName = TQString::tqfromLatin1( "[void SSIManager::setParameters] " ); kdDebug(OSCAR_RAW_DEBUG) << funcName << "Max number of contacts allowed in SSI: " << maxContacts << endl; kdDebug(OSCAR_RAW_DEBUG) << funcName << "Max number of groups allowed in SSI: " @@ -214,7 +214,7 @@ Oscar::SSI SSIManager::findContact( const TQString &contact, const TQString &gro return m_dummyItem; } - Oscar::SSI gr = findGroup( group ); // find the parent group + Oscar::SSI gr = findGroup( group ); // find the tqparent group if ( gr.isValid() ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "gr->name= " << gr.name() << @@ -449,7 +449,7 @@ bool SSIManager::updateGroup( const Oscar::SSI& group ) d->SSIList.remove( oldGroup ); } - if ( d->SSIList.findIndex( group ) != -1 ) + if ( d->SSIList.tqfindIndex( group ) != -1 ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "New group is already in list." << endl; return false; @@ -496,7 +496,7 @@ bool SSIManager::removeGroup( const TQString &group ) bool SSIManager::newContact( const Oscar::SSI& contact ) { - if ( d->SSIList.findIndex( contact ) == -1 ) + if ( d->SSIList.tqfindIndex( contact ) == -1 ) { kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Adding contact '" << contact.name() << "' to SSI list" << endl; addID( contact ); @@ -518,7 +518,7 @@ bool SSIManager::updateContact( const Oscar::SSI& contact ) d->SSIList.remove( oldContact ); } - if ( d->SSIList.findIndex( contact ) != -1 ) + if ( d->SSIList.tqfindIndex( contact ) != -1 ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "New contact is already in list." << endl; return false; @@ -562,7 +562,7 @@ bool SSIManager::removeContact( const TQString &contact ) bool SSIManager::newItem( const Oscar::SSI& item ) { - if ( d->SSIList.findIndex( item ) != -1 ) + if ( d->SSIList.tqfindIndex( item ) != -1 ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Item is already in list." << endl; return false; @@ -584,7 +584,7 @@ bool SSIManager::updateItem( const Oscar::SSI& item ) d->SSIList.remove( oldItem ); } - if ( d->SSIList.findIndex( item ) != -1 ) + if ( d->SSIList.tqfindIndex( item ) != -1 ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "New item is already in list." << endl; return false; @@ -614,12 +614,12 @@ void SSIManager::addID( const Oscar::SSI& item ) { if ( item.type() == ROSTER_GROUP ) { - if ( d->groupIdList.contains( item.gid() ) == 0 ) + if ( d->groupIdList.tqcontains( item.gid() ) == 0 ) d->groupIdList.append( item.gid() ); } else { - if ( d->itemIdList.contains( item.bid() ) == 0 ) + if ( d->itemIdList.tqcontains( item.bid() ) == 0 ) d->itemIdList.append( item.bid() ); } } @@ -646,7 +646,7 @@ WORD SSIManager::findFreeId( const TQValueList<WORD>& idList, WORD fromId ) cons { for ( WORD id = fromId; id < 0x8000; id++ ) { - if ( idList.contains( id ) == 0 ) + if ( idList.tqcontains( id ) == 0 ) return id; } diff --git a/kopete/protocols/oscar/liboscar/ssimanager.h b/kopete/protocols/oscar/liboscar/ssimanager.h index df39268c..d75d1e17 100644 --- a/kopete/protocols/oscar/liboscar/ssimanager.h +++ b/kopete/protocols/oscar/liboscar/ssimanager.h @@ -38,11 +38,12 @@ SSI management @author Gustavo Pichorim Boiko @author Matt Rogers */ -class KOPETE_EXPORT SSIManager : public QObject +class KOPETE_EXPORT SSIManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - SSIManager( TQObject* parent = 0, const char* name = 0 ); + SSIManager( TQObject* tqparent = 0, const char* name = 0 ); ~SSIManager(); diff --git a/kopete/protocols/oscar/liboscar/ssimodifytask.cpp b/kopete/protocols/oscar/liboscar/ssimodifytask.cpp index b4194b5e..23164bc0 100644 --- a/kopete/protocols/oscar/liboscar/ssimodifytask.cpp +++ b/kopete/protocols/oscar/liboscar/ssimodifytask.cpp @@ -28,9 +28,9 @@ #include "transfer.h" -SSIModifyTask::SSIModifyTask( Task* parent, bool staticTask ) : Task( parent ) +SSIModifyTask::SSIModifyTask( Task* tqparent, bool staticTask ) : Task( tqparent ) { - m_ssiManager = parent->client()->ssiManager(); + m_ssiManager = tqparent->client()->ssiManager(); m_static = staticTask; m_opType = NoType; m_opSubject = NoSubject; @@ -254,23 +254,23 @@ void SSIModifyTask::handleSSIAck() break; case 0x0002: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Item to modify not found in list" << endl; - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); break; case 0x0003: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Item already exists in SSI" << endl; - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); break; case 0x000A: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Error adding item ( invalid id, already in list, invalid data )" << endl; - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); break; case 0x000C: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add item. Limit exceeded." << endl; - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); break; case 0x000D: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add ICQ item to AIM list ( and vice versa )" << endl; - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); break; case 0x000E: { @@ -283,7 +283,7 @@ void SSIModifyTask::handleSSIAck() } default: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Unknown acknowledgement code" << endl; - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); break; } }; @@ -466,7 +466,7 @@ void SSIModifyTask::updateSSIManager() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "and adding " << m_newItem.name() << " to SSI manager" << endl; m_ssiManager->newItem( m_newItem ); } - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); return; } @@ -479,7 +479,7 @@ void SSIModifyTask::updateSSIManager() m_ssiManager->removeContact( m_oldItem.name() ); else if ( m_opSubject == NoSubject ) m_ssiManager->removeItem( m_oldItem ); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); return; } @@ -492,11 +492,11 @@ void SSIModifyTask::updateSSIManager() m_ssiManager->newContact( m_newItem ); else if ( m_opSubject == NoSubject ) m_ssiManager->newItem( m_newItem ); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); return; } - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } void SSIModifyTask::freeIdOnError() diff --git a/kopete/protocols/oscar/liboscar/ssimodifytask.h b/kopete/protocols/oscar/liboscar/ssimodifytask.h index 70486cbc..3093c159 100644 --- a/kopete/protocols/oscar/liboscar/ssimodifytask.h +++ b/kopete/protocols/oscar/liboscar/ssimodifytask.h @@ -51,7 +51,7 @@ This task implements the following SNACs from the SSI family (0x0013): class SSIModifyTask : public Task { public: - SSIModifyTask( Task* parent, bool staticTask = false ); + SSIModifyTask( Task* tqparent, bool staticTask = false ); ~SSIModifyTask(); virtual void onGo(); diff --git a/kopete/protocols/oscar/liboscar/ssiparamstask.cpp b/kopete/protocols/oscar/liboscar/ssiparamstask.cpp index d279061c..11239533 100644 --- a/kopete/protocols/oscar/liboscar/ssiparamstask.cpp +++ b/kopete/protocols/oscar/liboscar/ssiparamstask.cpp @@ -27,7 +27,7 @@ using namespace Oscar; -SSIParamsTask::SSIParamsTask(Task* parent): Task(parent) +SSIParamsTask::SSIParamsTask(Task* tqparent): Task(tqparent) { } @@ -81,7 +81,7 @@ void SSIParamsTask::handleParamReply() //manually parse the TLV out of the packet, since we only want certain things if ( buf->getWord() != 0x0004 ) { - setError( -1, TQString::null ); + setError( -1, TQString() ); return; //no TLV of type 0x0004, bad packet. do nothing. } else @@ -95,7 +95,7 @@ void SSIParamsTask::handleParamReply() WORD maxIgnore = buf->getWord(); client()->ssiManager()->setParameters( maxContacts, maxGroups, maxVisible, maxInvisible, maxIgnore ); } - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } // kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/ssiparamstask.h b/kopete/protocols/oscar/liboscar/ssiparamstask.h index abf12aa2..e0244c6d 100644 --- a/kopete/protocols/oscar/liboscar/ssiparamstask.h +++ b/kopete/protocols/oscar/liboscar/ssiparamstask.h @@ -26,7 +26,7 @@ class SSIParamsTask : public Task { public: - SSIParamsTask(Task* parent); + SSIParamsTask(Task* tqparent); ~SSIParamsTask(); diff --git a/kopete/protocols/oscar/liboscar/stream.cpp b/kopete/protocols/oscar/liboscar/stream.cpp index 2fb302c1..517bde68 100644 --- a/kopete/protocols/oscar/liboscar/stream.cpp +++ b/kopete/protocols/oscar/liboscar/stream.cpp @@ -19,8 +19,8 @@ #include "stream.h" -Stream::Stream(TQObject *parent) -:TQObject(parent) +Stream::Stream(TQObject *tqparent) +:TQObject(tqparent) { } diff --git a/kopete/protocols/oscar/liboscar/stream.h b/kopete/protocols/oscar/liboscar/stream.h index d5bfabad..2ea1f871 100644 --- a/kopete/protocols/oscar/liboscar/stream.h +++ b/kopete/protocols/oscar/liboscar/stream.h @@ -25,9 +25,10 @@ class Transfer; -class Stream : public QObject +class Stream : public TQObject { Q_OBJECT + TQ_OBJECT public: enum Error { ErrParse, ErrProtocol, ErrStream, ErrCustom = 10 }; enum StreamCond { @@ -42,7 +43,7 @@ public: SystemShutdown }; - Stream(TQObject *parent=0); + Stream(TQObject *tqparent=0); virtual ~Stream(); virtual void close()=0; diff --git a/kopete/protocols/oscar/liboscar/task.cpp b/kopete/protocols/oscar/liboscar/task.cpp index 2ec342ac..cc988ebe 100644 --- a/kopete/protocols/oscar/liboscar/task.cpp +++ b/kopete/protocols/oscar/liboscar/task.cpp @@ -31,7 +31,7 @@ class Task::TaskPrivate public: TaskPrivate() {} - Q_UINT32 id; + TQ_UINT32 id; bool success; int statusCode; TQString statusString; @@ -41,19 +41,19 @@ public: Transfer* transfer; }; -Task::Task(Task *parent) -:TQObject(parent) +Task::Task(Task *tqparent) +:TQObject(tqparent) { init(); - d->client = parent->client(); + d->client = tqparent->client(); connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } -Task::Task(Connection* parent, bool) +Task::Task(Connection* tqparent, bool) :TQObject(0) { init(); - d->client = parent; + d->client = tqparent; connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } @@ -75,9 +75,9 @@ void Task::init() d->id = 0; } -Task *Task::parent() const +Task *Task::tqparent() const { - return (Task *)TQObject::parent(); + return (Task *)TQObject::tqparent(); } Connection *Task::client() const @@ -124,12 +124,12 @@ void Task::go(bool autoDelete) bool Task::take( Transfer * transfer) { - const TQObjectList *p = children(); - if(!p) + const TQObjectList p = childrenListObject(); + if(p.isEmpty()) return false; - // pass along the transfer to our children - TQObjectListIt it(*p); + // pass along the transfer to our tqchildren + TQObjectListIt it(p); Task *t; for(; it.current(); ++it) { TQObject *obj = it.current(); @@ -271,7 +271,7 @@ void Task::debug(const TQString &str) { //black hole Q_UNUSED( str ); - //client()->debug(TQString("%1: ").arg(className()) + str); + //client()->debug(TQString("%1: ").tqarg(className()) + str); } bool Task::forMe( const Transfer * transfer ) const @@ -280,7 +280,7 @@ bool Task::forMe( const Transfer * transfer ) const return false; } -void Task::setId( Q_UINT32 id ) +void Task::setId( TQ_UINT32 id ) { d->id = id; } diff --git a/kopete/protocols/oscar/liboscar/task.h b/kopete/protocols/oscar/liboscar/task.h index ebc26fb8..184abd45 100644 --- a/kopete/protocols/oscar/liboscar/task.h +++ b/kopete/protocols/oscar/liboscar/task.h @@ -34,16 +34,17 @@ class Transfer; using namespace Oscar; -class Task : public QObject +class Task : public TQObject { Q_OBJECT + TQ_OBJECT public: enum { ErrDisc }; - Task(Task *parent); + Task(Task *tqparent); Task( Connection*, bool isRoot ); virtual ~Task(); - Task *parent() const; + Task *tqparent() const; Connection* client() const; Transfer *transfer() const; @@ -74,7 +75,7 @@ signals: protected: virtual void onGo(); virtual void onDisconnect(); - void setId( Q_UINT32 id ); + void setId( TQ_UINT32 id ); void send( Transfer * request ); void setSuccess( int code=0, const TQString &str="" ); void setError( int code=0, const TQString &str="" ); diff --git a/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp b/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp index a7c16cea..6f62ebe6 100644 --- a/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp +++ b/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp @@ -27,7 +27,7 @@ ClientStreamTest::~ClientStreamTest() void ClientStreamTest::slotDoTest() { - TQString server = TQString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::tqfromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); myTestObject->connectToServer( server, true ); // fine up to here... diff --git a/kopete/protocols/oscar/liboscar/tests/clientstream_test.h b/kopete/protocols/oscar/liboscar/tests/clientstream_test.h index 47aeac86..80c68446 100644 --- a/kopete/protocols/oscar/liboscar/tests/clientstream_test.h +++ b/kopete/protocols/oscar/liboscar/tests/clientstream_test.h @@ -19,11 +19,12 @@ #include "coreprotocol.h" -#define QT_FATAL_ASSERT 1 +#define TQT_FATAL_ASSERT 1 -class ClientStreamTest : public QApplication +class ClientStreamTest : public TQApplication { Q_OBJECT + TQ_OBJECT public: ClientStreamTest(int argc, char ** argv); diff --git a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h index f2fa0fec..6aff018c 100644 --- a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h +++ b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h @@ -16,9 +16,9 @@ #include "oscarutils.h" -#define QT_FATAL_ASSERT 1 +#define TQT_FATAL_ASSERT 1 -class IPAddrTest : public QApplication +class IPAddrTest : public TQApplication { public: IPAddrTest(int argc, char ** argv); diff --git a/kopete/protocols/oscar/liboscar/tests/kunittest.cpp b/kopete/protocols/oscar/liboscar/tests/kunittest.cpp index 2181fda3..d40f0069 100644 --- a/kopete/protocols/oscar/liboscar/tests/kunittest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/kunittest.cpp @@ -62,7 +62,7 @@ KUnitTest::KUnitTest() void KUnitTest::checkRun() { // if ( m_qtests.isEmpty() ) -// qApp->exit(); +// tqApp->exit(); } int KUnitTest::runTests() @@ -150,7 +150,7 @@ int KUnitTest::runTests() return m_tests.count(); } -//void KUnitTest::addTester( QTester *test ) +//void KUnitTest::addTester( TQTester *test ) //{ // m_qtests.insert( test, test ); // connect( test, TQT_SIGNAL(destroyed(TQObject*)), @@ -161,7 +161,7 @@ void KUnitTest::qtesterDone( TQObject *obj ) { // m_qtests.remove( obj ); // if ( m_qtests.isEmpty() ) -// qApp->quit(); +// tqApp->quit(); } #include "kunittest.moc" diff --git a/kopete/protocols/oscar/liboscar/tests/kunittest.h b/kopete/protocols/oscar/liboscar/tests/kunittest.h index d2d6a04a..c2149992 100644 --- a/kopete/protocols/oscar/liboscar/tests/kunittest.h +++ b/kopete/protocols/oscar/liboscar/tests/kunittest.h @@ -34,11 +34,12 @@ #include <tqptrdict.h> #define ADD_TEST(x) addTester( #x, new x ) -#define ADD_QTEST(x) addTester( new x ) +#define ADD_TQTEST(x) addTester( new x ) -class KUnitTest : public QObject +class KUnitTest : public TQObject { Q_OBJECT + TQ_OBJECT public: KUnitTest(); @@ -48,7 +49,7 @@ public: { m_tests.insert( name, test ); } -// void addTester( QTester *test ); +// void addTester( TQTester *test ); private slots: void qtesterDone( TQObject *obj ); @@ -59,7 +60,7 @@ private: private: TQAsciiDict<Tester> m_tests; -// TQPtrDict<QTester> m_qtests; +// TQPtrDict<TQTester> m_qtests; int globalTests; int globalPasses; int globalFails; diff --git a/kopete/protocols/oscar/liboscar/tests/logintest.cpp b/kopete/protocols/oscar/liboscar/tests/logintest.cpp index 1d3728aa..540aa35c 100644 --- a/kopete/protocols/oscar/liboscar/tests/logintest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/logintest.cpp @@ -29,7 +29,7 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - TQString server = TQString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::tqfromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); diff --git a/kopete/protocols/oscar/liboscar/tests/logintest.h b/kopete/protocols/oscar/liboscar/tests/logintest.h index d97c336d..661ae49d 100644 --- a/kopete/protocols/oscar/liboscar/tests/logintest.h +++ b/kopete/protocols/oscar/liboscar/tests/logintest.h @@ -20,11 +20,12 @@ #include "connection.h" #include "coreprotocol.h" -#define QT_FATAL_ASSERT 1 +#define TQT_FATAL_ASSERT 1 -class LoginTest : public QApplication +class LoginTest : public TQApplication { Q_OBJECT + TQ_OBJECT public: LoginTest(int argc, char ** argv); diff --git a/kopete/protocols/oscar/liboscar/tests/redirecttest.h b/kopete/protocols/oscar/liboscar/tests/redirecttest.h index 785d61c8..0989529c 100644 --- a/kopete/protocols/oscar/liboscar/tests/redirecttest.h +++ b/kopete/protocols/oscar/liboscar/tests/redirecttest.h @@ -19,9 +19,9 @@ #include "serverredirecttask.h" #include "task.h" -#define QT_FATAL_ASSERT 1 +#define TQT_FATAL_ASSERT 1 -class RedirectTest : public QApplication +class RedirectTest : public TQApplication { public: RedirectTest(int argc, char ** argv); diff --git a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp index 6ca733cc..9849bbbb 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp @@ -29,7 +29,7 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - TQString server = TQString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::tqfromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); @@ -57,7 +57,7 @@ int main(int argc, char ** argv) void LoginTest::runAddGroupTest() { qDebug( "running ssi group add test" ); - TQString group = TQString::fromLatin1( "dummygroup" ); + TQString group = TQString::tqfromLatin1( "dummygroup" ); myClient->addGroup( group ); TQTimer::singleShot( 5000, this, TQT_SLOT( runDelGroupTest() ) ); } @@ -65,7 +65,7 @@ void LoginTest::runAddGroupTest() void LoginTest::runDelGroupTest() { qDebug( "running ssi group del test" ); - TQString group = TQString::fromLatin1( "dummygroup" ); + TQString group = TQString::tqfromLatin1( "dummygroup" ); myClient->removeGroup( group ); } diff --git a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h index 291698ec..e997b9db 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h +++ b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h @@ -20,11 +20,12 @@ #include "connection.h" #include "coreprotocol.h" -#define QT_FATAL_ASSERT 1 +#define TQT_FATAL_ASSERT 1 -class LoginTest : public QApplication +class LoginTest : public TQApplication { Q_OBJECT + TQ_OBJECT public: LoginTest(int argc, char ** argv); diff --git a/kopete/protocols/oscar/liboscar/tests/ssitest.cpp b/kopete/protocols/oscar/liboscar/tests/ssitest.cpp index 7669a945..9c2202a6 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssitest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/ssitest.cpp @@ -53,28 +53,28 @@ void SSITest::testIt() //try to find a group by name ssi = m_manager->findGroup("SecondGroup"); if ( ssi ) - qDebug( TQString("Found group SecondGroup with gid=%1").arg( ssi->gid() ).latin1()); + qDebug( TQString("Found group SecondGroup with gid=%1").tqarg( ssi->gid() ).latin1()); else qDebug( "Oops, group SecondGroup not found" ); //try to find a group by gid ssi = m_manager->findGroup( 3 ); if ( ssi ) - qDebug( TQString("Found group 3 with name=%1").arg( ssi->name() ).latin1() ); + qDebug( TQString("Found group 3 with name=%1").tqarg( ssi->name() ).latin1() ); else qDebug( "Oops, group 3 not found" ); //try to find a contact by name ssi = m_manager->findContact("ThirdContact"); if ( ssi ) - qDebug( TQString( "Found contact ThirdContact with gid=%1" ).arg( ssi->gid() ).latin1() ); + qDebug( TQString( "Found contact ThirdContact with gid=%1" ).tqarg( ssi->gid() ).latin1() ); else qDebug( "Oops, contact ThirdContact not found" ); //try to find a contact using the name and the group name ssi = m_manager->findContact("FourthContact","SecondGroup"); if ( ssi ) - qDebug( TQString("Found contact FourthContact with bid=%1").arg( ssi->bid() ).latin1() ); + qDebug( TQString("Found contact FourthContact with bid=%1").tqarg( ssi->bid() ).latin1() ); else qDebug( "Oops, contact FourthContact not found" ); @@ -89,13 +89,13 @@ void SSITest::testIt() TQValueList<SSI*>::iterator it; qDebug( "Contacts from group FirtsGroup:" ); for ( it = list.begin(); it != list.end(); ++it) - qDebug( TQString(" name=%1").arg( (*it)->name() ).latin1() ); + qDebug( TQString(" name=%1").tqarg( (*it)->name() ).latin1() ); //the group list TQValueList<SSI*> list2 = m_manager->groupList(); qDebug( "Group list:" ); for ( it = list2.begin(); it != list2.end(); ++it) - qDebug( TQString(" name=%1").arg( (*it)->name() ).latin1() ); + qDebug( TQString(" name=%1").tqarg( (*it)->name() ).latin1() ); //remove a group - this shouldn't report any debug line m_manager->removeGroup( "SecondGroup" ); diff --git a/kopete/protocols/oscar/liboscar/tests/ssitest.h b/kopete/protocols/oscar/liboscar/tests/ssitest.h index fbdcf2fb..db7e8697 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssitest.h +++ b/kopete/protocols/oscar/liboscar/tests/ssitest.h @@ -16,11 +16,12 @@ #include "ssimanager.h" -#define QT_FATAL_ASSERT 1 +#define TQT_FATAL_ASSERT 1 -class SSITest : public QApplication +class SSITest : public TQApplication { Q_OBJECT + TQ_OBJECT public: SSITest(int argc, char ** argv); diff --git a/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp b/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp index fb346d26..663ec2fb 100644 --- a/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp @@ -29,7 +29,7 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - TQString server = TQString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::tqfromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); @@ -58,7 +58,7 @@ int main(int argc, char ** argv) void LoginTest::runUserInfoTest() { qDebug( "running user info test" ); - TQString contact = TQString::fromLatin1( "userid" ); + TQString contact = TQString::tqfromLatin1( "userid" ); myClient->requestFullInfo( contact ); } diff --git a/kopete/protocols/oscar/liboscar/tests/userinfotest.h b/kopete/protocols/oscar/liboscar/tests/userinfotest.h index 76450466..a17818e6 100644 --- a/kopete/protocols/oscar/liboscar/tests/userinfotest.h +++ b/kopete/protocols/oscar/liboscar/tests/userinfotest.h @@ -20,11 +20,12 @@ #include "connection.h" #include "coreprotocol.h" -#define QT_FATAL_ASSERT 1 +#define TQT_FATAL_ASSERT 1 -class LoginTest : public QApplication +class LoginTest : public TQApplication { Q_OBJECT + TQ_OBJECT public: LoginTest(int argc, char ** argv); diff --git a/kopete/protocols/oscar/liboscar/transfer.cpp b/kopete/protocols/oscar/liboscar/transfer.cpp index ac83ac06..100bcf9d 100644 --- a/kopete/protocols/oscar/liboscar/transfer.cpp +++ b/kopete/protocols/oscar/liboscar/transfer.cpp @@ -90,7 +90,7 @@ TQString Transfer::toString() const if(c < 0x10) hex.append("0"); - hex.append(TQString("%1 ").arg(c, 0, 16)); + hex.append(TQString("%1 ").tqarg(c, 0, 16)); ascii.append(isprint(c) ? c : '.'); @@ -98,8 +98,8 @@ TQString Transfer::toString() const { output += hex + " |" + ascii + "|\n"; i=0; - hex=TQString::null; - ascii=TQString::null; + hex=TQString(); + ascii=TQString(); } } diff --git a/kopete/protocols/oscar/liboscar/typingnotifytask.cpp b/kopete/protocols/oscar/liboscar/typingnotifytask.cpp index f3c34f96..536f2f39 100644 --- a/kopete/protocols/oscar/liboscar/typingnotifytask.cpp +++ b/kopete/protocols/oscar/liboscar/typingnotifytask.cpp @@ -25,8 +25,8 @@ -TypingNotifyTask::TypingNotifyTask( Task* parent ) -: Task( parent ) +TypingNotifyTask::TypingNotifyTask( Task* tqparent ) +: Task( tqparent ) { m_notificationType = 0x0000; } @@ -79,7 +79,7 @@ void TypingNotifyTask::onGo() Transfer* t = createTransfer( f, s, b ); send( t ); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } void TypingNotifyTask::handleNotification() @@ -87,12 +87,12 @@ void TypingNotifyTask::handleNotification() /* NB ICQ5 (windows) seems to only send 0x0002 and 0x0001, so I'm interpreting 0x001 as typing finished here - Will */ Buffer* b = transfer()->buffer(); - //I don't care about the QWORD or the channel + //I don't care about the TQWORD or the channel b->skipBytes( 10 ); TQString contact( b->getBUIN() ); - Q_UINT32 word = b->getWord(); + TQ_UINT32 word = b->getWord(); switch ( word ) { case 0x0000: @@ -120,5 +120,5 @@ void TypingNotifyTask::setParams( const TQString& contact, int notifyType ) #include "typingnotifytask.moc" -// kate: indent-mode csands; space-indent off; replace-tabs off; +// kate: indent-mode csands; space-indent off; tqreplace-tabs off; diff --git a/kopete/protocols/oscar/liboscar/typingnotifytask.h b/kopete/protocols/oscar/liboscar/typingnotifytask.h index 34c5d86a..e99951fc 100644 --- a/kopete/protocols/oscar/liboscar/typingnotifytask.h +++ b/kopete/protocols/oscar/liboscar/typingnotifytask.h @@ -28,10 +28,11 @@ class TypingNotifyTask : public Task { Q_OBJECT + TQ_OBJECT public: enum { Finished = 0x0000, Typed = 0x0001, Begin = 0x0002 }; - TypingNotifyTask( Task* parent ); + TypingNotifyTask( Task* tqparent ); ~TypingNotifyTask(); virtual bool forMe( const Transfer* transfer) const; @@ -59,4 +60,4 @@ private: #endif -//kate: indent-mode csands; space-indent off; replace-tabs off; +//kate: indent-mode csands; space-indent off; tqreplace-tabs off; diff --git a/kopete/protocols/oscar/liboscar/userdetails.cpp b/kopete/protocols/oscar/liboscar/userdetails.cpp index 8a1b6c4e..77a6c72b 100644 --- a/kopete/protocols/oscar/liboscar/userdetails.cpp +++ b/kopete/protocols/oscar/liboscar/userdetails.cpp @@ -34,7 +34,7 @@ UserDetails::UserDetails() m_warningLevel = 0; m_userClass = 0; m_idleTime = 0; - m_extendedStatus = 0; + m_extendedtqStatus = 0; m_capabilities = 0; m_dcPort = 0; m_dcType = 0; @@ -107,9 +107,9 @@ int UserDetails::userClass() const return m_userClass; } -DWORD UserDetails::extendedStatus() const +DWORD UserDetails::extendedtqStatus() const { - return m_extendedStatus; + return m_extendedtqStatus; } BYTE UserDetails::iconCheckSumType() const @@ -126,7 +126,7 @@ TQString UserDetails::clientName() const { if ( !m_clientVersion.isEmpty() ) return i18n("Translators: client-name client-version", - "%1 %2").arg(m_clientName, m_clientVersion); + "%1 %2").tqarg(m_clientName, m_clientVersion); else return m_clientName; } @@ -183,10 +183,10 @@ void UserDetails::fill( Buffer * buffer ) #endif break; case 0x0006: //extended user status - m_extendedStatus = b.getDWord(); + m_extendedtqStatus = b.getDWord(); m_extendedStatusSpecified = true; #ifdef OSCAR_USERINFO_DEBUG - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Extended status is " << TQString::number( m_extendedStatus, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Extended status is " << TQString::number( m_extendedtqStatus, 16 ) << endl; #endif break; case 0x000A: //external IP address @@ -366,9 +366,9 @@ void UserDetails::detectClient() case 0xFFFFFFFFL: //gaim behaves like official AIM so we can't detect them, only look for miranda { if (m_dcLastExtStatusUpdateTime & 0x80000000) - m_clientName=TQString::fromLatin1("Miranda alpha"); + m_clientName=TQString::tqfromLatin1("Miranda alpha"); else - m_clientName=TQString::fromLatin1("Miranda"); + m_clientName=TQString::tqfromLatin1("Miranda"); DWORD version = (m_dcLastExtInfoUpdateTime & 0xFFFFFF); BYTE major1 = ((version >> 24) & 0xFF); @@ -391,25 +391,25 @@ void UserDetails::detectClient() } break; case 0xFFFFFF8FL: - m_clientName = TQString::fromLatin1("StrICQ"); + m_clientName = TQString::tqfromLatin1("StrICQ"); break; case 0xFFFFFF42L: - m_clientName = TQString::fromLatin1("mICQ"); + m_clientName = TQString::tqfromLatin1("mICQ"); break; case 0xFFFFFFBEL: - m_clientName = TQString::fromLatin1("alicq"); + m_clientName = TQString::tqfromLatin1("alicq"); break; case 0xFFFFFF7FL: - m_clientName = TQString::fromLatin1("&RQ"); + m_clientName = TQString::tqfromLatin1("&RQ"); break; case 0xFFFFFFABL: - m_clientName = TQString::fromLatin1("YSM"); + m_clientName = TQString::tqfromLatin1("YSM"); break; case 0x3AA773EEL: if ((m_dcLastExtStatusUpdateTime == 0x3AA66380L) && (m_dcLastExtInfoUpdateTime == 0x3A877A42L)) { - m_clientName=TQString::fromLatin1("libicq2000"); + m_clientName=TQString::tqfromLatin1("libicq2000"); } break; default: @@ -427,48 +427,48 @@ void UserDetails::detectClient() switch (m_dcProtoVersion) { case 10: - m_clientName=TQString::fromLatin1("ICQ 2003b"); + m_clientName=TQString::tqfromLatin1("ICQ 2003b"); break; case 9: - m_clientName=TQString::fromLatin1("ICQ Lite"); + m_clientName=TQString::tqfromLatin1("ICQ Lite"); break; case 8: - m_clientName=TQString::fromLatin1("Miranda"); + m_clientName=TQString::tqfromLatin1("Miranda"); break; default: - m_clientName=TQString::fromLatin1("ICQ2go"); + m_clientName=TQString::tqfromLatin1("ICQ2go"); } } else if (hasCap(CAP_BUDDYICON)) // only gaim seems to advertize this on ICQ { - m_clientName = TQString::fromLatin1("Gaim"); + m_clientName = TQString::tqfromLatin1("Gaim"); } else if (hasCap(CAP_XTRAZ)) { - m_clientName = TQString::fromLatin1("ICQ 4.0 Lite"); + m_clientName = TQString::tqfromLatin1("ICQ 4.0 Lite"); } else if ((hasCap(CAP_STR_2001) || hasCap(CAP_ICQSERVERRELAY)) && hasCap(CAP_IS_2001)) { - m_clientName = TQString::fromLatin1( "ICQ 2001"); + m_clientName = TQString::tqfromLatin1( "ICQ 2001"); } else if ((hasCap(CAP_STR_2001) || hasCap(CAP_ICQSERVERRELAY)) && hasCap(CAP_STR_2002)) { - m_clientName = TQString::fromLatin1("ICQ 2002"); + m_clientName = TQString::tqfromLatin1("ICQ 2002"); } else if (hasCap(CAP_RTFMSGS) && hasCap(CAP_UTF8) && hasCap(CAP_ICQSERVERRELAY) && hasCap(CAP_ISICQ)) { - m_clientName = TQString::fromLatin1("ICQ 2003a"); + m_clientName = TQString::tqfromLatin1("ICQ 2003a"); } else if (hasCap(CAP_ICQSERVERRELAY) && hasCap(CAP_ISICQ)) { - m_clientName =TQString::fromLatin1("ICQ 2001b"); + m_clientName =TQString::tqfromLatin1("ICQ 2001b"); } else if ((m_dcProtoVersion == 7) && hasCap(CAP_RTFMSGS)) { - m_clientName = TQString::fromLatin1("GnomeICU"); + m_clientName = TQString::tqfromLatin1("GnomeICU"); } } @@ -514,7 +514,7 @@ void UserDetails::merge( const UserDetails& ud ) } if ( ud.m_extendedStatusSpecified ) { - m_extendedStatus = ud.m_extendedStatus; + m_extendedtqStatus = ud.m_extendedtqStatus; m_extendedStatusSpecified = true; } if ( ud.m_capabilitiesSpecified ) diff --git a/kopete/protocols/oscar/liboscar/userdetails.h b/kopete/protocols/oscar/liboscar/userdetails.h index 8835f6f9..367d8999 100644 --- a/kopete/protocols/oscar/liboscar/userdetails.h +++ b/kopete/protocols/oscar/liboscar/userdetails.h @@ -44,7 +44,7 @@ public: TQDateTime onlineSinceTime() const; //! Online since accessor TQDateTime memberSinceTime() const; //! Member since accessor int userClass() const; //! User class accessor - DWORD extendedStatus() const; //!User status accessor + DWORD extendedtqStatus() const; //!User status accessor BYTE iconCheckSumType() const; //!Buddy icon hash type TQByteArray buddyIconHash() const; //! Buddy icon md5 hash accessor TQString clientName() const; //! Client name and version @@ -85,7 +85,7 @@ private: TQDateTime m_onlineSince; /// how long the contact's been online - TLV 0x03 DWORD m_numSecondsOnline; /// how long the contact's been online in seconds WORD m_idleTime; /// the idle time of the contact - TLV 0x0F - DWORD m_extendedStatus; /// the extended status of the contact - TLV 0x06 + DWORD m_extendedtqStatus; /// the extended status of the contact - TLV 0x06 DWORD m_capabilities; //TLV 0x05 TQString m_clientVersion; /// the version of client they're using TQString m_clientName; /// the name of the client they're using diff --git a/kopete/protocols/oscar/liboscar/userinfotask.cpp b/kopete/protocols/oscar/liboscar/userinfotask.cpp index 66197316..4cda87a0 100644 --- a/kopete/protocols/oscar/liboscar/userinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/userinfotask.cpp @@ -26,8 +26,8 @@ Kopete (c) 2002-2005 by the Kopete developers <kopete-devel@kde.org> -UserInfoTask::UserInfoTask( Task* parent ) -: Task( parent ) +UserInfoTask::UserInfoTask( Task* tqparent ) +: Task( tqparent ) { } @@ -44,7 +44,7 @@ bool UserInfoTask::forMe( const Transfer * transfer ) const if ( st->snacService() == 0x0002 && st->snacSubtype() == 0x0006 ) { - if ( m_contactSequenceMap.find( st->snacRequest() ) == m_contactSequenceMap.end() ) + if ( m_contactSequenceMap.tqfind( st->snacRequest() ) == m_contactSequenceMap.end() ) return false; else { @@ -61,7 +61,7 @@ bool UserInfoTask::take( Transfer * transfer ) if ( forMe( transfer ) ) { setTransfer( transfer ); - Q_UINT16 seq = 0; + TQ_UINT16 seq = 0; SnacTransfer* st = dynamic_cast<SnacTransfer*>( transfer ); if ( st ) seq = st->snacRequest(); @@ -135,7 +135,7 @@ void UserInfoTask::onGo() void UserInfoTask::requestInfoFor( const TQString& contact, unsigned int types ) { - Q_UINT16 seq = client()->snacSequence(); + TQ_UINT16 seq = client()->snacSequence(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting sequence " << seq << " for contact " << contact << endl; m_contactSequenceMap[seq] = contact; m_typesSequenceMap[seq] = types; @@ -143,7 +143,7 @@ void UserInfoTask::requestInfoFor( const TQString& contact, unsigned int types ) onGo(); } -UserDetails UserInfoTask::getInfoFor( Q_UINT16 sequence ) const +UserDetails UserInfoTask::getInfoFor( TQ_UINT16 sequence ) const { return m_sequenceInfoMap[sequence]; } diff --git a/kopete/protocols/oscar/liboscar/userinfotask.h b/kopete/protocols/oscar/liboscar/userinfotask.h index 4b973a04..4eadc90c 100644 --- a/kopete/protocols/oscar/liboscar/userinfotask.h +++ b/kopete/protocols/oscar/liboscar/userinfotask.h @@ -33,8 +33,9 @@ Handles user information requests that are done via SNAC 02,05 and 02,06 class UserInfoTask : public Task { Q_OBJECT + TQ_OBJECT public: - UserInfoTask( Task* parent ); + UserInfoTask( Task* tqparent ); ~UserInfoTask(); enum { Profile = 0x0001, General = 0x0002, AwayMessage = 0x0003, Capabilities = 0x0004 }; @@ -45,20 +46,20 @@ public: void onGo(); void requestInfoFor( const TQString& userId, unsigned int types ); - UserDetails getInfoFor( Q_UINT16 sequence ) const; - TQString contactForSequence( Q_UINT16 sequence ) const; + UserDetails getInfoFor( TQ_UINT16 sequence ) const; + TQString contactForSequence( TQ_UINT16 sequence ) const; signals: - void gotInfo( Q_UINT16 seqNumber ); + void gotInfo( TQ_UINT16 seqNumber ); void receivedProfile( const TQString& contact, const TQString& profile ); void receivedAwayMessage( const TQString& contact, const TQString& message ); private: - TQMap<Q_UINT16, UserDetails> m_sequenceInfoMap; - TQMap<Q_UINT16, TQString> m_contactSequenceMap; - TQMap<Q_UINT16, unsigned int> m_typesSequenceMap; - Q_UINT16 m_seq; + TQMap<TQ_UINT16, UserDetails> m_sequenceInfoMap; + TQMap<TQ_UINT16, TQString> m_contactSequenceMap; + TQMap<TQ_UINT16, unsigned int> m_typesSequenceMap; + TQ_UINT16 m_seq; }; diff --git a/kopete/protocols/oscar/liboscar/usersearchtask.cpp b/kopete/protocols/oscar/liboscar/usersearchtask.cpp index 545706a5..a386d8cf 100644 --- a/kopete/protocols/oscar/liboscar/usersearchtask.cpp +++ b/kopete/protocols/oscar/liboscar/usersearchtask.cpp @@ -22,8 +22,8 @@ #include "buffer.h" #include "connection.h" -UserSearchTask::UserSearchTask( Task* parent ) - : ICQTask( parent ) +UserSearchTask::UserSearchTask( Task* tqparent ) + : ICQTask( tqparent ) { } @@ -61,7 +61,7 @@ bool UserSearchTask::take( Transfer* t ) { setTransfer( t ); - Q_UINT16 seq = 0; + TQ_UINT16 seq = 0; SnacTransfer* st = dynamic_cast<SnacTransfer*>( t ); if ( st ) seq = st->snacRequest(); @@ -98,7 +98,7 @@ bool UserSearchTask::take( Transfer* t ) { int moreUsersCount = buffer->getLEDWord(); emit searchFinished( moreUsersCount ); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); } setTransfer( 0 ); } @@ -312,4 +312,4 @@ void UserSearchTask::searchWhitePages( const ICQWPSearchInfo& info ) #include "usersearchtask.moc" -//kate: indent-mode csands; tab-width 4; space-indent off; replace-tabs off; +//kate: indent-mode csands; tab-width 4; space-indent off; tqreplace-tabs off; diff --git a/kopete/protocols/oscar/liboscar/usersearchtask.h b/kopete/protocols/oscar/liboscar/usersearchtask.h index 781a311a..4cef65d0 100644 --- a/kopete/protocols/oscar/liboscar/usersearchtask.h +++ b/kopete/protocols/oscar/liboscar/usersearchtask.h @@ -31,8 +31,9 @@ Search for contacts class UserSearchTask : public ICQTask { Q_OBJECT + TQ_OBJECT public: - UserSearchTask( Task* parent ); + UserSearchTask( Task* tqparent ); ~UserSearchTask(); @@ -54,7 +55,7 @@ signals: private: TQValueList<ICQSearchResult> m_results; TQString m_uin; - Q_UINT16 m_seq; + TQ_UINT16 m_seq; SearchType m_type; }; diff --git a/kopete/protocols/oscar/liboscar/warningtask.cpp b/kopete/protocols/oscar/liboscar/warningtask.cpp index 7b895b5c..00a0294d 100644 --- a/kopete/protocols/oscar/liboscar/warningtask.cpp +++ b/kopete/protocols/oscar/liboscar/warningtask.cpp @@ -23,7 +23,7 @@ #include "transfer.h" #include "connection.h" -WarningTask::WarningTask( Task* parent ): Task( parent ) +WarningTask::WarningTask( Task* tqparent ): Task( tqparent ) { } @@ -65,13 +65,13 @@ bool WarningTask::take( Transfer* transfer ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Warning level increased " << m_increase << " to " << m_newLevel << endl; emit userWarned( m_contact, m_increase, m_newLevel ); - setSuccess( 0, TQString::null ); + setSuccess( 0, TQString() ); setTransfer( 0 ); return true; } else { - setError( 0, TQString::null ); + setError( 0, TQString() ); return false; } } @@ -91,6 +91,6 @@ void WarningTask::onGo() send( t ); } -//kate: indent-mode csands; space-indent off; replace-tabs off; tab-width 4; +//kate: indent-mode csands; space-indent off; tqreplace-tabs off; tab-width 4; #include "warningtask.moc" diff --git a/kopete/protocols/oscar/liboscar/warningtask.h b/kopete/protocols/oscar/liboscar/warningtask.h index af56968c..d5e720be 100644 --- a/kopete/protocols/oscar/liboscar/warningtask.h +++ b/kopete/protocols/oscar/liboscar/warningtask.h @@ -29,8 +29,9 @@ class WarningTask : public Task { Q_OBJECT + TQ_OBJECT public: - WarningTask( Task* parent ); + WarningTask( Task* tqparent ); ~WarningTask(); void setContact( const TQString& contact ); @@ -44,7 +45,7 @@ public: virtual void onGo(); signals: - void userWarned( const TQString&, Q_UINT16, Q_UINT16 ); + void userWarned( const TQString&, TQ_UINT16, TQ_UINT16 ); private: TQString m_contact; @@ -56,4 +57,4 @@ private: #endif -//kate: indent-mode csands; space-indent off; replace-tabs off; tab-width 4; +//kate: indent-mode csands; space-indent off; tqreplace-tabs off; tab-width 4; |