diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/oscar | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/oscar')
177 files changed, 2457 insertions, 2457 deletions
diff --git a/kopete/protocols/oscar/aim/aimaccount.cpp b/kopete/protocols/oscar/aim/aimaccount.cpp index c6228040..9a6ec9de 100644 --- a/kopete/protocols/oscar/aim/aimaccount.cpp +++ b/kopete/protocols/oscar/aim/aimaccount.cpp @@ -13,8 +13,8 @@ ************************************************************************* */ -#include <qdom.h> -#include <qfile.h> +#include <tqdom.h> +#include <tqfile.h> #include <kdebug.h> #include <kconfig.h> @@ -68,20 +68,20 @@ void AIMMyselfContact::userInfoUpdated() setOnlineStatus( static_cast<AIMProtocol*>( protocol() )->statusAway ); //we're away } -void AIMMyselfContact::setOwnProfile( const QString& newProfile ) +void AIMMyselfContact::setOwnProfile( const TQString& newProfile ) { m_profileString = newProfile; if ( m_acct->isConnected() ) m_acct->engine()->updateProfile( newProfile ); } -QString AIMMyselfContact::userProfile() +TQString AIMMyselfContact::userProfile() { return m_profileString; } Kopete::ChatSession* AIMMyselfContact::manager( Kopete::Contact::CanCreateFlags canCreate, - Oscar::WORD exchange, const QString& room ) + Oscar::WORD exchange, const TQString& room ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << endl; Kopete::ContactPtrList chatMembers; @@ -95,8 +95,8 @@ Kopete::ChatSession* AIMMyselfContact::manager( Kopete::Contact::CanCreateFlags session = new AIMChatSession( this, chatMembers, account()->protocol(), exchange, room ); session->setEngine( m_acct->engine() ); - connect( session, SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), - this, SLOT( sendMessage( Kopete::Message&, Kopete::ChatSession* ) ) ); + connect( session, TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), + this, TQT_SLOT( sendMessage( Kopete::Message&, Kopete::ChatSession* ) ) ); m_chatRoomSessions.append( session ); } return session; @@ -112,7 +112,7 @@ void AIMMyselfContact::sendMessage( Kopete::Message& message, Kopete::ChatSessio kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "sending a message" << endl; //TODO: remove duplication - factor into a message utils class or something Oscar::Message msg; - QString s; + TQString s; if (message.plainBody().isEmpty()) // no text, do nothing return; @@ -127,53 +127,53 @@ void AIMMyselfContact::sendMessage( Kopete::Message& message, Kopete::ChatSessio //font-size:xxpt -> <font ptsize=xx> s=message.escapedBody(); - s.replace ( QRegExp( QString::fromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")), - QString::fromLatin1("<style>\\1;\"\\2</style>")); + s.replace ( TQRegExp( TQString::fromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")), + TQString::fromLatin1("<style>\\1;\"\\2</style>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<i><style>\\1\\2\"\\3</style></i>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<i><style>\\1\\2\"\\3</style></i>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<b><style>\\1\\2\"\\3</style></b>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<b><style>\\1\\2\"\\3</style></b>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<u><style>\\1\\2\"\\3</style></u>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<u><style>\\1\\2\"\\3</style></u>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("\\2")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("\\2")); //okay now change the <font ptsize="xx"> to <font size="xx"> //0-9 are size 1 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"\\d\">")), - QString::fromLatin1("<font size=\"1\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"\\d\">")), + TQString::fromLatin1("<font size=\"1\">")); //10-11 are size 2 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[01]\">")), - QString::fromLatin1("<font size=\"2\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[01]\">")), + TQString::fromLatin1("<font size=\"2\">")); //12-13 are size 3 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[23]\">")), - QString::fromLatin1("<font size=\"3\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[23]\">")), + TQString::fromLatin1("<font size=\"3\">")); //14-16 are size 4 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[456]\">")), - QString::fromLatin1("<font size=\"4\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[456]\">")), + TQString::fromLatin1("<font size=\"4\">")); //17-22 are size 5 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")), - QString::fromLatin1("<font size=\"5\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")), + TQString::fromLatin1("<font size=\"5\">")); //23-29 are size 6 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"2[3456789]\">")),QString::fromLatin1("<font size=\"6\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"2[3456789]\">")),TQString::fromLatin1("<font size=\"6\">")); //30- (and any I missed) are size 7 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"[^\"]*\">")),QString::fromLatin1("<font size=\"7\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"[^\"]*\">")),TQString::fromLatin1("<font size=\"7\">")); - s.replace ( QRegExp ( QString::fromLatin1("<br[ /]*>")), QString::fromLatin1("<br>") ); + s.replace ( TQRegExp ( TQString::fromLatin1("<br[ /]*>")), TQString::fromLatin1("<br>") ); kdDebug(14190) << k_funcinfo << "sending " << s << endl; @@ -200,34 +200,34 @@ void AIMMyselfContact::sendMessage( Kopete::Message& message, Kopete::ChatSessio } -AIMAccount::AIMAccount(Kopete::Protocol *parent, QString accountID, const char *name) +AIMAccount::AIMAccount(Kopete::Protocol *parent, TQString accountID, const char *name) : OscarAccount(parent, accountID, name, false) { kdDebug(14152) << k_funcinfo << accountID << ": Called."<< endl; AIMMyselfContact* mc = new AIMMyselfContact( this ); setMyself( mc ); myself()->setOnlineStatus( static_cast<AIMProtocol*>( parent )->statusOffline ); - QString profile = configGroup()->readEntry( "Profile", + TQString profile = configGroup()->readEntry( "Profile", i18n( "Visit the Kopete website at <a href=\"http://kopete.kde.org\">http://kopete.kde.org</a>") ); mc->setOwnProfile( profile ); m_joinChatDialog = 0; m_visibilityDialog = 0; - QObject::connect( Kopete::ContactList::self(), - SIGNAL( globalIdentityChanged( const QString&, const QVariant& ) ), + TQObject::connect( Kopete::ContactList::self(), + TQT_SIGNAL( globalIdentityChanged( const TQString&, const TQVariant& ) ), this, - SLOT( slotGlobalIdentityChanged( const QString&, const QVariant& ) ) ); + TQT_SLOT( slotGlobalIdentityChanged( const TQString&, const TQVariant& ) ) ); - QObject::connect( engine(), SIGNAL( chatRoomConnected( WORD, const QString& ) ), - this, SLOT( connectedToChatRoom( WORD, const QString& ) ) ); + TQObject::connect( engine(), TQT_SIGNAL( chatRoomConnected( WORD, const TQString& ) ), + this, TQT_SLOT( connectedToChatRoom( WORD, const TQString& ) ) ); - QObject::connect( engine(), SIGNAL( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ), - this, SLOT( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ) ); + TQObject::connect( engine(), TQT_SIGNAL( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SLOT( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ) ); - QObject::connect( engine(), SIGNAL( userLeftChat( Oscar::WORD, const QString&, const QString& ) ), - this, SLOT( userLeftChat( Oscar::WORD, const QString&, const QString& ) ) ); + TQObject::connect( engine(), TQT_SIGNAL( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SLOT( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ) ); - QObject::connect( this, SIGNAL( buddyIconChanged() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( this, TQT_SIGNAL( buddyIconChanged() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); } @@ -235,19 +235,19 @@ AIMAccount::~AIMAccount() { } -OscarContact *AIMAccount::createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) +OscarContact *AIMAccount::createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) { - AIMContact* contact = new AIMContact( this, contactId, parentContact, QString::null, ssiItem ); + AIMContact* contact = new AIMContact( this, contactId, parentContact, TQString::null, ssiItem ); if ( !ssiItem.alias().isEmpty() ) contact->setProperty( Kopete::Global::Properties::self()->nickName(), ssiItem.alias() ); return contact; } -QString AIMAccount::sanitizedMessage( const QString& message ) +TQString AIMAccount::sanitizedMessage( const TQString& message ) { - QDomDocument doc; - QString domError; + TQDomDocument doc; + TQString domError; int errLine = 0, errCol = 0; doc.setContent( message, false, &domError, &errLine, &errCol ); if ( !domError.isEmpty() ) //error parsing, do nothing @@ -260,7 +260,7 @@ QString AIMAccount::sanitizedMessage( const QString& message ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "conversion to dom document successful." << "looking for font tags" << endl; - QDomNodeList fontTagList = doc.elementsByTagName( "font" ); + TQDomNodeList fontTagList = doc.elementsByTagName( "font" ); if ( fontTagList.count() == 0 ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "No font tags found. Returning normal message" << endl; @@ -272,8 +272,8 @@ QString AIMAccount::sanitizedMessage( const QString& message ) uint numFontTags = fontTagList.count(); for ( uint i = 0; i < numFontTags; i++ ) { - QDomNode fontNode = fontTagList.item(i); - QDomElement fontEl; + TQDomNode fontNode = fontTagList.item(i); + TQDomElement fontEl; if ( !fontNode.isNull() && fontNode.isElement() ) fontEl = fontTagList.item(i).toElement(); else @@ -281,7 +281,7 @@ QString AIMAccount::sanitizedMessage( const QString& message ) if ( fontEl.hasAttribute( "back" ) ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Found attribute to replace. Doing replacement" << endl; - QString backgroundColor = fontEl.attribute( "back" ); + TQString backgroundColor = fontEl.attribute( "back" ); backgroundColor.insert( 0, "background-color: " ); backgroundColor.append( ';' ); fontEl.setAttribute( "style", backgroundColor ); @@ -304,42 +304,42 @@ KActionMenu* AIMAccount::actionMenu() AIMProtocol *p = AIMProtocol::protocol(); - QString accountNick = myself()->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString accountNick = myself()->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); mActionMenu->popupMenu()->insertTitle( myself()->onlineStatus().iconFor( myself() ), i18n( "%2 <%1>" ).arg( accountId(), accountNick )); mActionMenu->insert( new KAction( i18n("Online"), p->statusOnline.iconFor( this ), 0, this, - SLOT( slotGoOnline() ), mActionMenu, "AIMAccount::mActionOnline") ); + TQT_SLOT( slotGoOnline() ), mActionMenu, "AIMAccount::mActionOnline") ); KAction* mActionAway = new Kopete::AwayAction(i18n("Away"), p->statusAway.iconFor( this ), 0, this, - SLOT(slotGoAway( const QString & )), this, "AIMAccount::mActionNA" ); + TQT_SLOT(slotGoAway( const TQString & )), this, "AIMAccount::mActionNA" ); mActionAway->setEnabled( isConnected() ); mActionMenu->insert( mActionAway ); KAction* mActionOffline = new KAction( i18n("Offline"), p->statusOffline.iconFor(this), 0, this, - SLOT( slotGoOffline() ), mActionMenu, "AIMAccount::mActionOffline"); + TQT_SLOT( slotGoOffline() ), mActionMenu, "AIMAccount::mActionOffline"); mActionMenu->insert( mActionOffline ); mActionMenu->popupMenu()->insertSeparator(); - KAction* m_joinChatAction = new KAction( i18n( "Join Chat..." ), QString::null, 0, this, - SLOT( slotJoinChat() ), mActionMenu, "join_a_chat" ); + KAction* m_joinChatAction = new KAction( i18n( "Join Chat..." ), TQString::null, 0, this, + TQT_SLOT( slotJoinChat() ), mActionMenu, "join_a_chat" ); mActionMenu->insert( new KToggleAction( i18n( "Set Visibility..." ), 0, 0, - this, SLOT( slotSetVisiblility() ), this, + this, TQT_SLOT( slotSetVisiblility() ), this, "AIMAccount::mActionSetVisibility") ); mActionMenu->insert( m_joinChatAction ); KAction* m_editInfoAction = new KAction( i18n( "Edit User Info..." ), "identity", 0, - this, SLOT( slotEditInfo() ), mActionMenu, "actionEditInfo"); + this, TQT_SLOT( slotEditInfo() ), mActionMenu, "actionEditInfo"); mActionMenu->insert( m_editInfoAction ); return mActionMenu; } -void AIMAccount::setAway(bool away, const QString &awayReason) +void AIMAccount::setAway(bool away, const TQString &awayReason) { // kdDebug(14152) << k_funcinfo << accountId() << "reason is " << awayReason << endl; if ( away ) @@ -353,12 +353,12 @@ void AIMAccount::setAway(bool away, const QString &awayReason) { engine()->setStatus( Client::Online ); AIMMyselfContact* me = static_cast<AIMMyselfContact *> ( myself() ); - me->setLastAwayMessage(QString::null); + me->setLastAwayMessage(TQString::null); me->removeProperty( Kopete::Global::Properties::self()->awayMessage() ); } } -void AIMAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QString& reason ) +void AIMAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const TQString& reason ) { kdDebug(14152) << k_funcinfo << "called with reason = " << reason <<" status = "<< status.status() << endl;; if ( status.status() == Kopete::OnlineStatus::Online ) @@ -368,13 +368,13 @@ void AIMAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QStr } -void AIMAccount::setUserProfile(const QString &profile) +void AIMAccount::setUserProfile(const TQString &profile) { kdDebug(14152) << k_funcinfo << "called." << endl; AIMMyselfContact* aimmc = dynamic_cast<AIMMyselfContact*>( myself() ); if ( aimmc ) aimmc->setOwnProfile( profile ); - configGroup()->writeEntry( QString::fromLatin1( "Profile" ), profile ); + configGroup()->writeEntry( TQString::fromLatin1( "Profile" ), profile ); } void AIMAccount::slotEditInfo() @@ -391,7 +391,7 @@ void AIMAccount::slotEditInfo() myInfo->exec(); // This is a modal dialog } -void AIMAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& value ) +void AIMAccount::slotGlobalIdentityChanged( const TQString& key, const TQVariant& value ) { //do something with the photo kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Global identity changed" << endl; @@ -415,14 +415,14 @@ void AIMAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& void AIMAccount::slotBuddyIconChanged() { // need to disconnect because we could end up with many connections - QObject::disconnect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::disconnect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); if ( !engine()->isActive() ) { - QObject::connect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); return; } - QString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); + TQString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); SSIManager* ssi = engine()->ssiManager(); Oscar::SSI item = ssi->findItemForIconByRef( 1 ); @@ -435,7 +435,7 @@ void AIMAccount::slotBuddyIconChanged() Oscar::SSI s(item); //remove hash and alias - QValueList<TLV> tList( item.tlvList() ); + TQValueList<TLV> tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) tList.remove( t ); @@ -447,7 +447,7 @@ void AIMAccount::slotBuddyIconChanged() } else { - QFile iconFile( photoPath ); + TQFile iconFile( photoPath ); iconFile.open( IO_ReadOnly ); KMD5 iconHash; @@ -467,7 +467,7 @@ void AIMAccount::slotBuddyIconChanged() memcpy(t.data.data() + 2, iconHash.rawDigest(), 16); t.length = t.data.size(); - QValueList<Oscar::TLV> list; + TQValueList<Oscar::TLV> list; list.append( t ); Oscar::SSI s( "1", 0, ssi->nextContactId(), ROSTER_BUDDYICONS, list ); @@ -480,7 +480,7 @@ void AIMAccount::slotBuddyIconChanged() { //found an item Oscar::SSI s(item); kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "modifying old item in ssi." << endl; - QValueList<TLV> tList( item.tlvList() ); + TQValueList<TLV> tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) @@ -520,9 +520,9 @@ void AIMAccount::slotJoinChat() if ( !m_joinChatDialog ) { m_joinChatDialog = new AIMJoinChatUI( this, false, Kopete::UI::Global::mainWidget() ); - QObject::connect( m_joinChatDialog, SIGNAL( closing( int ) ), - this, SLOT( joinChatDialogClosed( int ) ) ); - QValueList<int> list = engine()->chatExchangeList(); + TQObject::connect( m_joinChatDialog, TQT_SIGNAL( closing( int ) ), + this, TQT_SLOT( joinChatDialogClosed( int ) ) ); + TQValueList<int> list = engine()->chatExchangeList(); m_joinChatDialog->setExchangeList( list ); m_joinChatDialog->show(); } @@ -549,7 +549,7 @@ void AIMAccount::slotGoOnline() } } -void AIMAccount::slotGoAway(const QString &message) +void AIMAccount::slotGoAway(const TQString &message) { kdDebug(14152) << k_funcinfo << message << endl; setAway(true, message); @@ -557,7 +557,7 @@ void AIMAccount::slotGoAway(const QString &message) void AIMAccount::joinChatDialogClosed( int code ) { - if ( code == QDialog::Accepted ) + if ( code == TQDialog::Accepted ) { //join the chat kdDebug(14152) << k_funcinfo << "chat accepted." << endl; @@ -583,7 +583,7 @@ void AIMAccount::disconnected( DisconnectReason reason ) kdDebug( OSCAR_AIM_DEBUG ) << k_funcinfo << "Attempting to set status offline" << endl; myself()->setOnlineStatus( static_cast<AIMProtocol*>( protocol() )->statusOffline ); - QDictIterator<Kopete::Contact> it( contacts() ); + TQDictIterator<Kopete::Contact> it( contacts() ); for( ; it.current(); ++it ) { OscarContact* oc = dynamic_cast<OscarContact*>( it.current() ); @@ -608,7 +608,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) kdDebug(14152) << k_funcinfo << "Checking to see if I'm online.." << endl; if( myself()->onlineStatus().status() == Kopete::OnlineStatus::Away ) { - QString sender = Oscar::normalize( message.sender() ); + TQString sender = Oscar::normalize( message.sender() ); AIMContact* aimSender = static_cast<AIMContact *> ( contacts()[sender] ); //should exist now if ( !aimSender ) { @@ -621,7 +621,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) // get the away message we have set AIMMyselfContact* myContact = static_cast<AIMMyselfContact *> ( myself() ); - QString msg = myContact->lastAwayMessage(); + TQString msg = myContact->lastAwayMessage(); kdDebug(14152) << k_funcinfo << "Got away message: " << msg << endl; // Create the message Kopete::Message chatMessage( myself(), aimSender, msg, Kopete::Message::Outbound, @@ -636,8 +636,8 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "have chat message" << endl; //handle chat room messages seperately - QValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); - QValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); + TQValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); + TQValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); for ( it = chats.begin(); it != itEnd; ++it ) { Kopete::ChatSession* kcs = ( *it ); @@ -652,7 +652,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "found chat session for chat room" << endl; Kopete::Contact* ocSender = contacts()[Oscar::normalize( message.sender() )]; //sanitize; - QString sanitizedMsg = sanitizedMessage( message.text( defaultCodec() ) ); + TQString sanitizedMsg = sanitizedMessage( message.text( defaultCodec() ) ); Kopete::ContactPtrList me; me.append( myself() ); @@ -665,7 +665,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) } } -void AIMAccount::connectedToChatRoom( WORD exchange, const QString& room ) +void AIMAccount::connectedToChatRoom( WORD exchange, const TQString& room ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Creating chat room session" << endl; Kopete::ContactPtrList emptyList; @@ -677,14 +677,14 @@ void AIMAccount::connectedToChatRoom( WORD exchange, const QString& room ) session->raiseView(); } -void AIMAccount::userJoinedChat( WORD exchange, const QString& room, const QString& contact ) +void AIMAccount::userJoinedChat( WORD exchange, const TQString& room, const TQString& contact ) { if ( Oscar::normalize( contact ) == Oscar::normalize( myself()->contactId() ) ) return; kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "user " << contact << " has joined the chat" << endl; - QValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); - QValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); + TQValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); + TQValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); for ( it = chats.begin(); it != itEnd; ++it ) { Kopete::ChatSession* kcs = ( *it ); @@ -717,13 +717,13 @@ void AIMAccount::userJoinedChat( WORD exchange, const QString& room, const QStri } } -void AIMAccount::userLeftChat( WORD exchange, const QString& room, const QString& contact ) +void AIMAccount::userLeftChat( WORD exchange, const TQString& room, const TQString& contact ) { if ( Oscar::normalize( contact ) == Oscar::normalize( myself()->contactId() ) ) return; - QValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); - QValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); + TQValueList<Kopete::ChatSession*> chats = Kopete::ChatSessionManager::self()->sessions(); + TQValueList<Kopete::ChatSession*>::iterator it, itEnd = chats.end(); for ( it = chats.begin(); it != itEnd; ++it ) { Kopete::ChatSession* kcs = ( *it ); @@ -753,18 +753,18 @@ void AIMAccount::userLeftChat( WORD exchange, const QString& room, const QString } -void AIMAccount::connectWithPassword( const QString & ) +void AIMAccount::connectWithPassword( const TQString & ) { kdDebug(14152) << k_funcinfo << "accountId='" << accountId() << "'" << endl; // Get the screen name for this account - QString screenName = accountId(); - QString server = configGroup()->readEntry( "Server", QString::fromLatin1( "login.oscar.aol.com" ) ); + TQString screenName = accountId(); + TQString server = configGroup()->readEntry( "Server", TQString::fromLatin1( "login.oscar.aol.com" ) ); uint port = configGroup()->readNumEntry( "Port", 5190 ); Connection* c = setupConnection( server, port ); - QString _password = password().cachedValue(); + TQString _password = password().cachedValue(); if ( _password.isEmpty() ) { kdDebug(14150) << "Kopete is unable to attempt to sign-on to the " @@ -794,19 +794,19 @@ void AIMAccount::slotSetVisiblility() if ( !m_visibilityDialog ) { m_visibilityDialog = new OscarVisibilityDialog( engine(), Kopete::UI::Global::mainWidget() ); - QObject::connect( m_visibilityDialog, SIGNAL( closing() ), - this, SLOT( slotVisibilityDialogClosed() ) ); + TQObject::connect( m_visibilityDialog, TQT_SIGNAL( closing() ), + this, TQT_SLOT( slotVisibilityDialogClosed() ) ); //add all contacts; OscarVisibilityDialog::ContactMap contactMap; - QMap<QString, QString> revContactMap; + TQMap<TQString, TQString> revContactMap; - QValueList<Oscar::SSI> contactList = engine()->ssiManager()->contactList(); - QValueList<Oscar::SSI>::const_iterator it, cEnd = contactList.constEnd(); + TQValueList<Oscar::SSI> contactList = engine()->ssiManager()->contactList(); + TQValueList<Oscar::SSI>::const_iterator it, cEnd = contactList.constEnd(); for ( it = contactList.constBegin(); it != cEnd; ++it ) { - QString contactId = ( *it ).name(); + TQString contactId = ( *it ).name(); OscarContact* oc = dynamic_cast<OscarContact*>( contacts()[( *it ).name()] ); if ( oc ) @@ -823,7 +823,7 @@ void AIMAccount::slotSetVisiblility() m_visibilityDialog->addContacts( contactMap ); //add contacts from visible list - QStringList tmpList; + TQStringList tmpList; contactList = engine()->ssiManager()->visibleList(); cEnd = contactList.constEnd(); @@ -895,9 +895,9 @@ void AIMAccount::setPrivacySettings( int privacy ) void AIMAccount::setPrivacyTLVs( BYTE privacy, DWORD userClasses ) { SSIManager* ssi = engine()->ssiManager(); - Oscar::SSI item = ssi->findItem( QString::null, ROSTER_VISIBILITY ); + Oscar::SSI item = ssi->findItem( TQString::null, ROSTER_VISIBILITY ); - QValueList<Oscar::TLV> tList; + TQValueList<Oscar::TLV> tList; tList.append( TLV( 0x00CA, 1, (char *)&privacy ) ); tList.append( TLV( 0x00CB, sizeof(userClasses), (char *)&userClasses ) ); @@ -905,7 +905,7 @@ void AIMAccount::setPrivacyTLVs( BYTE privacy, DWORD userClasses ) if ( !item ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Adding new privacy TLV item" << endl; - Oscar::SSI s( QString::null, 0, ssi->nextContactId(), ROSTER_VISIBILITY, tList ); + Oscar::SSI s( TQString::null, 0, ssi->nextContactId(), ROSTER_VISIBILITY, tList ); engine()->modifySSIItem( item, s ); } else diff --git a/kopete/protocols/oscar/aim/aimaccount.h b/kopete/protocols/oscar/aim/aimaccount.h index 034b9836..2df309b6 100644 --- a/kopete/protocols/oscar/aim/aimaccount.h +++ b/kopete/protocols/oscar/aim/aimaccount.h @@ -19,9 +19,9 @@ #ifndef AIMACCOUNT_H #define AIMACCOUNT_H -#include <qdict.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqdict.h> +#include <tqstring.h> +#include <tqwidget.h> #include "oscartypeclasses.h" #include "oscaraccount.h" @@ -56,26 +56,26 @@ Q_OBJECT public: AIMMyselfContact( AIMAccount *acct ); void userInfoUpdated(); - void setOwnProfile( const QString& newProfile ); - QString userProfile(); - void setLastAwayMessage( const QString& msg) {m_lastAwayMessage = msg;} - QString lastAwayMessage() { return m_lastAwayMessage; }; + void setOwnProfile( const TQString& newProfile ); + TQString userProfile(); + void setLastAwayMessage( const TQString& msg) {m_lastAwayMessage = msg;} + TQString lastAwayMessage() { return m_lastAwayMessage; }; virtual Kopete::ChatSession* manager( Kopete::Contact::CanCreateFlags = Kopete::Contact::CannotCreate, - WORD exchange = 0, const QString& room = QString::null); + WORD exchange = 0, const TQString& room = TQString::null); public slots: void sendMessage( Kopete::Message&, Kopete::ChatSession* session ); void chatSessionDestroyed( Kopete::ChatSession* ); private: - QString m_profileString; + TQString m_profileString; AIMAccount* m_acct; /** * There has GOT to be a better way to get this away message */ - QString m_lastAwayMessage; - QValueList<Kopete::ChatSession*> m_chatRoomSessions; + TQString m_lastAwayMessage; + TQValueList<Kopete::ChatSession*> m_chatRoomSessions; }; @@ -85,42 +85,42 @@ class AIMAccount : public OscarAccount Q_OBJECT public: - AIMAccount(Kopete::Protocol *parent, QString accountID, const char *name=0L); + AIMAccount(Kopete::Protocol *parent, TQString accountID, const char *name=0L); virtual ~AIMAccount(); // Accessor method for the action menu virtual KActionMenu* actionMenu(); - void setAway(bool away, const QString &awayReason = QString::null ); + void setAway(bool away, const TQString &awayReason = TQString::null ); - virtual void connectWithPassword( const QString &password ); + virtual void connectWithPassword( const TQString &password ); - void setUserProfile(const QString &profile); + void setUserProfile(const TQString &profile); void setPrivacySettings( int privacy ); public slots: /** Reimplementation from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus& status, const QString& reason = QString::null ); + void setOnlineStatus( const Kopete::OnlineStatus& status, const TQString& reason = TQString::null ); void slotEditInfo(); void slotGoOnline(); - void slotGlobalIdentityChanged( const QString&, const QVariant& ); + void slotGlobalIdentityChanged( const TQString&, const TQVariant& ); void slotBuddyIconChanged(); void slotJoinChat(); protected slots: - void slotGoAway(const QString&); + void slotGoAway(const TQString&); void joinChatDialogClosed( int ); virtual void loginActions(); virtual void disconnected( Kopete::Account::DisconnectReason reason ); virtual void messageReceived( const Oscar::Message& message ); - void connectedToChatRoom( WORD exchange, const QString& roomName ); - void userJoinedChat( Oscar::WORD exchange, const QString& room, const QString& contact ); - void userLeftChat( Oscar::WORD exchange, const QString& room, const QString& contact ); + void connectedToChatRoom( WORD exchange, const TQString& roomName ); + void userJoinedChat( Oscar::WORD exchange, const TQString& room, const TQString& contact ); + void userLeftChat( Oscar::WORD exchange, const TQString& room, const TQString& contact ); void slotSetVisiblility(); void slotVisibilityDialogClosed(); @@ -131,9 +131,9 @@ protected: * Implement virtual method from OscarAccount * This allows OscarAccount to take care of adding new contacts */ - OscarContact *createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ); + OscarContact *createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ); - QString sanitizedMessage( const QString& message ); + TQString sanitizedMessage( const TQString& message ); private: // Set privacy tlv item diff --git a/kopete/protocols/oscar/aim/aimchatsession.cpp b/kopete/protocols/oscar/aim/aimchatsession.cpp index fa0616a6..10938a6a 100644 --- a/kopete/protocols/oscar/aim/aimchatsession.cpp +++ b/kopete/protocols/oscar/aim/aimchatsession.cpp @@ -26,7 +26,7 @@ AIMChatSession::AIMChatSession( const Kopete::Contact* user, Kopete::ContactPtrList others, Kopete::Protocol* protocol, Oscar::WORD exchange, - const QString& room ) + const TQString& room ) : Kopete::ChatSession( user, others, protocol, "AIMChatSession" ) { @@ -48,13 +48,13 @@ void AIMChatSession::setEngine( Client* engine ) m_engine = engine; } -QString AIMChatSession::roomName() const +TQString AIMChatSession::roomName() const { return m_roomName; } -void AIMChatSession::setRoomName( const QString& room ) +void AIMChatSession::setRoomName( const TQString& room ) { m_roomName = room; } diff --git a/kopete/protocols/oscar/aim/aimchatsession.h b/kopete/protocols/oscar/aim/aimchatsession.h index 79c0685e..9ce3ce1f 100644 --- a/kopete/protocols/oscar/aim/aimchatsession.h +++ b/kopete/protocols/oscar/aim/aimchatsession.h @@ -30,7 +30,7 @@ Q_OBJECT public: AIMChatSession( const Kopete::Contact* contact, Kopete::ContactPtrList others, Kopete::Protocol* protocol, Oscar::WORD exchange = 0, - const QString& room = QString::null ); + const TQString& room = TQString::null ); virtual ~AIMChatSession(); /** @@ -44,14 +44,14 @@ public: * this ChatSession object * @return the name of the chat room */ - QString roomName() const; + TQString roomName() const; /** * Set the name of the AIM chat room represented by * this ChatSession object * @param room the name of the AIM chat room */ - void setRoomName( const QString& room ); + void setRoomName( const TQString& room ); /** * Get the exchange of the AIM chat room represented by @@ -68,7 +68,7 @@ public: void setExchange( Oscar::WORD exchange ); private: - QString m_roomName; + TQString m_roomName; Oscar::WORD m_exchange; Client* m_engine; }; diff --git a/kopete/protocols/oscar/aim/aimcontact.cpp b/kopete/protocols/oscar/aim/aimcontact.cpp index 7e46c585..fc55537d 100644 --- a/kopete/protocols/oscar/aim/aimcontact.cpp +++ b/kopete/protocols/oscar/aim/aimcontact.cpp @@ -16,10 +16,10 @@ #include <time.h> -#include <qimage.h> -#include <qregexp.h> -#include <qtimer.h> -#include <qtextcodec.h> +#include <tqimage.h> +#include <tqregexp.h> +#include <tqtimer.h> +#include <tqtextcodec.h> #include <kapplication.h> #include <kactionclasses.h> @@ -43,8 +43,8 @@ #include "aimcontact.h" #include "aimaccount.h" -AIMContact::AIMContact( Kopete::Account* account, const QString& name, Kopete::MetaContact* parent, - const QString& icon, const Oscar::SSI& ssiItem ) +AIMContact::AIMContact( Kopete::Account* account, const TQString& name, Kopete::MetaContact* parent, + const TQString& icon, const Oscar::SSI& ssiItem ) : OscarContact(account, name, parent, icon, ssiItem ) { mProtocol=static_cast<AIMProtocol *>(protocol()); @@ -56,23 +56,23 @@ AIMContact::AIMContact( Kopete::Account* account, const QString& name, Kopete::M m_haveAwayMessage = false; m_mobile = false; // Set the last autoresponse time to the current time yesterday - m_lastAutoresponseTime = QDateTime::currentDateTime().addDays(-1); - - QObject::connect( mAccount->engine(), SIGNAL( receivedUserInfo( const QString&, const UserDetails& ) ), - this, SLOT( userInfoUpdated( const QString&, const UserDetails& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( userIsOffline( const QString& ) ), - this, SLOT( userOffline( const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedAwayMessage( const QString&, const QString& ) ), - this, SLOT( updateAwayMessage( const QString&, const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedProfile( const QString&, const QString& ) ), - this, SLOT( updateProfile( const QString&, const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( userWarned( const QString&, Q_UINT16, Q_UINT16 ) ), - this, SLOT( gotWarning( const QString&, Q_UINT16, Q_UINT16 ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( haveIconForContact( const QString&, QByteArray ) ), - this, SLOT( haveIcon( const QString&, QByteArray ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( iconServerConnected() ), - this, SLOT( requestBuddyIcon() ) ); - QObject::connect( this, SIGNAL( featuresUpdated() ), this, SLOT( updateFeatures() ) ); + m_lastAutoresponseTime = TQDateTime::currentDateTime().addDays(-1); + + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedUserInfo( const TQString&, const UserDetails& ) ), + this, TQT_SLOT( userInfoUpdated( const TQString&, const UserDetails& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( userIsOffline( const TQString& ) ), + this, TQT_SLOT( userOffline( const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ), + this, TQT_SLOT( updateAwayMessage( const TQString&, const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedProfile( const TQString&, const TQString& ) ), + this, TQT_SLOT( updateProfile( const TQString&, const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ), + this, TQT_SLOT( gotWarning( const TQString&, Q_UINT16, Q_UINT16 ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( haveIconForContact( const TQString&, TQByteArray ) ), + this, TQT_SLOT( haveIcon( const TQString&, TQByteArray ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( iconServerConnected() ), + this, TQT_SLOT( requestBuddyIcon() ) ); + TQObject::connect( this, TQT_SIGNAL( featuresUpdated() ), this, TQT_SLOT( updateFeatures() ) ); } AIMContact::~AIMContact() @@ -84,18 +84,18 @@ bool AIMContact::isReachable() return true; } -QPtrList<KAction> *AIMContact::customContextMenuActions() +TQPtrList<KAction> *AIMContact::customContextMenuActions() { - QPtrList<KAction> *actionCollection = new QPtrList<KAction>(); + TQPtrList<KAction> *actionCollection = new TQPtrList<KAction>(); if ( !m_warnUserAction ) { - m_warnUserAction = new KAction( i18n( "&Warn User" ), 0, this, SLOT( warnUser() ), this, "warnAction" ); + m_warnUserAction = new KAction( i18n( "&Warn User" ), 0, this, TQT_SLOT( warnUser() ), this, "warnAction" ); } m_actionVisibleTo = new KToggleAction(i18n("Always &Visible To"), "", 0, - this, SLOT(slotVisibleTo()), this, "actionVisibleTo"); + this, TQT_SLOT(slotVisibleTo()), this, "actionVisibleTo"); m_actionInvisibleTo = new KToggleAction(i18n("Always &Invisible To"), "", 0, - this, SLOT(slotInvisibleTo()), this, "actionInvisibleTo"); + this, TQT_SLOT(slotInvisibleTo()), this, "actionInvisibleTo"); bool on = account()->isConnected(); @@ -117,26 +117,26 @@ QPtrList<KAction> *AIMContact::customContextMenuActions() return actionCollection; } -const QString AIMContact::awayMessage() +const TQString AIMContact::awayMessage() { return property(mProtocol->awayMessage).value().toString(); } -void AIMContact::setAwayMessage(const QString &message) +void AIMContact::setAwayMessage(const TQString &message) { kdDebug(14152) << k_funcinfo << "Called for '" << contactId() << "', away msg='" << message << "'" << endl; - QString filteredMessage = message; + TQString filteredMessage = message; filteredMessage.replace( - QRegExp(QString::fromLatin1("<[hH][tT][mM][lL].*>(.*)</[hH][tT][mM][lL]>")), - QString::fromLatin1("\\1")); + TQRegExp(TQString::fromLatin1("<[hH][tT][mM][lL].*>(.*)</[hH][tT][mM][lL]>")), + TQString::fromLatin1("\\1")); filteredMessage.replace( - QRegExp(QString::fromLatin1("<[bB][oO][dD][yY].*>(.*)</[bB][oO][dD][yY]>")), - QString::fromLatin1("\\1") ); - QRegExp fontRemover( QString::fromLatin1("<[fF][oO][nN][tT].*>(.*)</[fF][oO][nN][tT]>") ); + TQRegExp(TQString::fromLatin1("<[bB][oO][dD][yY].*>(.*)</[bB][oO][dD][yY]>")), + TQString::fromLatin1("\\1") ); + TQRegExp fontRemover( TQString::fromLatin1("<[fF][oO][nN][tT].*>(.*)</[fF][oO][nN][tT]>") ); fontRemover.setMinimal(true); while ( filteredMessage.find( fontRemover ) != -1 ) - filteredMessage.replace( fontRemover, QString::fromLatin1("\\1") ); + filteredMessage.replace( fontRemover, TQString::fromLatin1("\\1") ); setProperty(mProtocol->awayMessage, filteredMessage); } @@ -162,7 +162,7 @@ void AIMContact::slotUserInfo() m_infoDialog = new AIMUserInfoDialog( this, static_cast<AIMAccount*>( account() ), false, Kopete::UI::Global::mainWidget(), 0 ); if( !m_infoDialog ) return; - connect( m_infoDialog, SIGNAL( finished() ), this, SLOT( closeUserInfoDialog() ) ); + connect( m_infoDialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeUserInfoDialog() ) ); m_infoDialog->show(); if ( mAccount->isConnected() ) { @@ -174,7 +174,7 @@ void AIMContact::slotUserInfo() m_infoDialog->raise(); } -void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& details ) +void AIMContact::userInfoUpdated( const TQString& contact, const UserDetails& details ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -183,7 +183,7 @@ void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& det //if they don't have an SSI alias, make sure we use the capitalization from the //server so their contact id looks all pretty. - QString nickname = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString nickname = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if ( nickname.isEmpty() || Oscar::normalize( nickname ) == Oscar::normalize( contact ) ) setNickName( contact ); @@ -240,13 +240,13 @@ void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& det int time = ( KApplication::random() % 10 ) * 1000; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating buddy icon in " << time/1000 << " seconds" << endl; - QTimer::singleShot( time, this, SLOT( requestBuddyIcon() ) ); + TQTimer::singleShot( time, this, TQT_SLOT( requestBuddyIcon() ) ); } OscarContact::userInfoUpdated( contact, details ); } -void AIMContact::userOnline( const QString& userId ) +void AIMContact::userOnline( const TQString& userId ) { if ( Oscar::normalize( userId ) == Oscar::normalize( contactId() ) ) { @@ -255,7 +255,7 @@ void AIMContact::userOnline( const QString& userId ) } } -void AIMContact::userOffline( const QString& userId ) +void AIMContact::userOffline( const TQString& userId ) { if ( Oscar::normalize( userId ) == Oscar::normalize( contactId() ) ) { @@ -264,7 +264,7 @@ void AIMContact::userOffline( const QString& userId ) } } -void AIMContact::updateAwayMessage( const QString& contact, const QString& message ) +void AIMContact::updateAwayMessage( const TQString& contact, const TQString& message ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -293,7 +293,7 @@ void AIMContact::updateAwayMessage( const QString& contact, const QString& messa emit updatedProfile(); } -void AIMContact::updateProfile( const QString& contact, const QString& profile ) +void AIMContact::updateProfile( const TQString& contact, const TQString& profile ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -302,7 +302,7 @@ void AIMContact::updateProfile( const QString& contact, const QString& profile ) emit updatedProfile(); } -void AIMContact::gotWarning( const QString& contact, Q_UINT16 increase, Q_UINT16 newLevel ) +void AIMContact::gotWarning( const TQString& contact, Q_UINT16 increase, Q_UINT16 newLevel ) { //somebody just got bitchslapped! :O Q_UNUSED( increase ); @@ -322,16 +322,16 @@ void AIMContact::requestBuddyIcon() } } -void AIMContact::haveIcon( const QString& user, QByteArray icon ) +void AIMContact::haveIcon( const TQString& user, TQByteArray icon ) { if ( Oscar::normalize( user ) != Oscar::normalize( contactId() ) ) return; kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Updating icon for " << contactId() << endl; - QImage buddyIcon( icon ); + TQImage buddyIcon( icon ); if ( buddyIcon.isNull() ) { - kdWarning(OSCAR_AIM_DEBUG) << k_funcinfo << "Failed to convert buddy icon to QImage" << endl; + kdWarning(OSCAR_AIM_DEBUG) << k_funcinfo << "Failed to convert buddy icon to TQImage" << endl; return; } @@ -346,8 +346,8 @@ void AIMContact::closeUserInfoDialog() void AIMContact::warnUser() { - QString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); - QString message = i18n( "<qt>Would you like to warn %1 anonymously or with your name?<br>" \ + TQString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString message = i18n( "<qt>Would you like to warn %1 anonymously or with your name?<br>" \ "(Warning a user on AIM will result in a \"Warning Level\"" \ " increasing for the user you warn. Once this level has reached a" \ " certain point, they will not be able to sign on. Please do not abuse" \ @@ -377,7 +377,7 @@ void AIMContact::slotInvisibleTo() void AIMContact::slotSendMsg(Kopete::Message& message, Kopete::ChatSession *) { Oscar::Message msg; - QString s; + TQString s; if (message.plainBody().isEmpty()) // no text, do nothing return; @@ -392,56 +392,56 @@ void AIMContact::slotSendMsg(Kopete::Message& message, Kopete::ChatSession *) //font-size:xxpt -> <font ptsize=xx> s=message.escapedBody(); - s.replace ( QRegExp( QString::fromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")), - QString::fromLatin1("<style>\\1;\"\\2</style>")); + s.replace ( TQRegExp( TQString::fromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")), + TQString::fromLatin1("<style>\\1;\"\\2</style>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<i><style>\\1\\2\"\\3</style></i>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<i><style>\\1\\2\"\\3</style></i>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<b><style>\\1\\2\"\\3</style></b>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<b><style>\\1\\2\"\\3</style></b>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<u><style>\\1\\2\"\\3</style></u>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<u><style>\\1\\2\"\\3</style></u>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>")); - s.replace ( QRegExp( QString::fromLatin1("<style>([^\"]*)\"([^<]*)</style>")), - QString::fromLatin1("\\2")); + s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)\"([^<]*)</style>")), + TQString::fromLatin1("\\2")); //okay now change the <font ptsize="xx"> to <font size="xx"> //0-9 are size 1 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"\\d\">")), - QString::fromLatin1("<font size=\"1\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"\\d\">")), + TQString::fromLatin1("<font size=\"1\">")); //10-11 are size 2 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[01]\">")), - QString::fromLatin1("<font size=\"2\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[01]\">")), + TQString::fromLatin1("<font size=\"2\">")); //12-13 are size 3 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[23]\">")), - QString::fromLatin1("<font size=\"3\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[23]\">")), + TQString::fromLatin1("<font size=\"3\">")); //14-16 are size 4 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"1[456]\">")), - QString::fromLatin1("<font size=\"4\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[456]\">")), + TQString::fromLatin1("<font size=\"4\">")); //17-22 are size 5 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")), - QString::fromLatin1("<font size=\"5\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")), + TQString::fromLatin1("<font size=\"5\">")); //23-29 are size 6 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"2[3456789]\">")),QString::fromLatin1("<font size=\"6\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"2[3456789]\">")),TQString::fromLatin1("<font size=\"6\">")); //30- (and any I missed) are size 7 - s.replace ( QRegExp ( QString::fromLatin1("<font ptsize=\"[^\"]*\">")),QString::fromLatin1("<font size=\"7\">")); + s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"[^\"]*\">")),TQString::fromLatin1("<font size=\"7\">")); - s.replace ( QRegExp ( QString::fromLatin1("<br[ /]*>")), QString::fromLatin1("<br>") ); + s.replace ( TQRegExp ( TQString::fromLatin1("<br[ /]*>")), TQString::fromLatin1("<br>") ); // strip left over line break - s.remove( QRegExp( QString::fromLatin1( "<br>$" ) ) ); + s.remove( TQRegExp( TQString::fromLatin1( "<br>$" ) ) ); kdDebug(14190) << k_funcinfo << "sending " << s << endl; @@ -472,9 +472,9 @@ void AIMContact::updateFeatures() void AIMContact::sendAutoResponse(Kopete::Message& msg) { // The target time is 2 minutes later than the last message - int delta = m_lastAutoresponseTime.secsTo( QDateTime::currentDateTime() ); + int delta = m_lastAutoresponseTime.secsTo( TQDateTime::currentDateTime() ); kdDebug(14152) << k_funcinfo << "Last autoresponse time: " << m_lastAutoresponseTime << endl; - kdDebug(14152) << k_funcinfo << "Current time: " << QDateTime::currentDateTime() << endl; + kdDebug(14152) << k_funcinfo << "Current time: " << TQDateTime::currentDateTime() << endl; kdDebug(14152) << k_funcinfo << "Difference: " << delta << endl; // Check to see if we're past that time if(delta > 120) @@ -491,7 +491,7 @@ void AIMContact::sendAutoResponse(Kopete::Message& msg) } else { - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); message.setText( Oscar::Message::UserDefined, msg.plainBody(), codec ); } @@ -506,7 +506,7 @@ void AIMContact::sendAutoResponse(Kopete::Message& msg) manager(Kopete::Contact::CanCreate)->appendMessage(msg); manager(Kopete::Contact::CanCreate)->messageSucceeded(); // Update the last autoresponse time - m_lastAutoresponseTime = QDateTime::currentDateTime(); + m_lastAutoresponseTime = TQDateTime::currentDateTime(); } else { diff --git a/kopete/protocols/oscar/aim/aimcontact.h b/kopete/protocols/oscar/aim/aimcontact.h index 458db2f5..a246c029 100644 --- a/kopete/protocols/oscar/aim/aimcontact.h +++ b/kopete/protocols/oscar/aim/aimcontact.h @@ -18,7 +18,7 @@ #ifndef AIMCONTACT_H #define AIMCONTACT_H -#include <qdatetime.h> +#include <tqdatetime.h> #include "oscarcontact.h" @@ -37,25 +37,25 @@ class AIMContact : public OscarContact Q_OBJECT public: - AIMContact( Kopete::Account*, const QString&, Kopete::MetaContact*, - const QString& icon = QString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); + AIMContact( Kopete::Account*, const TQString&, Kopete::MetaContact*, + const TQString& icon = TQString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); virtual ~AIMContact(); bool isReachable(); - QPtrList<KAction> *customContextMenuActions(); + TQPtrList<KAction> *customContextMenuActions(); - const QString &userProfile() { return mUserProfile; } + const TQString &userProfile() { return mUserProfile; } - virtual const QString awayMessage(); - virtual void setAwayMessage( const QString &message ); + virtual const TQString awayMessage(); + virtual void setAwayMessage( const TQString &message ); int warningLevel() const; /** * Gets the last time an autoresponse was sent to this contact - * @returns QDateTime Object that represents the date/time + * @returns TQDateTime Object that represents the date/time */ - QDateTime lastAutoResponseTime() {return m_lastAutoresponseTime;} + TQDateTime lastAutoResponseTime() {return m_lastAutoresponseTime;} /** Sends an auto response to this contact */ virtual void sendAutoResponse(Kopete::Message& msg); @@ -63,12 +63,12 @@ public: public slots: void updateSSIItem(); void slotUserInfo(); - void userInfoUpdated( const QString& contact, const UserDetails& details ); - void userOnline( const QString& userId ); - void userOffline( const QString& userId ); - void updateAwayMessage( const QString& userId, const QString& message ); - void updateProfile( const QString& contact, const QString& profile ); - void gotWarning( const QString& contact, Q_UINT16, Q_UINT16 ); + void userInfoUpdated( const TQString& contact, const UserDetails& details ); + void userOnline( const TQString& userId ); + void userOffline( const TQString& userId ); + void updateAwayMessage( const TQString& userId, const TQString& message ); + void updateProfile( const TQString& contact, const TQString& profile ); + void gotWarning( const TQString& contact, Q_UINT16, Q_UINT16 ); signals: void updatedProfile(); @@ -79,7 +79,7 @@ protected slots: private slots: void requestBuddyIcon(); - void haveIcon( const QString&, QByteArray ); + void haveIcon( const TQString&, TQByteArray ); void closeUserInfoDialog(); void warnUser(); @@ -89,10 +89,10 @@ private slots: private: AIMProtocol* mProtocol; AIMUserInfoDialog* m_infoDialog; - QString mUserProfile; + TQString mUserProfile; bool m_haveAwayMessage; bool m_mobile; // Is this user mobile (i.e. do they have message forwarding on, or mobile AIM) - QDateTime m_lastAutoresponseTime; + TQDateTime m_lastAutoresponseTime; KAction* m_warnUserAction; KToggleAction *m_actionVisibleTo; diff --git a/kopete/protocols/oscar/aim/aimjoinchat.cpp b/kopete/protocols/oscar/aim/aimjoinchat.cpp index 8b8c78a9..2ccec9b2 100644 --- a/kopete/protocols/oscar/aim/aimjoinchat.cpp +++ b/kopete/protocols/oscar/aim/aimjoinchat.cpp @@ -19,15 +19,15 @@ #include "aimjoinchat.h" -#include <qlineedit.h> -#include <qcombobox.h> +#include <tqlineedit.h> +#include <tqcombobox.h> #include <klocale.h> #include "aimjoinchatbase.h" #include "aimaccount.h" AIMJoinChatUI::AIMJoinChatUI( AIMAccount* account, bool modal, - QWidget* parent, const char* name ) + TQWidget* parent, const char* name ) : KDialogBase( parent, name, modal, i18n( "Join AIM Chat Room" ), Cancel | User1, User1, true, i18n( "Join" ) ) { @@ -41,8 +41,8 @@ AIMJoinChatUI::AIMJoinChatUI( AIMAccount* account, bool modal, setMainWidget( m_joinUI ); - QObject::connect( this, SIGNAL( user1Clicked() ), this, SLOT( joinChat() ) ); - QObject::connect( this, SIGNAL( cancelClicked() ), this, SLOT( closeClicked() ) ); + TQObject::connect( this, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT( joinChat() ) ); + TQObject::connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( closeClicked() ) ); } AIMJoinChatUI::~AIMJoinChatUI() @@ -50,14 +50,14 @@ AIMJoinChatUI::~AIMJoinChatUI() m_exchanges.clear(); } -void AIMJoinChatUI::setExchangeList( const QValueList<int>& list ) +void AIMJoinChatUI::setExchangeList( const TQValueList<int>& list ) { m_exchanges = list; - QStringList exchangeList; - QValueList<int>::const_iterator it = list.begin(); + TQStringList exchangeList; + TQValueList<int>::const_iterator it = list.begin(); while ( it != list.end() ) { - exchangeList.append( QString::number( ( *it ) ) ); + exchangeList.append( TQString::number( ( *it ) ) ); ++it; } @@ -71,21 +71,21 @@ void AIMJoinChatUI::joinChat() int item = m_joinUI->exchange->currentItem(); m_exchange = m_joinUI->exchange->text( item ); - emit closing( QDialog::Accepted ); + emit closing( TQDialog::Accepted ); } void AIMJoinChatUI::closeClicked() { //hmm, do nothing? - emit closing( QDialog::Rejected ); + emit closing( TQDialog::Rejected ); } -QString AIMJoinChatUI::roomName() const +TQString AIMJoinChatUI::roomName() const { return m_roomName; } -QString AIMJoinChatUI::exchange() const +TQString AIMJoinChatUI::exchange() const { return m_exchange; } diff --git a/kopete/protocols/oscar/aim/aimjoinchat.h b/kopete/protocols/oscar/aim/aimjoinchat.h index dc74a8a9..a6e493d4 100644 --- a/kopete/protocols/oscar/aim/aimjoinchat.h +++ b/kopete/protocols/oscar/aim/aimjoinchat.h @@ -31,15 +31,15 @@ class AIMJoinChatUI : public KDialogBase { Q_OBJECT public: - AIMJoinChatUI( AIMAccount*, bool modal, QWidget* parent = 0, + AIMJoinChatUI( AIMAccount*, bool modal, TQWidget* parent = 0, const char* name = 0 ); ~AIMJoinChatUI(); - void setExchangeList( const QValueList<int>& ); - QValueList<int> exchangeList() const; + void setExchangeList( const TQValueList<int>& ); + TQValueList<int> exchangeList() const; - QString roomName() const; - QString exchange() const; + TQString roomName() const; + TQString exchange() const; protected slots: @@ -52,9 +52,9 @@ signals: private: AIMJoinChatBase* m_joinUI; AIMAccount* m_account; - QValueList<int> m_exchanges; - QString m_roomName; - QString m_exchange; + TQValueList<int> m_exchanges; + TQString m_roomName; + TQString m_exchange; }; diff --git a/kopete/protocols/oscar/aim/aimprotocol.cpp b/kopete/protocols/oscar/aim/aimprotocol.cpp index 9f64fe28..779c63c8 100644 --- a/kopete/protocols/oscar/aim/aimprotocol.cpp +++ b/kopete/protocols/oscar/aim/aimprotocol.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include <qstringlist.h> +#include <tqstringlist.h> #include <kgenericfactory.h> #include <kmessagebox.h> #include <kdebug.h> @@ -46,7 +46,7 @@ AIMProtocol* AIMProtocol::protocolStatic_ = 0L; AIMProtocolHandler::AIMProtocolHandler() : Kopete::MimeTypeHandler(false) { - registerAsProtocolHandler(QString::fromLatin1("aim")); + registerAsProtocolHandler(TQString::fromLatin1("aim")); } void AIMProtocolHandler::handleURL(const KURL &url) const @@ -78,8 +78,8 @@ void AIMProtocolHandler::handleURL(const KURL &url) const AIMProtocol *proto = AIMProtocol::protocol(); kdDebug(14152) << k_funcinfo << "URL url : '" << url.url() << "'" << endl; kdDebug(14152) << k_funcinfo << "URL path : '" << url.path() << "'" << endl; - QString command = url.path(); - QString realCommand, firstParam, secondParam; + TQString command = url.path(); + TQString realCommand, firstParam, secondParam; bool needContactAddition = false; if ( command.find( "goim", 0, false ) != -1 ) { @@ -150,11 +150,11 @@ void AIMProtocolHandler::handleURL(const KURL &url) const } Kopete::Account *account = 0; - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(proto); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(proto); if (accounts.count() == 1) { - QDictIterator<Kopete::Account> it(accounts); + TQDictIterator<Kopete::Account> it(accounts); account = it.current(); } @@ -170,7 +170,7 @@ void AIMProtocolHandler::handleURL(const KURL &url) const account = accSelector->selectedItem(); delete chooser; - if (ret == QDialog::Rejected || account == 0) + if (ret == TQDialog::Rejected || account == 0) { kdDebug(14152) << k_funcinfo << "Cancelled" << endl; return; @@ -190,7 +190,7 @@ void AIMProtocolHandler::handleURL(const KURL &url) const if (KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(), i18n("Do you want to add '%1' to your contact list?").arg(command), - QString::null, i18n("Add"), i18n("Do Not Add")) + TQString::null, i18n("Add"), i18n("Do Not Add")) != KMessageBox::Yes) { kdDebug(14152) << k_funcinfo << "Cancelled" << endl; @@ -213,7 +213,7 @@ void AIMProtocolHandler::handleURL(const KURL &url) const KMessageBox::sorry( Kopete::UI::Global::mainWidget(), i18n( "Unable to connect to the chat room %1 because the account" " for %2 is not connected." ).arg( firstParam ).arg( aimAccount->accountId() ), - QString::null ); + TQString::null ); } @@ -227,21 +227,21 @@ void AIMProtocolHandler::handleURL(const KURL &url) const -AIMProtocol::AIMProtocol(QObject *parent, const char *name, const QStringList &) +AIMProtocol::AIMProtocol(TQObject *parent, const char *name, const TQStringList &) : Kopete::Protocol( AIMProtocolFactory::instance(), parent, name ), - statusOnline( Kopete::OnlineStatus::Online, 2, this, 0, QString::null, i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online ), - statusOffline( Kopete::OnlineStatus::Offline, 2, this, 10, QString::null, i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline ), + statusOnline( Kopete::OnlineStatus::Online, 2, this, 0, TQString::null, i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online ), + statusOffline( Kopete::OnlineStatus::Offline, 2, this, 10, TQString::null, i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline ), statusAway( Kopete::OnlineStatus::Away, 2, this, 20, "contact_away_overlay", i18n("Away"), i18n("Away"), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HasAwayMessage ), statusWirelessOnline( Kopete::OnlineStatus::Online, 1, this, 30, "contact_phone_overlay", i18n("Mobile"), i18n("Mobile"), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HideFromMenu ), - statusWirelessAway( Kopete::OnlineStatus::Away, 1, this, 31, QStringList::split( " ", "contact_phone_overlay contact_away_overlay"), + statusWirelessAway( Kopete::OnlineStatus::Away, 1, this, 31, TQStringList::split( " ", "contact_phone_overlay contact_away_overlay"), i18n("Mobile Away"), i18n("Mobile Away"), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HideFromMenu ), statusConnecting(Kopete::OnlineStatus::Connecting, 99, this, 99, "aim_connecting", i18n("Connecting...")), awayMessage(Kopete::Global::Properties::self()->awayMessage()), clientFeatures("clientFeatures", i18n("Client Features"), 0, false), clientProfile( "clientProfile", i18n( "User Profile"), 0, false, true), - iconHash("iconHash", i18n("Buddy Icon MD5 Hash"), QString::null, true, false, true) + iconHash("iconHash", i18n("Buddy Icon MD5 Hash"), TQString::null, true, false, true) { if (protocolStatic_) kdDebug(14152) << k_funcinfo << "AIM plugin already initialized" << endl; @@ -265,28 +265,28 @@ AIMProtocol *AIMProtocol::protocol(void) } Kopete::Contact *AIMProtocol::deserializeContact(Kopete::MetaContact *metaContact, - const QMap<QString, QString> &serializedData, - const QMap<QString, QString> &/*addressBookData*/) + const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> &/*addressBookData*/) { - QString contactId = serializedData["contactId"]; - QString accountId = serializedData["accountId"]; - QString displayName = serializedData["displayName"]; + TQString contactId = serializedData["contactId"]; + TQString accountId = serializedData["accountId"]; + TQString displayName = serializedData["displayName"]; // Get the account it belongs to - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this ); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts( this ); Kopete::Account *account = accounts[accountId]; if ( !account ) //no account return 0; uint ssiGid = 0, ssiBid = 0, ssiType = 0xFFFF; - QString ssiName; + TQString ssiName; bool ssiWaitingAuth = false; if ( serializedData.contains( "ssi_type" ) ) { ssiName = serializedData["ssi_name"]; - QString authStatus = serializedData["ssi_waitingAuth"]; + TQString authStatus = serializedData["ssi_waitingAuth"]; if ( authStatus == "true" ) ssiWaitingAuth = true; ssiGid = serializedData["ssi_gid"].toUInt(); @@ -294,24 +294,24 @@ Kopete::Contact *AIMProtocol::deserializeContact(Kopete::MetaContact *metaContac ssiType = serializedData["ssi_type"].toUInt(); } - Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, QValueList<TLV>(), 0 ); + Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, TQValueList<TLV>(), 0 ); item.setWaitingAuth( ssiWaitingAuth ); - AIMContact *c = new AIMContact( account, contactId, metaContact, QString::null, item ); + AIMContact *c = new AIMContact( account, contactId, metaContact, TQString::null, item ); return c; } -AddContactPage *AIMProtocol::createAddContactWidget(QWidget *parent, Kopete::Account *account) +AddContactPage *AIMProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *account) { return ( new AIMAddContactPage( account->isConnected(), parent ) ); } -KopeteEditAccountWidget *AIMProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *AIMProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return ( new AIMEditAccountWidget( this, account, parent ) ); } -Kopete::Account *AIMProtocol::createNewAccount(const QString &accountId) +Kopete::Account *AIMProtocol::createNewAccount(const TQString &accountId) { return ( new AIMAccount( this, accountId ) ); } diff --git a/kopete/protocols/oscar/aim/aimprotocol.h b/kopete/protocols/oscar/aim/aimprotocol.h index e6c578e6..16c8860a 100644 --- a/kopete/protocols/oscar/aim/aimprotocol.h +++ b/kopete/protocols/oscar/aim/aimprotocol.h @@ -23,7 +23,7 @@ #include "kopetemimetypehandler.h" #include "kopeteonlinestatus.h" -#include <qmap.h> +#include <tqmap.h> namespace Kopete { @@ -42,7 +42,7 @@ class AIMProtocol : public Kopete::Protocol Q_OBJECT public: - AIMProtocol( QObject *parent, const char *name, const QStringList &args ); + AIMProtocol( TQObject *parent, const char *name, const TQStringList &args ); virtual ~AIMProtocol(); /** * Return the active instance of the protocol @@ -53,12 +53,12 @@ public: bool canSendOffline() const { return false; } virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap<QString, QString> &serializedData, - const QMap<QString, QString> &addressBookData ); + const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> &addressBookData ); - AddContactPage*createAddContactWidget( QWidget *parent, Kopete::Account *account ); - KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account *account, QWidget *parent ); - Kopete::Account* createNewAccount( const QString &accountId ); + AddContactPage*createAddContactWidget( TQWidget *parent, Kopete::Account *account ); + KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account *account, TQWidget *parent ); + Kopete::Account* createNewAccount( const TQString &accountId ); /** * The set of online statuses that AIM contacts can have diff --git a/kopete/protocols/oscar/aim/aimuserinfo.cpp b/kopete/protocols/oscar/aim/aimuserinfo.cpp index 81bdd9c7..927a12ec 100644 --- a/kopete/protocols/oscar/aim/aimuserinfo.cpp +++ b/kopete/protocols/oscar/aim/aimuserinfo.cpp @@ -21,11 +21,11 @@ #include "aimcontact.h" #include "aimprotocol.h" -#include <qlineedit.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qtimer.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqtimer.h> #include <klocale.h> #include <kstandarddirs.h> @@ -37,7 +37,7 @@ #include <krun.h> AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool modal, - QWidget *parent, const char* name ) + TQWidget *parent, const char* name ) : KDialogBase( parent, name, modal, i18n( "User Information on %1" ) .arg( c->property( Kopete::Global::Properties::self()->nickName() ).value().toString() ), Cancel | Ok , Ok, true ) @@ -50,14 +50,14 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool mMainWidget = new AIMUserInfoWidget(this, "aimuserinfowidget"); setMainWidget(mMainWidget); - QObject::connect(this, SIGNAL(okClicked()), this, SLOT(slotSaveClicked())); - QObject::connect(this, SIGNAL(user1Clicked()), this, SLOT(slotUpdateClicked())); - QObject::connect(this, SIGNAL(cancelClicked()), this, SLOT(slotCloseClicked())); - QObject::connect(c, SIGNAL(updatedProfile()), this, SLOT(slotUpdateProfile())); + TQObject::connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotSaveClicked())); + TQObject::connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotUpdateClicked())); + TQObject::connect(this, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotCloseClicked())); + TQObject::connect(c, TQT_SIGNAL(updatedProfile()), this, TQT_SLOT(slotUpdateProfile())); mMainWidget->txtScreenName->setText( c->contactId() ); - QString nickName = c->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString nickName = c->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if( nickName.isEmpty() ) mMainWidget->txtNickName->setText( c->contactId() ); else @@ -75,9 +75,9 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool mMainWidget->lblAwayMessage->hide(); userInfoView=0L; - mMainWidget->userInfoFrame->setFrameStyle(QFrame::NoFrame | QFrame::Plain); - QVBoxLayout *l = new QVBoxLayout(mMainWidget->userInfoFrame); - userInfoEdit = new KTextEdit(QString::null, QString::null, + mMainWidget->userInfoFrame->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain); + TQVBoxLayout *l = new TQVBoxLayout(mMainWidget->userInfoFrame); + userInfoEdit = new KTextEdit(TQString::null, TQString::null, mMainWidget->userInfoFrame, "userInfoEdit"); userInfoEdit->setTextFormat(PlainText); @@ -85,7 +85,7 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool if ( aimmc ) userInfoEdit->setText( aimmc->userProfile() ); else - userInfoEdit->setText( QString::null ); + userInfoEdit->setText( TQString::null ); setButtonText(Ok, i18n("&Save Profile")); showButton(User1, false); @@ -94,17 +94,17 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool else { userInfoEdit=0L; - mMainWidget->userInfoFrame->setFrameStyle(QFrame::NoFrame | QFrame::Plain); - QVBoxLayout *l = new QVBoxLayout(mMainWidget->userInfoFrame); + mMainWidget->userInfoFrame->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain); + TQVBoxLayout *l = new TQVBoxLayout(mMainWidget->userInfoFrame); userInfoView = new KTextBrowser(mMainWidget->userInfoFrame, "userInfoView"); userInfoView->setTextFormat(AutoText); userInfoView->setNotifyClick(true); - QObject::connect( - userInfoView, SIGNAL(urlClick(const QString&)), - this, SLOT(slotUrlClicked(const QString&))); - QObject::connect( - userInfoView, SIGNAL(mailClick(const QString&, const QString&)), - this, SLOT(slotMailClicked(const QString&, const QString&))); + TQObject::connect( + userInfoView, TQT_SIGNAL(urlClick(const TQString&)), + this, TQT_SLOT(slotUrlClicked(const TQString&))); + TQObject::connect( + userInfoView, TQT_SIGNAL(mailClick(const TQString&, const TQString&)), + this, TQT_SLOT(slotMailClicked(const TQString&, const TQString&))); showButton(Cancel, false); setButtonText(Ok, i18n("&Close")); setEscapeButton(Ok); @@ -115,7 +115,7 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool // Update the user view to indicate that we're requesting the user's profile userInfoView->setText(i18n("Requesting User Profile, please wait...")); } - QTimer::singleShot(0, this, SLOT(slotUpdateProfile())); + TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateProfile())); } } @@ -127,8 +127,8 @@ AIMUserInfoDialog::~AIMUserInfoDialog() void AIMUserInfoDialog::slotUpdateClicked() { kdDebug(14200) << k_funcinfo << "Called." << endl; - QString newNick = mMainWidget->txtNickName->text(); - QString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString newNick = mMainWidget->txtNickName->text(); + TQString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if ( !newNick.isEmpty() && ( newNick != currentNick ) ) { //m_contact->rename(newNick); @@ -144,8 +144,8 @@ void AIMUserInfoDialog::slotSaveClicked() if (userInfoEdit) { // editable mode, set profile - QString newNick = mMainWidget->txtNickName->text(); - QString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString newNick = mMainWidget->txtNickName->text(); + TQString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if(!newNick.isEmpty() && ( newNick != currentNick ) ) { //m_contact->rename(newNick); @@ -169,7 +169,7 @@ void AIMUserInfoDialog::slotUpdateProfile() { kdDebug(14152) << k_funcinfo << "Got User Profile." << endl; AIMProtocol* p = static_cast<AIMProtocol*>( mAccount->protocol() ); - QString awayMessage = m_contact->property( p->awayMessage ).value().toString(); + TQString awayMessage = m_contact->property( p->awayMessage ).value().toString(); mMainWidget->txtAwayMessage->setText( awayMessage ); if ( awayMessage.isNull() ) @@ -183,15 +183,15 @@ void AIMUserInfoDialog::slotUpdateProfile() mMainWidget->lblAwayMessage->show(); } - QString onlineSince = m_contact->property("onlineSince").value().toString(); - //QString onlineSince = m_details.onlineSinceTime().toString(); + TQString onlineSince = m_contact->property("onlineSince").value().toString(); + //TQString onlineSince = m_details.onlineSinceTime().toString(); mMainWidget->txtOnlineSince->setText( onlineSince ); AIMContact* c = static_cast<AIMContact*>( m_contact ); mMainWidget->txtIdleTime->setText(c->formattedIdleTime()); - mMainWidget->txtWarnLevel->setText(QString::number(c->warningLevel())); + mMainWidget->txtWarnLevel->setText(TQString::number(c->warningLevel())); - QString contactProfile = m_contact->property( p->clientProfile ).value().toString(); + TQString contactProfile = m_contact->property( p->clientProfile ).value().toString(); if ( contactProfile.isNull() ) { contactProfile = @@ -209,12 +209,12 @@ void AIMUserInfoDialog::slotUpdateProfile() } -void AIMUserInfoDialog::slotUrlClicked(const QString &url) +void AIMUserInfoDialog::slotUrlClicked(const TQString &url) { new KRun(KURL(url)); } -void AIMUserInfoDialog::slotMailClicked(const QString&, const QString &address) +void AIMUserInfoDialog::slotMailClicked(const TQString&, const TQString &address) { new KRun(KURL(address)); } diff --git a/kopete/protocols/oscar/aim/aimuserinfo.h b/kopete/protocols/oscar/aim/aimuserinfo.h index f128610f..886274ac 100644 --- a/kopete/protocols/oscar/aim/aimuserinfo.h +++ b/kopete/protocols/oscar/aim/aimuserinfo.h @@ -32,7 +32,7 @@ class AIMUserInfoDialog : public KDialogBase Q_OBJECT public: AIMUserInfoDialog(Kopete::Contact *c, AIMAccount *acc, bool modal, - QWidget *parent, const char* name); + TQWidget *parent, const char* name); ~AIMUserInfoDialog(); private: @@ -47,11 +47,11 @@ class AIMUserInfoDialog : public KDialogBase void slotCloseClicked(); void slotUpdateClicked(); void slotUpdateProfile(); - void slotUrlClicked(const QString&); - void slotMailClicked(const QString&, const QString&); + void slotUrlClicked(const TQString&); + void slotMailClicked(const TQString&, const TQString&); signals: -// void updateNickname(const QString &); +// void updateNickname(const TQString &); void closing(); }; diff --git a/kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp b/kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp index cf5fbae5..f00741c9 100644 --- a/kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp +++ b/kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp @@ -20,17 +20,17 @@ #include "kopeteaccount.h" -#include <qlayout.h> -#include <qlineedit.h> +#include <tqlayout.h> +#include <tqlineedit.h> #include <klocale.h> #include <kmessagebox.h> -AIMAddContactPage::AIMAddContactPage(bool connected, QWidget *parent, +AIMAddContactPage::AIMAddContactPage(bool connected, TQWidget *parent, const char *name ) : AddContactPage(parent,name) { m_gui = 0; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); if(connected) { @@ -39,8 +39,8 @@ AIMAddContactPage::AIMAddContactPage(bool connected, QWidget *parent, } else { - noaddMsg1 = new QLabel(i18n("You need to be connected to be able to add contacts."), this); - noaddMsg2 = new QLabel(i18n("Connect to the AIM network and try again."), this); + noaddMsg1 = new TQLabel(i18n("You need to be connected to be able to add contacts."), this); + noaddMsg2 = new TQLabel(i18n("Connect to the AIM network and try again."), this); canadd = false; } } @@ -58,7 +58,7 @@ bool AIMAddContactPage::validateData() if ( !m_gui ) return false; - QString sn = m_gui->addSN->text(); + TQString sn = m_gui->addSN->text(); if ( sn.isEmpty() ) { KMessageBox::sorry ( this, diff --git a/kopete/protocols/oscar/aim/ui/aimaddcontactpage.h b/kopete/protocols/oscar/aim/ui/aimaddcontactpage.h index 979d0472..7f6c732d 100644 --- a/kopete/protocols/oscar/aim/ui/aimaddcontactpage.h +++ b/kopete/protocols/oscar/aim/ui/aimaddcontactpage.h @@ -2,8 +2,8 @@ #ifndef AIMADDCONTACTPAGE_H #define AIMADDCONTACTPAGE_H -#include <qwidget.h> -#include <qlabel.h> +#include <tqwidget.h> +#include <tqlabel.h> #include "addcontactpage.h" class aimAddContactUI; @@ -19,7 +19,7 @@ class AIMAddContactPage : public AddContactPage Q_OBJECT public: - AIMAddContactPage(bool connected, QWidget *parent=0, + AIMAddContactPage(bool connected, TQWidget *parent=0, const char *name=0); ~AIMAddContactPage(); @@ -31,8 +31,8 @@ public: protected: /** The actual GUI */ aimAddContactUI *m_gui; - QLabel *noaddMsg1; - QLabel *noaddMsg2; + TQLabel *noaddMsg1; + TQLabel *noaddMsg2; bool canadd; }; #endif diff --git a/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp b/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp index de720e17..2e0100ab 100644 --- a/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp +++ b/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp @@ -1,12 +1,12 @@ #include "aimeditaccountwidget.h" #include "aimeditaccountui.h" -#include <qlayout.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qlineedit.h> -#include <qspinbox.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqlineedit.h> +#include <tqspinbox.h> #include <kdebug.h> #include <krun.h> @@ -20,8 +20,8 @@ #include "aimaccount.h" AIMEditAccountWidget::AIMEditAccountWidget( AIMProtocol *protocol, - Kopete::Account *account, QWidget *parent, const char *name ) - : QWidget( parent, name ), KopeteEditAccountWidget( account ) + Kopete::Account *account, TQWidget *parent, const char *name ) + : TQWidget( parent, name ), KopeteEditAccountWidget( account ) { //kdDebug(14152) << k_funcinfo << "Called." << endl; @@ -29,7 +29,7 @@ AIMEditAccountWidget::AIMEditAccountWidget( AIMProtocol *protocol, mProtocol = protocol; // create the gui (generated from a .ui file) - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); mGui = new aimEditAccountUI( this, "AIMEditAccountWidget::mGui" ); // Read in the settings from the account if it exists @@ -40,7 +40,7 @@ AIMEditAccountWidget::AIMEditAccountWidget( AIMProtocol *protocol, //Remove me after we can change Account IDs (Matt) mGui->edtAccountId->setDisabled( true ); mGui->mAutoLogon->setChecked( account->excludeConnect() ); - QString serverEntry = account->configGroup()->readEntry( "Server", "login.oscar.aol.com" ); + TQString serverEntry = account->configGroup()->readEntry( "Server", "login.oscar.aol.com" ); int portEntry = account->configGroup()->readNumEntry( "Port", 5190 ); if ( serverEntry != "login.oscar.aol.com" || portEntry != 5190 ) mGui->optionOverrideServer->setChecked( true ); @@ -80,12 +80,12 @@ AIMEditAccountWidget::AIMEditAccountWidget( AIMProtocol *protocol, // Global Identity mGui->mGlobalIdentity->setChecked( account->configGroup()->readBoolEntry("ExcludeGlobalIdentity", false) ); } - QObject::connect( mGui->buttonRegister, SIGNAL( clicked() ), this, SLOT( slotOpenRegister() ) ); + TQObject::connect( mGui->buttonRegister, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOpenRegister() ) ); /* Set tab order to password custom widget correctly */ - QWidget::setTabOrder( mGui->edtAccountId, mGui->mPasswordWidget->mRemembered ); - QWidget::setTabOrder( mGui->mPasswordWidget->mRemembered, mGui->mPasswordWidget->mPassword ); - QWidget::setTabOrder( mGui->mPasswordWidget->mPassword, mGui->mAutoLogon ); + TQWidget::setTabOrder( mGui->edtAccountId, mGui->mPasswordWidget->mRemembered ); + TQWidget::setTabOrder( mGui->mPasswordWidget->mRemembered, mGui->mPasswordWidget->mPassword ); + TQWidget::setTabOrder( mGui->mPasswordWidget->mPassword, mGui->mAutoLogon ); } AIMEditAccountWidget::~AIMEditAccountWidget() @@ -99,7 +99,7 @@ Kopete::Account *AIMEditAccountWidget::apply() if ( !mAccount ) { kdDebug( 14152 ) << k_funcinfo << "creating a new account" << endl; - QString newId = mGui->edtAccountId->text(); + TQString newId = mGui->edtAccountId->text(); mAccount = new AIMAccount( mProtocol, newId ); } @@ -145,8 +145,8 @@ bool AIMEditAccountWidget::validateData() { //kdDebug(14152) << k_funcinfo << "Called." << endl; - QString userName = mGui->edtAccountId->text(); - QString server = mGui->edtServerAddress->text(); + TQString userName = mGui->edtAccountId->text(); + TQString server = mGui->edtServerAddress->text(); int port = mGui->sbxServerPort->value(); if ( userName.length() < 1 ) diff --git a/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h b/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h index ccb2b451..9f180315 100644 --- a/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h +++ b/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h @@ -19,7 +19,7 @@ #ifndef AIMEDITACCOUNTWIDGET_H #define AIMEDITACCOUNTWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> #include "editaccountwidget.h" /** * @author Chris TenHarmsel <tenharmsel@staticmethod.net> @@ -34,13 +34,13 @@ class AIMAccount; class AIMProtocol; class aimEditAccountUI; -class AIMEditAccountWidget : public QWidget, public KopeteEditAccountWidget +class AIMEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT public: AIMEditAccountWidget(AIMProtocol *protocol, Kopete::Account *account, - QWidget *parent=0, const char *name=0); + TQWidget *parent=0, const char *name=0); virtual ~AIMEditAccountWidget(); virtual bool validateData(); diff --git a/kopete/protocols/oscar/icq/icqaccount.cpp b/kopete/protocols/oscar/icq/icqaccount.cpp index 9a071442..7e358346 100644 --- a/kopete/protocols/oscar/icq/icqaccount.cpp +++ b/kopete/protocols/oscar/icq/icqaccount.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include <qfile.h> +#include <tqfile.h> #include <kconfig.h> #include <kdebug.h> @@ -43,21 +43,21 @@ ICQMyselfContact::ICQMyselfContact( ICQAccount *acct ) : OscarMyselfContact( acct ) { - QObject::connect( acct->engine(), SIGNAL( loggedIn() ), this, SLOT( fetchShortInfo() ) ); - QObject::connect( acct->engine(), SIGNAL( receivedIcqShortInfo( const QString& ) ), - this, SLOT( receivedShortInfo( const QString& ) ) ); + TQObject::connect( acct->engine(), TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( fetchShortInfo() ) ); + TQObject::connect( acct->engine(), TQT_SIGNAL( receivedIcqShortInfo( const TQString& ) ), + this, TQT_SLOT( receivedShortInfo( const TQString& ) ) ); } void ICQMyselfContact::userInfoUpdated() { DWORD extendedStatus = details().extendedStatus(); - kdDebug( OSCAR_ICQ_DEBUG ) << k_funcinfo << "extendedStatus is " << QString::number( extendedStatus, 16 ) << endl; + kdDebug( OSCAR_ICQ_DEBUG ) << k_funcinfo << "extendedStatus is " << TQString::number( extendedStatus, 16 ) << endl; ICQ::Presence presence = ICQ::Presence::fromOscarStatus( extendedStatus & 0xffff ); setOnlineStatus( presence.toOnlineStatus() ); setProperty( Kopete::Global::Properties::self()->awayMessage(), static_cast<ICQAccount*>( account() )->engine()->statusMessage() ); } -void ICQMyselfContact::receivedShortInfo( const QString& contact ) +void ICQMyselfContact::receivedShortInfo( const TQString& contact ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -74,7 +74,7 @@ void ICQMyselfContact::fetchShortInfo() static_cast<ICQAccount*>( account() )->engine()->requestShortInfo( contactId() ); } -ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID, const char *name) +ICQAccount::ICQAccount(Kopete::Protocol *parent, TQString accountID, const char *name) : OscarAccount(parent, accountID, name, true) { kdDebug(14152) << k_funcinfo << accountID << ": Called."<< endl; @@ -83,15 +83,15 @@ ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID, const char * m_visibilityDialog = 0; - QString nickName = configGroup()->readEntry("NickName", QString::null); + TQString nickName = configGroup()->readEntry("NickName", TQString::null); mWebAware = configGroup()->readBoolEntry( "WebAware", false ); mHideIP = configGroup()->readBoolEntry( "HideIP", true ); - mInitialStatusMessage = QString::null; + mInitialStatusMessage = TQString::null; - QObject::connect( Kopete::ContactList::self(), SIGNAL( globalIdentityChanged( const QString&, const QVariant& ) ), - this, SLOT( slotGlobalIdentityChanged( const QString&, const QVariant& ) ) ); + TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( globalIdentityChanged( const TQString&, const TQVariant& ) ), + this, TQT_SLOT( slotGlobalIdentityChanged( const TQString&, const TQVariant& ) ) ); - QObject::connect( this, SIGNAL( buddyIconChanged() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( this, TQT_SIGNAL( buddyIconChanged() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); //setIgnoreUnknownContacts(pluginData(protocol(), "IgnoreUnknownContacts").toUInt() == 1); @@ -100,7 +100,7 @@ ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID, const char * { kdDebug(14153) << k_funcinfo << "sending status to reflect HideIP and WebAware settings" << endl; - //setStatus(mStatus, QString::null); + //setStatus(mStatus, TQString::null); }*/ } @@ -129,21 +129,21 @@ KActionMenu* ICQAccount::actionMenu() KToggleAction* actionInvisible = new KToggleAction( i18n( "In&visible" ), ICQ::Presence( presence().type(), ICQ::Presence::Invisible ).toOnlineStatus().iconFor( this ), - 0, this, SLOT( slotToggleInvisible() ), this ); + 0, this, TQT_SLOT( slotToggleInvisible() ), this ); actionInvisible->setChecked( presence().visibility() == ICQ::Presence::Invisible ); actionMenu->insert( actionInvisible ); actionMenu->popupMenu()->insertSeparator(); actionMenu->insert( new KToggleAction( i18n( "Set Visibility..." ), 0, 0, - this, SLOT( slotSetVisiblility() ), this, + this, TQT_SLOT( slotSetVisiblility() ), this, "ICQAccount::mActionSetVisibility") ); - //actionMenu->insert( new KToggleAction( i18n( "Send &SMS..." ), 0, 0, this, SLOT( slotSendSMS() ), this, "ICQAccount::mActionSendSMS") ); + //actionMenu->insert( new KToggleAction( i18n( "Send &SMS..." ), 0, 0, this, TQT_SLOT( slotSendSMS() ), this, "ICQAccount::mActionSendSMS") ); return actionMenu; } -void ICQAccount::connectWithPassword( const QString &password ) +void ICQAccount::connectWithPassword( const TQString &password ) { if ( password.isNull() ) return; @@ -162,9 +162,9 @@ void ICQAccount::connectWithPassword( const QString &password ) if ( accountIsOffline ) { myself()->setOnlineStatus( protocol()->statusManager()->connectingStatus() ); - QString icqNumber = accountId(); + TQString icqNumber = accountId(); kdDebug(14153) << k_funcinfo << "Logging in as " << icqNumber << endl ; - QString server = configGroup()->readEntry( "Server", QString::fromLatin1( "login.oscar.aol.com" ) ); + TQString server = configGroup()->readEntry( "Server", TQString::fromLatin1( "login.oscar.aol.com" ) ); uint port = configGroup()->readNumEntry( "Port", 5190 ); Connection* c = setupConnection( server, port ); @@ -185,7 +185,7 @@ void ICQAccount::connectWithPassword( const QString &password ) engine()->start( server, port, accountId(), password ); engine()->connectToServer( c, server, true /* doAuth */ ); - mInitialStatusMessage = QString::null; + mInitialStatusMessage = TQString::null; } } @@ -195,7 +195,7 @@ void ICQAccount::disconnected( DisconnectReason reason ) ICQ::Presence presOffline = ICQ::Presence( ICQ::Presence::Offline, presence().visibility() ); myself()->setOnlineStatus( presOffline.toOnlineStatus() ); - QDictIterator<Kopete::Contact> it( contacts() ); + TQDictIterator<Kopete::Contact> it( contacts() ); for( ; it.current(); ++it ) { OscarContact* oc = dynamic_cast<OscarContact*>( it.current() ); @@ -231,25 +231,25 @@ void ICQAccount::slotSetVisiblility() if ( !m_visibilityDialog ) { m_visibilityDialog = new OscarVisibilityDialog( engine(), Kopete::UI::Global::mainWidget() ); - QObject::connect( m_visibilityDialog, SIGNAL( closing() ), - this, SLOT( slotVisibilityDialogClosed() ) ); + TQObject::connect( m_visibilityDialog, TQT_SIGNAL( closing() ), + this, TQT_SLOT( slotVisibilityDialogClosed() ) ); //add all contacts; OscarVisibilityDialog::ContactMap contactMap; //temporary map for faster lookup of contactId - QMap<QString, QString> revContactMap; + TQMap<TQString, TQString> revContactMap; - QValueList<Oscar::SSI> contactList = engine()->ssiManager()->contactList(); - QValueList<Oscar::SSI>::const_iterator it, cEnd = contactList.constEnd(); + TQValueList<Oscar::SSI> contactList = engine()->ssiManager()->contactList(); + TQValueList<Oscar::SSI>::const_iterator it, cEnd = contactList.constEnd(); for ( it = contactList.constBegin(); it != cEnd; ++it ) { - QString contactId = ( *it ).name(); + TQString contactId = ( *it ).name(); OscarContact* oc = dynamic_cast<OscarContact*>( contacts()[( *it ).name()] ); if ( oc ) { //for better orientation in lists use nickName and icq number - QString screenName( "%1 (%2)" ); + TQString screenName( "%1 (%2)" ); screenName = screenName.arg( oc->nickName(), contactId); contactMap.insert( screenName, contactId ); revContactMap.insert( contactId, screenName ); @@ -263,7 +263,7 @@ void ICQAccount::slotSetVisiblility() m_visibilityDialog->addContacts( contactMap ); //add contacts from visible list - QStringList tmpList; + TQStringList tmpList; contactList = engine()->ssiManager()->visibleList(); cEnd = contactList.constEnd(); @@ -299,7 +299,7 @@ void ICQAccount::slotVisibilityDialogClosed() m_visibilityDialog = 0L; } -void ICQAccount::setAway( bool away, const QString &awayReason ) +void ICQAccount::setAway( bool away, const TQString &awayReason ) { kdDebug(14153) << k_funcinfo << "account='" << accountId() << "'" << endl; if ( away ) @@ -319,7 +319,7 @@ void ICQAccount::setInvisible( ICQ::Presence::Visibility vis ) setPresenceTarget( ICQ::Presence( pres.type(), vis ) ); } -void ICQAccount::setPresenceType( ICQ::Presence::Type type, const QString &message ) +void ICQAccount::setPresenceType( ICQ::Presence::Type type, const TQString &message ) { ICQ::Presence pres = presence(); kdDebug(14153) << k_funcinfo << "new type=" << (int)type << ", old type=" << (int)pres.type() << ", new message=" << message << endl; @@ -327,7 +327,7 @@ void ICQAccount::setPresenceType( ICQ::Presence::Type type, const QString &messa setPresenceTarget( ICQ::Presence( type, pres.visibility() ), message ); } -void ICQAccount::setPresenceTarget( const ICQ::Presence &newPres, const QString &message ) +void ICQAccount::setPresenceTarget( const ICQ::Presence &newPres, const TQString &message ) { bool targetIsOffline = (newPres.type() == ICQ::Presence::Offline); bool accountIsOffline = ( presence().type() == ICQ::Presence::Offline || @@ -351,7 +351,7 @@ void ICQAccount::setPresenceTarget( const ICQ::Presence &newPres, const QString } -void ICQAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QString& reason ) +void ICQAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const TQString& reason ) { if ( status.status() == Kopete::OnlineStatus::Invisible ) { @@ -375,9 +375,9 @@ void ICQAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QStr } -OscarContact *ICQAccount::createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) +OscarContact *ICQAccount::createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) { - ICQContact* contact = new ICQContact( this, contactId, parentContact, QString::null, ssiItem ); + ICQContact* contact = new ICQContact( this, contactId, parentContact, TQString::null, ssiItem ); if ( !ssiItem.alias().isEmpty() ) contact->setProperty( Kopete::Global::Properties::self()->nickName(), ssiItem.alias() ); @@ -387,13 +387,13 @@ OscarContact *ICQAccount::createNewContact( const QString &contactId, Kopete::Me return contact; } -QString ICQAccount::sanitizedMessage( const QString& message ) +TQString ICQAccount::sanitizedMessage( const TQString& message ) { return Kopete::Message::escape( message ); } -void ICQAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& value ) +void ICQAccount::slotGlobalIdentityChanged( const TQString& key, const TQVariant& value ) { //do something with the photo kdDebug(14153) << k_funcinfo << "Global identity changed" << endl; @@ -417,14 +417,14 @@ void ICQAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& void ICQAccount::slotBuddyIconChanged() { // need to disconnect because we could end up with many connections - QObject::disconnect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::disconnect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); if ( !engine()->isActive() ) { - QObject::connect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); return; } - QString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); + TQString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); SSIManager* ssi = engine()->ssiManager(); Oscar::SSI item = ssi->findItemForIconByRef( 1 ); @@ -437,7 +437,7 @@ void ICQAccount::slotBuddyIconChanged() Oscar::SSI s(item); //remove hash and alias - QValueList<TLV> tList( item.tlvList() ); + TQValueList<TLV> tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) tList.remove( t ); @@ -453,7 +453,7 @@ void ICQAccount::slotBuddyIconChanged() } else { - QFile iconFile( photoPath ); + TQFile iconFile( photoPath ); iconFile.open( IO_ReadOnly ); KMD5 iconHash; @@ -478,7 +478,7 @@ void ICQAccount::slotBuddyIconChanged() t2.type = 0x0131; t2.length = 0; - QValueList<Oscar::TLV> list; + TQValueList<Oscar::TLV> list; list.append( t ); list.append( t2 ); @@ -492,7 +492,7 @@ void ICQAccount::slotBuddyIconChanged() { //found an item Oscar::SSI s(item); kdDebug(14153) << k_funcinfo << "modifying old item in ssi." << endl; - QValueList<TLV> tList( item.tlvList() ); + TQValueList<TLV> tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) diff --git a/kopete/protocols/oscar/icq/icqaccount.h b/kopete/protocols/oscar/icq/icqaccount.h index f6231ec9..d64fe5d7 100644 --- a/kopete/protocols/oscar/icq/icqaccount.h +++ b/kopete/protocols/oscar/icq/icqaccount.h @@ -39,7 +39,7 @@ public: void userInfoUpdated(); public slots: - void receivedShortInfo( const QString& ); + void receivedShortInfo( const TQString& ); void fetchShortInfo(); }; @@ -49,7 +49,7 @@ class ICQAccount : public OscarAccount Q_OBJECT public: - ICQAccount( Kopete::Protocol *parent, QString accountID, const char *name = 0L ); + ICQAccount( Kopete::Protocol *parent, TQString accountID, const char *name = 0L ); virtual ~ICQAccount(); ICQProtocol *protocol(); @@ -58,18 +58,18 @@ public: virtual KActionMenu* actionMenu(); /** Reimplementation from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus&, const QString& ); + void setOnlineStatus( const Kopete::OnlineStatus&, const TQString& ); - virtual void setAway( bool away, const QString &awayReason ); + virtual void setAway( bool away, const TQString &awayReason ); - void connectWithPassword( const QString &password ); + void connectWithPassword( const TQString &password ); - void setUserProfile( const QString &profile ); + void setUserProfile( const TQString &profile ); protected: - virtual OscarContact *createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ); + virtual OscarContact *createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ); - virtual QString sanitizedMessage( const QString& message ); + virtual TQString sanitizedMessage( const TQString& message ); protected slots: virtual void disconnected( DisconnectReason reason ); @@ -79,8 +79,8 @@ private: ICQ::Presence presence(); void setInvisible( ICQ::Presence::Visibility ); - void setPresenceType( ICQ::Presence::Type, const QString &awayMessage = QString::null ); - void setPresenceTarget( const ICQ::Presence &presence, const QString &message = QString::null ); + void setPresenceType( ICQ::Presence::Type, const TQString &awayMessage = TQString::null ); + void setPresenceTarget( const ICQ::Presence &presence, const TQString &message = TQString::null ); //const unsigned long fullStatus( const unsigned long plainStatus ); @@ -90,14 +90,14 @@ private slots: void slotSetVisiblility(); void slotVisibilityDialogClosed(); - void slotGlobalIdentityChanged( const QString& key, const QVariant& value ); + void slotGlobalIdentityChanged( const TQString& key, const TQVariant& value ); void slotBuddyIconChanged(); private: bool mWebAware; bool mHideIP; - QString mInitialStatusMessage; + TQString mInitialStatusMessage; OscarVisibilityDialog* m_visibilityDialog; }; diff --git a/kopete/protocols/oscar/icq/icqcontact.cpp b/kopete/protocols/oscar/icq/icqcontact.cpp index 8ba8d195..90204bdf 100644 --- a/kopete/protocols/oscar/icq/icqcontact.cpp +++ b/kopete/protocols/oscar/icq/icqcontact.cpp @@ -17,9 +17,9 @@ #include "icqcontact.h" -#include <qtimer.h> -#include <qimage.h> -#include <qfile.h> +#include <tqtimer.h> +#include <tqimage.h> +#include <tqfile.h> #include <kaction.h> #include <kactionclasses.h> @@ -51,8 +51,8 @@ #include "oscarencodingselectiondialog.h" #include "ssimanager.h" -ICQContact::ICQContact( ICQAccount *account, const QString &name, Kopete::MetaContact *parent, - const QString& icon, const Oscar::SSI& ssiItem ) +ICQContact::ICQContact( ICQAccount *account, const TQString &name, Kopete::MetaContact *parent, + const TQString& icon, const Oscar::SSI& ssiItem ) : OscarContact( account, name, parent, icon, ssiItem ) { mProtocol = static_cast<ICQProtocol *>(protocol()); @@ -66,28 +66,28 @@ ICQContact::ICQContact( ICQAccount *account, const QString &name, Kopete::MetaCo else setOnlineStatus( ICQ::Presence( ICQ::Presence::Offline, ICQ::Presence::Visible ).toOnlineStatus() ); - QObject::connect( mAccount->engine(), SIGNAL( loggedIn() ), this, SLOT( loggedIn() ) ); - //QObject::connect( mAccount->engine(), SIGNAL( userIsOnline( const QString& ) ), this, SLOT( userOnline( const QString&, UserDetails ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( userIsOffline( const QString& ) ), this, SLOT( userOffline( const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( authRequestReceived( const QString&, const QString& ) ), - this, SLOT( slotGotAuthRequest( const QString&, const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( authReplyReceived( const QString&, const QString&, bool ) ), - this, SLOT( slotGotAuthReply(const QString&, const QString&, bool ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedIcqShortInfo( const QString& ) ), - this, SLOT( receivedShortInfo( const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedIcqLongInfo( const QString& ) ), - this, SLOT( receivedLongInfo( const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedUserInfo( const QString&, const UserDetails& ) ), - this, SLOT( userInfoUpdated( const QString&, const UserDetails& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedAwayMessage( const QString&, const QString& ) ), - this, SLOT( receivedStatusMessage( const QString&, const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedAwayMessage( const Oscar::Message& ) ), - this, SLOT( receivedStatusMessage( const Oscar::Message& ) ) ); - QObject::connect( this, SIGNAL( featuresUpdated() ), this, SLOT( updateFeatures() ) ); - QObject::connect( mAccount->engine(), SIGNAL( iconServerConnected() ), - this, SLOT( requestBuddyIcon() ) ); - QObject::connect( mAccount->engine(), SIGNAL( haveIconForContact( const QString&, QByteArray ) ), - this, SLOT( haveIcon( const QString&, QByteArray ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( loggedIn() ) ); + //TQObject::connect( mAccount->engine(), TQT_SIGNAL( userIsOnline( const TQString& ) ), this, TQT_SLOT( userOnline( const TQString&, UserDetails ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( userIsOffline( const TQString& ) ), this, TQT_SLOT( userOffline( const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( authRequestReceived( const TQString&, const TQString& ) ), + this, TQT_SLOT( slotGotAuthRequest( const TQString&, const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( authReplyReceived( const TQString&, const TQString&, bool ) ), + this, TQT_SLOT( slotGotAuthReply(const TQString&, const TQString&, bool ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedIcqShortInfo( const TQString& ) ), + this, TQT_SLOT( receivedShortInfo( const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedIcqLongInfo( const TQString& ) ), + this, TQT_SLOT( receivedLongInfo( const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedUserInfo( const TQString&, const UserDetails& ) ), + this, TQT_SLOT( userInfoUpdated( const TQString&, const UserDetails& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ), + this, TQT_SLOT( receivedStatusMessage( const TQString&, const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedAwayMessage( const Oscar::Message& ) ), + this, TQT_SLOT( receivedStatusMessage( const Oscar::Message& ) ) ); + TQObject::connect( this, TQT_SIGNAL( featuresUpdated() ), this, TQT_SLOT( updateFeatures() ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( iconServerConnected() ), + this, TQT_SLOT( requestBuddyIcon() ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( haveIconForContact( const TQString&, TQByteArray ) ), + this, TQT_SLOT( haveIcon( const TQString&, TQByteArray ) ) ); } @@ -111,7 +111,7 @@ void ICQContact::updateSSIItem() } -void ICQContact::userInfoUpdated( const QString& contact, const UserDetails& details ) +void ICQContact::userInfoUpdated( const TQString& contact, const UserDetails& details ) { //kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << contact << contactId() << endl; if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) @@ -193,7 +193,7 @@ void ICQContact::userInfoUpdated( const QString& contact, const UserDetails& det int time = ( KApplication::random() % 10 ) * 1000; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating buddy icon in " << time/1000 << " seconds" << endl; - QTimer::singleShot( time, this, SLOT( requestBuddyIcon() ) ); + TQTimer::singleShot( time, this, TQT_SLOT( requestBuddyIcon() ) ); } } } @@ -201,7 +201,7 @@ void ICQContact::userInfoUpdated( const QString& contact, const UserDetails& det OscarContact::userInfoUpdated( contact, details ); } -void ICQContact::userOnline( const QString& userId ) +void ICQContact::userOnline( const TQString& userId ) { if ( Oscar::normalize( userId ) != Oscar::normalize( contactId() ) ) return; @@ -211,7 +211,7 @@ void ICQContact::userOnline( const QString& userId ) //mAccount->engine()->requestStatusInfo( contactId() ); } -void ICQContact::userOffline( const QString& userId ) +void ICQContact::userOffline( const TQString& userId ) { if ( Oscar::normalize( userId ) != Oscar::normalize( contactId() ) ) return; @@ -237,7 +237,7 @@ void ICQContact::loggedIn() m_requestingNickname = true; int time = ( KApplication::random() % 20 ) * 1000; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating nickname in " << time/1000 << " seconds" << endl; - QTimer::singleShot( time, this, SLOT( requestShortInfo() ) ); + TQTimer::singleShot( time, this, TQT_SLOT( requestShortInfo() ) ); } } @@ -250,7 +250,7 @@ void ICQContact::requestShortInfo() void ICQContact::slotRequestAuth() { - QString reason = KInputDialog::getText( i18n("Request Authorization"), + TQString reason = KInputDialog::getText( i18n("Request Authorization"), i18n("Reason for requesting authorization:") ); if ( !reason.isNull() ) mAccount->engine()->requestAuth( contactId(), reason ); @@ -266,13 +266,13 @@ void ICQContact::slotSendAuth() mAccount->engine()->sendAuth( contactId(), replyDialog.reason(), replyDialog.grantAuth() ); } -void ICQContact::slotGotAuthReply( const QString& contact, const QString& reason, bool granted ) +void ICQContact::slotGotAuthReply( const TQString& contact, const TQString& reason, bool granted ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << endl; - QString message; + TQString message; if( granted ) { message = i18n( "User %1 has granted your authorization request.\nReason: %2" ) @@ -291,14 +291,14 @@ void ICQContact::slotGotAuthReply( const QString& contact, const QString& reason KNotifyClient::event( Kopete::UI::Global::sysTrayWId(), "icq_authorization", message ); } -void ICQContact::slotGotAuthRequest( const QString& contact, const QString& reason ) +void ICQContact::slotGotAuthRequest( const TQString& contact, const TQString& reason ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; ICQAuthReplyDialog *replyDialog = new ICQAuthReplyDialog(); - connect( replyDialog, SIGNAL( okClicked() ), this, SLOT( slotAuthReplyDialogOkClicked() ) ); + connect( replyDialog, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotAuthReplyDialogOkClicked() ) ); replyDialog->setUser( property( Kopete::Global::Properties::self()->nickName() ).value().toString() ); replyDialog->setRequestReason( reason ); replyDialog->setModal( TRUE ); @@ -314,7 +314,7 @@ void ICQContact::slotAuthReplyDialogOkClicked() mAccount->engine()->sendAuth( contactId(), replyDialog->reason(), replyDialog->grantAuth() ); } -void ICQContact::receivedLongInfo( const QString& contact ) +void ICQContact::receivedLongInfo( const TQString& contact ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) { @@ -323,7 +323,7 @@ void ICQContact::receivedLongInfo( const QString& contact ) return; } - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "received long info from engine" << endl; @@ -343,12 +343,12 @@ void ICQContact::receivedLongInfo( const QString& contact ) } -void ICQContact::receivedShortInfo( const QString& contact ) +void ICQContact::receivedShortInfo( const TQString& contact ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); m_requestingNickname = false; //done requesting nickname ICQShortInfo shortInfo = mAccount->engine()->getShortInfo( contact ); @@ -372,7 +372,7 @@ void ICQContact::receivedShortInfo( const QString& contact ) } -void ICQContact::receivedStatusMessage( const QString &contact, const QString &message ) +void ICQContact::receivedStatusMessage( const TQString &contact, const TQString &message ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -389,9 +389,9 @@ void ICQContact::receivedStatusMessage( const Oscar::Message &message ) return; //decode message - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); - QString realText = message.text(codec); + TQString realText = message.text(codec); if ( !realText.isEmpty() ) setProperty( mProtocol->awayMessage, realText ); @@ -404,7 +404,7 @@ void ICQContact::slotSendMsg( Kopete::Message& msg, Kopete::ChatSession* session //Why is this unused? Q_UNUSED( session ); - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); int messageChannel = 0x01; Oscar::Message::Encoding messageEncoding; @@ -414,14 +414,14 @@ void ICQContact::slotSendMsg( Kopete::Message& msg, Kopete::ChatSession* session else messageEncoding = Oscar::Message::UserDefined; - QString msgText( msg.plainBody() ); + TQString msgText( msg.plainBody() ); // TODO: More intelligent handling of message length. uint chunk_length = !isOnline() ? 450 : 4096; uint msgPosition = 0; do { - QString msgChunk( msgText.mid( msgPosition, chunk_length ) ); + TQString msgChunk( msgText.mid( msgPosition, chunk_length ) ); // Try to split on space if needed if ( msgChunk.length() == chunk_length ) { @@ -460,7 +460,7 @@ void ICQContact::requestBuddyIcon() } } -void ICQContact::haveIcon( const QString& user, QByteArray icon ) +void ICQContact::haveIcon( const TQString& user, TQByteArray icon ) { if ( Oscar::normalize( user ) != Oscar::normalize( contactId() ) ) return; @@ -470,9 +470,9 @@ void ICQContact::haveIcon( const QString& user, QByteArray icon ) KMD5 buddyIconHash( icon ); if ( memcmp( buddyIconHash.rawDigest(), m_details.buddyIconHash().data(), 16 ) == 0 ) { - QString iconLocation( locateLocal( "appdata", "oscarpictures/"+ contactId() ) ); + TQString iconLocation( locateLocal( "appdata", "oscarpictures/"+ contactId() ) ); - QFile iconFile( iconLocation ); + TQFile iconFile( iconLocation ); if ( !iconFile.open( IO_WriteOnly ) ) { kdDebug(14153) << k_funcinfo << "Cannot open file" @@ -483,7 +483,7 @@ void ICQContact::haveIcon( const QString& user, QByteArray icon ) iconFile.writeBlock( icon ); iconFile.close(); - setProperty( Kopete::Global::Properties::self()->photo(), QString::null ); + setProperty( Kopete::Global::Properties::self()->photo(), TQString::null ); setProperty( Kopete::Global::Properties::self()->photo(), iconLocation ); m_buddyIconDirty = false; } @@ -494,11 +494,11 @@ void ICQContact::haveIcon( const QString& user, QByteArray icon ) } } -bool ICQContact::cachedBuddyIcon( QByteArray hash ) +bool ICQContact::cachedBuddyIcon( TQByteArray hash ) { - QString iconLocation( locateLocal( "appdata", "oscarpictures/"+ contactId() ) ); + TQString iconLocation( locateLocal( "appdata", "oscarpictures/"+ contactId() ) ); - QFile iconFile( iconLocation ); + TQFile iconFile( iconLocation ); if ( !iconFile.open( IO_ReadOnly ) ) return false; @@ -510,7 +510,7 @@ bool ICQContact::cachedBuddyIcon( QByteArray hash ) { kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "Updating icon for " << contactId() << " from local cache" << endl; - setProperty( Kopete::Global::Properties::self()->photo(), QString::null ); + setProperty( Kopete::Global::Properties::self()->photo(), TQString::null ); setProperty( Kopete::Global::Properties::self()->photo(), iconLocation ); m_buddyIconDirty = false; return true; @@ -532,7 +532,7 @@ void ICQContact::slotContactChanged(const UserInfo &u) /*kdDebug(14190) << k_funcinfo << "Called for '" << displayName() << "', contactName()=" << contactName() << endl;*/ - QStringList capList; + TQStringList capList; // Append client name and version in case we found one if (!mInfo.clientName.isEmpty()) { @@ -595,7 +595,7 @@ void ICQContact::slotContactChanged(const UserInfo &u) setStatus(newStatus); } -void ICQContact::slotOffgoingBuddy(QString sender) +void ICQContact::slotOffgoingBuddy(TQString sender) { if(sender != contactName()) return; @@ -605,7 +605,7 @@ void ICQContact::slotOffgoingBuddy(QString sender) setOnlineStatus(mProtocol->statusOffline); } -void ICQContact::gotIM(OscarSocket::OscarMessageType /*type*/, const QString &message) +void ICQContact::gotIM(OscarSocket::OscarMessageType /*type*/, const TQString &message) { // Build a Kopete::Message and set the body as Rich Text Kopete::ContactPtrList tmpList; @@ -649,12 +649,12 @@ bool ICQContact::isReachable() return account()->isConnected(); } -QPtrList<KAction> *ICQContact::customContextMenuActions() +TQPtrList<KAction> *ICQContact::customContextMenuActions() { - QPtrList<KAction> *actionCollection = new QPtrList<KAction>(); + TQPtrList<KAction> *actionCollection = new TQPtrList<KAction>(); /* - QString awTxt; - QString awIcn; + TQString awTxt; + TQString awIcn; unsigned int status = onlineStatus().internalStatus(); if (status >= 15) status -= 15; // get rid of invis addon @@ -685,12 +685,12 @@ QPtrList<KAction> *ICQContact::customContextMenuActions() if(actionReadAwayMessage==0) { actionReadAwayMessage = new KAction(awTxt, awIcn, 0, - this, SLOT(slotReadAwayMessage()), this, "actionReadAwayMessage"); + this, TQT_SLOT(slotReadAwayMessage()), this, "actionReadAwayMessage"); */ actionRequestAuth = new KAction(i18n("&Request Authorization"), "mail_reply", 0, - this, SLOT(slotRequestAuth()), this, "actionRequestAuth"); + this, TQT_SLOT(slotRequestAuth()), this, "actionRequestAuth"); actionSendAuth = new KAction(i18n("&Grant Authorization"), "mail_forward", 0, - this, SLOT(slotSendAuth()), this, "actionSendAuth"); + this, TQT_SLOT(slotSendAuth()), this, "actionSendAuth"); /* } else @@ -701,11 +701,11 @@ QPtrList<KAction> *ICQContact::customContextMenuActions() */ m_actionIgnore = new KToggleAction(i18n("&Ignore"), "", 0, - this, SLOT(slotIgnore()), this, "actionIgnore"); + this, TQT_SLOT(slotIgnore()), this, "actionIgnore"); m_actionVisibleTo = new KToggleAction(i18n("Always &Visible To"), "", 0, - this, SLOT(slotVisibleTo()), this, "actionVisibleTo"); + this, TQT_SLOT(slotVisibleTo()), this, "actionVisibleTo"); m_actionInvisibleTo = new KToggleAction(i18n("Always &Invisible To"), "", 0, - this, SLOT(slotInvisibleTo()), this, "actionInvisibleTo"); + this, TQT_SLOT(slotInvisibleTo()), this, "actionInvisibleTo"); bool on = account()->isConnected(); if ( m_ssiItem.waitingAuth() ) @@ -717,7 +717,7 @@ QPtrList<KAction> *ICQContact::customContextMenuActions() m_selectEncoding = new KAction( i18n( "Select Encoding..." ), "charset", 0, - this, SLOT( changeContactEncoding() ), this, "changeEncoding" ); + this, TQT_SLOT( changeContactEncoding() ), this, "changeEncoding" ); /* actionReadAwayMessage->setEnabled(status != OSCAR_OFFLINE && status != OSCAR_ONLINE); @@ -748,7 +748,7 @@ QPtrList<KAction> *ICQContact::customContextMenuActions() void ICQContact::slotUserInfo() { m_infoWidget = new ICQUserInfoWidget( Kopete::UI::Global::mainWidget(), "icq info" ); - QObject::connect( m_infoWidget, SIGNAL( finished() ), this, SLOT( closeUserInfoDialog() ) ); + TQObject::connect( m_infoWidget, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeUserInfoDialog() ) ); m_infoWidget->setContact( this ); m_infoWidget->show(); if ( account()->isConnected() ) @@ -757,7 +757,7 @@ void ICQContact::slotUserInfo() void ICQContact::closeUserInfoDialog() { - QObject::disconnect( this, 0, m_infoWidget, 0 ); + TQObject::disconnect( this, 0, m_infoWidget, 0 ); m_infoWidget->delayedDestruct(); m_infoWidget = 0L; } @@ -768,14 +768,14 @@ void ICQContact::changeContactEncoding() return; m_oesd = new OscarEncodingSelectionDialog( Kopete::UI::Global::mainWidget(), property(mProtocol->contactEncoding).value().toInt() ); - connect( m_oesd, SIGNAL( closing( int ) ), - this, SLOT( changeEncodingDialogClosed( int ) ) ); + connect( m_oesd, TQT_SIGNAL( closing( int ) ), + this, TQT_SLOT( changeEncodingDialogClosed( int ) ) ); m_oesd->show(); } void ICQContact::changeEncodingDialogClosed( int result ) { - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) { int mib = m_oesd->selectedEncoding(); if ( mib != 0 ) @@ -827,7 +827,7 @@ void ICQContact::slotReadAwayMessage() awayMessageDialog = new ICQReadAway(this, 0L, "awayMessageDialog"); if(!awayMessageDialog) return; - QObject::connect(awayMessageDialog, SIGNAL(closing()), this, SLOT(slotCloseAwayMessageDialog())); + TQObject::connect(awayMessageDialog, TQT_SIGNAL(closing()), this, TQT_SLOT(slotCloseAwayMessageDialog())); awayMessageDialog->show(); } else @@ -844,14 +844,14 @@ void ICQContact::slotCloseAwayMessageDialog() } -const QString ICQContact::awayMessage() +const TQString ICQContact::awayMessage() { kdDebug(14150) << k_funcinfo << property(mProtocol->awayMessage).value().toString() << endl; return property(mProtocol->awayMessage).value().toString(); } -void ICQContact::setAwayMessage(const QString &message) +void ICQContact::setAwayMessage(const TQString &message) { /*kdDebug(14150) << k_funcinfo << "Called for '" << displayName() << "', away msg='" << message << "'" << endl;*/ diff --git a/kopete/protocols/oscar/icq/icqcontact.h b/kopete/protocols/oscar/icq/icqcontact.h index 41084e63..8e3301cf 100644 --- a/kopete/protocols/oscar/icq/icqcontact.h +++ b/kopete/protocols/oscar/icq/icqcontact.h @@ -51,30 +51,30 @@ Q_OBJECT public: /** Normal ICQ constructor */ - ICQContact( ICQAccount *account, const QString &name, Kopete::MetaContact *parent, - const QString& icon = QString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); + ICQContact( ICQAccount *account, const TQString &name, Kopete::MetaContact *parent, + const TQString& icon = TQString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); virtual ~ICQContact(); /** * Returns a set of custom menu items for * the context menu */ - virtual QPtrList<KAction> *customContextMenuActions(); + virtual TQPtrList<KAction> *customContextMenuActions(); /** Return whether or not this contact is reachable. */ virtual bool isReachable(); - //virtual const QString awayMessage(); - //virtual void setAwayMessage(const QString &message); + //virtual const TQString awayMessage(); + //virtual void setAwayMessage(const TQString &message); public slots: virtual void slotUserInfo(); virtual void updateSSIItem(); - void userInfoUpdated( const QString& contact, const UserDetails& details ); + void userInfoUpdated( const TQString& contact, const UserDetails& details ); - void userOnline( const QString& userId ); - void userOffline( const QString& userID ); + void userOnline( const TQString& userId ); + void userOffline( const TQString& userID ); void loggedIn(); void requestShortInfo(); @@ -87,7 +87,7 @@ signals: void haveInterestInfo( const ICQInterestInfo& ); private: - bool cachedBuddyIcon( QByteArray hash ); + bool cachedBuddyIcon( TQByteArray hash ); bool m_buddyIconDirty; bool m_requestingNickname; @@ -125,22 +125,22 @@ private slots: void slotAuthReplyDialogOkClicked(); /** We have received an auth request */ - void slotGotAuthRequest( const QString& contact, const QString& reason ); + void slotGotAuthRequest( const TQString& contact, const TQString& reason ); /** We have received an auth reply */ - void slotGotAuthReply( const QString& contact, const QString& reason, bool granted ); + void slotGotAuthReply( const TQString& contact, const TQString& reason, bool granted ); void closeUserInfoDialog(); - void receivedLongInfo( const QString& contact ); - void receivedShortInfo( const QString& contact ); + void receivedLongInfo( const TQString& contact ); + void receivedShortInfo( const TQString& contact ); void changeContactEncoding(); void changeEncodingDialogClosed( int ); void requestBuddyIcon(); - void haveIcon( const QString&, QByteArray ); - void receivedStatusMessage( const QString &contact, const QString &message ); + void haveIcon( const TQString&, TQByteArray ); + void receivedStatusMessage( const TQString &contact, const TQString &message ); void receivedStatusMessage( const Oscar::Message &message ); //void slotCloseAwayMessageDialog(); diff --git a/kopete/protocols/oscar/icq/icqpresence.cpp b/kopete/protocols/oscar/icq/icqpresence.cpp index ab6bb670..393f04c9 100644 --- a/kopete/protocols/oscar/icq/icqpresence.cpp +++ b/kopete/protocols/oscar/icq/icqpresence.cpp @@ -39,9 +39,9 @@ struct PresenceTypeData Kopete::OnlineStatus::StatusType onlineStatusType; unsigned long setFlag; unsigned long getFlag; - QString caption; - QString visibleName; - QString invisibleName; + TQString caption; + TQString visibleName; + TQString invisibleName; const char *visibleIcon; const char *invisibleIcon; unsigned int categories; @@ -132,8 +132,8 @@ public: , waitingForAuth( Kopete::OnlineStatus::Unknown, 1, ICQProtocol::protocol(), Presence::Offline, "button_cancel", i18n("Waiting for Authorization") ) , invisible( Kopete::OnlineStatus::Invisible, 2, ICQProtocol::protocol(), - Presence::Offline, QString::null, QString::null, - QString::null, Kopete::OnlineStatusManager::Invisible, + Presence::Offline, TQString::null, TQString::null, + TQString::null, Kopete::OnlineStatusManager::Invisible, Kopete::OnlineStatusManager::HideFromMenu ) { @@ -150,8 +150,8 @@ public: const PresenceTypeData &data = PresenceTypeData::forType( static_cast<Presence::Type>(n) ); const uint weight = n + firstUsableWeight; const uint internalStatus = n + invisibleOffset; - QStringList overlayIcons( data.visibleIcon ); - QString description( data.visibleName ); + TQStringList overlayIcons( data.visibleIcon ); + TQString description( data.visibleName ); Kopete::OnlineStatus status; if ( invisible ) { diff --git a/kopete/protocols/oscar/icq/icqprotocol.cpp b/kopete/protocols/oscar/icq/icqprotocol.cpp index 42616e32..79fd2848 100644 --- a/kopete/protocols/oscar/icq/icqprotocol.cpp +++ b/kopete/protocols/oscar/icq/icqprotocol.cpp @@ -23,15 +23,15 @@ #include <netinet/in.h> // for ntohl() -#include <qcombobox.h> +#include <tqcombobox.h> /* -#include <qhostaddress.h> -#include <qlistbox.h> -#include <qspinbox.h> -#include <qtextedit.h> +#include <tqhostaddress.h> +#include <tqlistbox.h> +#include <tqspinbox.h> +#include <tqtextedit.h> #include <kdatewidget.h>*/ -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <kdialogbase.h> /* #include <klineedit.h> @@ -66,10 +66,10 @@ K_EXPORT_COMPONENT_FACTORY( kopete_icq, ICQProtocolFactory( "kopete_icq" ) ) ICQProtocolHandler::ICQProtocolHandler() : Kopete::MimeTypeHandler(false) { - registerAsMimeHandler(QString::fromLatin1("application/x-icq")); + registerAsMimeHandler(TQString::fromLatin1("application/x-icq")); } -void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) const +void ICQProtocolHandler::handleURL(const TQString &mimeType, const KURL & url) const { if (mimeType != "application/x-icq") return; @@ -96,21 +96,21 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co ICQProtocol *proto = ICQProtocol::protocol(); - QString uin = file.readEntry("UIN"); + TQString uin = file.readEntry("UIN"); if (uin.isEmpty()) return; - QString nick = file.readEntry("NickName"); - QString first = file.readEntry("FirstName"); - QString last = file.readEntry("LastName"); - QString email = file.readEntry("Email"); + TQString nick = file.readEntry("NickName"); + TQString first = file.readEntry("FirstName"); + TQString last = file.readEntry("LastName"); + TQString email = file.readEntry("Email"); Kopete::Account *account = 0; - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(proto); + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(proto); // do not show chooser if we only have one account to "choose" from if (accounts.count() == 1) { - QDictIterator<Kopete::Account> it(accounts); + TQDictIterator<Kopete::Account> it(accounts); account = it.current(); } else @@ -126,7 +126,7 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co account = accSelector->selectedItem(); delete chooser; - if (ret == QDialog::Rejected || account == 0) + if (ret == TQDialog::Rejected || account == 0) { kdDebug(14153) << k_funcinfo << "Cancelled" << endl; return; @@ -140,12 +140,12 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co return; } - QString nickuin = nick.isEmpty() ? + TQString nickuin = nick.isEmpty() ? i18n("'%1'").arg(uin) : i18n("'%1' (%2)").arg(nick, uin); if (KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(), - i18n("Do you want to add %1 to your contact list?").arg(nickuin), QString::null, i18n("Add"), i18n("Do Not Add")) + i18n("Do you want to add %1 to your contact list?").arg(nickuin), TQString::null, i18n("Add"), i18n("Do Not Add")) != KMessageBox::Yes) { kdDebug(14153) << k_funcinfo << "Cancelled" << endl; @@ -173,7 +173,7 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co ICQProtocol* ICQProtocol::protocolStatic_ = 0L; -ICQProtocol::ICQProtocol(QObject *parent, const char *name, const QStringList&) +ICQProtocol::ICQProtocol(TQObject *parent, const char *name, const TQStringList&) : Kopete::Protocol( ICQProtocolFactory::instance(), parent, name ), firstName(Kopete::Global::Properties::self()->firstName()), lastName(Kopete::Global::Properties::self()->lastName()), @@ -181,8 +181,8 @@ ICQProtocol::ICQProtocol(QObject *parent, const char *name, const QStringList&) emailAddress(Kopete::Global::Properties::self()->emailAddress()), ipAddress("ipAddress", i18n("IP Address") ), clientFeatures("clientFeatures", i18n("Client Features"), 0, false), - buddyIconHash("iconHash", i18n("Buddy Icon MD5 Hash"), QString::null, true, false, true), - contactEncoding( "contactEncoding", i18n( "Contact Encoding" ), QString::null, true, false, true ) + buddyIconHash("iconHash", i18n("Buddy Icon MD5 Hash"), TQString::null, true, false, true), + contactEncoding( "contactEncoding", i18n( "Contact Encoding" ), TQString::null, true, false, true ) { if (protocolStatic_) @@ -219,7 +219,7 @@ void ICQProtocol::initGenders() void ICQProtocol::initCountries() { mCountries.insert(0, ""); // unspecified - KLocale *kl = KGlobal::locale(); //KLocale(QString::fromLatin1("kopete")); + KLocale *kl = KGlobal::locale(); //KLocale(TQString::fromLatin1("kopete")); mCountries.insert(93, kl->twoAlphaToCountryName("af")); mCountries.insert(355, kl->twoAlphaToCountryName("al")); @@ -468,7 +468,7 @@ void ICQProtocol::initCountries() void ICQProtocol::initLang() { - KLocale *kl = KGlobal::locale(); //KLocale(QString::fromLatin1("kopete")); + KLocale *kl = KGlobal::locale(); //KLocale(TQString::fromLatin1("kopete")); mLanguages.insert(0 , ""); mLanguages.insert(1 , kl->twoAlphaToLanguageName("ar") /*i18n("Arabic")*/); @@ -660,19 +660,19 @@ void ICQProtocol::initInterests() } -void ICQProtocol::fillComboFromTable(QComboBox *box, const QMap<int, QString> &map) +void ICQProtocol::fillComboFromTable(TQComboBox *box, const TQMap<int, TQString> &map) { // kdDebug(14153) << k_funcinfo << "Called." << endl; - QStringList list = map.values(); + TQStringList list = map.values(); list.sort(); box->insertStringList(list); } -void ICQProtocol::setComboFromTable(QComboBox *box, const QMap<int, QString> &map, int value) +void ICQProtocol::setComboFromTable(TQComboBox *box, const TQMap<int, TQString> &map, int value) { // kdDebug(14153) << k_funcinfo << "Called." << endl; - QMap<int, QString>::ConstIterator it; + TQMap<int, TQString>::ConstIterator it; it = map.find(value); if (!(*it)) return; @@ -687,11 +687,11 @@ void ICQProtocol::setComboFromTable(QComboBox *box, const QMap<int, QString> &ma } } -int ICQProtocol::getCodeForCombo(QComboBox *cmb, const QMap<int, QString> &map) +int ICQProtocol::getCodeForCombo(TQComboBox *cmb, const TQMap<int, TQString> &map) { - const QString curText = cmb->currentText(); + const TQString curText = cmb->currentText(); - QMap<int, QString>::ConstIterator it; + TQMap<int, TQString>::ConstIterator it; for(it = map.begin(); it != map.end(); ++it) { if(it.data() == curText) @@ -701,10 +701,10 @@ int ICQProtocol::getCodeForCombo(QComboBox *cmb, const QMap<int, QString> &map) } #if 0 -void ICQProtocol::fillTZCombo(QComboBox *combo) +void ICQProtocol::fillTZCombo(TQComboBox *combo) { - QTime time(12, 0); - QTime done(0, 0); + TQTime time(12, 0); + TQTime done(0, 0); while(time > done) { @@ -713,8 +713,8 @@ void ICQProtocol::fillTZCombo(QComboBox *combo) time = time.addSecs(-30 * 60); } - time = QTime(0, 0); - done = QTime(12, 0); + time = TQTime(0, 0); + done = TQTime(12, 0); while(time <= done) { @@ -724,7 +724,7 @@ void ICQProtocol::fillTZCombo(QComboBox *combo) } } -void ICQProtocol::setTZComboValue(QComboBox *combo, const char &tz) +void ICQProtocol::setTZComboValue(TQComboBox *combo, const char &tz) { kdDebug(14153) << k_funcinfo << "tz=" << int(tz) << endl; if ((tz < -24) || (tz > 24)) @@ -733,7 +733,7 @@ void ICQProtocol::setTZComboValue(QComboBox *combo, const char &tz) combo->setCurrentItem(24 + tz); } -char ICQProtocol::getTZComboValue(QComboBox *combo) +char ICQProtocol::getTZComboValue(TQComboBox *combo) { char ret = combo->currentItem() - 24; // kdDebug(14153) << k_funcinfo << "return value=" << int(ret) << endl; @@ -752,11 +752,11 @@ bool ICQProtocol::canSendOffline() const } Kopete::Contact *ICQProtocol::deserializeContact( Kopete::MetaContact *metaContact, - const QMap<QString, QString> &serializedData, - const QMap<QString, QString> &/*addressBookData*/ ) + const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> &/*addressBookData*/ ) { - QString accountId = serializedData["accountId"]; - QDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(this); + TQString accountId = serializedData["accountId"]; + TQDict<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(this); ICQAccount *account = static_cast<ICQAccount*>(accounts[accountId]); if(!account) @@ -766,16 +766,16 @@ Kopete::Contact *ICQProtocol::deserializeContact( Kopete::MetaContact *metaConta return 0; } - QString contactId=serializedData["contactId"]; + TQString contactId=serializedData["contactId"]; uint ssiGid = 0, ssiBid = 0, ssiType = 0xFFFF; - QString ssiName; + TQString ssiName; bool ssiWaitingAuth = false; if ( serializedData.contains( "ssi_name" ) ) ssiName = serializedData["ssi_name"]; if ( serializedData.contains( "ssi_waitingAuth" ) ) { - QString authStatus = serializedData["ssi_waitingAuth"]; + TQString authStatus = serializedData["ssi_waitingAuth"]; if ( authStatus == "true" ) ssiWaitingAuth = true; } @@ -787,23 +787,23 @@ Kopete::Contact *ICQProtocol::deserializeContact( Kopete::MetaContact *metaConta if ( serializedData.contains( "ssi_type" ) ) ssiType = serializedData["ssi_type"].toUInt(); - Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, QValueList<TLV>(), 0 ); + Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, TQValueList<TLV>(), 0 ); item.setWaitingAuth( ssiWaitingAuth ); - ICQContact *c = new ICQContact( account, contactId, metaContact, QString::null, item ); + ICQContact *c = new ICQContact( account, contactId, metaContact, TQString::null, item ); return c; } -AddContactPage *ICQProtocol::createAddContactWidget(QWidget *parent, Kopete::Account *account) +AddContactPage *ICQProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *account) { return new ICQAddContactPage( static_cast<ICQAccount*>( account ), parent); } -KopeteEditAccountWidget *ICQProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *ICQProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return new ICQEditAccountWidget(this, account, parent); } -Kopete::Account *ICQProtocol::createNewAccount(const QString &accountId) +Kopete::Account *ICQProtocol::createNewAccount(const TQString &accountId) { return new ICQAccount(this, accountId); } diff --git a/kopete/protocols/oscar/icq/icqprotocol.h b/kopete/protocols/oscar/icq/icqprotocol.h index 8e3c1be9..96b2e201 100644 --- a/kopete/protocols/oscar/icq/icqprotocol.h +++ b/kopete/protocols/oscar/icq/icqprotocol.h @@ -31,7 +31,7 @@ class ICQProtocolHandler : public Kopete::MimeTypeHandler { public: ICQProtocolHandler(); - void handleURL(const QString &mimeType, const KURL & url) const; + void handleURL(const TQString &mimeType, const KURL & url) const; }; @@ -40,7 +40,7 @@ class ICQProtocol : public Kopete::Protocol Q_OBJECT public: - ICQProtocol(QObject *parent, const char *name, const QStringList &args); + ICQProtocol(TQObject *parent, const char *name, const TQStringList &args); virtual ~ICQProtocol(); /** @@ -51,11 +51,11 @@ public: virtual bool canSendOffline() const; virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap<QString, QString> &serializedData, - const QMap<QString, QString> &addressBookData ); - AddContactPage *createAddContactWidget(QWidget *parent, Kopete::Account *account); - KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent); - Kopete::Account *createNewAccount(const QString &accountId); + const TQMap<TQString, TQString> &serializedData, + const TQMap<TQString, TQString> &addressBookData ); + AddContactPage *createAddContactWidget(TQWidget *parent, Kopete::Account *account); + KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, TQWidget *parent); + Kopete::Account *createNewAccount(const TQString &accountId); ICQ::OnlineStatusManager *statusManager(); @@ -69,19 +69,19 @@ public: const Kopete::ContactPropertyTmpl buddyIconHash; const Kopete::ContactPropertyTmpl contactEncoding; - const QMap<int, QString> &genders() { return mGenders; } - const QMap<int, QString> &countries() { return mCountries; } - const QMap<int, QString> &languages() { return mLanguages; } - const QMap<int, QString> &encodings() { return mEncodings; } - const QMap<int, QString> &maritals() { return mMarital; } - const QMap<int, QString> &interests() { return mInterests; } + const TQMap<int, TQString> &genders() { return mGenders; } + const TQMap<int, TQString> &countries() { return mCountries; } + const TQMap<int, TQString> &languages() { return mLanguages; } + const TQMap<int, TQString> &encodings() { return mEncodings; } + const TQMap<int, TQString> &maritals() { return mMarital; } + const TQMap<int, TQString> &interests() { return mInterests; } - void fillComboFromTable( QComboBox*, const QMap<int, QString>& ); - void setComboFromTable( QComboBox*, const QMap<int, QString>&, int ); - int getCodeForCombo( QComboBox*, const QMap<int, QString>& ); - /* void fillTZCombo(QComboBox *combo); - void setTZComboValue(QComboBox *combo, const char &tz); - char getTZComboValue(QComboBox *combo); */ + void fillComboFromTable( TQComboBox*, const TQMap<int, TQString>& ); + void setComboFromTable( TQComboBox*, const TQMap<int, TQString>&, int ); + int getCodeForCombo( TQComboBox*, const TQMap<int, TQString>& ); + /* void fillTZCombo(TQComboBox *combo); + void setTZComboValue(TQComboBox *combo, const char &tz); + char getTZComboValue(TQComboBox *combo); */ private: void initGenders(); @@ -94,12 +94,12 @@ private: private: static ICQProtocol* protocolStatic_; ICQ::OnlineStatusManager* statusManager_; - QMap<int, QString> mGenders; - QMap<int, QString> mCountries; - QMap<int, QString> mLanguages; - QMap<int, QString> mEncodings; - QMap<int, QString> mMarital; - QMap<int, QString> mInterests; + TQMap<int, TQString> mGenders; + TQMap<int, TQString> mCountries; + TQMap<int, TQString> mLanguages; + TQMap<int, TQString> mEncodings; + TQMap<int, TQString> mMarital; + TQMap<int, TQString> mInterests; ICQProtocolHandler protohandler; }; #endif diff --git a/kopete/protocols/oscar/icq/icqreadaway.cpp b/kopete/protocols/oscar/icq/icqreadaway.cpp index 94cccafd..28b86d33 100644 --- a/kopete/protocols/oscar/icq/icqreadaway.cpp +++ b/kopete/protocols/oscar/icq/icqreadaway.cpp @@ -20,7 +20,7 @@ #include "icqaccount.h" #include "icqcontact.h" -#include <qvbox.h> +#include <tqvbox.h> #include <ktextbrowser.h> #include <klocale.h> @@ -29,8 +29,8 @@ #include <assert.h> -ICQReadAway::ICQReadAway(ICQContact *c, QWidget *parent, const char* name) - : KDialogBase(parent, name, false, QString::null, Close | User1, +ICQReadAway::ICQReadAway(ICQContact *c, TQWidget *parent, const char* name) + : KDialogBase(parent, name, false, TQString::null, Close | User1, Close, false, i18n("&Fetch Again")) { assert(c); @@ -39,27 +39,27 @@ ICQReadAway::ICQReadAway(ICQContact *c, QWidget *parent, const char* name) mContact = c; setCaption(i18n("'%2' Message for %1").arg(c->displayName()).arg(c->onlineStatus().description())); - QVBox *mMainWidget = makeVBoxMainWidget(); + TQVBox *mMainWidget = makeVBoxMainWidget(); awayMessageBrowser = new KTextBrowser(mMainWidget, "userInfoView"); awayMessageBrowser->setTextFormat(AutoText); awayMessageBrowser->setNotifyClick(true); awayMessageBrowser->setText(mContact->awayMessage()); - QObject::connect( - awayMessageBrowser, SIGNAL(urlClick(const QString&)), - this, SLOT(slotUrlClicked(const QString&))); - QObject::connect( - awayMessageBrowser, SIGNAL(mailClick(const QString&, const QString&)), - this, SLOT(slotMailClicked(const QString&, const QString&))); + TQObject::connect( + awayMessageBrowser, TQT_SIGNAL(urlClick(const TQString&)), + this, TQT_SLOT(slotUrlClicked(const TQString&))); + TQObject::connect( + awayMessageBrowser, TQT_SIGNAL(mailClick(const TQString&, const TQString&)), + this, TQT_SLOT(slotMailClicked(const TQString&, const TQString&))); - connect(this, SIGNAL(user1Clicked()), - this, SLOT(slotFetchAwayMessage())); - connect(this, SIGNAL(closeClicked()), - this, SLOT(slotCloseClicked())); + connect(this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(slotFetchAwayMessage())); + connect(this, TQT_SIGNAL(closeClicked()), + this, TQT_SLOT(slotCloseClicked())); - connect(c, SIGNAL(awayMessageChanged()), - this, SLOT(slotAwayMessageChanged())); + connect(c, TQT_SIGNAL(awayMessageChanged()), + this, TQT_SLOT(slotAwayMessageChanged())); slotFetchAwayMessage(); } @@ -92,12 +92,12 @@ void ICQReadAway::slotCloseClicked() emit closing(); } -void ICQReadAway::slotUrlClicked(const QString &url) +void ICQReadAway::slotUrlClicked(const TQString &url) { new KRun(KURL(url)); } -void ICQReadAway::slotMailClicked(const QString&, const QString &address) +void ICQReadAway::slotMailClicked(const TQString&, const TQString &address) { new KRun(KURL(address)); } diff --git a/kopete/protocols/oscar/icq/icqreadaway.h b/kopete/protocols/oscar/icq/icqreadaway.h index 7e62588e..81981257 100644 --- a/kopete/protocols/oscar/icq/icqreadaway.h +++ b/kopete/protocols/oscar/icq/icqreadaway.h @@ -30,14 +30,14 @@ class ICQReadAway : public KDialogBase Q_OBJECT public: - ICQReadAway(ICQContact *, QWidget *parent = 0, const char* name = "ICQReadAway"); + ICQReadAway(ICQContact *, TQWidget *parent = 0, const char* name = "ICQReadAway"); private slots: void slotFetchAwayMessage(); void slotAwayMessageChanged(); void slotCloseClicked(); - void slotUrlClicked(const QString &url); - void slotMailClicked(const QString&, const QString &address); + void slotUrlClicked(const TQString &url); + void slotMailClicked(const TQString&, const TQString &address); signals: void closing(); @@ -45,7 +45,7 @@ class ICQReadAway : public KDialogBase private: ICQAccount *mAccount; ICQContact *mContact; - QVBox *mMainWidget; + TQVBox *mMainWidget; KTextBrowser *awayMessageBrowser; }; #endif diff --git a/kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp b/kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp index b1ab2eb4..3461ed8f 100644 --- a/kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp +++ b/kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp @@ -18,13 +18,13 @@ #include <ctype.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qtabwidget.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqtabwidget.h> +#include <tqlabel.h> #include <kdebug.h> #include <kiconloader.h> @@ -39,28 +39,28 @@ #include "icqsearchdialog.h" -ICQAddContactPage::ICQAddContactPage(ICQAccount *owner, QWidget *parent, const char *name) +ICQAddContactPage::ICQAddContactPage(ICQAccount *owner, TQWidget *parent, const char *name) : AddContactPage(parent,name) { kdDebug(14153) << k_funcinfo << "called" << endl; mAccount = owner; m_searchDialog = 0L; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); addUI = new icqAddUI(this); - connect( addUI->searchButton, SIGNAL( clicked() ), this, SLOT( showSearchDialog() ) ); + connect( addUI->searchButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( showSearchDialog() ) ); } ICQAddContactPage::~ICQAddContactPage() { } -void ICQAddContactPage::setUINFromSearch( const QString& uin ) +void ICQAddContactPage::setUINFromSearch( const TQString& uin ) { addUI->uinEdit->setText( uin ); } -void ICQAddContactPage::showEvent(QShowEvent *e) +void ICQAddContactPage::showEvent(TQShowEvent *e) { // slotSelectionChanged(); AddContactPage::showEvent(e); @@ -70,7 +70,7 @@ bool ICQAddContactPage::apply(Kopete::Account* , Kopete::MetaContact *parentCont { kdDebug(14153) << k_funcinfo << "called; adding contact..." << endl; - QString contactId = addUI->uinEdit->text(); + TQString contactId = addUI->uinEdit->text(); kdDebug(14153) << k_funcinfo << "uin=" << contactId << endl; return mAccount->addContact(contactId, parentContact, Kopete::Account::ChangeKABC ); @@ -109,13 +109,13 @@ void ICQAddContactPage::showSearchDialog() { m_searchDialog = new ICQSearchDialog( mAccount, this, "icqSearchDialog" ); m_searchDialog->show(); - connect( m_searchDialog, SIGNAL( finished() ), this, SLOT( searchDialogDestroyed() ) ); + connect( m_searchDialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( searchDialogDestroyed() ) ); } } void ICQAddContactPage::searchDialogDestroyed() { - QObject::disconnect( this, 0, m_searchDialog, 0 ); + TQObject::disconnect( this, 0, m_searchDialog, 0 ); m_searchDialog->delayedDestruct(); m_searchDialog = NULL; } diff --git a/kopete/protocols/oscar/icq/ui/icqaddcontactpage.h b/kopete/protocols/oscar/icq/ui/icqaddcontactpage.h index e9285b79..c6c22eb2 100644 --- a/kopete/protocols/oscar/icq/ui/icqaddcontactpage.h +++ b/kopete/protocols/oscar/icq/ui/icqaddcontactpage.h @@ -18,7 +18,7 @@ #ifndef ICQADDCONTACTPAGE_H #define ICQADDCONTACTPAGE_H -#include <qwidget.h> +#include <tqwidget.h> #include <addcontactpage.h> /** @@ -34,16 +34,16 @@ class ICQAddContactPage : public AddContactPage Q_OBJECT public: - ICQAddContactPage(ICQAccount *owner, QWidget *parent = 0, const char *name = 0); + ICQAddContactPage(ICQAccount *owner, TQWidget *parent = 0, const char *name = 0); ~ICQAddContactPage(); virtual bool validateData(); virtual bool apply(Kopete::Account* , Kopete::MetaContact *parentContact); - void setUINFromSearch( const QString& ); + void setUINFromSearch( const TQString& ); protected: - void showEvent(QShowEvent *e); + void showEvent(TQShowEvent *e); private slots: void showSearchDialog(); diff --git a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp index 76b56fba..a92b33de 100644 --- a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp +++ b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp @@ -20,11 +20,11 @@ #include <klocale.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qlineedit.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqlineedit.h> -ICQAuthReplyDialog::ICQAuthReplyDialog( QWidget *parent, const char *name, bool wasRequested ) +ICQAuthReplyDialog::ICQAuthReplyDialog( TQWidget *parent, const char *name, bool wasRequested ) : KDialogBase( parent, name, true, i18n( "Authorization Reply" ), KDialogBase::Ok | KDialogBase::Cancel ) { m_ui = new ICQAuthReplyUI( this ); @@ -46,7 +46,7 @@ ICQAuthReplyDialog::~ICQAuthReplyDialog() { } -void ICQAuthReplyDialog::setUser( const QString & user ) +void ICQAuthReplyDialog::setUser( const TQString & user ) { if ( m_wasRequested ) m_ui->lblUserReq->setText( @@ -55,12 +55,12 @@ void ICQAuthReplyDialog::setUser( const QString & user ) m_ui->lblUserReq->setText( i18n( "Authorization reply to <b>%1</b>." ).arg( user ) ); } -void ICQAuthReplyDialog::setRequestReason( const QString & reason ) +void ICQAuthReplyDialog::setRequestReason( const TQString & reason ) { m_ui->lblRequestReason->setText( reason ); } -QString ICQAuthReplyDialog::reason() +TQString ICQAuthReplyDialog::reason() { return m_ui->leReason->text(); } diff --git a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.h b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.h index da27b241..f32d4569 100644 --- a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.h +++ b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.h @@ -30,12 +30,12 @@ class ICQAuthReplyDialog : public KDialogBase { Q_OBJECT public: - ICQAuthReplyDialog(QWidget *parent = 0, const char *name = 0, bool wasRequested = true); + ICQAuthReplyDialog(TQWidget *parent = 0, const char *name = 0, bool wasRequested = true); ~ICQAuthReplyDialog(); - void setUser( const QString& user ); - void setRequestReason( const QString& reason ); - QString reason(); + void setUser( const TQString& user ); + void setRequestReason( const TQString& reason ); + TQString reason(); bool grantAuth(); private: bool m_wasRequested; diff --git a/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp b/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp index e4b308be..04a312a4 100644 --- a/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp +++ b/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp @@ -17,13 +17,13 @@ #include "icqeditaccountwidget.h" #include "icqeditaccountui.h" -#include <qlayout.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlineedit.h> -#include <qtextedit.h> -#include <qspinbox.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlineedit.h> +#include <tqtextedit.h> +#include <tqspinbox.h> +#include <tqpushbutton.h> #include <kconfig.h> #include <kdebug.h> @@ -44,15 +44,15 @@ #include "icqcontact.h" ICQEditAccountWidget::ICQEditAccountWidget(ICQProtocol *protocol, - Kopete::Account *account, QWidget *parent, const char *name) - : QWidget(parent, name), KopeteEditAccountWidget(account) + Kopete::Account *account, TQWidget *parent, const char *name) + : TQWidget(parent, name), KopeteEditAccountWidget(account) { kdDebug(14153) << k_funcinfo << "Called." << endl; mAccount=dynamic_cast<ICQAccount*>(account); mProtocol=protocol; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); mAccountSettings = new ICQEditAccountUI( this ); mProtocol->fillComboFromTable( mAccountSettings->encodingCombo, mProtocol->encodings() ); @@ -67,7 +67,7 @@ ICQEditAccountWidget::ICQEditAccountWidget(ICQProtocol *protocol, mAccountSettings->mPasswordWidget->load(&mAccount->password()); mAccountSettings->chkAutoLogin->setChecked(mAccount->excludeConnect()); - QString serverEntry = mAccount->configGroup()->readEntry("Server", "login.oscar.aol.com"); + TQString serverEntry = mAccount->configGroup()->readEntry("Server", "login.oscar.aol.com"); int portEntry = mAccount->configGroup()->readNumEntry("Port", 5190); if ( serverEntry != "login.oscar.aol.com" || ( portEntry != 5190) ) mAccountSettings->optionOverrideServer->setChecked( true ); @@ -99,12 +99,12 @@ ICQEditAccountWidget::ICQEditAccountWidget(ICQProtocol *protocol, 4 ); } - QObject::connect(mAccountSettings->buttonRegister, SIGNAL(clicked()), this, SLOT(slotOpenRegister())); + TQObject::connect(mAccountSettings->buttonRegister, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpenRegister())); /* Set tab order to password custom widget correctly */ - QWidget::setTabOrder( mAccountSettings->edtAccountId, mAccountSettings->mPasswordWidget->mRemembered ); - QWidget::setTabOrder( mAccountSettings->mPasswordWidget->mRemembered, mAccountSettings->mPasswordWidget->mPassword ); - QWidget::setTabOrder( mAccountSettings->mPasswordWidget->mPassword, mAccountSettings->chkAutoLogin ); + TQWidget::setTabOrder( mAccountSettings->edtAccountId, mAccountSettings->mPasswordWidget->mRemembered ); + TQWidget::setTabOrder( mAccountSettings->mPasswordWidget->mRemembered, mAccountSettings->mPasswordWidget->mPassword ); + TQWidget::setTabOrder( mAccountSettings->mPasswordWidget->mPassword, mAccountSettings->chkAutoLogin ); } @@ -158,7 +158,7 @@ bool ICQEditAccountWidget::validateData() { kdDebug(14153) << k_funcinfo << "Called." << endl; - QString userName = mAccountSettings->edtAccountId->text(); + TQString userName = mAccountSettings->edtAccountId->text(); if (userName.isEmpty()) return false; diff --git a/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h b/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h index fc5c6d38..4bc1a52b 100644 --- a/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h +++ b/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h @@ -18,8 +18,8 @@ #ifndef ICQEDITACCOUNTWIDGET_H #define ICQEDITACCOUNTWIDGET_H -#include <qwidget.h> -#include <qdatetime.h> +#include <tqwidget.h> +#include <tqdatetime.h> #include "editaccountwidget.h" namespace Kopete { class Account; } @@ -28,13 +28,13 @@ class ICQAccount; class ICQProtocol; class ICQEditAccountUI; -class ICQEditAccountWidget : public QWidget, public KopeteEditAccountWidget +class ICQEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT public: ICQEditAccountWidget(ICQProtocol *, Kopete::Account *, - QWidget *parent=0, const char *name=0); + TQWidget *parent=0, const char *name=0); virtual bool validateData(); virtual Kopete::Account *apply(); diff --git a/kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp b/kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp index 0010166a..e52e707f 100644 --- a/kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp +++ b/kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp @@ -18,12 +18,12 @@ #include "icqsearchdialog.h" -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlayout.h> -#include <qtextcodec.h> -#include <qtabwidget.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlayout.h> +#include <tqtextcodec.h> +#include <tqtabwidget.h> #include <kdebug.h> #include <kiconloader.h> #include <klistview.h> @@ -41,20 +41,20 @@ #include "icqcontact.h" #include "icquserinfowidget.h" -ICQSearchDialog::ICQSearchDialog( ICQAccount* account, QWidget* parent, const char* name ) +ICQSearchDialog::ICQSearchDialog( ICQAccount* account, TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "ICQ User Search" ), 0, NoDefault ) { m_account = account; m_searchUI = new ICQSearchBase( this, name ); setMainWidget( m_searchUI ); - connect( m_searchUI->searchButton, SIGNAL( clicked() ), this, SLOT( startSearch() ) ); - connect( m_searchUI->searchResults, SIGNAL( selectionChanged() ), this, SLOT( resultSelectionChanged() ) ); - connect( m_searchUI->addButton, SIGNAL( clicked() ), this, SLOT( addContact() ) ); - connect( m_searchUI->clearButton, SIGNAL( clicked() ), this, SLOT( clearResults() ) ); - connect( m_searchUI->stopButton, SIGNAL( clicked() ), this, SLOT( stopSearch() ) ); - connect( m_searchUI->closeButton, SIGNAL( clicked() ), this, SLOT( closeDialog() ) ); - connect( m_searchUI->userInfoButton, SIGNAL( clicked() ), this, SLOT( userInfo() ) ); - connect( m_searchUI->newSearchButton, SIGNAL( clicked() ), this, SLOT( newSearch() ) ); + connect( m_searchUI->searchButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( startSearch() ) ); + connect( m_searchUI->searchResults, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( resultSelectionChanged() ) ); + connect( m_searchUI->addButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addContact() ) ); + connect( m_searchUI->clearButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clearResults() ) ); + connect( m_searchUI->stopButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( stopSearch() ) ); + connect( m_searchUI->closeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeDialog() ) ); + connect( m_searchUI->userInfoButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( userInfo() ) ); + connect( m_searchUI->newSearchButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( newSearch() ) ); ICQProtocol *p = ICQProtocol::protocol(); p->fillComboFromTable( m_searchUI->gender, p->genders() ); @@ -91,12 +91,12 @@ void ICQSearchDialog::startSearch() m_searchUI->searchButton->setEnabled( false ); m_searchUI->newSearchButton->setEnabled( false ); - connect( m_account->engine(), SIGNAL( gotSearchResults( const ICQSearchResult& ) ), - this, SLOT( newResult( const ICQSearchResult& ) ) ); - connect( m_account->engine(), SIGNAL( endOfSearch( int ) ), - this, SLOT( searchFinished( int ) ) ); + connect( m_account->engine(), TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ), + this, TQT_SLOT( newResult( const ICQSearchResult& ) ) ); + connect( m_account->engine(), TQT_SIGNAL( endOfSearch( int ) ), + this, TQT_SLOT( searchFinished( int ) ) ); - const QWidget* currentPage = m_searchUI->tabWidget3->currentPage(); + const TQWidget* currentPage = m_searchUI->tabWidget3->currentPage(); if ( currentPage == m_searchUI->tab ) { @@ -119,7 +119,7 @@ void ICQSearchDialog::startSearch() //create a ICQWPSearchInfo struct and send it ICQProtocol* p = ICQProtocol::protocol(); ICQWPSearchInfo info; - QTextCodec* codec = m_account->defaultCodec(); + TQTextCodec* codec = m_account->defaultCodec(); info.firstName = codec->fromUnicode( m_searchUI->firstName->text() ); info.lastName = codec->fromUnicode( m_searchUI->lastName->text() ); info.nickName = codec->fromUnicode( m_searchUI->nickName->text() ); @@ -159,10 +159,10 @@ void ICQSearchDialog::startSearch() void ICQSearchDialog::stopSearch() { - disconnect( m_account->engine(), SIGNAL( gotSearchResults( const ICQSearchResult& ) ), - this, SLOT( newResult( const ICQSearchResult& ) ) ); - disconnect( m_account->engine(), SIGNAL( endOfSearch( int ) ), - this, SLOT( searchFinished( int ) ) ); + disconnect( m_account->engine(), TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ), + this, TQT_SLOT( newResult( const ICQSearchResult& ) ) ); + disconnect( m_account->engine(), TQT_SIGNAL( endOfSearch( int ) ), + this, TQT_SLOT( searchFinished( int ) ) ); m_searchUI->stopButton->setEnabled( false ); m_searchUI->searchButton->setEnabled( true ); @@ -178,7 +178,7 @@ void ICQSearchDialog::addContact() } else { - QString uin = m_searchUI->searchResults->selectedItem()->text( 0 ); + TQString uin = m_searchUI->searchResults->selectedItem()->text( 0 ); kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "Passing " << uin << " back to the ACP" << endl; iacp->setUINFromSearch( uin ); @@ -203,7 +203,7 @@ void ICQSearchDialog::userInfo() NULL); m_infoWidget = new ICQUserInfoWidget( Kopete::UI::Global::mainWidget(), "icq info" ); - QObject::connect( m_infoWidget, SIGNAL( finished() ), this, SLOT( closeUserInfo() ) ); + TQObject::connect( m_infoWidget, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeUserInfo() ) ); m_infoWidget->setContact( m_contact ); m_infoWidget->setModal(true); @@ -217,7 +217,7 @@ void ICQSearchDialog::userInfo() void ICQSearchDialog::closeUserInfo() { // Free the ICQUserInfoWidget - QObject::disconnect( this, 0, m_infoWidget, 0 ); + TQObject::disconnect( this, 0, m_infoWidget, 0 ); m_infoWidget->delayedDestruct(); m_infoWidget = NULL; @@ -266,9 +266,9 @@ void ICQSearchDialog::newResult( const ICQSearchResult& info ) return; } - QTextCodec* codec = m_account->defaultCodec(); + TQTextCodec* codec = m_account->defaultCodec(); - QListViewItem *item = new QListViewItem( m_searchUI->searchResults, QString::number( info.uin ), + TQListViewItem *item = new TQListViewItem( m_searchUI->searchResults, TQString::number( info.uin ), codec->toUnicode( info.nickName ), codec->toUnicode( info.firstName ), codec->toUnicode( info.lastName ), @@ -296,13 +296,13 @@ void ICQSearchDialog::searchFinished( int numLeft ) void ICQSearchDialog::clearFields() { - m_searchUI->uin->setText( QString::null ); + m_searchUI->uin->setText( TQString::null ); - m_searchUI->firstName->setText( QString::null ); - m_searchUI->lastName->setText( QString::null ); - m_searchUI->nickName->setText( QString::null ); - m_searchUI->email->setText( QString::null ); - m_searchUI->city->setText( QString::null ); + m_searchUI->firstName->setText( TQString::null ); + m_searchUI->lastName->setText( TQString::null ); + m_searchUI->nickName->setText( TQString::null ); + m_searchUI->email->setText( TQString::null ); + m_searchUI->city->setText( TQString::null ); m_searchUI->gender->setCurrentItem( 0 ); // Unspecified m_searchUI->country->setCurrentItem( 0 ); m_searchUI->language->setCurrentItem( 0 ); diff --git a/kopete/protocols/oscar/icq/ui/icqsearchdialog.h b/kopete/protocols/oscar/icq/ui/icqsearchdialog.h index b14aa2a1..aca61ee7 100644 --- a/kopete/protocols/oscar/icq/ui/icqsearchdialog.h +++ b/kopete/protocols/oscar/icq/ui/icqsearchdialog.h @@ -33,7 +33,7 @@ class ICQSearchDialog : public KDialogBase { Q_OBJECT public: - ICQSearchDialog( ICQAccount* account, QWidget* parent = 0, const char* name = 0 ); + ICQSearchDialog( ICQAccount* account, TQWidget* parent = 0, const char* name = 0 ); ~ICQSearchDialog(); private slots: diff --git a/kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp b/kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp index 3830e05f..44fd5afd 100644 --- a/kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp +++ b/kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp @@ -18,12 +18,12 @@ #include "icquserinfowidget.h" -#include <qlayout.h> -#include <qlineedit.h> -#include <qspinbox.h> -#include <qcombobox.h> -#include <qobject.h> -#include <qtextcodec.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqspinbox.h> +#include <tqcombobox.h> +#include <tqobject.h> +#include <tqtextcodec.h> #include <kdatewidget.h> #include <kdebug.h> @@ -40,36 +40,36 @@ #include "icqinterestinfowidget.h" -ICQUserInfoWidget::ICQUserInfoWidget( QWidget * parent, const char * name ) +ICQUserInfoWidget::ICQUserInfoWidget( TQWidget * parent, const char * name ) : KDialogBase( KDialogBase::IconList, 0, parent, name, false, i18n( "ICQ User Information" ), Ok ) { kdDebug(14153) << k_funcinfo << "Creating new icq user info widget" << endl; - QFrame* genInfo = addPage( i18n( "General Info" ), + TQFrame* genInfo = addPage( i18n( "General Info" ), i18n( "General ICQ Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "identity" ), KIcon::Desktop ) ); - QVBoxLayout* genLayout = new QVBoxLayout( genInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "identity" ), KIcon::Desktop ) ); + TQVBoxLayout* genLayout = new TQVBoxLayout( genInfo ); m_genInfoWidget = new ICQGeneralInfoWidget( genInfo, "Basic Information" ); genLayout->addWidget( m_genInfoWidget ); - QFrame* workInfo = addPage( i18n( "Work Info" ), + TQFrame* workInfo = addPage( i18n( "Work Info" ), i18n( "Work Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "attach" ), KIcon::Desktop ) ); - QVBoxLayout* workLayout = new QVBoxLayout( workInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "attach" ), KIcon::Desktop ) ); + TQVBoxLayout* workLayout = new TQVBoxLayout( workInfo ); m_workInfoWidget = new ICQWorkInfoWidget( workInfo, "Work Information" ); workLayout->addWidget( m_workInfoWidget ); - QFrame* otherInfo = addPage( i18n( "Other Info" ), + TQFrame* otherInfo = addPage( i18n( "Other Info" ), i18n( "Other ICQ Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "email" ), KIcon::Desktop ) ); - QVBoxLayout* otherLayout = new QVBoxLayout( otherInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "email" ), KIcon::Desktop ) ); + TQVBoxLayout* otherLayout = new TQVBoxLayout( otherInfo ); m_otherInfoWidget = new ICQOtherInfoWidget( otherInfo, "Other Information" ); otherLayout->addWidget( m_otherInfoWidget ); - QFrame* interestInfo = addPage( i18n( "Interest Info" ), + TQFrame* interestInfo = addPage( i18n( "Interest Info" ), i18n( "Interest" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "email" ), KIcon::Desktop ) ); - QVBoxLayout* interestLayout = new QVBoxLayout( interestInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "email" ), KIcon::Desktop ) ); + TQVBoxLayout* interestLayout = new TQVBoxLayout( interestInfo ); m_interestInfoWidget = new ICQInterestInfoWidget( interestInfo, "Other Information" ); interestLayout->addWidget( m_interestInfoWidget ); @@ -78,21 +78,21 @@ ICQUserInfoWidget::ICQUserInfoWidget( QWidget * parent, const char * name ) void ICQUserInfoWidget::setContact( ICQContact* contact ) { m_contact = contact; - QObject::connect( contact, SIGNAL( haveBasicInfo( const ICQGeneralUserInfo& ) ), - this, SLOT( fillBasicInfo( const ICQGeneralUserInfo& ) ) ); - QObject::connect( contact, SIGNAL( haveWorkInfo( const ICQWorkUserInfo& ) ), - this, SLOT( fillWorkInfo( const ICQWorkUserInfo& ) ) ); - QObject::connect( contact, SIGNAL( haveEmailInfo( const ICQEmailInfo& ) ), - this, SLOT( fillEmailInfo( const ICQEmailInfo& ) ) ); - QObject::connect( contact, SIGNAL( haveMoreInfo( const ICQMoreUserInfo& ) ), - this, SLOT( fillMoreInfo( const ICQMoreUserInfo& ) ) ); - QObject::connect( contact, SIGNAL( haveInterestInfo( const ICQInterestInfo& ) ), - this, SLOT( fillInterestInfo( const ICQInterestInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveBasicInfo( const ICQGeneralUserInfo& ) ), + this, TQT_SLOT( fillBasicInfo( const ICQGeneralUserInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveWorkInfo( const ICQWorkUserInfo& ) ), + this, TQT_SLOT( fillWorkInfo( const ICQWorkUserInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveEmailInfo( const ICQEmailInfo& ) ), + this, TQT_SLOT( fillEmailInfo( const ICQEmailInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveMoreInfo( const ICQMoreUserInfo& ) ), + this, TQT_SLOT( fillMoreInfo( const ICQMoreUserInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveInterestInfo( const ICQInterestInfo& ) ), + this, TQT_SLOT( fillInterestInfo( const ICQInterestInfo& ) ) ); } void ICQUserInfoWidget::fillBasicInfo( const ICQGeneralUserInfo& ui ) { - QTextCodec* codec = m_contact->contactCodec(); + TQTextCodec* codec = m_contact->contactCodec(); m_genInfoWidget->uinEdit->setText( m_contact->contactId() ); m_genInfoWidget->nickNameEdit->setText( codec->toUnicode( ui.nickname ) ); m_genInfoWidget->fullNameEdit->setText( codec->toUnicode( ui.firstName ) + " " + codec->toUnicode( ui.lastName ) ); @@ -106,13 +106,13 @@ void ICQUserInfoWidget::fillBasicInfo( const ICQGeneralUserInfo& ui ) m_genInfoWidget->cellEdit->setText( codec->toUnicode( ui.cellNumber ) ); m_genInfoWidget->zipEdit->setText( codec->toUnicode( ui.zip ) ); - QString country = static_cast<ICQProtocol*>( m_contact->protocol() )->countries()[ui.country]; + TQString country = static_cast<ICQProtocol*>( m_contact->protocol() )->countries()[ui.country]; m_genInfoWidget->countryEdit->setText( country ); } void ICQUserInfoWidget::fillWorkInfo( const ICQWorkUserInfo& ui ) { - QTextCodec* codec = m_contact->contactCodec(); + TQTextCodec* codec = m_contact->contactCodec(); m_workInfoWidget->cityEdit->setText( codec->toUnicode( ui.city ) ); m_workInfoWidget->stateEdit->setText( codec->toUnicode( ui.state ) ); m_workInfoWidget->phoneEdit->setText( codec->toUnicode( ui.phone ) ); @@ -125,7 +125,7 @@ void ICQUserInfoWidget::fillWorkInfo( const ICQWorkUserInfo& ui ) m_workInfoWidget->homepageEdit->setText( codec->toUnicode( ui.homepage ) ); ICQProtocol* p = static_cast<ICQProtocol*>( m_contact->protocol() ); - QString country = p->countries()[ui.country]; + TQString country = p->countries()[ui.country]; m_workInfoWidget->countryEdit->setText( country ); //TODO handle the occupation @@ -137,24 +137,24 @@ void ICQUserInfoWidget::fillEmailInfo( const ICQEmailInfo& ) void ICQUserInfoWidget::fillInterestInfo( const ICQInterestInfo& info) { - QTextCodec* codec = m_contact->contactCodec(); + TQTextCodec* codec = m_contact->contactCodec(); if (info.count>0) { - QString topic = static_cast<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[0]]; + TQString topic = static_cast<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[0]]; m_interestInfoWidget->topic1->setText( topic ); m_interestInfoWidget->desc1->setText( codec->toUnicode( info.descriptions[0] ) ); } if (info.count>1) { - QString topic = static_cast<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[1]]; + TQString topic = static_cast<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[1]]; m_interestInfoWidget->topic2->setText( topic ); m_interestInfoWidget->desc2->setText( codec->toUnicode( info.descriptions[1] ) ); } if (info.count>2) { - QString topic = static_cast<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[2]]; + TQString topic = static_cast<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[2]]; m_interestInfoWidget->topic3->setText( topic ); m_interestInfoWidget->desc3->setText( codec->toUnicode( info.descriptions[2] ) ); } if (info.count>3) { - QString topic = static_cast<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[3]]; + TQString topic = static_cast<ICQProtocol*>( m_contact->protocol() )->interests()[info.topics[3]]; m_interestInfoWidget->topic4->setText( topic ); m_interestInfoWidget->desc4->setText( codec->toUnicode( info.descriptions[3] ) ); } @@ -162,22 +162,22 @@ void ICQUserInfoWidget::fillInterestInfo( const ICQInterestInfo& info) void ICQUserInfoWidget::fillMoreInfo( const ICQMoreUserInfo& ui ) { - QTextCodec* codec = m_contact->contactCodec(); + TQTextCodec* codec = m_contact->contactCodec(); m_genInfoWidget->ageSpinBox->setValue( ui.age ); if ( ui.birthday.isValid() ) m_genInfoWidget->birthday->setText( KGlobal::locale()->formatDate( ui.birthday,true ) ); - QString gender = static_cast<ICQProtocol*>( m_contact->protocol() )->genders()[ui.gender]; + TQString gender = static_cast<ICQProtocol*>( m_contact->protocol() )->genders()[ui.gender]; m_genInfoWidget->genderEdit->setText( gender ); m_genInfoWidget->homepageEdit->setText( codec->toUnicode( ui.homepage ) ); - QString ms = static_cast<ICQProtocol*>( m_contact->protocol() )->maritals()[ui.marital]; + TQString ms = static_cast<ICQProtocol*>( m_contact->protocol() )->maritals()[ui.marital]; m_genInfoWidget->marital->setText( ms ); m_genInfoWidget->oCityEdit->setText( codec->toUnicode( ui.ocity) ); m_genInfoWidget->oStateEdit->setText( codec->toUnicode( ui.ostate) ); - QString ocountry = static_cast<ICQProtocol*>( m_contact->protocol() )->countries()[ui.ocountry]; + TQString ocountry = static_cast<ICQProtocol*>( m_contact->protocol() )->countries()[ui.ocountry]; m_genInfoWidget->oCountryEdit->setText( ocountry ); //TODO languages diff --git a/kopete/protocols/oscar/icq/ui/icquserinfowidget.h b/kopete/protocols/oscar/icq/ui/icquserinfowidget.h index ef478e59..ac4048ab 100644 --- a/kopete/protocols/oscar/icq/ui/icquserinfowidget.h +++ b/kopete/protocols/oscar/icq/ui/icquserinfowidget.h @@ -33,7 +33,7 @@ class ICQUserInfoWidget : public KDialogBase { Q_OBJECT public: - ICQUserInfoWidget( QWidget* parent = 0, const char* name = 0 ); + ICQUserInfoWidget( TQWidget* parent = 0, const char* name = 0 ); void setContact( ICQContact* contact ); public slots: diff --git a/kopete/protocols/oscar/liboscar/aimlogintask.cpp b/kopete/protocols/oscar/liboscar/aimlogintask.cpp index 69a9c770..da066333 100644 --- a/kopete/protocols/oscar/liboscar/aimlogintask.cpp +++ b/kopete/protocols/oscar/liboscar/aimlogintask.cpp @@ -43,7 +43,7 @@ void AimLoginTask::onGo() //send Snac 17,06 sendAuthStringRequest(); //when we have the authKey, login - connect( this, SIGNAL( haveAuthKey() ), this, SLOT( sendLoginRequest() ) ); + connect( this, TQT_SIGNAL( haveAuthKey() ), this, TQT_SLOT( sendLoginRequest() ) ); } bool AimLoginTask::forMe( Transfer* transfer ) const @@ -72,17 +72,17 @@ bool AimLoginTask::forMe( Transfer* transfer ) const return false; } -const QByteArray& AimLoginTask::cookie() const +const TQByteArray& AimLoginTask::cookie() const { return m_cookie; } -const QString& AimLoginTask::bosHost() const +const TQString& AimLoginTask::bosHost() const { return m_bosHost; } -const QString& AimLoginTask::bosPort() const +const TQString& AimLoginTask::bosPort() const { return m_bosPort; } @@ -158,7 +158,7 @@ void AimLoginTask::sendLoginRequest() outbuf->addTLV(0x0001, client()->userId().length(), client()->userId().latin1()); - QByteArray digest( 17 ); //apparently MD5 digests are 16 bytes long + TQByteArray digest( 17 ); //apparently MD5 digests are 16 bytes long encodePassword( digest ); digest[16] = '\0'; //do this so that addTLV sees a NULL-terminator @@ -189,16 +189,16 @@ void AimLoginTask::handleLoginResponse() if ( !st ) { - setError( -1 , QString::null ); + setError( -1 , TQString::null ); return; } - QValueList<TLV> tlvList = st->buffer()->getTLVList(); + TQValueList<TLV> tlvList = st->buffer()->getTLVList(); TLV uin = findTLV( tlvList, 0x0001 ); if ( uin ) { - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(1) [SN], SN=" << QString( uin.data ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(1) [SN], SN=" << TQString( uin.data ) << endl; } TLV err = findTLV( tlvList, 0x0008 ); @@ -211,14 +211,14 @@ void AimLoginTask::handleLoginResponse() errorNum << endl; Oscar::SNAC s = { 0, 0, 0, 0 }; client()->fatalTaskError( s, errorNum ); - setError( errorNum, QString::null ); + setError( errorNum, TQString::null ); return; //if there's an error, we'll need to disconnect anyways } TLV server = findTLV( tlvList, 0x0005 ); if ( server ) { - QString ip = QString( server.data ); + TQString ip = TQString( server.data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(5) [SERVER] " << ip << endl; int index = ip.find( ':' ); m_bosHost = ip.left( index ); @@ -233,12 +233,12 @@ void AimLoginTask::handleLoginResponse() { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(6) [COOKIE]" << endl; m_cookie.duplicate( cookie.data ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } tlvList.clear(); } -void AimLoginTask::encodePassword( QByteArray& digest ) const +void AimLoginTask::encodePassword( TQByteArray& digest ) const { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; md5_state_t state; diff --git a/kopete/protocols/oscar/liboscar/aimlogintask.h b/kopete/protocols/oscar/liboscar/aimlogintask.h index 66308178..cc564592 100644 --- a/kopete/protocols/oscar/liboscar/aimlogintask.h +++ b/kopete/protocols/oscar/liboscar/aimlogintask.h @@ -33,9 +33,9 @@ public: virtual void onGo(); //Protocol specific stuff - const QByteArray& cookie() const; - const QString& bosHost() const; - const QString& bosPort() const; + const TQByteArray& cookie() const; + const TQString& bosHost() const; + const TQString& bosPort() const; protected: bool forMe( Transfer* transfer ) const; @@ -45,7 +45,7 @@ signals: private: //! Encodes a password using MD5 - void encodePassword( QByteArray& digest ) const; + void encodePassword( TQByteArray& digest ) const; //! Send SNAC 0x17, 0x06 void sendAuthStringRequest(); @@ -58,7 +58,7 @@ private: //! Parse the error codes to generate a reason why sign-on failed //Massive code duplication with CloseConnectionTask - bool parseDisconnectCode( int error, QString& reason ); + bool parseDisconnectCode( int error, TQString& reason ); private slots: //! Send SNAC 0x17, 0x02 @@ -66,16 +66,16 @@ private slots: private: //! The authorization key to use when encoding the password - QByteArray m_authKey; + TQByteArray m_authKey; //! The all important connection cookie - QByteArray m_cookie; + TQByteArray m_cookie; //! The new BOS Host - QString m_bosHost; + TQString m_bosHost; //! The new BOS Port - QString m_bosPort; + TQString m_bosPort; }; diff --git a/kopete/protocols/oscar/liboscar/blmlimitstask.cpp b/kopete/protocols/oscar/liboscar/blmlimitstask.cpp index c3fe7e6e..0b866de8 100644 --- a/kopete/protocols/oscar/liboscar/blmlimitstask.cpp +++ b/kopete/protocols/oscar/liboscar/blmlimitstask.cpp @@ -71,7 +71,7 @@ bool BLMLimitsTask::take(Transfer* transfer) break; } } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return true; } else diff --git a/kopete/protocols/oscar/liboscar/buddyicontask.cpp b/kopete/protocols/oscar/liboscar/buddyicontask.cpp index 1828b7b9..facaae1a 100644 --- a/kopete/protocols/oscar/liboscar/buddyicontask.cpp +++ b/kopete/protocols/oscar/liboscar/buddyicontask.cpp @@ -19,7 +19,7 @@ #include "buddyicontask.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> #include "buffer.h" #include "connection.h" @@ -36,20 +36,20 @@ BuddyIconTask::BuddyIconTask( Task* parent ) m_hashType = 0; } -void BuddyIconTask::uploadIcon( WORD length, const QByteArray& data ) +void BuddyIconTask::uploadIcon( WORD length, const TQByteArray& data ) { m_iconLength = length; m_icon = data; m_action = Send; } -void BuddyIconTask::requestIconFor( const QString& user ) +void BuddyIconTask::requestIconFor( const TQString& user ) { m_user = user; m_action = Receive; } -void BuddyIconTask::setHash( const QByteArray& md5Hash ) +void BuddyIconTask::setHash( const TQByteArray& md5Hash ) { m_hash = md5Hash; } @@ -125,7 +125,7 @@ bool BuddyIconTask::take( Transfer* transfer ) else handleICQBuddyIconResponse(); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; } @@ -150,10 +150,10 @@ void BuddyIconTask::handleUploadResponse() Buffer* b = transfer()->buffer(); b->skipBytes( 4 ); BYTE iconHashSize = b->getByte(); - QByteArray hash( b->getBlock( iconHashSize ) ); + TQByteArray hash( b->getBlock( iconHashSize ) ); //check the hash kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "hash " << hash << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } @@ -178,16 +178,16 @@ void BuddyIconTask::sendAIMBuddyIconRequest() void BuddyIconTask::handleAIMBuddyIconResponse() { Buffer* b = transfer()->buffer(); - QString user = b->getBUIN(); + TQString user = b->getBUIN(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Receiving buddy icon for " << user << endl; b->skipBytes(2); //unknown field. not used BYTE iconType = b->getByte(); Q_UNUSED( iconType ); BYTE hashSize = b->getByte(); - QByteArray iconHash; + TQByteArray iconHash; iconHash.duplicate( b->getBlock(hashSize) ); WORD iconSize = b->getWord(); - QByteArray icon; + TQByteArray icon; icon.duplicate( b->getBlock(iconSize) ); emit haveIcon( user, icon ); } @@ -213,7 +213,7 @@ void BuddyIconTask::sendICQBuddyIconRequest() void BuddyIconTask::handleICQBuddyIconResponse() { Buffer* b = transfer()->buffer(); - QString user = b->getBUIN(); + TQString user = b->getBUIN(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Receiving buddy icon for " << user << endl; b->skipBytes(2); //not used @@ -221,7 +221,7 @@ void BuddyIconTask::handleICQBuddyIconResponse() Q_UNUSED( iconType ); BYTE hashSize = b->getByte(); - QByteArray iconHash; + TQByteArray iconHash; iconHash.duplicate( b->getBlock(hashSize) ); b->skipBytes(1); //not used @@ -230,11 +230,11 @@ void BuddyIconTask::handleICQBuddyIconResponse() Q_UNUSED( iconType2 ); BYTE hashSize2 = b->getByte(); - QByteArray iconHash2; + TQByteArray iconHash2; iconHash2.duplicate( b->getBlock(hashSize2) ); WORD iconSize = b->getWord(); - QByteArray icon; + TQByteArray icon; icon.duplicate( b->getBlock(iconSize) ); emit haveIcon( user, icon ); diff --git a/kopete/protocols/oscar/liboscar/buddyicontask.h b/kopete/protocols/oscar/liboscar/buddyicontask.h index 83e70a53..f00a5b23 100644 --- a/kopete/protocols/oscar/liboscar/buddyicontask.h +++ b/kopete/protocols/oscar/liboscar/buddyicontask.h @@ -21,7 +21,7 @@ #define BUDDYICONTASK_H #include "task.h" -#include <qcstring.h> +#include <tqcstring.h> class Transfer; @@ -31,11 +31,11 @@ Q_OBJECT public: BuddyIconTask( Task* parent ); - void uploadIcon( WORD length, const QByteArray& data ); + void uploadIcon( WORD length, const TQByteArray& data ); void setReferenceNum( WORD num ); - void requestIconFor( const QString& user ); - void setHash( const QByteArray& md5Hash ); + void requestIconFor( const TQString& user ); + void setHash( const TQByteArray& md5Hash ); void setHashType( BYTE type ); //! Task implementation @@ -44,7 +44,7 @@ public: bool take( Transfer* transfer ); signals: - void haveIcon( const QString&, QByteArray ); + void haveIcon( const TQString&, TQByteArray ); private: void sendIcon(); @@ -59,9 +59,9 @@ private: Action m_action; WORD m_iconLength; int m_refNum; - QByteArray m_icon; - QString m_user; - QByteArray m_hash; + TQByteArray m_icon; + TQString m_user; + TQByteArray m_hash; BYTE m_hashType; DWORD m_seq; }; diff --git a/kopete/protocols/oscar/liboscar/buffer.cpp b/kopete/protocols/oscar/liboscar/buffer.cpp index b04587e7..23dca1bb 100644 --- a/kopete/protocols/oscar/liboscar/buffer.cpp +++ b/kopete/protocols/oscar/liboscar/buffer.cpp @@ -40,7 +40,7 @@ Buffer::Buffer(const char *b, Q_ULONG len) mReadPos=0; } -Buffer::Buffer( const QByteArray& data ) +Buffer::Buffer( const TQByteArray& data ) { mBuffer.duplicate( data ); mReadPos = 0; @@ -110,7 +110,7 @@ int Buffer::addLEDWord(const DWORD dw) return mBuffer.size(); } -int Buffer::addString(QByteArray s) +int Buffer::addString(TQByteArray s) { unsigned int pos = mBuffer.size(); int len = s.size(); @@ -122,7 +122,7 @@ int Buffer::addString(QByteArray s) return mBuffer.size(); } -int Buffer::addString(QByteArray s, DWORD len) +int Buffer::addString(TQByteArray s, DWORD len) { Q_UNUSED( len ); return addString( s ); @@ -130,14 +130,14 @@ int Buffer::addString(QByteArray s, DWORD len) int Buffer::addString( const char* s, DWORD len ) { - QByteArray qba; + TQByteArray qba; qba.duplicate( s, len ); return addString( qba ); } int Buffer::addString(const unsigned char* s, DWORD len) { - QByteArray qba; + TQByteArray qba; qba.duplicate( (const char*) s, len ); return addString( qba ); } @@ -253,9 +253,9 @@ void Buffer::setBuf(char *b, const WORD len) mReadPos = 0; } -QByteArray Buffer::getBlock(WORD len) +TQByteArray Buffer::getBlock(WORD len) { - QByteArray ch( len ); + TQByteArray ch( len ); for ( int i = 0; i < len; i++ ) { ch[i] = getByte(); @@ -264,9 +264,9 @@ QByteArray Buffer::getBlock(WORD len) return ch; } -QByteArray Buffer::getBBlock(WORD len) +TQByteArray Buffer::getBBlock(WORD len) { - QByteArray data; + TQByteArray data; data.duplicate(mBuffer.data() + mReadPos, len); mReadPos += len; return data; @@ -286,9 +286,9 @@ WORD *Buffer::getWordBlock(WORD len) } -QCString Buffer::getLEBlock(WORD len) +TQCString Buffer::getLEBlock(WORD len) { - QCString ch; + TQCString ch; for (unsigned int i=0;i<len;i++) ch += getLEByte(); @@ -340,9 +340,9 @@ TLV Buffer::getTLV() return t; } -QValueList<TLV> Buffer::getTLVList() +TQValueList<TLV> Buffer::getTLVList() { - QValueList<TLV> ql; + TQValueList<TLV> ql; while (mReadPos < mBuffer.size()) { @@ -363,7 +363,7 @@ QValueList<TLV> Buffer::getTLVList() } int Buffer::addChatTLV(const WORD type, const WORD exchange, - const QString &roomname, const WORD instance) + const TQString &roomname, const WORD instance) { addWord(type); addWord(0x0005 + roomname.length()); @@ -376,21 +376,21 @@ int Buffer::addChatTLV(const WORD type, const WORD exchange, void Buffer::expandBuffer(unsigned int inc) { - mBuffer.resize(mBuffer.size()+inc, QGArray::SpeedOptim); + mBuffer.resize(mBuffer.size()+inc, TQGArray::SpeedOptim); } -QCString Buffer::getLNTS() +TQCString Buffer::getLNTS() { WORD len = getLEWord(); - QCString qcs; + TQCString qcs; qcs.duplicate( getBlock(len) ); return qcs; } -QCString Buffer::getLELNTS() +TQCString Buffer::getLELNTS() { WORD len = getLEWord(); - QCString qcs; + TQCString qcs; qcs.duplicate( getBlock(len) ); return qcs; } @@ -425,10 +425,10 @@ int Buffer::addBSTR(const char * s) return ret; } -QByteArray Buffer::getBSTR() +TQByteArray Buffer::getBSTR() { WORD len = getWord(); - QByteArray qba; + TQByteArray qba; qba.duplicate( getBlock(len) ); return qba; } @@ -441,10 +441,10 @@ int Buffer::addBUIN(const char * s) return ret; } -QByteArray Buffer::getBUIN() +TQByteArray Buffer::getBUIN() { BYTE len = getByte(); - QByteArray qba; + TQByteArray qba; qba.duplicate( getBlock(len) ); return qba; } @@ -459,16 +459,16 @@ int Buffer::length() const return (mBuffer.size() - mReadPos); } -QString Buffer::toString() const +TQString Buffer::toString() const { // line format: //00 03 00 0b 00 00 90 b8 f5 9f 09 31 31 33 37 38 |;tJ�..........| int i = 0; - QString output = "\n"; - QString hex, ascii; + TQString output = "\n"; + TQString hex, ascii; - QByteArray::ConstIterator it; + TQByteArray::ConstIterator it; for ( it = mBuffer.begin(); it != mBuffer.end(); ++it ) { i++; @@ -477,7 +477,7 @@ QString Buffer::toString() const if ( c < 0x10 ) hex.append("0"); - hex.append(QString("%1 ").arg(c, 0, 16)); + hex.append(TQString("%1 ").arg(c, 0, 16)); ascii.append(isprint(c) ? c : '.'); @@ -485,8 +485,8 @@ QString Buffer::toString() const { output += hex + " |" + ascii + "|\n"; i=0; - hex=QString::null; - ascii=QString::null; + hex=TQString::null; + ascii=TQString::null; } } @@ -497,22 +497,22 @@ QString Buffer::toString() const return output; } -QString Buffer::peekBSTR() +TQString Buffer::peekBSTR() { int lastPos = mReadPos; - QByteArray qba = getBSTR(); + TQByteArray qba = getBSTR(); mReadPos = lastPos; - return QString( qba ); + return TQString( qba ); } -QString Buffer::peekBUIN() +TQString Buffer::peekBUIN() { int lastPos = mReadPos; - QByteArray qba = getBUIN(); + TQByteArray qba = getBUIN(); mReadPos = lastPos; - return QString( qba ); + return TQString( qba ); } -Buffer::operator QByteArray() const +Buffer::operator TQByteArray() const { return mBuffer; } diff --git a/kopete/protocols/oscar/liboscar/buffer.h b/kopete/protocols/oscar/liboscar/buffer.h index 900ddb50..b5035b52 100644 --- a/kopete/protocols/oscar/liboscar/buffer.h +++ b/kopete/protocols/oscar/liboscar/buffer.h @@ -22,8 +22,8 @@ #include "oscartypes.h" -#include <qvaluelist.h> -#include <qcstring.h> +#include <tqvaluelist.h> +#include <tqcstring.h> class QString; @@ -50,9 +50,9 @@ class Buffer /** * \brief Create a prefilled buffer * - * Constructor that creates a prefilled buffer from the QByteArray \p data + * Constructor that creates a prefilled buffer from the TQByteArray \p data */ - Buffer( const QByteArray& data ); + Buffer( const TQByteArray& data ); /** Default destructor */ @@ -72,8 +72,8 @@ class Buffer /** * adds the given string to the buffer (make sure it's NULL-terminated) */ - int addString(QByteArray); - int addString(QByteArray, DWORD); + int addString(TQByteArray); + int addString(TQByteArray, DWORD); int addString(const char*, DWORD); int addString(const unsigned char*, DWORD); @@ -141,9 +141,9 @@ class Buffer int addLETLV(WORD, WORD, const char *); /** - * Returns a QString representation of the buffer + * Returns a TQString representation of the buffer */ - QString toString() const; + TQString toString() const; /** * gets a DWord out of the buffer @@ -183,8 +183,8 @@ class Buffer /** * Allocates memory for and gets a block of buffer bytes */ - QByteArray getBlock(WORD len); - QByteArray getBBlock(WORD len); + TQByteArray getBlock(WORD len); + TQByteArray getBBlock(WORD len); /** * Allocates memory for and gets a block of buffer words @@ -194,14 +194,14 @@ class Buffer /** * Same as above but returning little-endian */ - QCString getLEBlock(WORD len); + TQCString getLEBlock(WORD len); /** * Convenience function that gets a LNTS (long null terminated string) * from the buffer. Otherwise you'd need a getWord() + getBlock() call :) */ - QCString getLNTS(); - QCString getLELNTS(); + TQCString getLNTS(); + TQCString getLELNTS(); /** * adds a 16-bit long TLV @@ -231,25 +231,25 @@ class Buffer /** * Gets a list of TLV's */ - QValueList<TLV> getTLVList(); + TQValueList<TLV> getTLVList(); /** * Creates a chat data segment for a tlv and calls addTLV with that data */ - int addChatTLV(const WORD, const WORD, const QString &, const WORD); + int addChatTLV(const WORD, const WORD, const TQString &, const WORD); /** * Similar to the LNTS functions but string is NOT null-terminated */ int addBSTR(const char * s); - QByteArray getBSTR(); - QString peekBSTR(); + TQByteArray getBSTR(); + TQString peekBSTR(); int addBUIN(const char * s); - QByteArray getBUIN(); - QString peekBUIN(); + TQByteArray getBUIN(); + TQString peekBUIN(); - operator QByteArray() const; + operator TQByteArray() const; private: /** @@ -258,7 +258,7 @@ class Buffer void expandBuffer(unsigned int inc); private: - QByteArray mBuffer; + TQByteArray mBuffer; unsigned int mReadPos; }; diff --git a/kopete/protocols/oscar/liboscar/bytestream.cpp b/kopete/protocols/oscar/liboscar/bytestream.cpp index 109dbbad..87603c76 100644 --- a/kopete/protocols/oscar/liboscar/bytestream.cpp +++ b/kopete/protocols/oscar/liboscar/bytestream.cpp @@ -35,7 +35,7 @@ //! //! The signals connectionClosed(), delayedCloseFinished(), readyRead(), //! bytesWritten(), and error() serve the exact same function as those from -//! <A HREF="http://doc.trolltech.com/3.1/qsocket.html">QSocket</A>. +//! <A HREF="http://doc.trolltech.com/3.1/tqsocket.html">TQSocket</A>. //! //! The simplest way to create a ByteStream is to reimplement isOpen(), close(), //! and tryWrite(). Call appendRead() whenever you want to make data available for @@ -59,13 +59,13 @@ class ByteStream::Private public: Private() {} - QByteArray readBuf, writeBuf; + TQByteArray readBuf, writeBuf; }; //! //! Constructs a ByteStream object with parent \a parent. -ByteStream::ByteStream(QObject *parent) -:QObject(parent) +ByteStream::ByteStream(TQObject *parent) +:TQObject(parent) { d = new Private; } @@ -95,7 +95,7 @@ void ByteStream::close() //! //! Writes array \a a to the stream. -void ByteStream::write(const QByteArray &a) +void ByteStream::write(const TQByteArray &a) { if(!isOpen()) return; @@ -109,7 +109,7 @@ void ByteStream::write(const QByteArray &a) //! //! Reads bytes \a bytes of data from the stream and returns them as an array. If \a bytes is 0, then //! \a read will return all available data. -QByteArray ByteStream::read(int bytes) +TQByteArray ByteStream::read(int bytes) { return takeRead(bytes); } @@ -130,9 +130,9 @@ int ByteStream::bytesToWrite() const //! //! Writes string \a cs to the stream. -void ByteStream::write(const QCString &cs) +void ByteStream::write(const TQCString &cs) { - QByteArray block(cs.length()); + TQByteArray block(cs.length()); memcpy(block.data(), cs.data(), block.size()); write(block); } @@ -153,14 +153,14 @@ void ByteStream::clearWriteBuffer() //! //! Appends \a block to the end of the read buffer. -void ByteStream::appendRead(const QByteArray &block) +void ByteStream::appendRead(const TQByteArray &block) { appendArray(&d->readBuf, block); } //! //! Appends \a block to the end of the write buffer. -void ByteStream::appendWrite(const QByteArray &block) +void ByteStream::appendWrite(const TQByteArray &block) { appendArray(&d->writeBuf, block); } @@ -169,7 +169,7 @@ void ByteStream::appendWrite(const QByteArray &block) //! Returns \a size bytes from the start of the read buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeRead(int size, bool del) +TQByteArray ByteStream::takeRead(int size, bool del) { return takeArray(&d->readBuf, size, del); } @@ -178,21 +178,21 @@ QByteArray ByteStream::takeRead(int size, bool del) //! Returns \a size bytes from the start of the write buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeWrite(int size, bool del) +TQByteArray ByteStream::takeWrite(int size, bool del) { return takeArray(&d->writeBuf, size, del); } //! //! Returns a reference to the read buffer. -QByteArray & ByteStream::readBuf() +TQByteArray & ByteStream::readBuf() { return d->readBuf; } //! //! Returns a reference to the write buffer. -QByteArray & ByteStream::writeBuf() +TQByteArray & ByteStream::writeBuf() { return d->writeBuf; } @@ -207,7 +207,7 @@ int ByteStream::tryWrite() //! //! Append array \a b to the end of the array pointed to by \a a. -void ByteStream::appendArray(QByteArray *a, const QByteArray &b) +void ByteStream::appendArray(TQByteArray *a, const TQByteArray &b) { int oldsize = a->size(); a->resize(oldsize + b.size()); @@ -218,9 +218,9 @@ void ByteStream::appendArray(QByteArray *a, const QByteArray &b) //! Returns \a size bytes from the start of the array pointed to by \a from. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeArray(QByteArray *from, int size, bool del) +TQByteArray ByteStream::takeArray(TQByteArray *from, int size, bool del) { - QByteArray a; + TQByteArray a; if(size == 0) { a = from->copy(); if(del) diff --git a/kopete/protocols/oscar/liboscar/bytestream.h b/kopete/protocols/oscar/liboscar/bytestream.h index 1c2dfa15..a990a940 100644 --- a/kopete/protocols/oscar/liboscar/bytestream.h +++ b/kopete/protocols/oscar/liboscar/bytestream.h @@ -21,8 +21,8 @@ #ifndef CS_BYTESTREAM_H #define CS_BYTESTREAM_H -#include <qobject.h> -#include <qcstring.h> +#include <tqobject.h> +#include <tqcstring.h> // CS_NAMESPACE_BEGIN @@ -32,20 +32,20 @@ class ByteStream : public QObject Q_OBJECT public: enum Error { ErrRead, ErrWrite, ErrCustom = 10 }; - ByteStream(QObject *parent=0); + ByteStream(TQObject *parent=0); virtual ~ByteStream()=0; virtual bool isOpen() const; virtual void close(); - virtual void write(const QByteArray &); - virtual QByteArray read(int bytes=0); + virtual void write(const TQByteArray &); + virtual TQByteArray read(int bytes=0); virtual int bytesAvailable() const; virtual int bytesToWrite() const; - void write(const QCString &); + void write(const TQCString &); - static void appendArray(QByteArray *a, const QByteArray &b); - static QByteArray takeArray(QByteArray *from, int size=0, bool del=true); + static void appendArray(TQByteArray *a, const TQByteArray &b); + static TQByteArray takeArray(TQByteArray *from, int size=0, bool del=true); signals: void connectionClosed(); @@ -57,12 +57,12 @@ signals: protected: void clearReadBuffer(); void clearWriteBuffer(); - void appendRead(const QByteArray &); - void appendWrite(const QByteArray &); - QByteArray takeRead(int size=0, bool del=true); - QByteArray takeWrite(int size=0, bool del=true); - QByteArray & readBuf(); - QByteArray & writeBuf(); + void appendRead(const TQByteArray &); + void appendWrite(const TQByteArray &); + TQByteArray takeRead(int size=0, bool del=true); + TQByteArray takeWrite(int size=0, bool del=true); + TQByteArray & readBuf(); + TQByteArray & writeBuf(); virtual int tryWrite(); private: diff --git a/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp b/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp index 5cb44720..7c6ff26a 100644 --- a/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp +++ b/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp @@ -18,7 +18,7 @@ #include "changevisibilitytask.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <kdebug.h> #include "buffer.h" #include "client.h" @@ -64,13 +64,13 @@ bool ChangeVisibilityTask::take(Transfer* transfer) if ( forMe( transfer ) ) { setTransfer( transfer ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; } else { - setError( 0, QString::null ); + setError( 0, TQString::null ); 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, QString::null ); + setError( 0, TQString::null ); return; } @@ -90,14 +90,14 @@ void ChangeVisibilityTask::onGo() BYTE visibleByte = m_visible ? 0x04 : 0x03; c8tlv.addByte( visibleByte ); - QValueList<Oscar::TLV> tList; + TQValueList<Oscar::TLV> tList; tList.append( TLV( 0x00CA, c8tlv.length(), c8tlv.buffer() ) ); Oscar::SSI newSSI(item); if ( Oscar::uptateTLVs( newSSI, tList ) == false ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Visibility didn't change, don't update" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return; } @@ -118,8 +118,8 @@ void ChangeVisibilityTask::onGo() b->addWord( newSSI.type() ); b->addWord( newSSI.tlvListLength() ); - QValueList<TLV>::const_iterator it2 = newSSI.tlvList().begin(); - QValueList<TLV>::const_iterator listEnd2 = newSSI.tlvList().end(); + TQValueList<TLV>::const_iterator it2 = newSSI.tlvList().begin(); + TQValueList<TLV>::const_iterator listEnd2 = newSSI.tlvList().end(); for( ; it2 != listEnd2; ++it2 ) b->addTLV( ( *it2 ) ); diff --git a/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp b/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp index f661d1f4..914de496 100644 --- a/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp +++ b/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp @@ -45,7 +45,7 @@ ChatNavServiceTask::RequestType ChatNavServiceTask::requestType() return m_type; } -QValueList<int> ChatNavServiceTask::exchangeList() const +TQValueList<int> ChatNavServiceTask::exchangeList() const { return m_exchanges; } @@ -97,7 +97,7 @@ bool ChatNavServiceTask::take( Transfer* transfer ) } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; @@ -113,12 +113,12 @@ void ChatNavServiceTask::onGo() send( t ); } -void ChatNavServiceTask::createRoom( WORD exchange, const QString& name ) +void ChatNavServiceTask::createRoom( WORD exchange, const TQString& name ) { //most of this comes from gaim. thanks to them for figuring it out - QString cookie = "create"; //hardcoded, seems to be ignored by AOL - QString lang = "en"; - QString charset = "us-ascii"; + TQString cookie = "create"; //hardcoded, seems to be ignored by AOL + TQString lang = "en"; + TQString charset = "us-ascii"; FLAP f = { 0x02, 0, 0 }; SNAC s = { 0x000D, 0x0008, 0x0000, client()->snacSequence() }; @@ -202,7 +202,7 @@ void ChatNavServiceTask::handleExchangeInfo( const TLV& t ) break; case 0xD3: { - QString eName( t.data ); + TQString eName( t.data ); kdDebug(OSCAR_RAW_DEBUG) << "exchange name: " << eName << endl; exchangeInfo.description = eName; break; @@ -227,16 +227,16 @@ void ChatNavServiceTask::handleBasicRoomInfo( const TLV& t ) kdDebug(OSCAR_RAW_DEBUG) << "Parsing room info TLV" << t.length << endl; Buffer b(t.data); WORD exchange = b.getWord(); - QByteArray cookie( b.getBlock( b.getByte() ) ); + TQByteArray cookie( b.getBlock( b.getByte() ) ); WORD instance = b.getWord(); b.getByte(); //detail level, which i'm not sure we need WORD tlvCount = b.getWord(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "e: " << exchange << " c: " << cookie << " i: " << instance << endl; - QValueList<Oscar::TLV> tlvList = b.getTLVList(); - QValueList<Oscar::TLV>::iterator it, itEnd = tlvList.end(); - QString roomName; + TQValueList<Oscar::TLV> tlvList = b.getTLVList(); + TQValueList<Oscar::TLV>::iterator it, itEnd = tlvList.end(); + TQString roomName; for ( it = tlvList.begin(); it != itEnd; ++it ) { TLV t = ( *it ); @@ -255,7 +255,7 @@ void ChatNavServiceTask::handleBasicRoomInfo( const TLV& t ) kdDebug(OSCAR_RAW_DEBUG) << "evil generated array" << endl; break; case 0x6A: - roomName = QString( t.data ); + roomName = TQString( t.data ); kdDebug(OSCAR_RAW_DEBUG) << "fully qualified name" << roomName << endl; break; case 0x6B: @@ -305,7 +305,7 @@ void ChatNavServiceTask::handleCreateRoomInfo( const TLV& t ) Buffer b( t.data ); WORD exchange = b.getWord(); WORD cookieLength = b.getByte(); - QByteArray cookie( b.getBlock( cookieLength ) ); + TQByteArray cookie( b.getBlock( cookieLength ) ); WORD instance = b.getWord(); BYTE detailLevel = b.getByte(); @@ -316,16 +316,16 @@ void ChatNavServiceTask::handleCreateRoomInfo( const TLV& t ) } WORD numberTlvs = b.getWord(); - QValueList<Oscar::TLV> roomTLVList = b.getTLVList(); - QValueList<Oscar::TLV>::iterator itEnd = roomTLVList.end(); - for ( QValueList<Oscar::TLV>::iterator it = roomTLVList.begin(); + TQValueList<Oscar::TLV> roomTLVList = b.getTLVList(); + TQValueList<Oscar::TLV>::iterator itEnd = roomTLVList.end(); + for ( TQValueList<Oscar::TLV>::iterator it = roomTLVList.begin(); it != itEnd; ++ it ) { switch( ( *it ).type ) { case 0x006A: { - QString fqcn = QString( ( *it ).data ); + TQString fqcn = TQString( ( *it ).data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "fqcn: " << fqcn << endl; break; } @@ -342,7 +342,7 @@ void ChatNavServiceTask::handleCreateRoomInfo( const TLV& t ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "max occupancy: " << t.data << endl; break; case 0x00D3: - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "name: " << QString( t.data ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "name: " << TQString( t.data ) << endl; break; case 0x00D5: kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "create perms: " << t.data << endl; diff --git a/kopete/protocols/oscar/liboscar/chatnavservicetask.h b/kopete/protocols/oscar/liboscar/chatnavservicetask.h index 6b7d8764..8af63247 100644 --- a/kopete/protocols/oscar/liboscar/chatnavservicetask.h +++ b/kopete/protocols/oscar/liboscar/chatnavservicetask.h @@ -19,7 +19,7 @@ #include "task.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <oscartypes.h> class Transfer; @@ -43,13 +43,13 @@ public: virtual bool forMe( const Transfer* transfer ) const; virtual bool take( Transfer* transfer ); virtual void onGo(); - void createRoom( WORD exchange, const QString& name ); //create a room. sends the packet as well + void createRoom( WORD exchange, const TQString& name ); //create a room. sends the packet as well - QValueList<int> exchangeList() const; + TQValueList<int> exchangeList() const; signals: - void haveChatExchanges( const QValueList<int>& ); - void connectChat( WORD, QByteArray, WORD, const QString& ); + void haveChatExchanges( const TQValueList<int>& ); + void connectChat( WORD, TQByteArray, WORD, const TQString& ); private: void handleExchangeInfo( const TLV& t ); @@ -57,7 +57,7 @@ private: void handleCreateRoomInfo( const TLV& t ); private: - QValueList<int> m_exchanges; + TQValueList<int> m_exchanges; RequestType m_type; }; diff --git a/kopete/protocols/oscar/liboscar/chatservicetask.cpp b/kopete/protocols/oscar/liboscar/chatservicetask.cpp index 9d07afe8..c8998495 100644 --- a/kopete/protocols/oscar/liboscar/chatservicetask.cpp +++ b/kopete/protocols/oscar/liboscar/chatservicetask.cpp @@ -20,17 +20,17 @@ #include "chatservicetask.h" -#include <qstring.h> +#include <tqstring.h> #include <kapplication.h> #include <kdebug.h> -#include <qtextcodec.h> +#include <tqtextcodec.h> #include "connection.h" #include "transfer.h" #include "buffer.h" #include "oscartypes.h" -ChatServiceTask::ChatServiceTask( Task* parent, Oscar::WORD exchange, const QString& room ) +ChatServiceTask::ChatServiceTask( Task* parent, Oscar::WORD exchange, const TQString& room ) : Task( parent ), m_encoding( "us-ascii" ) { m_exchange = exchange; @@ -47,7 +47,7 @@ void ChatServiceTask::setMessage( const Oscar::Message& msg ) m_message = msg; } -void ChatServiceTask::setEncoding( const QCString& enc ) +void ChatServiceTask::setEncoding( const TQCString& enc ) { m_encoding = enc; } @@ -56,7 +56,7 @@ void ChatServiceTask::onGo() { if ( !m_message ) { - setSuccess( true, QString::null ); + setSuccess( true, TQString::null ); return; } @@ -78,7 +78,7 @@ void ChatServiceTask::onGo() type3.type = 0x0003; type3.length = 0x0002; - type3.data = QCString( "en" ); //hardcode for right now. don't know that we can do others + type3.data = TQCString( "en" ); //hardcode for right now. don't know that we can do others type1.type = 0x0001; type1.length = m_message.textArray().size(); @@ -158,7 +158,7 @@ bool ChatServiceTask::take( Transfer* t ) break; }; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; } @@ -170,7 +170,7 @@ void ChatServiceTask::parseRoomInfo() Buffer* b = transfer()->buffer(); m_exchange = b->getWord(); - QByteArray cookie( b->getBlock( b->getByte() ) ); + TQByteArray cookie( b->getBlock( b->getByte() ) ); instance = b->getWord(); detailLevel = b->getByte(); @@ -179,15 +179,15 @@ void ChatServiceTask::parseRoomInfo() //correctly anyways b->skipBytes( 2 ); - QValueList<Oscar::TLV> tlvList = b->getTLVList(); - QValueList<Oscar::TLV>::iterator it = tlvList.begin(); - QValueList<Oscar::TLV>::iterator itEnd = tlvList.end(); + TQValueList<Oscar::TLV> tlvList = b->getTLVList(); + TQValueList<Oscar::TLV>::iterator it = tlvList.begin(); + TQValueList<Oscar::TLV>::iterator itEnd = tlvList.end(); for ( ; it != itEnd; ++it ) { switch ( ( *it ).type ) { case 0x006A: - m_internalRoom = QString( ( *it ).data ); + m_internalRoom = TQString( ( *it ).data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "room name: " << m_room << endl; break; case 0x006F: @@ -221,7 +221,7 @@ void ChatServiceTask::parseJoinNotification() Buffer* b = transfer()->buffer(); while ( b->length() > 0 ) { - QString sender( b->getBUIN() ); + TQString sender( b->getBUIN() ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "user name:" << sender << endl; WORD warningLevel = b->getWord(); WORD numTLVs = b->getWord(); @@ -252,7 +252,7 @@ void ChatServiceTask::parseLeftNotification() Buffer* b = transfer()->buffer(); while ( b->length() > 0 ) { - QString sender( b->getBUIN() ); + TQString sender( b->getBUIN() ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "user name:" << sender << endl; WORD warningLevel = b->getWord(); WORD numTLVs = b->getWord(); @@ -281,12 +281,12 @@ void ChatServiceTask::parseChatMessage() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "have new chat room message" << endl; Buffer* b = transfer()->buffer(); bool whisper = true, reflection = false; - QByteArray language, encoding, message; - QString sender; - QByteArray icbmCookie( b->getBlock( 8 ) ); + TQByteArray language, encoding, message; + TQString sender; + TQByteArray icbmCookie( b->getBlock( 8 ) ); b->skipBytes( 2 ); //message channel always 0x03 - QValueList<Oscar::TLV> chatTLVs = b->getTLVList(); - QValueList<Oscar::TLV>::iterator it, itEnd = chatTLVs.end(); + TQValueList<Oscar::TLV> chatTLVs = b->getTLVList(); + TQValueList<Oscar::TLV>::iterator it, itEnd = chatTLVs.end(); for ( it = chatTLVs.begin(); it != itEnd; ++it ) { switch ( ( *it ).type ) @@ -326,7 +326,7 @@ void ChatServiceTask::parseChatMessage() case 0x0003: //user info { Buffer b( ( *it ).data ); - sender = QString( b.getBUIN() ); + sender = TQString( b.getBUIN() ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "got user info. sender is " << sender << endl; } break; @@ -334,14 +334,14 @@ void ChatServiceTask::parseChatMessage() } } - QTextCodec* codec = QTextCodec::codecForName( encoding ); + TQTextCodec* codec = TQTextCodec::codecForName( encoding ); if ( ! codec ) - codec = QTextCodec::codecForMib( 4 ); - QString msgText( codec->toUnicode( message ) ); + codec = TQTextCodec::codecForMib( 4 ); + TQString msgText( codec->toUnicode( message ) ); Oscar::Message omessage; omessage.setReceiver( client()->userId() ); omessage.setSender( sender ); - omessage.setTimestamp( QDateTime::currentDateTime() ); + omessage.setTimestamp( TQDateTime::currentDateTime() ); 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 90e29300..5f19fcae 100644 --- a/kopete/protocols/oscar/liboscar/chatservicetask.h +++ b/kopete/protocols/oscar/liboscar/chatservicetask.h @@ -29,7 +29,7 @@ class ChatServiceTask : public Task { Q_OBJECT public: - ChatServiceTask( Task* parent, Oscar::WORD exchange, const QString& room ); + ChatServiceTask( Task* parent, Oscar::WORD exchange, const TQString& room ); ~ChatServiceTask(); void onGo(); @@ -44,11 +44,11 @@ public: void parseChatError(); void setMessage( const Oscar::Message& msg ); - void setEncoding( const QCString &enc ); + void setEncoding( const TQCString &enc ); signals: - void userJoinedChat( Oscar::WORD, const QString& r, const QString& u ); - void userLeftChat( Oscar::WORD, const QString& r, const QString& u ); + void userJoinedChat( Oscar::WORD, const TQString& r, const TQString& u ); + void userLeftChat( Oscar::WORD, const TQString& r, const TQString& u ); void newChatMessage( const Oscar::Message& msg ); protected: @@ -56,10 +56,10 @@ protected: private: WORD m_exchange; - QString m_room; - QString m_internalRoom; + TQString m_room; + TQString m_internalRoom; Oscar::Message m_message; - QCString m_encoding; + TQCString m_encoding; }; #endif diff --git a/kopete/protocols/oscar/liboscar/client.cpp b/kopete/protocols/oscar/liboscar/client.cpp index af967512..222d9d69 100644 --- a/kopete/protocols/oscar/liboscar/client.cpp +++ b/kopete/protocols/oscar/liboscar/client.cpp @@ -20,8 +20,8 @@ #include "client.h" -#include <qtimer.h> -#include <qtextcodec.h> +#include <tqtimer.h> +#include <tqtextcodec.h> #include <kdebug.h> //for kdDebug() #include <klocale.h> @@ -66,13 +66,13 @@ namespace class DefaultCodecProvider : public Client::CodecProvider { public: - virtual QTextCodec* codecForContact( const QString& ) const + virtual TQTextCodec* codecForContact( const TQString& ) const { - return QTextCodec::codecForMib( 4 ); + return TQTextCodec::codecForMib( 4 ); } - virtual QTextCodec* codecForAccount() const + virtual TQTextCodec* codecForAccount() const { - return QTextCodec::codecForMib( 4 ); + return TQTextCodec::codecForMib( 4 ); } }; @@ -84,7 +84,7 @@ class Client::ClientPrivate public: ClientPrivate() {} - QString host, user, pass; + TQString host, user, pass; uint port; int tzoffset; bool active; @@ -95,11 +95,11 @@ public: //Protocol specific data bool isIcq; bool redirectRequested; - QValueList<WORD> redirectionServices; + TQValueList<WORD> redirectionServices; WORD currentRedirect; - QByteArray cookie; + TQByteArray cookie; DWORD connectAsStatus; // icq only - QString connectWithMessage; // icq only + TQString connectWithMessage; // icq only Oscar::Settings* settings; //Tasks @@ -120,25 +120,25 @@ public: UserDetails ourDetails; //Infos - QValueList<int> exchanges; + TQValueList<int> exchanges; - QString statusMessage; // for away-,DND-message etc... + TQString statusMessage; // for away-,DND-message etc... //away messages struct AwayMsgRequest { - QString contact; + TQString contact; ICQStatus contactStatus; }; - QValueList<AwayMsgRequest> awayMsgRequestQueue; - QTimer* awayMsgRequestTimer; + TQValueList<AwayMsgRequest> awayMsgRequestQueue; + TQTimer* awayMsgRequestTimer; CodecProvider* codecProvider; const Oscar::ClientVersion* version; }; -Client::Client( QObject* parent ) -:QObject( parent, "oscarclient" ) +Client::Client( TQObject* parent ) +:TQObject( parent, "oscarclient" ) { m_loginTask = 0L; m_loginTaskTwo = 0L; @@ -162,13 +162,13 @@ Client::Client( QObject* parent ) d->stage = ClientPrivate::StageOne; d->typingNotifyTask = 0L; d->ssiModifyTask = 0L; - d->awayMsgRequestTimer = new QTimer(); + d->awayMsgRequestTimer = new TQTimer(); d->codecProvider = &defaultCodecProvider; - connect( this, SIGNAL( redirectionFinished( WORD ) ), - this, SLOT( checkRedirectionQueue( WORD ) ) ); - connect( d->awayMsgRequestTimer, SIGNAL( timeout() ), - this, SLOT( nextICQAwayMessageRequest() ) ); + connect( this, TQT_SIGNAL( redirectionFinished( WORD ) ), + this, TQT_SLOT( checkRedirectionQueue( WORD ) ) ); + connect( d->awayMsgRequestTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( nextICQAwayMessageRequest() ) ); } Client::~Client() @@ -188,20 +188,20 @@ Oscar::Settings* Client::clientSettings() const return d->settings; } -void Client::connectToServer( Connection *c, const QString& server, bool auth ) +void Client::connectToServer( Connection *c, const TQString& server, bool auth ) { d->connections.append( c ); if ( auth == true ) { m_loginTask = new StageOneLoginTask( c->rootTask() ); - connect( m_loginTask, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) ); + connect( m_loginTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) ); } - connect( c, SIGNAL( socketError( int, const QString& ) ), this, SLOT( determineDisconnection( int, const QString& ) ) ); + connect( c, TQT_SIGNAL( socketError( int, const TQString& ) ), this, TQT_SLOT( determineDisconnection( int, const TQString& ) ) ); c->connectToServer(server, auth); } -void Client::start( const QString &host, const uint port, const QString &userId, const QString &pass ) +void Client::start( const TQString &host, const uint port, const TQString &userId, const TQString &pass ) { Q_UNUSED( host ); Q_UNUSED( port ); @@ -223,7 +223,7 @@ void Client::close() if ( d->stage == ClientPrivate::StageTwo ) { d->connectAsStatus = 0x0; - d->connectWithMessage = QString::null; + d->connectWithMessage = TQString::null; } d->exchanges.clear(); @@ -233,18 +233,18 @@ void Client::close() d->ssiManager->clear(); } -void Client::setStatus( AIMStatus status, const QString &_message ) +void Client::setStatus( AIMStatus status, const TQString &_message ) { // AIM: you're away exactly when your away message isn't empty. - // can't use QString::null as a message either; ProfileTask + // can't use TQString::null as a message either; ProfileTask // interprets null as "don't change". - QString message; + TQString message; if ( status == Online ) - message = QString::fromAscii(""); + message = TQString::fromAscii(""); else { if ( _message.isEmpty() ) - message = QString::fromAscii(" "); + message = TQString::fromAscii(" "); else message = _message; } @@ -257,7 +257,7 @@ void Client::setStatus( AIMStatus status, const QString &_message ) pt->go( true ); } -void Client::setStatus( DWORD status, const QString &message ) +void Client::setStatus( 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; @@ -302,7 +302,7 @@ UserDetails Client::ourInfo() const return d->ourDetails; } -QString Client::host() +TQString Client::host() { return d->host; } @@ -343,7 +343,7 @@ void Client::lt_loginFinished() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "stage two done. setting up services" << endl; initializeStaticTasks(); ServiceSetupTask* ssTask = new ServiceSetupTask( d->connections.defaultConnection()->rootTask() ); - connect( ssTask, SIGNAL( finished() ), this, SLOT( serviceSetupFinished() ) ); + connect( ssTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( serviceSetupFinished() ) ); ssTask->go( true ); //fire and forget m_loginTaskTwo->deleteLater(); m_loginTaskTwo = 0; @@ -351,7 +351,7 @@ void Client::lt_loginFinished() else if ( d->stage == ClientPrivate::StageOne ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "stage one login done" << endl; - disconnect( m_loginTask, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) ); + disconnect( m_loginTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) ); if ( m_loginTask->statusCode() == 0 ) //we can start stage two { @@ -362,7 +362,7 @@ void Client::lt_loginFinished() d->port = m_loginTask->bosPort().toUInt(); d->cookie = m_loginTask->loginCookie(); close(); - QTimer::singleShot( 100, this, SLOT(startStageTwo() ) ); + TQTimer::singleShot( 100, this, TQT_SLOT(startStageTwo() ) ); } else { @@ -379,17 +379,17 @@ void Client::lt_loginFinished() void Client::startStageTwo() { //create a new connection and set it up - Connection* c = createConnection( d->host, QString::number( d->port ) ); + Connection* c = createConnection( d->host, TQString::number( d->port ) ); new CloseConnectionTask( c->rootTask() ); //create the new login task m_loginTaskTwo = new StageTwoLoginTask( c->rootTask() ); m_loginTaskTwo->setCookie( d->cookie ); - QObject::connect( m_loginTaskTwo, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) ); + TQObject::connect( m_loginTaskTwo, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) ); //connect - QObject::connect( c, SIGNAL( connected() ), this, SLOT( streamConnected() ) ); + TQObject::connect( c, TQT_SIGNAL( connected() ), this, TQT_SLOT( streamConnected() ) ); connectToServer( c, d->host, false ) ; } @@ -411,8 +411,8 @@ void Client::serviceSetupFinished() return; OfflineMessagesTask *offlineMsgTask = new OfflineMessagesTask( c->rootTask() ); - connect( offlineMsgTask, SIGNAL( receivedOfflineMessage(const Oscar::Message& ) ), - this, SIGNAL( messageReceived(const Oscar::Message& ) ) ); + connect( offlineMsgTask, TQT_SIGNAL( receivedOfflineMessage(const Oscar::Message& ) ), + this, TQT_SIGNAL( messageReceived(const Oscar::Message& ) ) ); offlineMsgTask->go( true ); } @@ -420,7 +420,7 @@ void Client::serviceSetupFinished() emit loggedIn(); } -void Client::receivedIcqInfo( const QString& contact, unsigned int type ) +void Client::receivedIcqInfo( const TQString& contact, unsigned int type ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "received icq info for " << contact << " of type " << type << endl; @@ -437,7 +437,7 @@ void Client::receivedInfo( Q_UINT16 sequence ) emit receivedUserInfo( details.userId(), details ); } -void Client::offlineUser( const QString& user, const UserDetails& ) +void Client::offlineUser( const TQString& user, const UserDetails& ) { emit userIsOffline( user ); } @@ -462,27 +462,27 @@ void Client::setVersion( const Oscar::ClientVersion* version ) // INTERNALS // -QString Client::userId() const +TQString Client::userId() const { return d->user; } -QString Client::password() const +TQString Client::password() const { return d->pass; } -QString Client::statusMessage() const +TQString Client::statusMessage() const { return d->statusMessage; } -void Client::setStatusMessage( const QString &message ) +void Client::setStatusMessage( const TQString &message ) { d->statusMessage = message; } -QCString Client::ipAddress() const +TQCString Client::ipAddress() const { //!TODO determine ip address return "127.0.0.1"; @@ -493,7 +493,7 @@ void Client::notifyTaskError( const Oscar::SNAC& s, int errCode, bool fatal ) emit taskError( s, errCode, fatal ); } -void Client::notifySocketError( int errCode, const QString& msg ) +void Client::notifySocketError( int errCode, const TQString& msg ) { emit socketError( errCode, msg ); } @@ -538,13 +538,13 @@ void Client::receivedMessage( const Oscar::Message& msg ) Oscar::Message response ( msg ); if ( msg.hasProperty( Oscar::Message::StatusMessageRequest ) ) { - QTextCodec* codec = d->codecProvider->codecForContact( msg.sender() ); + TQTextCodec* codec = d->codecProvider->codecForContact( msg.sender() ); response.setText( Oscar::Message::UserDefined, statusMessage(), codec ); } else { response.setEncoding( Oscar::Message::UserDefined ); - response.setTextArray( QByteArray() ); + response.setTextArray( TQByteArray() ); } response.setReceiver( msg.sender() ); response.addProperty( Oscar::Message::AutoResponse ); @@ -557,7 +557,7 @@ void Client::receivedMessage( const Oscar::Message& msg ) if ( msg.hasProperty( Oscar::Message::AutoResponse ) ) { // we got a response to a status message request. - QString awayMessage( msg.text( d->codecProvider->codecForContact( msg.sender() ) ) ); + TQString awayMessage( msg.text( d->codecProvider->codecForContact( msg.sender() ) ) ); kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Received an away message: " << awayMessage << endl; emit receivedAwayMessage( msg.sender(), awayMessage ); } @@ -574,7 +574,7 @@ void Client::receivedMessage( const Oscar::Message& msg ) } } -void Client::requestAuth( const QString& contactid, const QString& reason ) +void Client::requestAuth( const TQString& contactid, const TQString& reason ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -582,7 +582,7 @@ void Client::requestAuth( const QString& contactid, const QString& reason ) d->ssiAuthTask->sendAuthRequest( contactid, reason ); } -void Client::sendAuth( const QString& contactid, const QString& reason, bool auth ) +void Client::sendAuth( const TQString& contactid, const TQString& reason, bool auth ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -605,7 +605,7 @@ void Client::setIsIcq( bool isIcq ) d->isIcq = isIcq; } -void Client::debug( const QString& str ) +void Client::debug( const TQString& str ) { Q_UNUSED(str); // qDebug( "CLIENT: %s", str.ascii() ); @@ -627,37 +627,37 @@ void Client::initializeStaticTasks() d->typingNotifyTask = new TypingNotifyTask( c->rootTask() ); d->ssiModifyTask = new SSIModifyTask( c->rootTask(), true ); - connect( d->onlineNotifier, SIGNAL( userIsOnline( const QString&, const UserDetails& ) ), - this, SIGNAL( receivedUserInfo( const QString&, const UserDetails& ) ) ); - connect( d->onlineNotifier, SIGNAL( userIsOffline( const QString&, const UserDetails& ) ), - this, SLOT( offlineUser( const QString&, const UserDetails & ) ) ); + connect( d->onlineNotifier, TQT_SIGNAL( userIsOnline( const TQString&, const UserDetails& ) ), + this, TQT_SIGNAL( receivedUserInfo( const TQString&, const UserDetails& ) ) ); + connect( d->onlineNotifier, TQT_SIGNAL( userIsOffline( const TQString&, const UserDetails& ) ), + this, TQT_SLOT( offlineUser( const TQString&, const UserDetails & ) ) ); - connect( d->ownStatusTask, SIGNAL( gotInfo() ), this, SLOT( haveOwnUserInfo() ) ); - connect( d->ownStatusTask, SIGNAL( buddyIconUploadRequested() ), this, - SIGNAL( iconNeedsUploading() ) ); + connect( d->ownStatusTask, TQT_SIGNAL( gotInfo() ), this, TQT_SLOT( haveOwnUserInfo() ) ); + connect( d->ownStatusTask, TQT_SIGNAL( buddyIconUploadRequested() ), this, + TQT_SIGNAL( iconNeedsUploading() ) ); - connect( d->messageReceiverTask, SIGNAL( receivedMessage( const Oscar::Message& ) ), - this, SLOT( receivedMessage( const Oscar::Message& ) ) ); + connect( d->messageReceiverTask, TQT_SIGNAL( receivedMessage( const Oscar::Message& ) ), + this, TQT_SLOT( receivedMessage( const Oscar::Message& ) ) ); - connect( d->ssiAuthTask, SIGNAL( authRequested( const QString&, const QString& ) ), - this, SIGNAL( authRequestReceived( const QString&, const QString& ) ) ); - connect( d->ssiAuthTask, SIGNAL( authReplied( const QString&, const QString&, bool ) ), - this, SIGNAL( authReplyReceived( const QString&, const QString&, bool ) ) ); + connect( d->ssiAuthTask, TQT_SIGNAL( authRequested( const TQString&, const TQString& ) ), + this, TQT_SIGNAL( authRequestReceived( const TQString&, const TQString& ) ) ); + connect( d->ssiAuthTask, TQT_SIGNAL( authReplied( const TQString&, const TQString&, bool ) ), + this, TQT_SIGNAL( authReplyReceived( const TQString&, const TQString&, bool ) ) ); - connect( d->icqInfoTask, SIGNAL( receivedInfoFor( const QString&, unsigned int ) ), - this, SLOT( receivedIcqInfo( const QString&, unsigned int ) ) ); + connect( d->icqInfoTask, TQT_SIGNAL( receivedInfoFor( const TQString&, unsigned int ) ), + this, TQT_SLOT( receivedIcqInfo( const TQString&, unsigned int ) ) ); - connect( d->userInfoTask, SIGNAL( receivedProfile( const QString&, const QString& ) ), - this, SIGNAL( receivedProfile( const QString&, const QString& ) ) ); - connect( d->userInfoTask, SIGNAL( receivedAwayMessage( const QString&, const QString& ) ), - this, SIGNAL( receivedAwayMessage( const QString&, const QString& ) ) ); - connect( d->typingNotifyTask, SIGNAL( typingStarted( const QString& ) ), - this, SIGNAL( userStartedTyping( const QString& ) ) ); - connect( d->typingNotifyTask, SIGNAL( typingFinished( const QString& ) ), - this, SIGNAL( userStoppedTyping( const QString& ) ) ); + connect( d->userInfoTask, TQT_SIGNAL( receivedProfile( const TQString&, const TQString& ) ), + this, TQT_SIGNAL( receivedProfile( const TQString&, const TQString& ) ) ); + connect( d->userInfoTask, TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ), + this, TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ) ); + connect( d->typingNotifyTask, TQT_SIGNAL( typingStarted( const TQString& ) ), + this, TQT_SIGNAL( userStartedTyping( const TQString& ) ) ); + connect( d->typingNotifyTask, TQT_SIGNAL( typingFinished( const TQString& ) ), + this, TQT_SIGNAL( userStoppedTyping( const TQString& ) ) ); } -void Client::removeGroup( const QString& groupName ) +void Client::removeGroup( const TQString& groupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -671,7 +671,7 @@ void Client::removeGroup( const QString& groupName ) delete ssimt; } -void Client::addGroup( const QString& groupName ) +void Client::addGroup( const TQString& groupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -685,7 +685,7 @@ void Client::addGroup( const QString& groupName ) delete ssimt; } -void Client::addContact( const QString& contactName, const QString& groupName ) +void Client::addContact( const TQString& contactName, const TQString& groupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -699,7 +699,7 @@ void Client::addContact( const QString& contactName, const QString& groupName ) delete ssimt; } -void Client::removeContact( const QString& contactName ) +void Client::removeContact( const TQString& contactName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -713,7 +713,7 @@ void Client::removeContact( const QString& contactName ) delete ssimt; } -void Client::renameGroup( const QString & oldGroupName, const QString & newGroupName ) +void Client::renameGroup( const TQString & oldGroupName, const TQString & newGroupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -764,7 +764,7 @@ void Client::modifySSIItem( const Oscar::SSI& oldItem, const Oscar::SSI& newItem } } -void Client::changeContactGroup( const QString& contact, const QString& newGroupName ) +void Client::changeContactGroup( const TQString& contact, const TQString& newGroupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -779,7 +779,7 @@ void Client::changeContactGroup( const QString& contact, const QString& newGroup delete ssimt; } -void Client::requestFullInfo( const QString& contactId ) +void Client::requestFullInfo( const TQString& contactId ) { Connection* c = d->connections.connectionForFamily( 0x0015 ); if ( !c ) @@ -789,7 +789,7 @@ void Client::requestFullInfo( const QString& contactId ) d->icqInfoTask->go(); } -void Client::requestShortInfo( const QString& contactId ) +void Client::requestShortInfo( const TQString& contactId ) { Connection* c = d->connections.connectionForFamily( 0x0015 ); if ( !c ) @@ -799,7 +799,7 @@ void Client::requestShortInfo( const QString& contactId ) d->icqInfoTask->go(); } -void Client::sendWarning( const QString& contact, bool anonymous ) +void Client::sendWarning( const TQString& contact, bool anonymous ) { Connection* c = d->connections.connectionForFamily( 0x0004 ); if ( !c ) @@ -807,62 +807,62 @@ void Client::sendWarning( const QString& contact, bool anonymous ) WarningTask* warnTask = new WarningTask( c->rootTask() ); warnTask->setContact( contact ); warnTask->setAnonymous( anonymous ); - QObject::connect( warnTask, SIGNAL( userWarned( const QString&, Q_UINT16, Q_UINT16 ) ), - this, SIGNAL( userWarned( const QString&, Q_UINT16, Q_UINT16 ) ) ); + TQObject::connect( warnTask, TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ), + this, TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ) ); warnTask->go( true ); } -ICQGeneralUserInfo Client::getGeneralInfo( const QString& contact ) +ICQGeneralUserInfo Client::getGeneralInfo( const TQString& contact ) { return d->icqInfoTask->generalInfoFor( contact ); } -ICQWorkUserInfo Client::getWorkInfo( const QString& contact ) +ICQWorkUserInfo Client::getWorkInfo( const TQString& contact ) { return d->icqInfoTask->workInfoFor( contact ); } -ICQEmailInfo Client::getEmailInfo( const QString& contact ) +ICQEmailInfo Client::getEmailInfo( const TQString& contact ) { return d->icqInfoTask->emailInfoFor( contact ); } -ICQMoreUserInfo Client::getMoreInfo( const QString& contact ) +ICQMoreUserInfo Client::getMoreInfo( const TQString& contact ) { return d->icqInfoTask->moreInfoFor( contact ); } -ICQInterestInfo Client::getInterestInfo( const QString& contact ) +ICQInterestInfo Client::getInterestInfo( const TQString& contact ) { return d->icqInfoTask->interestInfoFor( contact ); } -ICQShortInfo Client::getShortInfo( const QString& contact ) +ICQShortInfo Client::getShortInfo( const TQString& contact ) { return d->icqInfoTask->shortInfoFor( contact ); } -QValueList<int> Client::chatExchangeList() const +TQValueList<int> Client::chatExchangeList() const { return d->exchanges; } -void Client::setChatExchangeList( const QValueList<int>& exchanges ) +void Client::setChatExchangeList( const TQValueList<int>& exchanges ) { d->exchanges = exchanges; } -void Client::requestAIMProfile( const QString& contact ) +void Client::requestAIMProfile( const TQString& contact ) { d->userInfoTask->requestInfoFor( contact, UserInfoTask::Profile ); } -void Client::requestAIMAwayMessage( const QString& contact ) +void Client::requestAIMAwayMessage( const TQString& contact ) { d->userInfoTask->requestInfoFor( contact, UserInfoTask::AwayMessage ); } -void Client::requestICQAwayMessage( const QString& contact, ICQStatus contactStatus ) +void Client::requestICQAwayMessage( const TQString& contact, ICQStatus contactStatus ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "requesting away message for " << contact << endl; Oscar::Message msg; @@ -894,7 +894,7 @@ void Client::requestICQAwayMessage( const QString& contact, ICQStatus contactSta sendMessage( msg ); } -void Client::addICQAwayMessageRequest( const QString& contact, ICQStatus contactStatus ) +void Client::addICQAwayMessageRequest( const TQString& contact, ICQStatus contactStatus ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "adding away message request for " << contact << " to queue" << endl; @@ -909,12 +909,12 @@ void Client::addICQAwayMessageRequest( const QString& contact, ICQStatus contact d->awayMsgRequestTimer->start( 1000 ); } -void Client::removeICQAwayMessageRequest( const QString& contact ) +void Client::removeICQAwayMessageRequest( const TQString& contact ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "removing away message request for " << contact << " from queue" << endl; - QValueList<ClientPrivate::AwayMsgRequest>::iterator it = d->awayMsgRequestQueue.begin(); + TQValueList<ClientPrivate::AwayMsgRequest>::iterator it = d->awayMsgRequestQueue.begin(); while ( it != d->awayMsgRequestQueue.end() ) { if ( (*it).contact == contact ) @@ -962,7 +962,7 @@ void Client::nextICQAwayMessageRequest() requestICQAwayMessage( amr.contact, amr.contactStatus ); } -void Client::requestStatusInfo( const QString& contact ) +void Client::requestStatusInfo( const TQString& contact ) { d->userInfoTask->requestInfoFor( contact, UserInfoTask::General ); } @@ -973,27 +973,27 @@ void Client::whitePagesSearch( const ICQWPSearchInfo& info ) if ( !c ) return; UserSearchTask* ust = new UserSearchTask( c->rootTask() ); - connect( ust, SIGNAL( foundUser( const ICQSearchResult& ) ), - this, SIGNAL( gotSearchResults( const ICQSearchResult& ) ) ); - connect( ust, SIGNAL( searchFinished( int ) ), this, SIGNAL( endOfSearch( int ) ) ); + connect( ust, TQT_SIGNAL( foundUser( const ICQSearchResult& ) ), + this, TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ) ); + connect( ust, TQT_SIGNAL( searchFinished( int ) ), this, TQT_SIGNAL( endOfSearch( int ) ) ); ust->go( true ); //onGo does nothing in this task. This is just here so autodelete works ust->searchWhitePages( info ); } -void Client::uinSearch( const QString& uin ) +void Client::uinSearch( const TQString& uin ) { Connection* c = d->connections.connectionForFamily( 0x0015 ); if ( !c ) return; UserSearchTask* ust = new UserSearchTask( c->rootTask() ); - connect( ust, SIGNAL( foundUser( const ICQSearchResult& ) ), - this, SIGNAL( gotSearchResults( const ICQSearchResult& ) ) ); - connect( ust, SIGNAL( searchFinished( int ) ), this, SIGNAL( endOfSearch( int ) ) ); + connect( ust, TQT_SIGNAL( foundUser( const ICQSearchResult& ) ), + this, TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ) ); + connect( ust, TQT_SIGNAL( searchFinished( int ) ), this, TQT_SIGNAL( endOfSearch( int ) ) ); ust->go( true ); //onGo does nothing in this task. This is just here so autodelete works ust->searchUserByUIN( uin ); } -void Client::updateProfile( const QString& profile ) +void Client::updateProfile( const TQString& profile ) { Connection* c = d->connections.connectionForFamily( 0x0002 ); if ( !c ) @@ -1003,7 +1003,7 @@ void Client::updateProfile( const QString& profile ) pt->go(true); } -void Client::sendTyping( const QString & contact, bool typing ) +void Client::sendTyping( const TQString & contact, bool typing ) { Connection* c = d->connections.connectionForFamily( 0x0004 ); if ( !c ) @@ -1022,7 +1022,7 @@ void Client::connectToIconServer() return; } -void Client::setIgnore( const QString& user, bool ignore ) +void Client::setIgnore( const TQString& user, bool ignore ) { Oscar::SSI item = ssiManager()->findItem( user, ROSTER_IGNORE ); if ( item && !ignore ) @@ -1033,12 +1033,12 @@ void Client::setIgnore( const QString& user, bool ignore ) else if ( !item && ignore ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding " << user << " to ignore list" << endl; - Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_IGNORE, QValueList<TLV>() ); + Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_IGNORE, TQValueList<TLV>() ); this->modifySSIItem( Oscar::SSI(), s ); } } -void Client::setVisibleTo( const QString& user, bool visible ) +void Client::setVisibleTo( const TQString& user, bool visible ) { Oscar::SSI item = ssiManager()->findItem( user, ROSTER_VISIBLE ); if ( item && !visible ) @@ -1049,12 +1049,12 @@ void Client::setVisibleTo( const QString& user, bool visible ) else if ( !item && visible ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding " << user << " to visible list" << endl; - Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_VISIBLE, QValueList<TLV>() ); + Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_VISIBLE, TQValueList<TLV>() ); this->modifySSIItem( Oscar::SSI(), s ); } } -void Client::setInvisibleTo( const QString& user, bool invisible ) +void Client::setInvisibleTo( const TQString& user, bool invisible ) { Oscar::SSI item = ssiManager()->findItem( user, ROSTER_INVISIBLE ); if ( item && !invisible ) @@ -1065,20 +1065,20 @@ void Client::setInvisibleTo( const QString& user, bool invisible ) else if ( !item && invisible ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding " << user << " to invisible list" << endl; - Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_INVISIBLE, QValueList<TLV>() ); + Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_INVISIBLE, TQValueList<TLV>() ); this->modifySSIItem( Oscar::SSI(), s ); } } -void Client::requestBuddyIcon( const QString& user, const QByteArray& hash, BYTE hashType ) +void Client::requestBuddyIcon( const TQString& user, const TQByteArray& hash, BYTE hashType ) { Connection* c = d->connections.connectionForFamily( 0x0010 ); if ( !c ) return; BuddyIconTask* bit = new BuddyIconTask( c->rootTask() ); - connect( bit, SIGNAL( haveIcon( const QString&, QByteArray ) ), - this, SIGNAL( haveIconForContact( const QString&, QByteArray ) ) ); + connect( bit, TQT_SIGNAL( haveIcon( const TQString&, TQByteArray ) ), + this, TQT_SIGNAL( haveIconForContact( const TQString&, TQByteArray ) ) ); bit->requestIconFor( user ); bit->setHashType( hashType ); bit->setHash( hash ); @@ -1086,8 +1086,8 @@ void Client::requestBuddyIcon( const QString& user, const QByteArray& hash, BYTE } void Client::requestServerRedirect( WORD family, WORD exchange, - QByteArray cookie, WORD instance, - const QString& room ) + TQByteArray cookie, WORD instance, + const TQString& room ) { //making the assumption that family 2 will always be the BOS connection //use it instead since we can't query for family 1 @@ -1116,21 +1116,21 @@ void Client::requestServerRedirect( WORD family, WORD exchange, srt->setChatRoom( room ); } - connect( srt, SIGNAL( haveServer( const QString&, const QByteArray&, WORD ) ), - this, SLOT( haveServerForRedirect( const QString&, const QByteArray&, WORD ) ) ); + connect( srt, TQT_SIGNAL( haveServer( const TQString&, const TQByteArray&, WORD ) ), + this, TQT_SLOT( haveServerForRedirect( const TQString&, const TQByteArray&, WORD ) ) ); srt->setService( family ); srt->go( true ); } -void Client::haveServerForRedirect( const QString& host, const QByteArray& cookie, WORD ) +void Client::haveServerForRedirect( const TQString& host, const TQByteArray& cookie, WORD ) { //nasty sender() usage to get the task with chat room info - QObject* o = const_cast<QObject*>( sender() ); + TQObject* o = const_cast<TQObject*>( sender() ); ServerRedirectTask* srt = dynamic_cast<ServerRedirectTask*>( o ); //create a new connection and set it up int colonPos = host.find(':'); - QString realHost, realPort; + TQString realHost, realPort; if ( colonPos != -1 ) { realHost = host.left( colonPos ); @@ -1139,18 +1139,18 @@ void Client::haveServerForRedirect( const QString& host, const QByteArray& cooki else { realHost = host; - realPort = QString::fromLatin1("5190"); + realPort = TQString::fromLatin1("5190"); } Connection* c = createConnection( realHost, realPort ); //create the new login task m_loginTaskTwo = new StageTwoLoginTask( c->rootTask() ); m_loginTaskTwo->setCookie( cookie ); - QObject::connect( m_loginTaskTwo, SIGNAL( finished() ), this, SLOT( serverRedirectFinished() ) ); + TQObject::connect( m_loginTaskTwo, TQT_SIGNAL( finished() ), this, TQT_SLOT( serverRedirectFinished() ) ); //connect connectToServer( c, d->host, false ); - QObject::connect( c, SIGNAL( connected() ), this, SLOT( streamConnected() ) ); + TQObject::connect( c, TQT_SIGNAL( connected() ), this, TQT_SLOT( streamConnected() ) ); if ( srt ) d->connections.addChatInfoForConnection( c, srt->chatExchange(), srt->chatRoomName() ); @@ -1176,8 +1176,8 @@ void Client::serverRedirectFinished() if ( d->currentRedirect == 0x000D ) { - connect( this, SIGNAL( chatNavigationConnected() ), - this, SLOT( requestChatNavLimits() ) ); + connect( this, TQT_SIGNAL( chatNavigationConnected() ), + this, TQT_SLOT( requestChatNavLimits() ) ); emit chatNavigationConnected(); } @@ -1192,18 +1192,18 @@ void Client::serverRedirectFinished() } Connection* c = m_loginTaskTwo->client(); - QString roomName = d->connections.chatRoomForConnection( c ); + TQString roomName = d->connections.chatRoomForConnection( c ); WORD exchange = d->connections.exchangeForConnection( c ); if ( c ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting up chat connection" << endl; ChatServiceTask* cst = new ChatServiceTask( c->rootTask(), exchange, roomName ); - connect( cst, SIGNAL( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ), - this, SIGNAL( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ) ); - connect( cst, SIGNAL( userLeftChat( Oscar::WORD, const QString&, const QString& ) ), - this, SIGNAL( userLeftChat( Oscar::WORD, const QString&, const QString& ) ) ); - connect( cst, SIGNAL( newChatMessage( const Oscar::Message& ) ), - this, SIGNAL( messageReceived( const Oscar::Message& ) ) ); + connect( cst, TQT_SIGNAL( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SIGNAL( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ) ); + connect( cst, TQT_SIGNAL( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SIGNAL( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ) ); + connect( cst, TQT_SIGNAL( newChatMessage( const Oscar::Message& ) ), + this, TQT_SIGNAL( messageReceived( const Oscar::Message& ) ) ); } emit chatRoomConnected( exchange, roomName ); } @@ -1234,19 +1234,19 @@ void Client::requestChatNavLimits() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "requesting chat nav service limits" << endl; ChatNavServiceTask* cnst = new ChatNavServiceTask( c->rootTask() ); cnst->setRequestType( ChatNavServiceTask::Limits ); - QObject::connect( cnst, SIGNAL( haveChatExchanges( const QValueList<int>& ) ), - this, SLOT( setChatExchangeList( const QValueList<int>& ) ) ); + TQObject::connect( cnst, TQT_SIGNAL( haveChatExchanges( const TQValueList<int>& ) ), + this, TQT_SLOT( setChatExchangeList( const TQValueList<int>& ) ) ); cnst->go( true ); //autodelete } -void Client::determineDisconnection( int code, const QString& string ) +void Client::determineDisconnection( int code, const TQString& string ) { if ( !sender() ) return; //yay for the sender() hack! - QObject* obj = const_cast<QObject*>( sender() ); + TQObject* obj = const_cast<TQObject*>( sender() ); Connection* c = dynamic_cast<Connection*>( obj ); if ( !c ) return; @@ -1262,7 +1262,7 @@ void Client::determineDisconnection( int code, const QString& string ) c = 0; } -void Client::sendBuddyIcon( const QByteArray& iconData ) +void Client::sendBuddyIcon( const TQByteArray& iconData ) { Connection* c = d->connections.connectionForFamily( 0x0010 ); if ( !c ) @@ -1274,7 +1274,7 @@ void Client::sendBuddyIcon( const QByteArray& iconData ) bit->go( true ); } -void Client::joinChatRoom( const QString& roomName, int exchange ) +void Client::joinChatRoom( const TQString& roomName, int exchange ) { Connection* c = d->connections.connectionForFamily( 0x000D ); if ( !c ) @@ -1283,21 +1283,21 @@ void Client::joinChatRoom( const QString& roomName, int exchange ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "joining the chat room '" << roomName << "' on exchange " << exchange << endl; ChatNavServiceTask* cnst = new ChatNavServiceTask( c->rootTask() ); - connect( cnst, SIGNAL( connectChat( WORD, QByteArray, WORD, const QString& ) ), - this, SLOT( setupChatConnection( WORD, QByteArray, WORD, const QString& ) ) ); + connect( cnst, TQT_SIGNAL( connectChat( WORD, TQByteArray, WORD, const TQString& ) ), + this, TQT_SLOT( setupChatConnection( WORD, TQByteArray, WORD, const TQString& ) ) ); cnst->createRoom( exchange, roomName ); } -void Client::setupChatConnection( WORD exchange, QByteArray cookie, WORD instance, const QString& room ) +void Client::setupChatConnection( WORD exchange, TQByteArray cookie, WORD instance, const TQString& room ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "cookie is:" << cookie << endl; - QByteArray realCookie( cookie ); + TQByteArray realCookie( cookie ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "connection to chat room" << endl; requestServerRedirect( 0x000E, exchange, realCookie, instance, room ); } -void Client::disconnectChatRoom( WORD exchange, const QString& room ) +void Client::disconnectChatRoom( WORD exchange, const TQString& room ) { Connection* c = d->connections.connectionForChatRoom( exchange, room ); if ( !c ) @@ -1308,7 +1308,7 @@ void Client::disconnectChatRoom( WORD exchange, const QString& room ) } -Connection* Client::createConnection( const QString& host, const QString& port ) +Connection* Client::createConnection( const TQString& host, const TQString& port ) { KNetworkConnector* knc = new KNetworkConnector( 0 ); knc->setOptHostPort( host, port.toUInt() ); diff --git a/kopete/protocols/oscar/liboscar/client.h b/kopete/protocols/oscar/liboscar/client.h index f5dc531e..5c619c33 100644 --- a/kopete/protocols/oscar/liboscar/client.h +++ b/kopete/protocols/oscar/liboscar/client.h @@ -23,8 +23,8 @@ #ifndef LIBOSCAR_CLIENT_H #define LIBOSCAR_CLIENT_H -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> #include "kopete_export.h" #include "rtf2html.h" #include "transfer.h" @@ -56,8 +56,8 @@ public: class CodecProvider { public: virtual ~CodecProvider() {} - virtual QTextCodec* codecForContact( const QString& contactName ) const = 0; - virtual QTextCodec* codecForAccount() const = 0; + virtual TQTextCodec* codecForContact( const TQString& contactName ) const = 0; + virtual TQTextCodec* codecForAccount() const = 0; }; enum ErrorCodes { @@ -74,7 +74,7 @@ public: EXTERNAL API *************/ - Client(QObject *parent=0); + Client(TQObject *parent=0); ~Client(); /** @@ -89,7 +89,7 @@ public: * @param server the server to connect to - but this is also set on the connector used to construct the clientstream?? * @param auth indicate whether we're connecting to the authorizer or the bos server */ - void connectToServer( Connection *c, const QString& server, bool auth = true ); + void connectToServer( Connection *c, const TQString& server, bool auth = true ); /** * Start the login process for Oscar @@ -97,14 +97,14 @@ public: * @param user The user name to log in as. * @param pass The password to use when logging in */ - void start( const QString &host, const uint port, const QString &userId, const QString &pass ); + void start( const TQString &host, const uint port, const TQString &userId, const TQString &pass ); /** Logout and disconnect */ void close(); /** Set our status for AIM */ - void setStatus( AIMStatus status, const QString &message = QString::null ); + void setStatus( AIMStatus status, const TQString &message = TQString::null ); /** Set our status for ICQ */ - void setStatus( DWORD status, const QString &message = QString::null ); + void setStatus( DWORD status, const TQString &message = TQString::null ); /** Retrieve our user info */ UserDetails ourInfo() const; @@ -114,35 +114,35 @@ public: * \param groupName the name of the group to remove * \return true if the group removal was successful */ - void removeGroup( const QString& groupName ); + void removeGroup( const TQString& groupName ); /** * Add a group from the contact list * \param groupName the name of the group to add * \return true if the group addition was successful */ - void addGroup( const QString& groupName ); + void addGroup( const TQString& groupName ); /** * Add a contact to the contact list * \param contactName the screen name of the new contact to add * \return true if the contact addition was successful */ - void addContact( const QString& contactName, const QString& groupName ); + void addContact( const TQString& contactName, const TQString& groupName ); /** * Remove a contact from the contact list * \param contactName the screen name of the contact to remove * \return true if the contact removal was successful */ - void removeContact( const QString &contactName ); + void removeContact( const TQString &contactName ); /** * Rename a group on the contact list * \param oldGroupName the old group name * \param newGroupName the new group name */ - void renameGroup( const QString& oldGroupName, const QString& newGroupName ); + void renameGroup( const TQString& oldGroupName, const TQString& newGroupName ); /** * Modify an SSI item on the SSI list @@ -155,7 +155,7 @@ public: * \param contact the contact to change * \param newGroup the new group to move the contact to */ - void changeContactGroup( const QString& contact, const QString& newGroupName ); + void changeContactGroup( const TQString& contact, const TQString& newGroupName ); /** * Send a message to a contact @@ -169,7 +169,7 @@ public: * \param contactid the id of the contact to request auth from * \param reason the reason for this authorization request */ - void requestAuth( const QString& contactid, const QString& reason ); + void requestAuth( const TQString& contactid, const TQString& reason ); /** * Grant or decline authorization to a contact @@ -177,128 +177,128 @@ public: * \param reason the reason to grant/decline authorization * \param auth grant or decline authorization */ - void sendAuth( const QString& contactid, const QString& reason, bool auth=true ); + void sendAuth( const TQString& contactid, const TQString& reason, bool auth=true ); /** * Request full user info from an ICQ contact * \param contactId the UIN of the contact to get info for */ - void requestFullInfo( const QString& contactId ); + void requestFullInfo( const TQString& contactId ); /** * Request short info for an ICQ contact * \param contactId the UIN of the contact to get info for */ - void requestShortInfo( const QString& contactId ); + void requestShortInfo( const TQString& contactId ); /** * Send a warning to the OSCAR servers about a contact * \param contact the contact to send the warning to * \param anon indicate whether to do it anonymously */ - void sendWarning( const QString& contact, bool anonymous ); + void sendWarning( const TQString& contact, bool anonymous ); /** * Get the general ICQ info for a client * \param contact the contact to get info for */ - ICQGeneralUserInfo getGeneralInfo( const QString& contact ); + ICQGeneralUserInfo getGeneralInfo( const TQString& contact ); /** * Get the work info for a contact * \param contact the contact to get info for */ - ICQWorkUserInfo getWorkInfo( const QString& contact ); + ICQWorkUserInfo getWorkInfo( const TQString& contact ); /** * Get the email info for a contact * \param contact the contact to get info for */ - ICQEmailInfo getEmailInfo( const QString& contact ); + ICQEmailInfo getEmailInfo( const TQString& contact ); /** * Get the additional info available for a contact * \param contact the contact to get info for */ - ICQMoreUserInfo getMoreInfo( const QString& contact ); + ICQMoreUserInfo getMoreInfo( const TQString& contact ); /** * Get the interest info available for a contact * \param contact the contact to get info for */ - ICQInterestInfo getInterestInfo( const QString& contact ); + ICQInterestInfo getInterestInfo( const TQString& contact ); /** * Get the short info available for an icq contact * \param contact the contact to get info for */ - ICQShortInfo getShortInfo( const QString& contact ); + ICQShortInfo getShortInfo( const TQString& contact ); /** * Get the list of chat room exchanges we have */ - QValueList<int> chatExchangeList() const; + TQValueList<int> chatExchangeList() const; /** * Request the aim profile * \param contact the contact to get info for */ - void requestAIMProfile( const QString& contact ); + void requestAIMProfile( const TQString& contact ); /** * Request the aim away message * \param contact the contact to get info for */ - void requestAIMAwayMessage( const QString& contact ); + void requestAIMAwayMessage( const TQString& contact ); /** * Add the icq away message request to queue * \param contact the contact to get info for */ - void addICQAwayMessageRequest( const QString& contact, ICQStatus contactStatus ); + void addICQAwayMessageRequest( const TQString& contact, ICQStatus contactStatus ); /** * Remove the icq away message request from queue * \param contact the contact to get info for */ - void removeICQAwayMessageRequest( const QString& contact ); + void removeICQAwayMessageRequest( const TQString& contact ); /** Request the extended status info */ - void requestStatusInfo( const QString& contact ); + void requestStatusInfo( const TQString& contact ); //! Run a whitepages search void whitePagesSearch( const ICQWPSearchInfo& info ); //! Run a UIN search - void uinSearch( const QString& uin ); + void uinSearch( const TQString& uin ); //! Update the user's AIM profile - void updateProfile( const QString& profile ); + void updateProfile( const TQString& profile ); //! Get buddy icon information for a person - void requestBuddyIcon( const QString& user, const QByteArray& hash, BYTE hashType ); + void requestBuddyIcon( const TQString& user, const TQByteArray& hash, BYTE hashType ); //! Start a server redirect for a different service - void requestServerRedirect( WORD family, WORD e = 0, QByteArray c = QByteArray(), - WORD instance = 0, const QString& room = QString::null ); + void requestServerRedirect( WORD family, WORD e = 0, TQByteArray c = TQByteArray(), + WORD instance = 0, const TQString& room = TQString::null ); //! Start uploading a buddy icon - void sendBuddyIcon( const QByteArray& imageData ); + void sendBuddyIcon( const TQByteArray& imageData ); - void joinChatRoom( const QString& roomName, int exchange ); + void joinChatRoom( const TQString& roomName, int exchange ); - void setIgnore( const QString& user, bool ignore ); + void setIgnore( const TQString& user, bool ignore ); - void setVisibleTo( const QString& user, bool visible ); + void setVisibleTo( const TQString& user, bool visible ); - void setInvisibleTo( const QString& user, bool invisible ); + void setInvisibleTo( const TQString& user, bool invisible ); /** Accessors needed for login */ - QString host(); + TQString host(); int port(); /** Send a typing notification */ - void sendTyping( const QString & contact, bool typing ); + void sendTyping( const TQString & contact, bool typing ); /** Make a connection to the icon server */ void connectToIconServer(); @@ -306,7 +306,7 @@ public: bool hasIconConnection() const; /** We've finished chatting in a chat room, disconnect from it */ - void disconnectChatRoom( WORD exchange, const QString& room ); + void disconnectChatRoom( WORD exchange, const TQString& room ); /** Set codec provider */ void setCodecProvider( CodecProvider* codecProvider ); @@ -320,7 +320,7 @@ public: /** * Print a debug statement */ - void debug( const QString &str ); + void debug( const TQString &str ); /** Have we logged in yet? */ bool isActive() const; @@ -332,29 +332,29 @@ public: const Oscar::ClientVersion* version() const; /** The current user's user ID */ - QString userId() const; + TQString userId() const; /** The current user's password */ - QString password() const; + TQString password() const; /** The current status message (a.k.a. away message) */ - QString statusMessage() const; + TQString statusMessage() const; /** Change the current status message w/o changing status */ - void setStatusMessage( const QString &message ); + void setStatusMessage( const TQString &message ); /** ICQ Settings */ bool isIcq() const; void setIsIcq( bool isIcq ); /** Host's IP address */ - QCString ipAddress() const; + TQCString ipAddress() const; /** Notify that a task error was received */ void notifyTaskError( const Oscar::SNAC& s, int errCode, bool fatal ); /** Notify that a socket error has occured */ - void notifySocketError( int errCode, const QString& msg ); + void notifySocketError( int errCode, const TQString& msg ); signals: /** CONNECTION EVENTS */ @@ -378,19 +378,19 @@ signals: void haveSSIList(); /** a user is online. */ - void userIsOnline( const QString& ); + void userIsOnline( const TQString& ); /** a user is offline. */ - void userIsOffline( const QString& ); + void userIsOffline( const TQString& ); /** we've received a message */ void messageReceived( const Oscar::Message& ); /** we've received an authorization request */ - void authRequestReceived( const QString& contact, const QString& reason ); + void authRequestReceived( const TQString& contact, const TQString& reason ); /** we've received an authorization reply */ - void authReplyReceived( const QString& contact, const QString& reason, bool auth ); + void authReplyReceived( const TQString& contact, const TQString& reason, bool auth ); /** * we've received an error from a task and need to notify somebody @@ -400,37 +400,37 @@ signals: /** * we've received a socket error and need to notify somebody */ - void socketError( int errCode, const QString& msg ); + void socketError( int errCode, const TQString& msg ); - void receivedIcqShortInfo( const QString& contact ); - void receivedIcqLongInfo( const QString& contact ); + void receivedIcqShortInfo( const TQString& contact ); + void receivedIcqLongInfo( const TQString& contact ); - void receivedProfile( const QString& contact, const QString& profile ); - void receivedAwayMessage( const QString& contact, const QString& message ); + void receivedProfile( const TQString& contact, const TQString& profile ); + void receivedAwayMessage( const TQString& contact, const TQString& message ); void receivedAwayMessage( const Oscar::Message& message ); - void receivedUserInfo( const QString& contact, const UserDetails& details ); + void receivedUserInfo( const TQString& contact, const UserDetails& details ); /** We warned a user */ - void userWarned( const QString& contact, Q_UINT16 increase, Q_UINT16 newLevel ); + void userWarned( const TQString& contact, Q_UINT16 increase, Q_UINT16 newLevel ); /** Search signals */ void gotSearchResults( const ICQSearchResult& ); void endOfSearch( int); /* Typing signals */ - void userStartedTyping( const QString& contact ); - void userStoppedTyping( const QString& contact ); + void userStartedTyping( const TQString& contact ); + void userStoppedTyping( const TQString& contact ); /* Buddy icons */ - void haveIconForContact( const QString&, QByteArray iconData ); + void haveIconForContact( const TQString&, TQByteArray iconData ); void iconServerConnected(); void iconNeedsUploading(); /* Chat rooms */ void chatNavigationConnected(); - void chatRoomConnected( WORD, const QString& ); - void userJoinedChat( Oscar::WORD, const QString& room, const QString& contact ); - void userLeftChat( Oscar::WORD, const QString& room, const QString& contact ); + void chatRoomConnected( WORD, const TQString& ); + void userJoinedChat( Oscar::WORD, const TQString& room, const TQString& contact ); + void userLeftChat( Oscar::WORD, const TQString& room, const TQString& contact ); /* service redirection */ void redirectionFinished( WORD ); @@ -459,7 +459,7 @@ protected slots: void serviceSetupFinished(); /** we have icq info for a contact */ - void receivedIcqInfo( const QString& contact, unsigned int type ); + void receivedIcqInfo( const TQString& contact, unsigned int type ); /** we have normal user info for a contact */ void receivedInfo( Q_UINT16 sequence ); @@ -467,9 +467,9 @@ protected slots: /** received a message of some kind */ void receivedMessage( const Oscar::Message& msg ); - void offlineUser( const QString&, const UserDetails& ); + void offlineUser( const TQString&, const UserDetails& ); - void haveServerForRedirect( const QString& host, const QByteArray& cookie, WORD family ); + void haveServerForRedirect( const TQString& host, const TQByteArray& cookie, WORD family ); void serverRedirectFinished(); void checkRedirectionQueue( WORD ); @@ -477,15 +477,15 @@ protected slots: /** * Set the list of chat room exchanges we have */ - void setChatExchangeList( const QValueList<int>& exchanges ); + void setChatExchangeList( const TQValueList<int>& exchanges ); /** * set up the connection to a chat room */ - void setupChatConnection( WORD, QByteArray, WORD, const QString& ); + void setupChatConnection( WORD, TQByteArray, WORD, const TQString& ); - void determineDisconnection( int, const QString& ); + void determineDisconnection( int, const TQString& ); void nextICQAwayMessageRequest(); @@ -497,14 +497,14 @@ private: /** Delete the static tasks */ void deleteStaticTasks(); - Connection* createConnection( const QString& host, const QString& port ); + Connection* createConnection( const TQString& host, const TQString& port ); /** * Request the icq away message * \param contact the contact to get info for */ //TODO only made a default for testing w/o frontend - void requestICQAwayMessage( const QString& contact, ICQStatus contactStatus = ICQAway ); + void requestICQAwayMessage( const TQString& contact, ICQStatus contactStatus = ICQAway ); private: class ClientPrivate; diff --git a/kopete/protocols/oscar/liboscar/clientreadytask.cpp b/kopete/protocols/oscar/liboscar/clientreadytask.cpp index 3338f7b3..d5b65069 100644 --- a/kopete/protocols/oscar/liboscar/clientreadytask.cpp +++ b/kopete/protocols/oscar/liboscar/clientreadytask.cpp @@ -38,7 +38,7 @@ ClientReadyTask::~ClientReadyTask() { } -void ClientReadyTask::setFamilies( const QValueList<int>& families ) +void ClientReadyTask::setFamilies( const TQValueList<int>& families ) { m_familyList = families; } @@ -52,8 +52,8 @@ void ClientReadyTask::onGo() kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Sending client ready, end of login" << endl; //nasty nasty nasty hack to get all the packets to work - QValueList<int>::const_iterator rcEnd = m_familyList.constEnd(); - for ( QValueList<int>::const_iterator it = m_familyList.constBegin(); it != rcEnd; ++it ) + TQValueList<int>::const_iterator rcEnd = m_familyList.constEnd(); + for ( TQValueList<int>::const_iterator it = m_familyList.constBegin(); it != rcEnd; ++it ) { //I have no idea what any of these values mean. I just copied them from oscarsocket int i = ( *it ); @@ -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, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/clientreadytask.h b/kopete/protocols/oscar/liboscar/clientreadytask.h index 4a9ea941..d632351f 100644 --- a/kopete/protocols/oscar/liboscar/clientreadytask.h +++ b/kopete/protocols/oscar/liboscar/clientreadytask.h @@ -20,7 +20,7 @@ #include "task.h" #include "rateclass.h" -#include "qvaluelist.h" +#include "tqvaluelist.h" /** Fire and forget task to let the server know we're ready @@ -34,11 +34,11 @@ public: ~ClientReadyTask(); virtual void onGo(); - void setFamilies( const QValueList<int>& families ); + void setFamilies( const TQValueList<int>& families ); private: - QValueList<RateClass*> m_classList; - QValueList<int> m_familyList; + TQValueList<RateClass*> m_classList; + TQValueList<int> m_familyList; }; #endif diff --git a/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp b/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp index 54926949..3b062b2a 100644 --- a/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp +++ b/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp @@ -18,8 +18,8 @@ #include "closeconnectiontask.h" -#include <qstring.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqvaluelist.h> #include <kdebug.h> #include <klocale.h> #include "connection.h" @@ -38,24 +38,24 @@ CloseConnectionTask::~CloseConnectionTask() { } -const QByteArray& CloseConnectionTask::cookie() const +const TQByteArray& CloseConnectionTask::cookie() const { return m_cookie; } -const QString& CloseConnectionTask::bosHost() const +const TQString& CloseConnectionTask::bosHost() const { return m_bosHost; } -const QString& CloseConnectionTask::bosPort() const +const TQString& CloseConnectionTask::bosPort() const { return m_bosPort; } bool CloseConnectionTask::take( Transfer* transfer ) { - QString errorReason; + TQString errorReason; WORD errorNum = 0; if ( forMe( transfer ) ) { @@ -70,12 +70,12 @@ bool CloseConnectionTask::take( Transfer* transfer ) return false; } - QValueList<TLV> tlvList = ft->buffer()->getTLVList(); + TQValueList<TLV> tlvList = ft->buffer()->getTLVList(); TLV uin = findTLV( tlvList, 0x0001 ); if ( uin ) { - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(1) [UIN], uin=" << QString( uin.data ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(1) [UIN], uin=" << TQString( uin.data ) << endl; } TLV err = findTLV( tlvList, 0x0008 ); @@ -96,8 +96,8 @@ bool CloseConnectionTask::take( Transfer* transfer ) TLV server = findTLV( tlvList, 0x0005 ); if ( server ) { - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(5) [SERVER] " << QString( server.data ) << endl; - QString ip = server.data; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(5) [SERVER] " << TQString( server.data ) << endl; + TQString ip = server.data; int index = ip.find( ':' ); m_bosHost = ip.left( index ); ip.remove( 0 , index+1 ); //get rid of the colon and everything before it diff --git a/kopete/protocols/oscar/liboscar/closeconnectiontask.h b/kopete/protocols/oscar/liboscar/closeconnectiontask.h index b241b07e..35c2ed18 100644 --- a/kopete/protocols/oscar/liboscar/closeconnectiontask.h +++ b/kopete/protocols/oscar/liboscar/closeconnectiontask.h @@ -20,7 +20,7 @@ #define CLOSECONNECTIONTASK_H #include <task.h> -#include <qcstring.h> +#include <tqcstring.h> class Transfer; class QString; @@ -38,21 +38,21 @@ public: virtual bool take(Transfer* transfer); //Protocol specific stuff - const QByteArray& cookie() const; - const QString& bosHost() const; - const QString& bosPort() const; + const TQByteArray& cookie() const; + const TQString& bosHost() const; + const TQString& bosPort() const; protected: virtual bool forMe(const Transfer* transfer) const; private: - bool parseDisconnectCode( int error, QString& reason ); + bool parseDisconnectCode( int error, TQString& reason ); private: - QByteArray m_cookie; - QString m_bosHost; - QString m_bosPort; + TQByteArray m_cookie; + TQString m_bosHost; + TQString m_bosPort; }; diff --git a/kopete/protocols/oscar/liboscar/connection.cpp b/kopete/protocols/oscar/liboscar/connection.cpp index c7cbc0fe..a4bc4877 100644 --- a/kopete/protocols/oscar/liboscar/connection.cpp +++ b/kopete/protocols/oscar/liboscar/connection.cpp @@ -38,7 +38,7 @@ public: DWORD snacSequence; WORD flapSequence; - QValueList<int> familyList; + TQValueList<int> familyList; RateClassManager* rateClassManager; ClientStream* clientStream; @@ -51,7 +51,7 @@ public: Connection::Connection( Connector* connector, ClientStream* cs, const char* name ) -: QObject( 0, name ) +: TQObject( 0, name ) { d = new ConnectionPrivate(); d->clientStream = cs; @@ -77,14 +77,14 @@ Connection::~Connection() void Connection::setClient( Client* c ) { d->client = c; - connect( c, SIGNAL( loggedIn() ), this, SLOT( loggedIn() ) ); + connect( c, TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( loggedIn() ) ); } -void Connection::connectToServer( const QString& host, bool auth ) +void Connection::connectToServer( const TQString& host, bool auth ) { - connect( d->clientStream, SIGNAL( error( int ) ), this, SLOT( streamSocketError( int ) ) ); - connect( d->clientStream, SIGNAL( readyRead() ), this, SLOT( streamReadyRead() ) ); - connect( d->clientStream, SIGNAL( connected() ), this, SIGNAL( connected() ) ); + connect( d->clientStream, TQT_SIGNAL( error( int ) ), this, TQT_SLOT( streamSocketError( int ) ) ); + connect( d->clientStream, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( streamReadyRead() ) ); + connect( d->clientStream, TQT_SIGNAL( connected() ), this, TQT_SIGNAL( connected() ) ); d->clientStream->connectToServer( host, auth ); } @@ -99,12 +99,12 @@ bool Connection::isSupported( int family ) const return ( d->familyList.findIndex( family ) != -1 ); } -QValueList<int> Connection::supportedFamilies() const +TQValueList<int> Connection::supportedFamilies() const { return d->familyList; } -void Connection::addToSupportedFamilies( const QValueList<int>& familyList ) +void Connection::addToSupportedFamilies( const TQValueList<int>& familyList ) { d->familyList += familyList; } @@ -144,12 +144,12 @@ Q_UINT32 Connection::snacSequence() return d->snacSequence; } -QString Connection::userId() const +TQString Connection::userId() const { return d->client->userId(); } -QString Connection::password() const +TQString Connection::password() const { return d->client->password(); } diff --git a/kopete/protocols/oscar/liboscar/connection.h b/kopete/protocols/oscar/liboscar/connection.h index 4170857e..f2c1da75 100644 --- a/kopete/protocols/oscar/liboscar/connection.h +++ b/kopete/protocols/oscar/liboscar/connection.h @@ -18,8 +18,8 @@ Kopete (c) 2002-2005 by the Kopete developers <kopete-devel@kde.org> #ifndef CONNECTION_H #define CONNECTION_H -#include <qobject.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqvaluelist.h> #include "oscartypes.h" #include "rateclass.h" @@ -55,7 +55,7 @@ public: void setClient( Client* ); - void connectToServer( const QString& server, bool auth = true ); + void connectToServer( const TQString& server, bool auth = true ); /** * Close the connection and reset the connection data */ @@ -72,14 +72,14 @@ public: * Get the list of supported families * @return The list of families supported on this connection */ - QValueList<int> supportedFamilies() const; + TQValueList<int> supportedFamilies() const; /** * Add the SNAC families in \p familyList to the list of supported families for * this connection * \param familyList the list of families to add */ - void addToSupportedFamilies( const QValueList<int>& familyList ); + void addToSupportedFamilies( const TQValueList<int>& familyList ); /** * Add the SNAC family in \p family to the list of supported families for @@ -94,7 +94,7 @@ public: * need to be filtered on * \param rateClassList the list of rate classes to add */ - void addToRateClasses( const QValueList<RateClass*> rateClassList ); + void addToRateClasses( const TQValueList<RateClass*> rateClassList ); /** * Add the rate class in \p rc to the list of rate classes packets @@ -125,7 +125,7 @@ public: /** * Get the chat room name for this connection. - * @return the name of the room or QString::null if not connected to a room + * @return the name of the room or TQString::null if not connected to a room */ /** Get the user settings object */ @@ -138,10 +138,10 @@ public: Q_UINT32 snacSequence(); /** Get the cookie for this connection */ - QByteArray cookie() const; + TQByteArray cookie() const; - QString userId() const; - QString password() const; + TQString userId() const; + TQString password() const; bool isIcq() const; SSIManager* ssiManager() const; const Oscar::ClientVersion* version() const; @@ -176,7 +176,7 @@ signals: * \param errCode the error code from the operating system * \param errString the i18n'ed string that describes the error */ - void socketError( int errCode, const QString& errString ); + void socketError( int errCode, const TQString& errString ); private: diff --git a/kopete/protocols/oscar/liboscar/connectionhandler.cpp b/kopete/protocols/oscar/liboscar/connectionhandler.cpp index bf5706ee..bd4df3c5 100644 --- a/kopete/protocols/oscar/liboscar/connectionhandler.cpp +++ b/kopete/protocols/oscar/liboscar/connectionhandler.cpp @@ -17,7 +17,7 @@ */ #include "connectionhandler.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <kdebug.h> #include "connection.h" #include "oscartypes.h" @@ -25,8 +25,8 @@ class ConnectionHandler::Private { public: - QValueList<Connection*> connections; - QMap<Connection*, ConnectionRoomInfo> chatRoomConnections; + TQValueList<Connection*> connections; + TQMap<Connection*, ConnectionRoomInfo> chatRoomConnections; }; ConnectionHandler::ConnectionHandler() @@ -57,8 +57,8 @@ void ConnectionHandler::remove( int family ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Removing all connections " << "supporting family " << family << endl; - QValueList<Connection*>::iterator it = d->connections.begin(); - QValueList<Connection*>::iterator itEnd = d->connections.end(); + TQValueList<Connection*>::iterator it = d->connections.begin(); + TQValueList<Connection*>::iterator itEnd = d->connections.end(); for ( ; it != itEnd; ++it ) { if ( ( *it )->isSupported( family ) ) @@ -84,8 +84,8 @@ void ConnectionHandler::clear() Connection* ConnectionHandler::connectionForFamily( int family ) const { - QValueList<Connection*>::iterator it = d->connections.begin(); - QValueList<Connection*>::iterator itEnd = d->connections.end(); + TQValueList<Connection*>::iterator it = d->connections.begin(); + TQValueList<Connection*>::iterator itEnd = d->connections.end(); int connectionCount = 0; Connection* lastConnection = 0; for ( ; it != itEnd; ++it ) @@ -110,7 +110,7 @@ Connection* ConnectionHandler::defaultConnection() const return d->connections.first(); } -void ConnectionHandler::addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const QString& room ) +void ConnectionHandler::addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const TQString& room ) { if ( d->connections.findIndex( c ) == -1 ) d->connections.append( c ); @@ -119,10 +119,10 @@ void ConnectionHandler::addChatInfoForConnection( Connection* c, Oscar::WORD exc d->chatRoomConnections[c] = info; } -Connection* ConnectionHandler::connectionForChatRoom( Oscar::WORD exchange, const QString& room ) +Connection* ConnectionHandler::connectionForChatRoom( Oscar::WORD exchange, const TQString& room ) { ConnectionRoomInfo infoToFind = qMakePair( exchange, room ); - QMap<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end(); + TQMap<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end(); for ( it = d->chatRoomConnections.begin(); it != itEnd; ++it ) { if ( it.data() == infoToFind ) @@ -135,22 +135,22 @@ Connection* ConnectionHandler::connectionForChatRoom( Oscar::WORD exchange, cons return 0; } -QString ConnectionHandler::chatRoomForConnection( Connection* c ) +TQString ConnectionHandler::chatRoomForConnection( Connection* c ) { if ( d->connections.findIndex( c ) == -1 ) - return QString::null; + return TQString::null; - QMap<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end(); + TQMap<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end(); for ( it = d->chatRoomConnections.begin(); it != itEnd; ++it ) { if ( it.key() == c ) { - QString room = it.data().second; + TQString room = it.data().second; return room; } } - return QString::null; + return TQString::null; } Oscar::WORD ConnectionHandler::exchangeForConnection( Connection* c ) @@ -159,7 +159,7 @@ Oscar::WORD ConnectionHandler::exchangeForConnection( Connection* c ) if ( d->connections.findIndex( c ) == -1 ) return 0xFFFF; - QMap<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end(); + TQMap<Connection*, ConnectionRoomInfo>::iterator it, itEnd = d->chatRoomConnections.end(); for ( it = d->chatRoomConnections.begin(); it != itEnd; ++it ) { if ( it.key() == c ) diff --git a/kopete/protocols/oscar/liboscar/connectionhandler.h b/kopete/protocols/oscar/liboscar/connectionhandler.h index 6094cab3..e8c50b12 100644 --- a/kopete/protocols/oscar/liboscar/connectionhandler.h +++ b/kopete/protocols/oscar/liboscar/connectionhandler.h @@ -20,13 +20,13 @@ #define CONNECTIONHANDLER_H #include "oscartypes.h" -#include <qstring.h> -#include <qpair.h> +#include <tqstring.h> +#include <tqpair.h> class Connection; -typedef QPair<Oscar::WORD, QString> ConnectionRoomInfo; +typedef QPair<Oscar::WORD, TQString> ConnectionRoomInfo; /** @author Kopete Developers @@ -84,7 +84,7 @@ public: * @param exchange the exchange the chat room is in * @param room the name of the chat room */ - void addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const QString& room ); + void addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const TQString& room ); /** * Get the connection for a particular room name and exchange number. @@ -92,15 +92,15 @@ public: * @param room the name of the chat room to find a connection for * @return a Connection for the chat room or 0L if no connection for that room */ - Connection* connectionForChatRoom( Oscar::WORD exchange, const QString& room ); + Connection* connectionForChatRoom( Oscar::WORD exchange, const TQString& room ); /** * 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 - * QString::null is returned. + * TQString::null is returned. */ - QString chatRoomForConnection( Connection* c ); + TQString chatRoomForConnection( Connection* c ); /** * Get the exchange number for the chat room based on the connection diff --git a/kopete/protocols/oscar/liboscar/connector.cpp b/kopete/protocols/oscar/liboscar/connector.cpp index 03a61882..c754e2d3 100644 --- a/kopete/protocols/oscar/liboscar/connector.cpp +++ b/kopete/protocols/oscar/liboscar/connector.cpp @@ -20,8 +20,8 @@ #include "connector.h" -Connector::Connector(QObject *parent) -:QObject(parent) +Connector::Connector(TQObject *parent) +:TQObject(parent) { setPeerAddressNone(); } @@ -35,7 +35,7 @@ bool Connector::havePeerAddress() const return haveaddr; } -QHostAddress Connector::peerAddress() const +TQHostAddress Connector::peerAddress() const { return addr; } @@ -48,11 +48,11 @@ Q_UINT16 Connector::peerPort() const void Connector::setPeerAddressNone() { haveaddr = false; - addr = QHostAddress(); + addr = TQHostAddress(); port = 0; } -void Connector::setPeerAddress(const QHostAddress &_addr, Q_UINT16 _port) +void Connector::setPeerAddress(const TQHostAddress &_addr, Q_UINT16 _port) { haveaddr = true; addr = _addr; diff --git a/kopete/protocols/oscar/liboscar/connector.h b/kopete/protocols/oscar/liboscar/connector.h index fd673163..3844ba49 100644 --- a/kopete/protocols/oscar/liboscar/connector.h +++ b/kopete/protocols/oscar/liboscar/connector.h @@ -22,8 +22,8 @@ #define LIBOSCAR_CONNECTOR_H -#include <qobject.h> -#include "qhostaddress.h" +#include <tqobject.h> +#include "tqhostaddress.h" class ByteStream; @@ -31,15 +31,15 @@ class Connector : public QObject { Q_OBJECT public: - Connector(QObject *parent=0); + Connector(TQObject *parent=0); virtual ~Connector(); - virtual void connectToServer(const QString &server)=0; + virtual void connectToServer(const TQString &server)=0; virtual ByteStream *stream() const=0; virtual void done()=0; bool havePeerAddress() const; - QHostAddress peerAddress() const; + TQHostAddress peerAddress() const; Q_UINT16 peerPort() const; signals: @@ -48,11 +48,11 @@ signals: protected: void setPeerAddressNone(); - void setPeerAddress(const QHostAddress &addr, Q_UINT16 port); + void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port); private: bool haveaddr; - QHostAddress addr; + TQHostAddress addr; Q_UINT16 port; }; diff --git a/kopete/protocols/oscar/liboscar/coreprotocol.cpp b/kopete/protocols/oscar/liboscar/coreprotocol.cpp index 4f114039..918b3751 100644 --- a/kopete/protocols/oscar/liboscar/coreprotocol.cpp +++ b/kopete/protocols/oscar/liboscar/coreprotocol.cpp @@ -24,9 +24,9 @@ #include "coreprotocol.h" -#include <qdatastream.h> -#include <qdatetime.h> -#include <qtextstream.h> +#include <tqdatastream.h> +#include <tqdatetime.h> +#include <tqtextstream.h> #include <kdebug.h> #include <ctype.h> @@ -36,16 +36,16 @@ #include "flapprotocol.h" #include "snacprotocol.h" -static QString toString( const QByteArray& buffer ) +static TQString toString( const TQByteArray& buffer ) { // line format: //00 03 00 0b 00 00 90 b8 f5 9f 09 31 31 33 37 38 |;tJ�..........| int i = 0; - QString output = "\n"; - QString hex, ascii; + TQString output = "\n"; + TQString hex, ascii; - QByteArray::ConstIterator it; + TQByteArray::ConstIterator it; for ( it = buffer.begin(); it != buffer.end(); ++it ) { i++; @@ -54,7 +54,7 @@ static QString toString( const QByteArray& buffer ) if ( c < 0x10 ) hex.append("0"); - hex.append(QString("%1 ").arg(c, 0, 16)); + hex.append(TQString("%1 ").arg(c, 0, 16)); ascii.append(isprint(c) ? c : '.'); @@ -62,8 +62,8 @@ static QString toString( const QByteArray& buffer ) { output += hex + " |" + ascii + "|\n"; i=0; - hex=QString::null; - ascii=QString::null; + hex=TQString::null; + ascii=TQString::null; } } @@ -77,7 +77,7 @@ static QString toString( const QByteArray& buffer ) using namespace Oscar; -CoreProtocol::CoreProtocol() : QObject() +CoreProtocol::CoreProtocol() : TQObject() { m_snacProtocol = new SnacProtocol( this, "snacprotocol" ); m_flapProtocol = new FlapProtocol( this, "flapprotocol" ); @@ -92,7 +92,7 @@ int CoreProtocol::state() return m_state; } -void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) +void CoreProtocol::addIncomingData( const TQByteArray & incomingBytes ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Received " << incomingBytes.count() << " bytes. " << endl; // store locally @@ -114,7 +114,7 @@ void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) { //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "more data in chunk!" << endl; // copy the unparsed bytes into a new qbytearray and replace m_in with that - QByteArray remainder( size - parsedBytes ); + TQByteArray remainder( size - parsedBytes ); memcpy( remainder.data(), m_in.data() + parsedBytes, remainder.size() ); m_in = remainder; } @@ -149,7 +149,7 @@ Transfer* CoreProtocol::incomingTransfer() } } -void cp_dump( const QByteArray &bytes ) +void cp_dump( const TQByteArray &bytes ) { #ifdef OSCAR_COREPROTOCOL_DEBUG kdDebug(OSCAR_RAW_DEBUG) << "contains: " << bytes.count() << " bytes" << endl; @@ -174,7 +174,7 @@ void CoreProtocol::outgoingTransfer( Transfer* outgoing ) return; } -int CoreProtocol::wireToTransfer( const QByteArray& wire ) +int CoreProtocol::wireToTransfer( const TQByteArray& wire ) { // processing incoming data and reassembling it into transfers // may be an event or a response @@ -194,13 +194,13 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire ) return bytesParsed; } - QDataStream din( wire, IO_ReadOnly ); + TQDataStream din( wire, IO_ReadOnly ); // look at first four bytes and decide what to do with the chunk if ( okToProceed( din ) ) { din >> flapStart; - QByteArray packet; + TQByteArray packet; packet.duplicate( wire ); if ( flapStart == 0x2A ) { @@ -264,12 +264,12 @@ void CoreProtocol::reset() m_in.resize( 0 ); } -void CoreProtocol::slotOutgoingData( const QCString &out ) +void CoreProtocol::slotOutgoingData( const TQCString &out ) { kdDebug(OSCAR_RAW_DEBUG) << out.data() << endl; } -bool CoreProtocol::okToProceed( const QDataStream &din ) +bool CoreProtocol::okToProceed( const TQDataStream &din ) { if ( din.atEnd() ) { diff --git a/kopete/protocols/oscar/liboscar/coreprotocol.h b/kopete/protocols/oscar/liboscar/coreprotocol.h index f49396af..bbc9b693 100644 --- a/kopete/protocols/oscar/liboscar/coreprotocol.h +++ b/kopete/protocols/oscar/liboscar/coreprotocol.h @@ -21,9 +21,9 @@ #ifndef GW_CORE_PROTOCOL_H #define GW_CORE_PROTOCOL_H -#include <qcstring.h> -#include <qobject.h> -#include <qptrlist.h> +#include <tqcstring.h> +#include <tqobject.h> +#include <tqptrlist.h> class FlapProtocol; class SnacProtocol; @@ -49,7 +49,7 @@ public: * This requires parsing out each FLAP, etc. from the incoming data * @param incomingBytes Raw data in wire format. */ - void addIncomingData( const QByteArray& incomingBytes ); + void addIncomingData( const TQByteArray& incomingBytes ); /** * @return the incoming transfer or 0 if none is available. @@ -71,7 +71,7 @@ signals: /** * Emitted as the core protocol converts fields to wire ready data */ - void outgoingData( const QByteArray& ); + void outgoingData( const TQByteArray& ); /** * Emitted when there is incoming data, parsed into a Transfer @@ -81,21 +81,21 @@ protected slots: /** * Just a debug method to test emitting to the socket, atm - should go to the ClientStream */ - void slotOutgoingData( const QCString & ); + void slotOutgoingData( const TQCString & ); protected: /** * Check that there is data to read, and set the protocol's state if there isn't any. */ - bool okToProceed( const QDataStream &din ); + bool okToProceed( const TQDataStream &din ); /** * Convert incoming wire data into a Transfer object and queue it * @return number of bytes from the input that were parsed into a Transfer */ - int wireToTransfer( const QByteArray& wire ); + int wireToTransfer( const TQByteArray& wire ); private: - QByteArray m_in; // buffer containing unprocessed bytes we received + TQByteArray m_in; // buffer containing unprocessed bytes we received int m_error; Transfer* m_inTransfer; // the transfer that is being received int m_state; // represents the protocol's overall state diff --git a/kopete/protocols/oscar/liboscar/flapprotocol.cpp b/kopete/protocols/oscar/liboscar/flapprotocol.cpp index c5dc04ed..f5e9fa03 100644 --- a/kopete/protocols/oscar/liboscar/flapprotocol.cpp +++ b/kopete/protocols/oscar/liboscar/flapprotocol.cpp @@ -19,16 +19,16 @@ #include "flapprotocol.h" -#include <qcstring.h> -#include <qdatastream.h> -#include <qobject.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqobject.h> #include <kdebug.h> #include "transfer.h" using namespace Oscar; -FlapProtocol::FlapProtocol(QObject *parent, const char *name) +FlapProtocol::FlapProtocol(TQObject *parent, const char *name) : InputProtocolBase(parent, name) { } @@ -37,9 +37,9 @@ FlapProtocol::~FlapProtocol() { } -Transfer* FlapProtocol::parse( const QByteArray & packet, uint& bytes ) +Transfer* FlapProtocol::parse( const TQByteArray & packet, uint& bytes ) { - QDataStream* m_din = new QDataStream( packet, IO_ReadOnly ); + TQDataStream* m_din = new TQDataStream( packet, IO_ReadOnly ); BYTE b; WORD w; diff --git a/kopete/protocols/oscar/liboscar/flapprotocol.h b/kopete/protocols/oscar/liboscar/flapprotocol.h index d61cf6c4..3d6de53b 100644 --- a/kopete/protocols/oscar/liboscar/flapprotocol.h +++ b/kopete/protocols/oscar/liboscar/flapprotocol.h @@ -29,7 +29,7 @@ class FlapProtocol : public InputProtocolBase { Q_OBJECT public: - FlapProtocol( QObject *parent = 0, const char *name = 0 ); + FlapProtocol( TQObject *parent = 0, const char *name = 0 ); ~FlapProtocol(); /** @@ -39,7 +39,7 @@ public: * @param bytes An integer used to return the number of bytes read. * @return A pointer to an FlapTransfer object if successfull, otherwise 0. The caller is responsible for deleting this object. */ - Transfer * parse( const QByteArray &, uint & bytes ); + Transfer * parse( const TQByteArray &, uint & bytes ); }; diff --git a/kopete/protocols/oscar/liboscar/icbmparamstask.cpp b/kopete/protocols/oscar/liboscar/icbmparamstask.cpp index 960d4ee5..5b00a8fd 100644 --- a/kopete/protocols/oscar/liboscar/icbmparamstask.cpp +++ b/kopete/protocols/oscar/liboscar/icbmparamstask.cpp @@ -137,7 +137,7 @@ void ICBMParamsTask::sendMessageParams( int channel ) Transfer* st = createTransfer( f, s, buffer ); send( st ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } //kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/icqlogintask.cpp b/kopete/protocols/oscar/liboscar/icqlogintask.cpp index c9f5cd52..76feaf42 100644 --- a/kopete/protocols/oscar/liboscar/icqlogintask.cpp +++ b/kopete/protocols/oscar/liboscar/icqlogintask.cpp @@ -18,7 +18,7 @@ #include "icqlogintask.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> #include "transfer.h" #include "connection.h" @@ -54,7 +54,7 @@ void IcqLoginTask::onGo() DWORD flapVersion = 0x00000001; Buffer *outbuf = new Buffer(); - QString encodedPassword = encodePassword( client()->password() ); + TQString encodedPassword = encodePassword( client()->password() ); const Oscar::ClientVersion* version = client()->version(); outbuf->addDWord( flapVersion ); @@ -78,14 +78,14 @@ void IcqLoginTask::onGo() } -QString IcqLoginTask::encodePassword( const QString& loginPassword ) +TQString IcqLoginTask::encodePassword( const TQString& loginPassword ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Called." << endl; // TODO: check if latin1 is the right conversion const char *password = loginPassword.latin1(); unsigned int i = 0; - QString encodedPassword = QString::null; + TQString encodedPassword = TQString::null; //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 45fb3eb6..3bce47f1 100644 --- a/kopete/protocols/oscar/liboscar/icqlogintask.h +++ b/kopete/protocols/oscar/liboscar/icqlogintask.h @@ -40,7 +40,7 @@ protected: bool forMe( Transfer* transfer ) const; private: - QString encodePassword( const QString& pw ); + TQString encodePassword( const TQString& pw ); }; diff --git a/kopete/protocols/oscar/liboscar/icqtask.cpp b/kopete/protocols/oscar/liboscar/icqtask.cpp index a383922f..bb58a9c4 100644 --- a/kopete/protocols/oscar/liboscar/icqtask.cpp +++ b/kopete/protocols/oscar/liboscar/icqtask.cpp @@ -20,7 +20,7 @@ #include "buffer.h" #include "connection.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> @@ -69,8 +69,8 @@ void ICQTask::parseInitialData( Buffer buf ) m_requestSubType = 0xFFFF; /*kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "uin: " << m_icquin << " sequence: " << sequence - <<" request type: 0x" << QString::number( m_requestType, 16 ) - << " request sub type: 0x" << QString::number( m_requestSubType, 16 ) << endl;*/ + <<" request type: 0x" << TQString::number( m_requestType, 16 ) + << " request sub type: 0x" << TQString::number( m_requestSubType, 16 ) << endl;*/ } Buffer* ICQTask::addInitialData( Buffer* buf ) const @@ -89,8 +89,8 @@ Buffer* ICQTask::addInitialData( Buffer* buf ) const tlvData->addLEWord( m_requestSubType ); /*kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "uin: " << m_icquin << " sequence: " << sequence - <<" request type: 0x" << QString::number( m_requestType, 16 ) - << " request sub type: 0x" << QString::number( m_requestSubType, 16 ) << endl; */ + <<" request type: 0x" << TQString::number( m_requestType, 16 ) + << " request sub type: 0x" << TQString::number( m_requestSubType, 16 ) << endl; */ if ( buf != 0 ) tlvData->addString( buf->buffer(), buf->length() ); diff --git a/kopete/protocols/oscar/liboscar/icquserinfo.cpp b/kopete/protocols/oscar/liboscar/icquserinfo.cpp index f853c045..bc37d313 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfo.cpp +++ b/kopete/protocols/oscar/liboscar/icquserinfo.cpp @@ -132,9 +132,9 @@ void ICQMoreUserInfo::fill( Buffer* buffer ) // set birthday to NULL if at least one of the values in the buffer is 0 if ( year == 0 || month == 0 || day == 0 ) - birthday = QDate(); + birthday = TQDate(); else - birthday = QDate( year, month, day ); + birthday = TQDate( year, month, day ); lang1 = buffer->getByte(); lang2 = buffer->getByte(); @@ -158,7 +158,7 @@ void ICQEmailInfo::fill( Buffer* buffer ) if ( buffer->getByte() == 0x0A ) { int numEmails = buffer->getByte(); - QString email; + TQString email; for ( int i = 0; i < numEmails; i++ ) { if ( buffer->getByte() == 0x00 ) @@ -183,7 +183,7 @@ void ICQInterestInfo::fill( Buffer* buffer ) for ( int i = 0; i < len; i++ ) { int t=buffer->getLEWord(); - QCString d = buffer->getLELNTS(); + TQCString d = buffer->getLELNTS(); if (t>0) { //there is some topic if (count<4) { //i think this could not happen, i have never seen more topics[count]=t; @@ -213,22 +213,22 @@ void ICQSearchResult::fill( Buffer* buffer ) WORD datalength = buffer->getLEWord(); // data length WORD len = 0; uin = buffer->getLEDWord(); - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Found UIN " << QString::number( uin ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Found UIN " << TQString::number( uin ) << endl; len = buffer->getLEWord(); if ( len > 0 ) - nickName = QCString( buffer->getBlock( len ) ); + nickName = TQCString( buffer->getBlock( len ) ); len = buffer->getLEWord(); if ( len > 0 ) - firstName = QCString( buffer->getBlock( len ) ); + firstName = TQCString( buffer->getBlock( len ) ); len = buffer->getLEWord(); if ( len > 0 ) - lastName = QCString( buffer->getBlock( len ) ); + lastName = TQCString( buffer->getBlock( len ) ); len = buffer->getLEWord(); if ( len > 0 ) - email = QCString( buffer->getBlock( len ) ); + email = TQCString( buffer->getBlock( len ) ); auth = ( buffer->getByte() != 0x01 ); online = ( buffer->getLEWord() == 0x0001 ); diff --git a/kopete/protocols/oscar/liboscar/icquserinfo.h b/kopete/protocols/oscar/liboscar/icquserinfo.h index ac054721..3c3510f4 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfo.h +++ b/kopete/protocols/oscar/liboscar/icquserinfo.h @@ -19,9 +19,9 @@ #ifndef _ICQUSERINFO_H_ #define _ICQUSERINFO_H_ -#include <qcstring.h> -#include <qvaluelist.h> -#include <qdatetime.h> +#include <tqcstring.h> +#include <tqvaluelist.h> +#include <tqdatetime.h> #include "kopete_export.h" class Buffer; @@ -56,10 +56,10 @@ public: public: unsigned long uin; - QCString nickname; - QCString firstName; - QCString lastName; - QCString email; + TQCString nickname; + TQCString firstName; + TQCString lastName; + TQCString email; bool needsAuth; unsigned int gender; // 0=offline, 1=online, 2=not webaware }; @@ -73,17 +73,17 @@ public: public: unsigned long uin; - QCString nickname; - QCString firstName; - QCString lastName; - QCString email; - QCString city; - QCString state; - QCString phoneNumber; - QCString faxNumber; - QCString address; - QCString cellNumber; - QCString zip; + TQCString nickname; + TQCString firstName; + TQCString lastName; + TQCString email; + TQCString city; + TQCString state; + TQCString phoneNumber; + TQCString faxNumber; + TQCString address; + TQCString cellNumber; + TQCString zip; int country; char timezone; bool publishEmail; @@ -99,18 +99,18 @@ public: void fill( Buffer* buffer ); public: - QCString city; - QCString state; - QCString phone; - QCString fax; - QCString address; - QCString zip; + TQCString city; + TQCString state; + TQCString phone; + TQCString fax; + TQCString address; + TQCString zip; int country; - QCString company; - QCString department; - QCString position; + TQCString company; + TQCString department; + TQCString position; int occupation; - QCString homepage; + TQCString homepage; }; class KOPETE_EXPORT ICQMoreUserInfo : public ICQInfoBase @@ -123,13 +123,13 @@ public: public: int age; unsigned int gender; - QCString homepage; - QDate birthday; + TQCString homepage; + TQDate birthday; unsigned int lang1; unsigned int lang2; unsigned int lang3; - QCString ocity; - QCString ostate; + TQCString ocity; + TQCString ostate; int ocountry; int marital; }; @@ -142,7 +142,7 @@ public: void fill( Buffer* buffer ); public: - QValueList<QCString> emailList; + TQValueList<TQCString> emailList; }; class KOPETE_EXPORT ICQInterestInfo : public ICQInfoBase @@ -155,7 +155,7 @@ public: public: int count; int topics[4]; - QCString descriptions[4]; + TQCString descriptions[4]; }; @@ -165,10 +165,10 @@ public: ICQSearchResult(); void fill( Buffer* buffer ); Q_UINT32 uin; - QCString firstName; - QCString lastName; - QCString nickName; - QCString email; + TQCString firstName; + TQCString lastName; + TQCString nickName; + TQCString email; bool auth; bool online; char gender; @@ -180,19 +180,19 @@ class KOPETE_EXPORT ICQWPSearchInfo public: ICQWPSearchInfo(); - QCString firstName; - QCString lastName; - QCString nickName; - QCString email; + TQCString firstName; + TQCString lastName; + TQCString nickName; + TQCString email; int age; int gender; int language; - QCString city; - QCString state; + TQCString city; + TQCString state; int country; - QCString company; - QCString department; - QCString position; + TQCString company; + TQCString department; + TQCString position; int occupation; bool onlineOnly; }; @@ -202,11 +202,11 @@ class ICQInfoItem { public: int category; - QCString description; + TQCString description; }; -typedef QValueList<ICQInfoItem> ICQInfoItemList; +typedef TQValueList<ICQInfoItem> ICQInfoItemList; */ #endif diff --git a/kopete/protocols/oscar/liboscar/icquserinfotask.cpp b/kopete/protocols/oscar/liboscar/icquserinfotask.cpp index 068ac273..3635bc71 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/icquserinfotask.cpp @@ -89,7 +89,7 @@ bool ICQUserInfoRequestTask::take( Transfer* transfer ) buffer->skipBytes( 8 ); WORD seq = buffer->getLEWord(); // request sequence number buffer->getLEWord(); // request data sub type - QString contactId = m_contactSequenceMap[seq]; + TQString contactId = m_contactSequenceMap[seq]; switch ( requestSubType() ) { @@ -186,43 +186,43 @@ void ICQUserInfoRequestTask::onGo() send( t ); } -ICQGeneralUserInfo ICQUserInfoRequestTask::generalInfoFor( const QString& contact ) +ICQGeneralUserInfo ICQUserInfoRequestTask::generalInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_genInfoMap[seq]; } -ICQWorkUserInfo ICQUserInfoRequestTask::workInfoFor( const QString& contact ) +ICQWorkUserInfo ICQUserInfoRequestTask::workInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_workInfoMap[seq]; } -ICQMoreUserInfo ICQUserInfoRequestTask::moreInfoFor( const QString& contact ) +ICQMoreUserInfo ICQUserInfoRequestTask::moreInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_moreInfoMap[seq]; } -ICQEmailInfo ICQUserInfoRequestTask::emailInfoFor(const QString& contact ) +ICQEmailInfo ICQUserInfoRequestTask::emailInfoFor(const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_emailInfoMap[seq]; } -ICQShortInfo ICQUserInfoRequestTask::shortInfoFor( const QString& contact ) +ICQShortInfo ICQUserInfoRequestTask::shortInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_shortInfoMap[seq]; } -ICQInterestInfo ICQUserInfoRequestTask::interestInfoFor( const QString& contact ) +ICQInterestInfo ICQUserInfoRequestTask::interestInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_interestInfoMap[seq]; } -QString ICQUserInfoRequestTask::notesInfoFor( const QString& contact ) +TQString ICQUserInfoRequestTask::notesInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_notesInfoMap[seq]; diff --git a/kopete/protocols/oscar/liboscar/icquserinfotask.h b/kopete/protocols/oscar/liboscar/icquserinfotask.h index eba81b57..613608fd 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfotask.h +++ b/kopete/protocols/oscar/liboscar/icquserinfotask.h @@ -19,8 +19,8 @@ #ifndef ICQUSERINFOTASK_H #define ICQUSERINFOTASK_H -#include <qmap.h> -#include <qstring.h> +#include <tqmap.h> +#include <tqstring.h> #include "icqtask.h" #include "icquserinfo.h" @@ -39,37 +39,37 @@ public: enum { Long = 0, Short }; - void setUser( const QString& user ) { m_userToRequestFor = user; } + void setUser( const TQString& user ) { m_userToRequestFor = user; } void setType( unsigned int type ) { m_type = type; } void setInfoToRequest( unsigned int type ); - ICQGeneralUserInfo generalInfoFor( const QString& contact ); - ICQEmailInfo emailInfoFor( const QString& contact ); - ICQMoreUserInfo moreInfoFor( const QString& contact ); - ICQWorkUserInfo workInfoFor( const QString& contact ); - QString notesInfoFor( const QString& contact ); - ICQShortInfo shortInfoFor( const QString& contact ); - ICQInterestInfo interestInfoFor( const QString& contact ); + ICQGeneralUserInfo generalInfoFor( const TQString& contact ); + ICQEmailInfo emailInfoFor( const TQString& contact ); + ICQMoreUserInfo moreInfoFor( const TQString& contact ); + ICQWorkUserInfo workInfoFor( const TQString& contact ); + TQString notesInfoFor( const TQString& contact ); + ICQShortInfo shortInfoFor( const TQString& contact ); + ICQInterestInfo interestInfoFor( const TQString& contact ); virtual bool forMe( const Transfer* transfer ) const; virtual bool take( Transfer* transfer ); virtual void onGo(); signals: - void receivedInfoFor( const QString& contact, unsigned int type ); + void receivedInfoFor( const TQString& contact, unsigned int type ); private: - QMap<int, ICQGeneralUserInfo> m_genInfoMap; - QMap<int, ICQEmailInfo> m_emailInfoMap; - QMap<int, ICQMoreUserInfo> m_moreInfoMap; - QMap<int, ICQWorkUserInfo> m_workInfoMap; - QMap<int, ICQShortInfo> m_shortInfoMap; - QMap<int, ICQInterestInfo> m_interestInfoMap; - QMap<int, QString> m_notesInfoMap; - QMap<int, QString> m_contactSequenceMap; - QMap<QString, int> m_reverseContactMap; + TQMap<int, ICQGeneralUserInfo> m_genInfoMap; + TQMap<int, ICQEmailInfo> m_emailInfoMap; + TQMap<int, ICQMoreUserInfo> m_moreInfoMap; + TQMap<int, ICQWorkUserInfo> m_workInfoMap; + TQMap<int, ICQShortInfo> m_shortInfoMap; + TQMap<int, ICQInterestInfo> m_interestInfoMap; + TQMap<int, TQString> m_notesInfoMap; + TQMap<int, TQString> m_contactSequenceMap; + TQMap<TQString, int> m_reverseContactMap; unsigned int m_type; - QString m_userToRequestFor; + TQString m_userToRequestFor; }; #endif diff --git a/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp b/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp index abd34e53..b93ede3f 100644 --- a/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp +++ b/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp @@ -18,8 +18,8 @@ #include "inputprotocolbase.h" -InputProtocolBase::InputProtocolBase(QObject *parent, const char *name) - : QObject(parent, name) +InputProtocolBase::InputProtocolBase(TQObject *parent, const char *name) + : TQObject(parent, name) { m_state = NeedMore; m_bytes = 0; @@ -35,13 +35,13 @@ uint InputProtocolBase::state() const return m_state; } -bool InputProtocolBase::readString( QString &message ) +bool InputProtocolBase::readString( TQString &message ) { uint len; - QCString rawData; + TQCString rawData; if ( !safeReadBytes( rawData, len ) ) return false; - message = QString::fromUtf8( rawData.data(), len - 1 ); + message = TQString::fromUtf8( rawData.data(), len - 1 ); return true; } @@ -61,7 +61,7 @@ bool InputProtocolBase::okToProceed() return false; } -bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) +bool InputProtocolBase::safeReadBytes( TQCString & data, uint & len ) { // read the length of the bytes Q_UINT32 val; @@ -72,7 +72,7 @@ bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) if ( val > 1024 ) return false; //qDebug( "EventProtocol::safeReadBytes() - expecting %i bytes", val ); - QCString temp( val ); + TQCString temp( val ); if ( val != 0 ) { if ( !okToProceed() ) diff --git a/kopete/protocols/oscar/liboscar/inputprotocolbase.h b/kopete/protocols/oscar/liboscar/inputprotocolbase.h index 7bea895f..94072e00 100644 --- a/kopete/protocols/oscar/liboscar/inputprotocolbase.h +++ b/kopete/protocols/oscar/liboscar/inputprotocolbase.h @@ -19,7 +19,7 @@ #ifndef INPUTPROTOCOLBASE_H #define INPUTPROTOCOLBASE_H -#include <qobject.h> +#include <tqobject.h> class Transfer; /** @@ -32,7 +32,7 @@ class InputProtocolBase : public QObject Q_OBJECT public: enum EventProtocolState { Success, NeedMore, OutOfSync, ProtocolError }; - InputProtocolBase(QObject *parent = 0, const char *name = 0); + InputProtocolBase(TQObject *parent = 0, const char *name = 0); ~InputProtocolBase(); /** * Returns a value describing the state of the object. @@ -45,13 +45,13 @@ public: * @param bytes this will be set to the number of bytes that were successfully parsed. It is no indication of the success of the whole procedure * @return On success, a Transfer object that the caller is responsible for deleting. It will be either an EventTransfer or a Response, delete as appropriate. On failure, returns 0. */ - virtual Transfer * parse( const QByteArray &, uint & bytes ) = 0 ; + virtual Transfer * parse( const TQByteArray &, uint & bytes ) = 0 ; protected: /** * Reads an arbitrary string * updates the bytes parsed counter */ - bool readString( QString &message ); + bool readString( TQString &message ); /** * Check that there is data to read, and set the protocol's state if there isn't any. */ @@ -61,12 +61,12 @@ protected: * updates the bytes parsed counter * @return false if the string was broken or there was no data available at all */ - bool safeReadBytes( QCString & data, uint & len ); + bool safeReadBytes( TQCString & data, uint & len ); protected: uint m_state; uint m_bytes; - QDataStream * m_din; + TQDataStream * m_din; }; #endif diff --git a/kopete/protocols/oscar/liboscar/locationrightstask.cpp b/kopete/protocols/oscar/liboscar/locationrightstask.cpp index 5aae9a5e..f019b961 100644 --- a/kopete/protocols/oscar/liboscar/locationrightstask.cpp +++ b/kopete/protocols/oscar/liboscar/locationrightstask.cpp @@ -80,7 +80,7 @@ void LocationRightsTask::sendLocationRightsRequest() void LocationRightsTask::handleLocationRightsResponse() { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Ignoring location rights response" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/logintask.cpp b/kopete/protocols/oscar/liboscar/logintask.cpp index 962b2e1a..a153f8f7 100644 --- a/kopete/protocols/oscar/liboscar/logintask.cpp +++ b/kopete/protocols/oscar/liboscar/logintask.cpp @@ -18,7 +18,7 @@ #include "logintask.h" -#include <qtimer.h> +#include <tqtimer.h> #include <kdebug.h> #include <klocale.h> @@ -63,7 +63,7 @@ bool StageOneLoginTask::take( Transfer* transfer ) m_closeTask = new CloseConnectionTask( client()->rootTask() ); //connect finished signal - connect( m_closeTask, SIGNAL( finished() ), this, SLOT( closeTaskFinished() ) ); + connect( m_closeTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeTaskFinished() ) ); m_icqTask->go( true ); } else @@ -80,7 +80,7 @@ bool StageOneLoginTask::take( Transfer* transfer ) send( ft ); m_aimTask = new AimLoginTask( client()->rootTask() ); - connect( m_aimTask, SIGNAL( finished() ), this, SLOT( aimTaskFinished() ) ); + connect( m_aimTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( aimTaskFinished() ) ); m_aimTask->go( true ); } return true; @@ -118,17 +118,17 @@ bool StageOneLoginTask::forMe( Transfer* transfer ) const return ( ft && ft->flapChannel() == 1 ); } -const QByteArray& StageOneLoginTask::loginCookie() const +const TQByteArray& StageOneLoginTask::loginCookie() const { return m_cookie; } -const QString& StageOneLoginTask::bosServer() const +const TQString& StageOneLoginTask::bosServer() const { return m_bosServer; } -const QString& StageOneLoginTask::bosPort() const +const TQString& StageOneLoginTask::bosPort() const { return m_bosPort; } @@ -145,8 +145,8 @@ StageTwoLoginTask::StageTwoLoginTask( Task* parent ) m_versionTask = new ServerVersionsTask( rootTask ); m_rateTask = new RateInfoTask( rootTask ); - QObject::connect( m_versionTask, SIGNAL( finished() ), this, SLOT( versionTaskFinished() ) ); - QObject::connect( m_rateTask, SIGNAL( finished() ), this, SLOT( rateTaskFinished() ) ); + TQObject::connect( m_versionTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( versionTaskFinished() ) ); + TQObject::connect( m_rateTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( rateTaskFinished() ) ); } StageTwoLoginTask::~StageTwoLoginTask() @@ -188,16 +188,16 @@ void StageTwoLoginTask::onGo() send( ft ); } else - setError( -1, QString::null ); + setError( -1, TQString::null ); return; } -void StageTwoLoginTask::setCookie( const QByteArray& newCookie ) +void StageTwoLoginTask::setCookie( const TQByteArray& newCookie ) { m_cookie.duplicate( newCookie ); } -const QByteArray& StageTwoLoginTask::cookie() +const TQByteArray& StageTwoLoginTask::cookie() { return m_cookie; } @@ -210,7 +210,7 @@ void StageTwoLoginTask::versionTaskFinished() void StageTwoLoginTask::rateTaskFinished() { - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } #include "logintask.moc" diff --git a/kopete/protocols/oscar/liboscar/logintask.h b/kopete/protocols/oscar/liboscar/logintask.h index 12061821..83bc8fde 100644 --- a/kopete/protocols/oscar/liboscar/logintask.h +++ b/kopete/protocols/oscar/liboscar/logintask.h @@ -19,7 +19,7 @@ #ifndef _OSCAR_LOGINTASK_H_ #define _OSCAR_LOGINTASK_H_ -#include <qcstring.h> +#include <tqcstring.h> #include "oscartypes.h" #include "task.h" @@ -52,19 +52,19 @@ public: //Protocol specific stuff //! Get the BOS cookie - const QByteArray& loginCookie() const; + const TQByteArray& loginCookie() const; //! Get the BOS server - const QString& bosServer() const; + const TQString& bosServer() const; //! Get the BOS port - const QString& bosPort() const; + const TQString& bosPort() const; //! Get the error code, if there is one int errorCode() const; //! Get the error reason so it can be displayed - const QString& errorReason() const; + const TQString& errorReason() const; public slots: @@ -82,9 +82,9 @@ private: CloseConnectionTask* m_closeTask; //Private data we get from the tasks - QByteArray m_cookie; - QString m_bosServer; - QString m_bosPort; + TQByteArray m_cookie; + TQString m_bosServer; + TQString m_bosPort; }; @@ -111,13 +111,13 @@ public: //protocol specifics //! Set the cookie to send to the server - void setCookie( const QByteArray& newCookie ); + void setCookie( const TQByteArray& newCookie ); //! Get the cookie to send to the server - const QByteArray& cookie(); + const TQByteArray& cookie(); - QString host() const; - QString port() const; + TQString host() const; + TQString port() const; public slots: @@ -131,8 +131,8 @@ protected: bool forMe( Transfer* transfer ) const; private: - QByteArray m_cookie; - QString m_host, m_port; + TQByteArray m_cookie; + TQString m_host, m_port; //tasks ServerVersionsTask* m_versionTask; diff --git a/kopete/protocols/oscar/liboscar/messagereceivertask.cpp b/kopete/protocols/oscar/liboscar/messagereceivertask.cpp index 2db05eb1..0dd26e3d 100644 --- a/kopete/protocols/oscar/liboscar/messagereceivertask.cpp +++ b/kopete/protocols/oscar/liboscar/messagereceivertask.cpp @@ -16,7 +16,7 @@ #include "messagereceivertask.h" -#include <qtextcodec.h> +#include <tqtextcodec.h> #include <kdebug.h> #include "transfer.h" #include "buffer.h" @@ -109,7 +109,7 @@ bool MessageReceiverTask::take( Transfer* transfer ) else { int screenNameLength = b->getByte(); - m_fromUser = QString( b->getBlock( screenNameLength ) ); + m_fromUser = TQString( b->getBlock( screenNameLength ) ); setTransfer( transfer ); handleAutoResponse(); setTransfer( 0 ); @@ -122,7 +122,7 @@ bool MessageReceiverTask::take( Transfer* transfer ) void MessageReceiverTask::handleType1Message() { Oscar::Message msg; - QValueList<TLV> messageTLVList = transfer()->buffer()->getTLVList(); + TQValueList<TLV> messageTLVList = transfer()->buffer()->getTLVList(); TLV t = Oscar::findTLV( messageTLVList, 0x0002 ); if ( !t ) { @@ -130,8 +130,8 @@ void MessageReceiverTask::handleType1Message() return; } Buffer messageBuffer( t.data ); - QValueList<TLV> innerTLVList = messageBuffer.getTLVList(); - QValueList<TLV>::iterator it = innerTLVList.begin(), listEnd = innerTLVList.end(); + TQValueList<TLV> innerTLVList = messageBuffer.getTLVList(); + TQValueList<TLV>::iterator it = innerTLVList.begin(), listEnd = innerTLVList.end(); for ( ; (*it); ++it ) { switch ( ( *it ).type ) @@ -154,7 +154,7 @@ void MessageReceiverTask::handleType1Message() //message length is buffer length - length of ( charset + subcharset ) */ int msgLength = ( *it ).length - 4; - QByteArray msgArray( message.getBlock( msgLength ) ); + TQByteArray msgArray( message.getBlock( msgLength ) ); msg.setTextArray( msgArray ); break; @@ -176,7 +176,7 @@ void MessageReceiverTask::handleType1Message() msg.setSender( m_fromUser ); msg.setReceiver( client()->userId() ); - msg.setTimestamp( QDateTime::currentDateTime() ); + msg.setTimestamp( TQDateTime::currentDateTime() ); msg.setType( 0x01 ); emit receivedMessage( msg ); @@ -187,7 +187,7 @@ void MessageReceiverTask::handleType2Message() kdDebug(14151) << k_funcinfo << "Received Type 2 message. Trying to handle it..." << endl; Oscar::Message msg; - QValueList<TLV> messageTLVList = transfer()->buffer()->getTLVList(); + TQValueList<TLV> messageTLVList = transfer()->buffer()->getTLVList(); TLV t = Oscar::findTLV( messageTLVList, 0x0005 ); if ( !t ) { @@ -280,7 +280,7 @@ void MessageReceiverTask::handleType4Message() Buffer tlv5buffer(tlv5.data, tlv5.length); DWORD uin = tlv5buffer.getLEDWord(); // little endian for no sane reason! - if ( QString::number(uin) != m_fromUser ) + if ( TQString::number(uin) != m_fromUser ) kdWarning(14151) << k_funcinfo << "message uin does not match uin found in packet header!" << endl; BYTE msgType = tlv5buffer.getByte(); @@ -291,7 +291,7 @@ void MessageReceiverTask::handleType4Message() //handle the special user types Oscar::Message msg; - QString msgSender; + TQString msgSender; switch ( msgType ) { case 0x0D: @@ -307,7 +307,7 @@ void MessageReceiverTask::handleType4Message() break; }; - QCString msgText = tlv5buffer.getLNTS(); + TQCString msgText = tlv5buffer.getLNTS(); int msgLength = msgText.size(); if ( msgType == 0x0D || msgType == 0x0E ) { @@ -332,7 +332,7 @@ void MessageReceiverTask::handleType4Message() } msg.setType( 0x04 ); - msg.setTimestamp( QDateTime::currentDateTime() ); + msg.setTimestamp( TQDateTime::currentDateTime() ); msg.setSender( msgSender ); msg.setReceiver( client()->userId() ); msg.setEncoding( Oscar::Message::UserDefined ); @@ -404,7 +404,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Message type is: " << messageType << endl; - QCString msgText( b->getLELNTS() ); + TQCString msgText( b->getLELNTS() ); Oscar::Message::Encoding encoding = Oscar::Message::UserDefined; int fgcolor = 0x00000000; int bgcolor = 0x00ffffff; @@ -421,7 +421,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) if ( b->length() < capLength ) break; - QByteArray cap( b->getBlock( capLength ) ); + TQByteArray cap( b->getBlock( capLength ) ); if ( qstrncmp ( 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( QDateTime::currentDateTime() ); + msg->setTimestamp( TQDateTime::currentDateTime() ); msg->setType( 0x02 ); msg->setIcbmCookie( m_icbmCookie ); msg->setProtocolVersion( protocolVersion ); @@ -451,7 +451,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) } } -QTextCodec* MessageReceiverTask::guessCodec( const QCString& string ) +TQTextCodec* MessageReceiverTask::guessCodec( const TQCString& string ) { Q_UNUSED( string ); return 0; diff --git a/kopete/protocols/oscar/liboscar/messagereceivertask.h b/kopete/protocols/oscar/liboscar/messagereceivertask.h index b50a133f..4a129016 100644 --- a/kopete/protocols/oscar/liboscar/messagereceivertask.h +++ b/kopete/protocols/oscar/liboscar/messagereceivertask.h @@ -17,8 +17,8 @@ #define MESSAGERECEIVERTASK_H #include "task.h" -#include <qstring.h> -#include <qcstring.h> +#include <tqstring.h> +#include <tqcstring.h> #include "oscarmessage.h" #include "oscartypeclasses.h" #include "oscarmessage.h" @@ -61,13 +61,13 @@ private: //!Parses Rendezvous data in Buffer and puts the information into Message void parseRendezvousData( Buffer* b, Oscar::Message* msg ); - QTextCodec* guessCodec( const QCString& string ); + TQTextCodec* guessCodec( const TQCString& string ); private: - QByteArray m_icbmCookie; + TQByteArray m_icbmCookie; int m_channel; - QString m_fromUser; + TQString m_fromUser; int m_currentSnacSubtype; int m_charSet; int m_subCharSet; diff --git a/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp b/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp index d97da7a3..88d41a84 100644 --- a/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp +++ b/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp @@ -108,10 +108,10 @@ void OfflineMessagesTask::handleOfflineMessage() BYTE flags = buffer->getByte(); // msg flags WORD msgLength = buffer->getLEWord(); - QByteArray msg = buffer->getBlock( msgLength ); + TQByteArray msg = buffer->getBlock( msgLength ); - QDate date(year, month, day); - QTime time(hour,minute); + TQDate date(year, month, day); + TQTime time(hour,minute); #ifndef HAVE_TM_GMTOFF int tz = -( ::timezone ); #else @@ -125,10 +125,10 @@ void OfflineMessagesTask::handleOfflineMessage() #endif time = time.addSecs( tz ); - QDateTime hackyTime( date, time ); + TQDateTime hackyTime( date, time ); Oscar::Message message( Oscar::Message::UserDefined, msg, type, flags, hackyTime ); - message.setSender( QString::number( senderUin ) ); - message.setReceiver( QString::number( receiverUin ) ); + message.setSender( TQString::number( senderUin ) ); + message.setReceiver( TQString::number( receiverUin ) ); kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Received offline message '" << msg.data() << "' from " << senderUin << endl; diff --git a/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp b/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp index 785e23f7..6b6b3d05 100644 --- a/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp +++ b/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp @@ -80,7 +80,7 @@ void OnlineNotifierTask::userOnline() Buffer* buffer = transfer()->buffer(); UserDetails ud; ud.fill( buffer ); - QString user = ud.userId(); + TQString user = ud.userId(); //kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << user << " is now online" << endl; emit userIsOnline( user, ud ); } @@ -90,7 +90,7 @@ void OnlineNotifierTask::userOffline() Buffer* buffer = transfer()->buffer(); UserDetails ud; ud.fill( buffer ); - QString user = ud.userId(); + TQString user = ud.userId(); //kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << user << " is now offline" << endl; emit userIsOffline( user, ud ); } diff --git a/kopete/protocols/oscar/liboscar/onlinenotifiertask.h b/kopete/protocols/oscar/liboscar/onlinenotifiertask.h index 2ec58e5a..18bcb5c1 100644 --- a/kopete/protocols/oscar/liboscar/onlinenotifiertask.h +++ b/kopete/protocols/oscar/liboscar/onlinenotifiertask.h @@ -46,8 +46,8 @@ protected: virtual bool forMe( const Transfer* transfer ) const; signals: - void userIsOnline( const QString& user, const UserDetails& ud ); - void userIsOffline( const QString& user, const UserDetails& ud ); + void userIsOnline( const TQString& user, const UserDetails& ud ); + void userIsOffline( const TQString& user, const UserDetails& ud ); private: void userOnline(); diff --git a/kopete/protocols/oscar/liboscar/oscarbytestream.cpp b/kopete/protocols/oscar/liboscar/oscarbytestream.cpp index ea090442..5f39d205 100644 --- a/kopete/protocols/oscar/liboscar/oscarbytestream.cpp +++ b/kopete/protocols/oscar/liboscar/oscarbytestream.cpp @@ -17,14 +17,14 @@ * * ***************************************************************************/ -#include <qobject.h> +#include <tqobject.h> #include <kbufferedsocket.h> #include <kdebug.h> #include <kresolver.h> #include "oscarbytestream.h" -KNetworkByteStream::KNetworkByteStream( QObject *parent, const char */*name*/ ) +KNetworkByteStream::KNetworkByteStream( TQObject *parent, const char */*name*/ ) : ByteStream ( parent ) { kdDebug( 14151 ) << k_funcinfo << "Instantiating new KNetwork byte stream." << endl; @@ -38,14 +38,14 @@ KNetworkByteStream::KNetworkByteStream( QObject *parent, const char */*name*/ ) mSocket->enableRead( true ); // connect signals and slots - QObject::connect( mSocket, SIGNAL ( gotError ( int ) ), this, SLOT ( slotError ( int ) ) ); - QObject::connect( mSocket, SIGNAL ( connected ( const KResolverEntry& ) ), this, SLOT ( slotConnected () ) ); - QObject::connect( mSocket, SIGNAL ( closed () ), this, SLOT ( slotConnectionClosed () ) ); - QObject::connect( mSocket, SIGNAL ( readyRead () ), this, SLOT ( slotReadyRead () ) ); - QObject::connect( mSocket, SIGNAL ( bytesWritten ( int ) ), this, SLOT ( slotBytesWritten ( int ) ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( gotError ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( connected ( const KResolverEntry& ) ), this, TQT_SLOT ( slotConnected () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( closed () ), this, TQT_SLOT ( slotConnectionClosed () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( readyRead () ), this, TQT_SLOT ( slotReadyRead () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( bytesWritten ( int ) ), this, TQT_SLOT ( slotBytesWritten ( int ) ) ); } -bool KNetworkByteStream::connect( QString host, QString service ) +bool KNetworkByteStream::connect( TQString host, TQString service ) { kdDebug( 14151 ) << k_funcinfo << "Connecting to " << host << ", service " << service << endl; @@ -71,7 +71,7 @@ void KNetworkByteStream::close () int KNetworkByteStream::tryWrite () { // send all data from the buffers to the socket - QByteArray writeData = takeWrite(); + TQByteArray writeData = takeWrite(); #ifdef OSCAR_EXCESSIVE_DEBUG kdDebug(14151) << k_funcinfo << "writing " << writeData.size() << " bytes." << endl; #endif @@ -115,7 +115,7 @@ void KNetworkByteStream::slotConnectionClosed() void KNetworkByteStream::slotReadyRead() { // stuff all available data into our buffers - QByteArray readBuffer( socket()->bytesAvailable () ); + TQByteArray readBuffer( socket()->bytesAvailable () ); socket()->readBlock( readBuffer.data (), readBuffer.size () ); diff --git a/kopete/protocols/oscar/liboscar/oscarbytestream.h b/kopete/protocols/oscar/liboscar/oscarbytestream.h index bd618666..2ecd92d9 100644 --- a/kopete/protocols/oscar/liboscar/oscarbytestream.h +++ b/kopete/protocols/oscar/liboscar/oscarbytestream.h @@ -37,11 +37,11 @@ class KNetworkByteStream : public ByteStream Q_OBJECT public: - KNetworkByteStream ( QObject *parent = 0, const char *name = 0 ); + KNetworkByteStream ( TQObject *parent = 0, const char *name = 0 ); ~KNetworkByteStream (); - bool connect ( QString host, QString service ); + bool connect ( TQString host, TQString service ); virtual bool isOpen () const; virtual void close (); diff --git a/kopete/protocols/oscar/liboscar/oscarclientstream.cpp b/kopete/protocols/oscar/liboscar/oscarclientstream.cpp index e607a24b..87da6020 100644 --- a/kopete/protocols/oscar/liboscar/oscarclientstream.cpp +++ b/kopete/protocols/oscar/liboscar/oscarclientstream.cpp @@ -20,10 +20,10 @@ #include "oscarclientstream.h" -#include <qguardedptr.h> -#include <qobject.h> -#include <qptrqueue.h> -#include <qtimer.h> +#include <tqguardedptr.h> +#include <tqobject.h> +#include <tqptrqueue.h> +#include <tqtimer.h> #include <kdebug.h> @@ -36,7 +36,7 @@ #define LIBOSCAR_DEBUG 0 -void cs_dump( const QByteArray &bytes ); +void cs_dump( const TQByteArray &bytes ); enum { Idle, @@ -59,9 +59,9 @@ public: bs = 0; connection = 0; - username = QString::null; - password = QString::null; - server = QString::null; + username = TQString::null; + password = TQString::null; + server = TQString::null; haveLocalAddr = false; doBinding = true; @@ -74,12 +74,12 @@ public: newTransfers = false; } - QString username; - QString password; - QString server; + TQString username; + TQString password; + TQString server; bool doAuth; //send the initial login sequences to get the cookie bool haveLocalAddr; - QHostAddress localAddr; + TQHostAddress localAddr; Q_UINT16 localPort; bool doBinding; @@ -88,7 +88,7 @@ public: CoreProtocol client; Connection* connection; - QString defRealm; + TQString defRealm; int mode; int state; @@ -96,15 +96,15 @@ public: bool newTransfers; int errCond; - QString errText; + TQString errText; - QPtrQueue<Transfer> in; + TQPtrQueue<Transfer> in; - QTimer noopTimer; // used to send icq keepalive + TQTimer noopTimer; // used to send icq keepalive int noop_time; }; -ClientStream::ClientStream(Connector *conn, QObject *parent) +ClientStream::ClientStream(Connector *conn, TQObject *parent) :Stream(parent) { //qDebug("CLIENTSTREAM::ClientStream"); @@ -112,13 +112,13 @@ ClientStream::ClientStream(Connector *conn, QObject *parent) d = new Private; d->mode = ClientMode; d->conn = conn; - connect( d->conn, SIGNAL(connected()), SLOT(cr_connected()) ); - connect( d->conn, SIGNAL(error()), SLOT(cr_error()) ); - connect( &d->client, SIGNAL( outgoingData( const QByteArray& ) ), SLOT ( cp_outgoingData( const QByteArray & ) ) ); - connect( &d->client, SIGNAL( incomingData() ), SLOT ( cp_incomingData() ) ); + connect( d->conn, TQT_SIGNAL(connected()), TQT_SLOT(cr_connected()) ); + connect( d->conn, TQT_SIGNAL(error()), TQT_SLOT(cr_error()) ); + connect( &d->client, TQT_SIGNAL( outgoingData( const TQByteArray& ) ), TQT_SLOT ( cp_outgoingData( const TQByteArray & ) ) ); + connect( &d->client, TQT_SIGNAL( incomingData() ), TQT_SLOT ( cp_incomingData() ) ); d->noop_time = 0; - connect(&d->noopTimer, SIGNAL(timeout()), SLOT(doNoop())); + connect(&d->noopTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doNoop())); } ClientStream::~ClientStream() @@ -151,7 +151,7 @@ void ClientStream::reset(bool all) d->in.clear(); } -void ClientStream::connectToServer(const QString& server, bool auth) +void ClientStream::connectToServer(const TQString& server, bool auth) { reset(true); d->state = Connecting; @@ -205,7 +205,7 @@ void ClientStream::setNoopTime(int mills) d->noopTimer.start( d->noop_time ); } -void ClientStream::setLocalAddr(const QHostAddress &addr, Q_UINT16 port) +void ClientStream::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port) { d->haveLocalAddr = true; d->localAddr = addr; @@ -217,7 +217,7 @@ int ClientStream::errorCondition() const return d->errCond; } -QString ClientStream::errorText() const +TQString ClientStream::errorText() const { return d->errText; } @@ -263,7 +263,7 @@ void ClientStream::write( Transfer *request ) d->client.outgoingTransfer( request ); } -void cs_dump( const QByteArray &bytes ) +void cs_dump( const TQByteArray &bytes ) { #if 0 qDebug( "contains: %i bytes ", bytes.count() ); @@ -305,7 +305,7 @@ void cs_dump( const QByteArray &bytes ) Q_UNUSED( bytes ); } -void ClientStream::cp_outgoingData( const QByteArray& outgoingBytes ) +void ClientStream::cp_outgoingData( const TQByteArray& outgoingBytes ) { // take formatted bytes from CoreProtocol and put them on the wire d->bs->write( outgoingBytes ); @@ -329,19 +329,19 @@ void ClientStream::cp_incomingData() void ClientStream::cr_connected() { d->bs = d->conn->stream(); - connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed())); - connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished())); - connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead())); - connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int))); - connect(d->bs, SIGNAL(error(int)), SLOT(bs_error(int))); + connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed())); + connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished())); + connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead())); + connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int))); + connect(d->bs, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int))); d->state = Active; if ( d->noop_time ) d->noopTimer.start( d->noop_time ); - QByteArray spare = d->bs->read(); + TQByteArray spare = d->bs->read(); - QGuardedPtr<QObject> self = this; + TQGuardedPtr<TQObject> self = this; emit connected(); if(!self) return; @@ -372,12 +372,12 @@ void ClientStream::bs_error(int) void ClientStream::bs_readyRead() { - QByteArray a; + TQByteArray a; //qDebug( "size of storage for incoming data is %i bytes.", a.size() ); a = d->bs->read(); #if LIBOSCAR_DEBUG - QCString cs(a.data(), a.size()+1); + TQCString cs(a.data(), a.size()+1); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "recv: " << a.size() << "bytes" << endl; cs_dump( a ); #endif @@ -408,7 +408,7 @@ void ClientStream::processNext() { if( !d->in.isEmpty() ) { - QTimer::singleShot(0, this, SLOT(doReadyRead())); + TQTimer::singleShot(0, this, TQT_SLOT(doReadyRead())); } } diff --git a/kopete/protocols/oscar/liboscar/oscarclientstream.h b/kopete/protocols/oscar/liboscar/oscarclientstream.h index f8b4d2b6..307c0616 100644 --- a/kopete/protocols/oscar/liboscar/oscarclientstream.h +++ b/kopete/protocols/oscar/liboscar/oscarclientstream.h @@ -73,19 +73,19 @@ public: BindConflict // resource in-use }; - ClientStream(Connector *conn, QObject *parent=0); + ClientStream(Connector *conn, TQObject *parent=0); ~ClientStream(); - void connectToServer(const QString& server, bool auth=true); + void connectToServer(const TQString& server, bool auth=true); void accept(); // server bool isActive() const; bool isAuthenticated() const; // login params - void setUsername(const QString &s); - void setPassword(const QString &s); + void setUsername(const TQString &s); + void setPassword(const TQString &s); - void setLocalAddr(const QHostAddress &addr, Q_UINT16 port); + void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port); void close(); @@ -110,10 +110,10 @@ public: void write( Transfer* request ); int errorCondition() const; - QString errorText() const; + TQString errorText() const; // extrahttp://bugs.kde.org/show_bug.cgi?id=85158 -/*# void writeDirect(const QString &s); // must be for debug testing*/ +/*# void writeDirect(const TQString &s); // must be for debug testing*/ void setNoopTime(int mills); signals: @@ -130,7 +130,7 @@ private slots: /** * collects wire ready outgoing data from the core protocol and sends */ - void cp_outgoingData( const QByteArray& ); + void cp_outgoingData( const TQByteArray& ); /** * collects parsed incoming data as a transfer from the core protocol and queues */ diff --git a/kopete/protocols/oscar/liboscar/oscarconnector.cpp b/kopete/protocols/oscar/liboscar/oscarconnector.cpp index 6fcef197..ec649e08 100644 --- a/kopete/protocols/oscar/liboscar/oscarconnector.cpp +++ b/kopete/protocols/oscar/liboscar/oscarconnector.cpp @@ -24,7 +24,7 @@ #include "oscarconnector.h" #include "oscarbytestream.h" -KNetworkConnector::KNetworkConnector( QObject *parent, const char */*name*/ ) +KNetworkConnector::KNetworkConnector( TQObject *parent, const char */*name*/ ) : Connector( parent ) { kdDebug( 14151 ) << k_funcinfo << "New KNetwork connector." << endl; @@ -33,8 +33,8 @@ KNetworkConnector::KNetworkConnector( QObject *parent, const char */*name*/ ) mByteStream = new KNetworkByteStream( this ); - connect( mByteStream, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) ); - connect( mByteStream, SIGNAL ( error ( int ) ), this, SLOT ( slotError ( int ) ) ); + connect( mByteStream, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) ); + connect( mByteStream, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); mPort = 0; } @@ -43,7 +43,7 @@ KNetworkConnector::~KNetworkConnector() delete mByteStream; } -void KNetworkConnector::connectToServer( const QString &server ) +void KNetworkConnector::connectToServer( const TQString &server ) { kdDebug( 14151 ) << k_funcinfo << "Initiating connection to " << mHost << endl; Q_ASSERT( !mHost.isNull() ); @@ -51,7 +51,7 @@ void KNetworkConnector::connectToServer( const QString &server ) mErrorCode = KNetwork::KSocketBase::NoError; - if ( !mByteStream->connect ( mHost, QString::number ( mPort ) ) ) + if ( !mByteStream->connect ( mHost, TQString::number ( mPort ) ) ) { // Houston, we have a problem mErrorCode = mByteStream->socket()->error(); @@ -65,7 +65,7 @@ void KNetworkConnector::slotConnected() // FIXME: setPeerAddress() is something different, find out correct usage later //KInetSocketAddress inetAddress = mStreamSocket->address().asInet().makeIPv6 (); - //setPeerAddress ( QHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); + //setPeerAddress ( TQHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); emit connected (); } @@ -94,7 +94,7 @@ void KNetworkConnector::done() mByteStream->close (); } -void KNetworkConnector::setOptHostPort( const QString &host, Q_UINT16 port ) +void KNetworkConnector::setOptHostPort( const TQString &host, Q_UINT16 port ) { kdDebug ( 14151 ) << k_funcinfo << "Manually specifying host " << host << " and port " << port << endl; diff --git a/kopete/protocols/oscar/liboscar/oscarconnector.h b/kopete/protocols/oscar/liboscar/oscarconnector.h index d130f7da..39696a35 100644 --- a/kopete/protocols/oscar/liboscar/oscarconnector.h +++ b/kopete/protocols/oscar/liboscar/oscarconnector.h @@ -39,15 +39,15 @@ class KNetworkConnector : public Connector Q_OBJECT public: - KNetworkConnector( QObject *parent = 0, const char *name = 0 ); + KNetworkConnector( TQObject *parent = 0, const char *name = 0 ); virtual ~KNetworkConnector(); - virtual void connectToServer( const QString &server ); + virtual void connectToServer( const TQString &server ); virtual ByteStream *stream() const; virtual void done(); - void setOptHostPort( const QString &host, Q_UINT16 port ); + void setOptHostPort( const TQString &host, Q_UINT16 port ); int errorCode(); @@ -56,7 +56,7 @@ private slots: void slotError( int ); private: - QString mHost; + TQString mHost; Q_UINT16 mPort; int mErrorCode; diff --git a/kopete/protocols/oscar/liboscar/oscarmessage.cpp b/kopete/protocols/oscar/liboscar/oscarmessage.cpp index f4f512d2..1f263be0 100644 --- a/kopete/protocols/oscar/liboscar/oscarmessage.cpp +++ b/kopete/protocols/oscar/liboscar/oscarmessage.cpp @@ -19,8 +19,8 @@ #include "oscarmessage.h" -#include <qdeepcopy.h> -#include <qtextcodec.h> +#include <tqdeepcopy.h> +#include <tqtextcodec.h> Oscar::Message::Message() @@ -33,7 +33,7 @@ Oscar::Message::Message() { } -Oscar::Message::Message( Encoding messageEncoding, const QByteArray& messageText, int channel, int properties, QDateTime timestamp ) +Oscar::Message::Message( Encoding messageEncoding, const TQByteArray& messageText, int channel, int properties, TQDateTime timestamp ) : m_channel( channel ), m_properties( properties ), m_messageType( 0 ), @@ -45,7 +45,7 @@ Oscar::Message::Message( Encoding messageEncoding, const QByteArray& messageText { } -Oscar::Message::Message( Encoding messageEncoding, const QCString& messageText, int channel, int properties, QDateTime timestamp ) +Oscar::Message::Message( Encoding messageEncoding, const TQCString& messageText, int channel, int properties, TQDateTime timestamp ) : m_channel( channel ), m_properties( properties ), m_messageType( 0 ), @@ -57,7 +57,7 @@ Oscar::Message::Message( Encoding messageEncoding, const QCString& messageText, setTextArray( messageText ); } -Oscar::Message::Message( Encoding messageEncoding, const QString& messageText, int channel, int properties, QDateTime timestamp, QTextCodec* codec ) +Oscar::Message::Message( Encoding messageEncoding, const TQString& messageText, int channel, int properties, TQDateTime timestamp, TQTextCodec* codec ) : m_channel( channel ), m_properties( properties ), m_messageType( 0 ), @@ -68,50 +68,50 @@ Oscar::Message::Message( Encoding messageEncoding, const QString& messageText, i setText( messageEncoding, messageText, codec ); } -QString Oscar::Message::sender() const +TQString Oscar::Message::sender() const { return m_sender; } -void Oscar::Message::setSender( const QString& sender ) +void Oscar::Message::setSender( const TQString& sender ) { m_sender = sender; } -QString Oscar::Message::receiver() const +TQString Oscar::Message::receiver() const { return m_receiver; } -void Oscar::Message::setReceiver( const QString& receiver ) +void Oscar::Message::setReceiver( const TQString& receiver ) { m_receiver = receiver; } -QByteArray Oscar::Message::textArray() const +TQByteArray Oscar::Message::textArray() const { return m_textArray; } -QString Oscar::Message::text( QTextCodec *codec ) const +TQString Oscar::Message::text( TQTextCodec *codec ) const { switch ( m_encoding ) { case Oscar::Message::UserDefined: return codec->toUnicode( m_textArray ); case Oscar::Message::UTF8: - return QString::fromUtf8( m_textArray.data(), m_textArray.size() ); + return TQString::fromUtf8( m_textArray.data(), m_textArray.size() ); case Oscar::Message::UCS2: { uint len = m_textArray.size() / 2; - QString result; + TQString result; result.setLength( len ); - QByteArray::ConstIterator p = m_textArray.begin(); + TQByteArray::ConstIterator p = m_textArray.begin(); for ( uint i = 0; i < len; i++) { char row = *p++; char cell = *p++; - result[i] = QChar( cell, row ); + result[i] = TQChar( cell, row ); } //check if last character isn't null if ( result[len-1].isNull() ) @@ -122,22 +122,22 @@ QString Oscar::Message::text( QTextCodec *codec ) const default: break; // Should never happen. } - return QString::null; + return TQString::null; //FIXME: warn at least with kdWarning if an unrecognised encoding style was seen. } -void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const QString& newText, QTextCodec* codec ) +void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const TQString& newText, TQTextCodec* codec ) { uint len; switch ( newEncoding ) { case Oscar::Message::UserDefined: - // Oscar::Message::setTextArray( const QCString& ) + // Oscar::Message::setTextArray( const TQCString& ) // strips trailing null byte automatically. setTextArray( codec->fromUnicode( newText ) ); break; case Oscar::Message::UTF8: - // Oscar::Message::setTextArray( const QCString& ) + // Oscar::Message::setTextArray( const TQCString& ) // strips trailing null byte automatically. setTextArray( newText.utf8() ); break; @@ -145,7 +145,7 @@ void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const QStrin { len = newText.length(); m_textArray.resize( len * 2 ); - QByteArray::Iterator p = m_textArray.begin(); + TQByteArray::Iterator p = m_textArray.begin(); for ( uint i = 0; i < len; i++) { *p++ = newText[i].row(); @@ -159,12 +159,12 @@ void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const QStrin m_encoding = newEncoding; } -void Oscar::Message::setTextArray( const QByteArray& newTextArray ) +void Oscar::Message::setTextArray( const TQByteArray& newTextArray ) { m_textArray.duplicate( newTextArray ); } -void Oscar::Message::setTextArray( const QCString& newTextArray ) +void Oscar::Message::setTextArray( const TQCString& newTextArray ) { m_textArray.duplicate( newTextArray ); uint len = m_textArray.size(); @@ -212,22 +212,22 @@ void Oscar::Message::setType( int newType ) m_channel = newType; } -QDateTime Oscar::Message::timestamp() const +TQDateTime Oscar::Message::timestamp() const { return m_timestamp; } -void Oscar::Message::setTimestamp( QDateTime ts ) +void Oscar::Message::setTimestamp( TQDateTime ts ) { m_timestamp = ts; } -QByteArray Oscar::Message::icbmCookie() const +TQByteArray Oscar::Message::icbmCookie() const { return m_icbmCookie; } -void Oscar::Message::setIcbmCookie( const QByteArray& cookie ) +void Oscar::Message::setIcbmCookie( const TQByteArray& cookie ) { m_icbmCookie.duplicate( cookie ); } @@ -272,12 +272,12 @@ void Oscar::Message::setExchange( Oscar::WORD exchange ) m_exchange = exchange; } -QString Oscar::Message::chatRoom() const +TQString Oscar::Message::chatRoom() const { return m_chatRoom; } -void Oscar::Message::setChatRoom( const QString& room ) +void Oscar::Message::setChatRoom( const TQString& room ) { m_chatRoom = room; } diff --git a/kopete/protocols/oscar/liboscar/oscarmessage.h b/kopete/protocols/oscar/liboscar/oscarmessage.h index 7f081054..f6f08fd9 100644 --- a/kopete/protocols/oscar/liboscar/oscarmessage.h +++ b/kopete/protocols/oscar/liboscar/oscarmessage.h @@ -21,10 +21,10 @@ #ifndef _OSCARMESSAGE_H_ #define _OSCARMESSAGE_H_ -#include <qglobal.h> -#include <qstring.h> -#include <qcstring.h> -#include <qdatetime.h> +#include <tqglobal.h> +#include <tqstring.h> +#include <tqcstring.h> +#include <tqdatetime.h> #include "kopete_export.h" #include "oscartypes.h" @@ -62,36 +62,36 @@ public: Message(); - Message( Encoding messageEncoding, const QByteArray& messageText, int channel, int properties, QDateTime timestamp ); - Message( Encoding messageEncoding, const QCString& messageText, int channel, int properties, QDateTime timestamp ); - Message( Encoding messageEncoding, const QString& messageText, int channel, int properties, QDateTime timestamp, QTextCodec* codec = 0 ); + Message( Encoding messageEncoding, const TQByteArray& messageText, int channel, int properties, TQDateTime timestamp ); + Message( Encoding messageEncoding, const TQCString& messageText, int channel, int properties, TQDateTime timestamp ); + Message( Encoding messageEncoding, const TQString& messageText, int channel, int properties, TQDateTime timestamp, TQTextCodec* codec = 0 ); /** Get the sender of the message */ - QString sender() const; + TQString sender() const; /** Set the sender of the message */ - void setSender( const QString& sender ); + void setSender( const TQString& sender ); /** Get the receiver of the message */ - QString receiver() const; + TQString receiver() const; /** Set the receiver of the message */ - void setReceiver( const QString& receiver); + void setReceiver( const TQString& receiver); /** get the message text */ - QString text( QTextCodec* codec ) const; + TQString text( TQTextCodec* codec ) const; /** set the message text */ - void setText( Encoding newEncoding, const QString& newText, QTextCodec* codec = 0); + void setText( Encoding newEncoding, const TQString& newText, TQTextCodec* codec = 0); /** get the message text as a bytearray for decoding */ - QByteArray textArray() const; + TQByteArray textArray() const; /** set the message text as a bytearray for decoding */ - void setTextArray( const QByteArray& newTextArray ); + void setTextArray( const TQByteArray& newTextArray ); /** set the mesasge text as a bytearray for decoding */ - void setTextArray( const QCString& newTextArray ); + void setTextArray( const TQCString& newTextArray ); /** get the message properties */ int properties() const; @@ -109,16 +109,16 @@ public: void setType( int newType ); /** get the timestamp of the message */ - QDateTime timestamp() const; + TQDateTime timestamp() const; /** set the timestamp of the message */ - void setTimestamp( QDateTime ts ); + void setTimestamp( TQDateTime ts ); /** get the ICBM cookie of the message */ - QByteArray icbmCookie() const; + TQByteArray icbmCookie() const; /** set the ICBM cookie of the message */ - void setIcbmCookie( const QByteArray& cookie ); + void setIcbmCookie( const TQByteArray& cookie ); /** get the protocol version (channel 2 messages only) */ int protocolVersion() const; @@ -145,10 +145,10 @@ public: void setExchange( Oscar::WORD ); /** get the chat room that this message is for */ - QString chatRoom() const; + TQString chatRoom() const; /** set the chat room that this message is for */ - void setChatRoom( const QString& ); + void setChatRoom( const TQString& ); /** get the message encoding */ Encoding encoding() const; @@ -160,18 +160,18 @@ public: private: //TODO d-pointer - QString m_sender; - QString m_receiver; + TQString m_sender; + TQString m_receiver; int m_channel; int m_properties; int m_messageType; int m_protocolVersion; int m_channel2Counter; - QByteArray m_icbmCookie; - QByteArray m_textArray; - QDateTime m_timestamp; + TQByteArray m_icbmCookie; + TQByteArray m_textArray; + TQDateTime m_timestamp; Oscar::WORD m_exchange; - QString m_chatRoom; + TQString m_chatRoom; Encoding m_encoding; }; diff --git a/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp b/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp index cd9e9619..be862872 100644 --- a/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp +++ b/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp @@ -17,8 +17,8 @@ */ #include "oscartypeclasses.h" -#include <qdeepcopy.h> -#include <qvaluelist.h> +#include <tqdeepcopy.h> +#include <tqvaluelist.h> #include <kdebug.h> #include "oscarutils.h" #include "buffer.h" @@ -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 QByteArray& newData ) +Oscar::TLV::TLV( Q_UINT16 newType, Q_UINT16 newLength, const TQByteArray& newData ) { type = newType; length = newLength; @@ -70,7 +70,7 @@ Oscar::SSI::SSI() m_waitingAuth = false; } -Oscar::SSI::SSI( const QString &name, int gid, int bid, int type, const QValueList<TLV> &tlvlist, int tlvLength ) +Oscar::SSI::SSI( const TQString &name, int gid, int bid, int type, const TQValueList<TLV> &tlvlist, int tlvLength ) { m_name = name; m_gid = gid; @@ -79,7 +79,7 @@ Oscar::SSI::SSI( const QString &name, int gid, int bid, int type, const QValueLi m_tlvLength = tlvLength; //deepcopy the tlvs - m_tlvList = QDeepCopy< QValueList<TLV> >( tlvlist ); + m_tlvList = TQDeepCopy< TQValueList<TLV> >( tlvlist ); if ( m_tlvLength == 0 && !m_tlvList.isEmpty() ) refreshTLVLength(); @@ -98,7 +98,7 @@ Oscar::SSI::SSI( const Oscar::SSI& other ) m_waitingAuth = other.m_waitingAuth; //deepcopy the tlvs - m_tlvList = QDeepCopy< QValueList<TLV> >( other.m_tlvList ); + m_tlvList = TQDeepCopy< TQValueList<TLV> >( other.m_tlvList ); if ( m_tlvLength == 0 && !m_tlvList.isEmpty() ) refreshTLVLength(); @@ -109,7 +109,7 @@ bool Oscar::SSI::isValid() const return m_type != 0xFFFF; } -QString Oscar::SSI::name() const +TQString Oscar::SSI::name() const { return m_name; } @@ -129,7 +129,7 @@ Q_UINT16 Oscar::SSI::type() const return m_type; } -const QValueList<TLV>& Oscar::SSI::tlvList() const +const TQValueList<TLV>& Oscar::SSI::tlvList() const { return m_tlvList; } @@ -144,10 +144,10 @@ Q_UINT16 Oscar::SSI::tlvListLength() const return m_tlvLength; } -void Oscar::SSI::setTLVList( QValueList<TLV> list ) +void Oscar::SSI::setTLVList( TQValueList<TLV> list ) { //deepcopy the tlvs - m_tlvList = QDeepCopy< QValueList<TLV> >( list ); + m_tlvList = TQDeepCopy< TQValueList<TLV> >( list ); refreshTLVLength(); checkTLVs(); } @@ -155,7 +155,7 @@ void Oscar::SSI::setTLVList( QValueList<TLV> list ) void Oscar::SSI::refreshTLVLength() { m_tlvLength = 0; - QValueList<TLV>::iterator it = m_tlvList.begin(); + TQValueList<TLV>::iterator it = m_tlvList.begin(); for( ; it != m_tlvList.end(); ++it ) { m_tlvLength += 4; @@ -179,7 +179,7 @@ void Oscar::SSI::checkTLVs() TLV aliasTLV = findTLV( m_tlvList, 0x0131 ); if ( aliasTLV ) { - m_alias = QString::fromUtf8( aliasTLV.data, aliasTLV.length ); + m_alias = TQString::fromUtf8( aliasTLV.data, aliasTLV.length ); kdDebug( 14151 ) << k_funcinfo << "Got an alias '" << m_alias << "' for contact '" << m_name << "'" << endl; } @@ -192,12 +192,12 @@ void Oscar::SSI::checkTLVs() kdDebug(14151) << k_funcinfo << "Found 'allow others to see...' options " << infoTLV.data << endl; } -QString Oscar::SSI::alias() const +TQString Oscar::SSI::alias() const { return m_alias; } -void Oscar::SSI::setAlias( const QString& newAlias ) +void Oscar::SSI::setAlias( const TQString& newAlias ) { m_alias = newAlias; } @@ -212,28 +212,28 @@ void Oscar::SSI::setWaitingAuth( bool waiting ) m_waitingAuth = waiting; } -void Oscar::SSI::setIconHash( QByteArray hash ) +void Oscar::SSI::setIconHash( TQByteArray hash ) { m_hash.duplicate( hash ); } -QByteArray Oscar::SSI::iconHash( ) const +TQByteArray Oscar::SSI::iconHash( ) const { return m_hash; } -QString Oscar::SSI::toString() const +TQString Oscar::SSI::toString() const { - QString ssiString = QString::fromLatin1( "name: " ); + TQString ssiString = TQString::fromLatin1( "name: " ); ssiString += m_name; ssiString += " gid: "; - ssiString += QString::number( m_gid ); + ssiString += TQString::number( m_gid ); ssiString += " bid: "; - ssiString += QString::number( m_bid ); + ssiString += TQString::number( m_bid ); ssiString += " type: "; - ssiString += QString::number( m_type ); + ssiString += TQString::number( m_type ); ssiString += " tlv length: "; - ssiString += QString::number( m_tlvLength ); + ssiString += TQString::number( m_tlvLength ); return ssiString; } @@ -250,26 +250,26 @@ Oscar::SSI::operator bool() const return isValid(); } -Oscar::SSI::operator QByteArray() const +Oscar::SSI::operator TQByteArray() const { Buffer b; - QCString name( m_name.utf8() ); + TQCString name( m_name.utf8() ); uint namelen = name.length(); const char *namedata = name; b.addWord( namelen ); // Using namedata instead of name because - // Buffer::addString(QByteArray, DWORD) ignores it's second argument, + // Buffer::addString(TQByteArray, DWORD) ignores it's second argument, // while Buffer::addString(const char*, DWORD) does not ignore it. // We must provide the explicit length argument to addString() because // we don't need trailing null byte to be added when automatic - // conversion from QCString to QByteArray is performed. + // conversion from TQCString to TQByteArray is performed. // This hack will not be needed with Qt 4. b.addString( namedata, namelen ); b.addWord( m_gid ); b.addWord( m_bid ); b.addWord( m_type ); b.addWord( m_tlvLength ); - QValueList<Oscar::TLV>::const_iterator it = m_tlvList.begin(); + TQValueList<Oscar::TLV>::const_iterator it = m_tlvList.begin(); for( ; it != m_tlvList.end(); ++it ) { b.addWord( (*it).type ); @@ -277,7 +277,7 @@ Oscar::SSI::operator QByteArray() const b.addString( (*it).data, (*it).data.size() ); } - return (QByteArray) b; + return (TQByteArray) b; } diff --git a/kopete/protocols/oscar/liboscar/oscartypeclasses.h b/kopete/protocols/oscar/liboscar/oscartypeclasses.h index 94e0c910..e4ec6ded 100644 --- a/kopete/protocols/oscar/liboscar/oscartypeclasses.h +++ b/kopete/protocols/oscar/liboscar/oscartypeclasses.h @@ -20,10 +20,10 @@ #ifndef _OSCARTYPECLASSES_H_ #define _OSCARTYPECLASSES_H_ -#include <qglobal.h> -#include <qstring.h> -#include <qcstring.h> -#include <qvaluelist.h> +#include <tqglobal.h> +#include <tqstring.h> +#include <tqcstring.h> +#include <tqvaluelist.h> #include "kopete_export.h" namespace Oscar @@ -34,14 +34,14 @@ public: TLV(); TLV( Q_UINT16, Q_UINT16, char* data ); - TLV( Q_UINT16, Q_UINT16, const QByteArray& ); + TLV( Q_UINT16, Q_UINT16, const TQByteArray& ); TLV( const TLV& t ); operator bool() const; Q_UINT16 type; Q_UINT16 length; - QByteArray data; + TQByteArray data; }; @@ -49,7 +49,7 @@ class KOPETE_EXPORT SSI { public: SSI(); - SSI( const QString &name, int gid, int bid, int type, const QValueList<TLV>& tlvlist, int tlvLength = 0 ); + SSI( const TQString &name, int gid, int bid, int type, const TQValueList<TLV>& tlvlist, int tlvLength = 0 ); SSI( const SSI& other ); /** Get the validity of this item */ @@ -57,7 +57,7 @@ public: /** \brief The name of this SSI item. * This is usually the screenname, ICQ number, or group name. */ - QString name() const; + TQString name() const; /** \brief The group id of the SSI item */ Q_UINT16 gid() const; @@ -73,10 +73,10 @@ public: Q_UINT16 type() const; /** \brief the TLV list for the item */ - const QValueList<TLV>& tlvList() const; + const TQValueList<TLV>& tlvList() const; /** \brief Set the TLV list for the item */ - void setTLVList( QValueList<TLV> ); + void setTLVList( TQValueList<TLV> ); /** * \brief Set the length of the TLV list @@ -93,14 +93,14 @@ public: * Get the alias for the SSI item * This is TLV 0x0131 in an SSI item */ - QString alias() const; + TQString alias() const; /** * Set the alias for the SSI item * This should be done after a successful modification of the item * on the server */ - void setAlias( const QString& newAlias ); + void setAlias( const TQString& newAlias ); /** \brief Indicates we're awaiting authorization from this item */ bool waitingAuth() const; @@ -108,17 +108,17 @@ public: /** Set whether we are waiting authorization or not from this item */ void setWaitingAuth( bool waiting ); - void setIconHash( QByteArray hash ); + void setIconHash( TQByteArray hash ); - QByteArray iconHash() const; + TQByteArray iconHash() const; /** \brief String representation of our SSI object */ - QString toString() const; + TQString toString() const; bool operator==( const SSI& item ) const; operator bool() const; - operator QByteArray() const; + operator TQByteArray() const; void refreshTLVLength(); @@ -126,15 +126,15 @@ public: void checkTLVs(); private: - QString m_name; + TQString m_name; int m_gid; int m_bid; int m_type; - QValueList<TLV> m_tlvList; + TQValueList<TLV> m_tlvList; int m_tlvLength; bool m_waitingAuth; - QString m_alias; - QByteArray m_hash; + TQString m_alias; + TQByteArray m_hash; }; } diff --git a/kopete/protocols/oscar/liboscar/oscartypes.h b/kopete/protocols/oscar/liboscar/oscartypes.h index b7d4f55b..3819b555 100644 --- a/kopete/protocols/oscar/liboscar/oscartypes.h +++ b/kopete/protocols/oscar/liboscar/oscartypes.h @@ -20,9 +20,9 @@ #define _OSCARTYPES_H_ #include "oscartypeclasses.h" -#include <qglobal.h> -#include <qdatetime.h> -#include <qstring.h> +#include <tqglobal.h> +#include <tqdatetime.h> +#include <tqstring.h> //! Debug Areas const int OSCAR_RAW_DEBUG = 14151; @@ -214,35 +214,35 @@ struct ChatExchangeInfo WORD maxRoomNameLength; WORD maxMsgLength; BYTE flags; - QString description; + TQString description; BYTE canCreate; - QString charset1; - QString charset2; - QString lang1; - QString lang2; + TQString charset1; + TQString charset2; + TQString lang1; + TQString lang2; }; struct ChatRoomInfo { WORD exchange; - QByteArray cookie; + TQByteArray cookie; WORD instance; - QString description; + TQString description; WORD maxMsgLength; - QString name; + TQString name; }; struct ClientVersion { - QString clientString; + TQString clientString; WORD clientId; WORD major; WORD minor; WORD point; WORD build; DWORD other; - QString country; - QString lang; + TQString country; + TQString lang; }; /* ICQ Version Characteristics */ diff --git a/kopete/protocols/oscar/liboscar/oscarutils.cpp b/kopete/protocols/oscar/liboscar/oscarutils.cpp index 13e28d9e..e07e0e12 100644 --- a/kopete/protocols/oscar/liboscar/oscarutils.cpp +++ b/kopete/protocols/oscar/liboscar/oscarutils.cpp @@ -17,16 +17,16 @@ */ #include "oscarutils.h" -#include <qhostaddress.h> +#include <tqhostaddress.h> #include <kapplication.h> #include <kdebug.h> using namespace Oscar; -QString Oscar::normalize( const QString& contact ) +TQString Oscar::normalize( const TQString& contact ) { - QString normal = contact.lower(); + TQString normal = contact.lower(); normal.remove( ' ' ); return normal; } @@ -39,10 +39,10 @@ bool Oscar::operator==( TLV a, TLV b ) return false; } -TLV Oscar::findTLV( const QValueList<TLV>& list, int type ) +TLV Oscar::findTLV( const TQValueList<TLV>& list, int type ) { TLV t; - QValueList<TLV>::const_iterator it; + TQValueList<TLV>::const_iterator it; for ( it = list.begin(); it != list.end(); ++it ) { if ( ( *it ).type == type ) @@ -52,12 +52,12 @@ TLV Oscar::findTLV( const QValueList<TLV>& list, int type ) return t; } -bool Oscar::uptateTLVs( SSI& item, const QValueList<TLV>& list ) +bool Oscar::uptateTLVs( SSI& item, const TQValueList<TLV>& list ) { bool changed = false; - QValueList<TLV> tList( item.tlvList() ); + TQValueList<TLV> tList( item.tlvList() ); - QValueList<TLV>::const_iterator it; + TQValueList<TLV>::const_iterator it; for ( it = list.begin(); it != list.end(); ++it ) { TLV t = Oscar::findTLV( tList, ( *it ).type ); @@ -92,9 +92,9 @@ int Oscar::parseCap( char* cap ) return capflag; } -const QString Oscar::capToString( char* cap ) +const TQString Oscar::capToString( char* cap ) { - QString dbg; + TQString dbg; dbg.sprintf( "{%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x}", cap[0], cap[1], cap[2], cap[3], cap[4], cap[5], cap[6], cap[7], cap[8], cap[9], @@ -103,17 +103,17 @@ const QString Oscar::capToString( char* cap ) return dbg; } -DWORD Oscar::parseCapabilities( Buffer &inbuf, QString &versionString ) +DWORD Oscar::parseCapabilities( Buffer &inbuf, TQString &versionString ) { // // FIXME: port capabilities array to some qt based list class, makes usage of memcmp obsolete // DWORD capflags = 0; - QString dbgCaps = "CAPS: "; + TQString dbgCaps = "CAPS: "; while(inbuf.length() >= 16) { - QByteArray cap; + TQByteArray cap; cap.duplicate( inbuf.getBlock(16) ); for (int i=0; i < CAP_LAST; i++) @@ -184,9 +184,9 @@ DWORD Oscar::parseCapabilities( Buffer &inbuf, QString &versionString ) return capflags; } -const QString Oscar::capName( int capNumber ) +const TQString Oscar::capName( int capNumber ) { - QString capString; + TQString capString; switch ( capNumber ) { @@ -279,18 +279,18 @@ const QString Oscar::capName( int capNumber ) return capString; } -DWORD Oscar::getNumericalIP(const QString &address) +DWORD Oscar::getNumericalIP(const TQString &address) { - QHostAddress addr; + TQHostAddress addr; if ( addr.setAddress( address ) == false ) return 0; return (DWORD)addr.toIPv4Address(); } -QString Oscar::getDottedDecimal( DWORD address ) +TQString Oscar::getDottedDecimal( DWORD address ) { - QHostAddress addr; + TQHostAddress addr; addr.setAddress((Q_UINT32)address); return addr.toString(); } diff --git a/kopete/protocols/oscar/liboscar/oscarutils.h b/kopete/protocols/oscar/liboscar/oscarutils.h index bf8b5aba..a9cd921c 100644 --- a/kopete/protocols/oscar/liboscar/oscarutils.h +++ b/kopete/protocols/oscar/liboscar/oscarutils.h @@ -19,9 +19,9 @@ #ifndef _OSCARUTILS_H_ #define _OSCARUTILS_H_ -#include <qglobal.h> -#include <qvaluelist.h> -#include <qstring.h> +#include <tqglobal.h> +#include <tqvaluelist.h> +#include <tqstring.h> #include "oscartypes.h" #include "buffer.h" @@ -29,7 +29,7 @@ namespace Oscar { ///Normalize the contact name to all lowercase and no spaces -KOPETE_EXPORT QString normalize( const QString& ); +KOPETE_EXPORT TQString normalize( const TQString& ); ///compare TLVs for equality KOPETE_EXPORT bool operator==( TLV, TLV ); @@ -37,13 +37,13 @@ KOPETE_EXPORT bool operator==( TLV, TLV ); /** * Find the TLV corresponding to the type in the list */ -KOPETE_EXPORT TLV findTLV( const QValueList<TLV>&, int type ); +KOPETE_EXPORT TLV findTLV( const TQValueList<TLV>&, int type ); /** * Update TLVs of SSI item from TLV list if necessary * \return true if something was updated */ -KOPETE_EXPORT bool uptateTLVs( SSI& item, const QValueList<TLV>& list ); +KOPETE_EXPORT bool uptateTLVs( SSI& item, const TQValueList<TLV>& list ); /** * Get the value of the capability that corresponds to the value @@ -57,34 +57,34 @@ int parseCap( char* cap ); /** * Convert the capability to a string we can print */ -const QString capToString(char *cap); +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 QString reference that will contain the - * version string of the detected client. Will be QString::null if + * \param versionString a TQString reference that will contain the + * version string of the detected client. Will be TQString::null if * no client is found * \return a DWORD containg a bit array of the capabilities we found */ -DWORD parseCapabilities(Buffer &inbuf, QString &versionString); +DWORD parseCapabilities(Buffer &inbuf, TQString &versionString); /** * Get the name of the capability from its number */ -const QString capName( int capNumber ); +const TQString capName( int capNumber ); /** * Convert an IP address in dotted decimal notation to a * numerical constant */ -DWORD getNumericalIP( const QString& address ); +DWORD getNumericalIP( const TQString& address ); /** * Convert a numerical constant that is an IP address to * dotted decimal format */ -QString getDottedDecimal( DWORD address ); +TQString getDottedDecimal( DWORD address ); } diff --git a/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp b/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp index a1baf073..2cf57d53 100644 --- a/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ #include "ownuserinfotask.h" -#include <qcstring.h> +#include <tqcstring.h> #include <kdebug.h> #include "buffer.h" #include "connection.h" @@ -70,7 +70,7 @@ bool OwnUserInfoTask::take( Transfer* transfer ) ud.fill( b ); m_details = ud; emit gotInfo(); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return true; } else @@ -83,7 +83,7 @@ bool OwnUserInfoTask::take( Transfer* transfer ) if ( flags == 0x41 ) //we need to do a buddy upload when bit 8 = 1 needUpload = true; - QByteArray qba; + TQByteArray qba; if ( b->length() != 0 ) { //buffer might be empty if flags bit 8 = 1 BYTE checksumLength = b->getByte(); @@ -104,11 +104,11 @@ bool OwnUserInfoTask::take( Transfer* transfer ) if ( infoType == 0x0002 ) { - QString availableMsg( b->getBSTR() ); + TQString availableMsg( b->getBSTR() ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "self available message: " << endl; } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return true; } diff --git a/kopete/protocols/oscar/liboscar/ownuserinfotask.h b/kopete/protocols/oscar/liboscar/ownuserinfotask.h index 30a169db..35314df0 100644 --- a/kopete/protocols/oscar/liboscar/ownuserinfotask.h +++ b/kopete/protocols/oscar/liboscar/ownuserinfotask.h @@ -44,9 +44,9 @@ signals: /** Emitted when user info is recieved. Needed because succeeded() is only emitted once. */ void gotInfo(); - void haveAvailableMessage( const QString& ); + void haveAvailableMessage( const TQString& ); - void haveIconChecksum( const QString& ); + void haveIconChecksum( const TQString& ); void buddyIconUploadRequested(); diff --git a/kopete/protocols/oscar/liboscar/prmparamstask.cpp b/kopete/protocols/oscar/liboscar/prmparamstask.cpp index 3668c73b..43580206 100644 --- a/kopete/protocols/oscar/liboscar/prmparamstask.cpp +++ b/kopete/protocols/oscar/liboscar/prmparamstask.cpp @@ -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, QString::null ); + setSuccess( 0, TQString::null ); return true; } diff --git a/kopete/protocols/oscar/liboscar/profiletask.cpp b/kopete/protocols/oscar/liboscar/profiletask.cpp index d64d5dbe..4b0949ea 100644 --- a/kopete/protocols/oscar/liboscar/profiletask.cpp +++ b/kopete/protocols/oscar/liboscar/profiletask.cpp @@ -18,7 +18,7 @@ #include "profiletask.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> #include "transfer.h" @@ -56,12 +56,12 @@ void ProfileTask::onGo() sendProfileUpdate(); } -void ProfileTask::setProfileText( const QString& text ) +void ProfileTask::setProfileText( const TQString& text ) { m_profileText = text; } -void ProfileTask::setAwayMessage( const QString& text ) +void ProfileTask::setAwayMessage( const TQString& text ) { m_awayMessage = text; } @@ -76,7 +76,7 @@ void ProfileTask::sendProfileUpdate() if ( !m_profileText.isNull() && !client()->isIcq() ) { - static const QString defencoding = "text/aolrtf; charset=\"us-ascii\""; + static const TQString defencoding = "text/aolrtf; charset=\"us-ascii\""; buffer->addTLV(0x0001, defencoding.length(), defencoding.latin1()); buffer->addTLV(0x0002, m_profileText.length(), m_profileText.local8Bit()); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting profile = " << m_profileText << endl; @@ -84,7 +84,7 @@ void ProfileTask::sendProfileUpdate() if ( !m_awayMessage.isNull() && !client()->isIcq() ) { - static const QString defencoding = "text/aolrtf; charset=\"us-ascii\""; + static const TQString defencoding = "text/aolrtf; charset=\"us-ascii\""; buffer->addTLV(0x0003, defencoding.length(), defencoding.latin1()); buffer->addTLV(0x0004, m_awayMessage.length(), m_awayMessage.local8Bit()); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting away message = " << m_awayMessage << endl; @@ -112,7 +112,7 @@ void ProfileTask::sendProfileUpdate() buffer->addTLV(0x0005, capBuf.length(), capBuf.buffer()); Transfer* st = createTransfer( f, s , buffer ); send( st ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/profiletask.h b/kopete/protocols/oscar/liboscar/profiletask.h index 23555105..a51075a5 100644 --- a/kopete/protocols/oscar/liboscar/profiletask.h +++ b/kopete/protocols/oscar/liboscar/profiletask.h @@ -39,16 +39,16 @@ public: bool take( Transfer* transfer ); void onGo(); - void setProfileText( const QString& text ); - void setAwayMessage( const QString& text ); + void setProfileText( const TQString& text ); + void setAwayMessage( const TQString& text ); private: void sendProfileUpdate(); private: - QString m_profileText; - QString m_awayMessage; + TQString m_profileText; + TQString m_awayMessage; }; #endif diff --git a/kopete/protocols/oscar/liboscar/rateclass.cpp b/kopete/protocols/oscar/liboscar/rateclass.cpp index 7fee4239..d035c810 100644 --- a/kopete/protocols/oscar/liboscar/rateclass.cpp +++ b/kopete/protocols/oscar/liboscar/rateclass.cpp @@ -16,14 +16,14 @@ */ #include "rateclass.h" -#include <qtimer.h> +#include <tqtimer.h> #include <kdebug.h> #include "transfer.h" using namespace Oscar; -RateClass::RateClass( QObject* parent ) -: QObject( parent, 0 ) +RateClass::RateClass( TQObject* parent ) +: TQObject( parent, 0 ) { m_waitingToSend = false; m_packetTimer.start(); @@ -70,8 +70,8 @@ void RateClass::addMember( WORD family, WORD subtype ) bool RateClass::isMember(const SNAC &s) const { - QValueList<SnacPair>::const_iterator it; - QValueList<SnacPair>::const_iterator spEnd = m_members.constEnd(); + TQValueList<SnacPair>::const_iterator it; + TQValueList<SnacPair>::const_iterator spEnd = m_members.constEnd(); for ( it = m_members.constBegin(); it != spEnd; ++it ) { if ( ( *it ).family == s.family && ( *it ).subtype == s.subtype ) @@ -83,8 +83,8 @@ bool RateClass::isMember(const SNAC &s) const bool RateClass::isMember( WORD family, WORD subtype ) const { - QValueList<SnacPair>::const_iterator it; - QValueList<SnacPair>::const_iterator spEnd = m_members.constEnd(); + TQValueList<SnacPair>::const_iterator it; + TQValueList<SnacPair>::const_iterator spEnd = m_members.constEnd(); for ( it = m_members.constBegin(); it != spEnd; ++it ) { if ( ( *it ).family == family && ( *it ).subtype == subtype ) @@ -194,7 +194,7 @@ void RateClass::setupTimer() } else { - QTimer::singleShot( ttns, this, SLOT( slotSend() ) ); //or send later + TQTimer::singleShot( ttns, this, TQT_SLOT( slotSend() ) ); //or send later } } } @@ -232,7 +232,7 @@ void RateClass::updateRateInfo() void RateClass::dumpQueue() { - QValueList<Transfer*>::iterator it = m_packetQueue.begin(); + TQValueList<Transfer*>::iterator it = m_packetQueue.begin(); while ( it != m_packetQueue.end() && m_packetQueue.count() > 0 ) { Transfer* t = ( *it ); diff --git a/kopete/protocols/oscar/liboscar/rateclass.h b/kopete/protocols/oscar/liboscar/rateclass.h index 1bb86f03..78ad8917 100644 --- a/kopete/protocols/oscar/liboscar/rateclass.h +++ b/kopete/protocols/oscar/liboscar/rateclass.h @@ -19,10 +19,10 @@ #define RATECLASS_H #include "oscartypes.h" -#include <qobject.h> -#include <qvaluelist.h> -#include <qdatetime.h> -#include <qpair.h> +#include <tqobject.h> +#include <tqvaluelist.h> +#include <tqdatetime.h> +#include <tqpair.h> const int RATE_SAFETY_TIME = 50; @@ -38,7 +38,7 @@ class RateClass : public QObject { Q_OBJECT public: - RateClass( QObject* parent = 0 ); + RateClass( TQObject* parent = 0 ); ~RateClass(); /** Accessor for classid */ @@ -119,11 +119,11 @@ private slots: private: Oscar::RateInfo m_rateInfo; - QValueList<SnacPair> m_members; - QValueList<Transfer*> m_packetQueue; - QTime m_packetTimer; + TQValueList<SnacPair> m_members; + TQValueList<Transfer*> m_packetQueue; + TQTime m_packetTimer; - // we are waiting for the QTimer::singleShot() to send + // we are waiting for the TQTimer::singleShot() to send bool m_waitingToSend; }; diff --git a/kopete/protocols/oscar/liboscar/rateclassmanager.cpp b/kopete/protocols/oscar/liboscar/rateclassmanager.cpp index 8b306c0b..59ef735e 100644 --- a/kopete/protocols/oscar/liboscar/rateclassmanager.cpp +++ b/kopete/protocols/oscar/liboscar/rateclassmanager.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <kdebug.h> @@ -30,12 +30,12 @@ class RateClassManagerPrivate { public: //! The list of rate classes owned by this manager - QValueList<RateClass*> classList; + TQValueList<RateClass*> classList; Connection* client; }; RateClassManager::RateClassManager( Connection* parent, const char* name ) -: QObject( parent, name ) +: TQObject( parent, name ) { d = new RateClassManagerPrivate(); d->client = parent; @@ -49,7 +49,7 @@ RateClassManager::~RateClassManager() void RateClassManager::reset() { - QValueList<RateClass*>::iterator it = d->classList.begin(); + TQValueList<RateClass*>::iterator it = d->classList.begin(); while ( it != d->classList.end() && d->classList.count() > 0) { RateClass* rc = ( *it ); @@ -60,7 +60,7 @@ void RateClassManager::reset() void RateClassManager::registerClass( RateClass* rc ) { - QObject::connect( rc, SIGNAL( dataReady( Transfer* ) ), this, SLOT( transferReady( Transfer* ) ) ); + TQObject::connect( rc, TQT_SIGNAL( dataReady( Transfer* ) ), this, TQT_SLOT( transferReady( Transfer* ) ) ); d->classList.append( rc ); } @@ -110,7 +110,7 @@ void RateClassManager::queue( Transfer* t ) transferReady( t ); } -QValueList<RateClass*> RateClassManager::classList() const +TQValueList<RateClass*> RateClassManager::classList() const { return d->classList; } @@ -133,8 +133,8 @@ RateClass* RateClassManager::findRateClass( SnacTransfer* st ) const SNAC s = st->snac(); //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Looking for SNAC " << s.family << ", " << s.subtype << endl; RateClass* rc = 0L; - QValueList<RateClass*>::const_iterator it; - QValueList<RateClass*>::const_iterator rcEnd = d->classList.constEnd(); + TQValueList<RateClass*>::const_iterator it; + TQValueList<RateClass*>::const_iterator rcEnd = d->classList.constEnd(); for ( it = d->classList.constBegin(); it != rcEnd; ++it ) { @@ -151,16 +151,16 @@ RateClass* RateClassManager::findRateClass( SnacTransfer* st ) const void RateClassManager::recalcRateLevels() { - QValueList<RateClass*>::iterator it; - QValueList<RateClass*>::iterator rcEnd = d->classList.end(); + TQValueList<RateClass*>::iterator it; + TQValueList<RateClass*>::iterator rcEnd = d->classList.end(); for ( it = d->classList.begin(); it != rcEnd; ++it ) ( *it )->updateRateInfo(); } int RateClassManager::timeToInitialLevel( SNAC s ) { - QValueList<RateClass*>::const_iterator it; - QValueList<RateClass*>::const_iterator rcEnd = d->classList.constEnd(); + TQValueList<RateClass*>::const_iterator it; + TQValueList<RateClass*>::const_iterator rcEnd = d->classList.constEnd(); for ( it = d->classList.constBegin(); it != rcEnd; ++it ) { diff --git a/kopete/protocols/oscar/liboscar/rateclassmanager.h b/kopete/protocols/oscar/liboscar/rateclassmanager.h index 4b972ede..b1240f07 100644 --- a/kopete/protocols/oscar/liboscar/rateclassmanager.h +++ b/kopete/protocols/oscar/liboscar/rateclassmanager.h @@ -19,9 +19,9 @@ #ifndef RATECLASSMANAGER_H #define RATECLASSMANAGER_H -#include <qobject.h> -#include <qvaluelist.h> -#include <qmap.h> +#include <tqobject.h> +#include <tqvaluelist.h> +#include <tqmap.h> #include "oscartypes.h" class Transfer; @@ -51,7 +51,7 @@ public: void queue( Transfer* t ); /** Get the list of rate classes */ - QValueList<RateClass*> classList() const; + TQValueList<RateClass*> classList() const; /** Recalculate the rate levels for all the classes */ void recalcRateLevels(); diff --git a/kopete/protocols/oscar/liboscar/rateinfotask.cpp b/kopete/protocols/oscar/liboscar/rateinfotask.cpp index f19cf792..08002b8a 100644 --- a/kopete/protocols/oscar/liboscar/rateinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/rateinfotask.cpp @@ -18,7 +18,7 @@ #include "rateinfotask.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <kdebug.h> #include "rateclass.h" #include "rateclassmanager.h" @@ -32,7 +32,7 @@ using namespace Oscar; RateInfoTask::RateInfoTask( Task* parent ) : Task( parent ) { - connect( this, SIGNAL( gotRateLimits() ), this, SLOT( sendRateInfoAck() ) ); + connect( this, TQT_SIGNAL( gotRateLimits() ), this, TQT_SLOT( sendRateInfoAck() ) ); } @@ -80,7 +80,7 @@ void RateInfoTask::sendRateInfoRequest() void RateInfoTask::handleRateInfoResponse() { - QValueList<RateClass*> rates; + TQValueList<RateClass*> rates; Oscar::RateInfo ri; kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "handling rate info response (SNAC 0x01, 0x07)" << endl; @@ -119,7 +119,7 @@ void RateInfoTask::handleRateInfoResponse() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding snac members to group " << groupNum << endl; RateClass* rc = 0L; - QValueList<RateClass*>::iterator it = rates.begin(); + TQValueList<RateClass*>::iterator it = rates.begin(); for ( ; it != rates.end(); ++it ) { if ( ( *it )->id() == groupNum ) @@ -139,8 +139,8 @@ void RateInfoTask::handleRateInfoResponse() } } - QValueList<RateClass*>::iterator it = rates.begin(); - QValueList<RateClass*>::iterator rcEnd = rates.end(); + TQValueList<RateClass*>::iterator it = rates.begin(); + TQValueList<RateClass*>::iterator rcEnd = rates.end(); for ( ; it != rcEnd; ++it ) client()->rateManager()->registerClass( ( *it ) ); @@ -154,8 +154,8 @@ void RateInfoTask::sendRateInfoAck() SNAC s = { 0x0001, 0x0008, 0x0000, client()->snacSequence() }; Buffer* buffer = new Buffer(); - QValueListConstIterator<int> cit = m_rateGroups.begin(); - QValueListConstIterator<int> end = m_rateGroups.end(); + TQValueListConstIterator<int> cit = m_rateGroups.begin(); + TQValueListConstIterator<int> end = m_rateGroups.end(); for ( cit = m_rateGroups.begin(); cit != end; ++cit ) { //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding rate " << (*cit) << " to rate ack" << endl; @@ -164,7 +164,7 @@ void RateInfoTask::sendRateInfoAck() Transfer* st = createTransfer( f, s, buffer ); send( st ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } #include "rateinfotask.moc" diff --git a/kopete/protocols/oscar/liboscar/rateinfotask.h b/kopete/protocols/oscar/liboscar/rateinfotask.h index 3964f0ea..013559f6 100644 --- a/kopete/protocols/oscar/liboscar/rateinfotask.h +++ b/kopete/protocols/oscar/liboscar/rateinfotask.h @@ -20,7 +20,7 @@ #define RATEINFOTASK_H #include "task.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> using namespace Oscar; @@ -56,7 +56,7 @@ private slots: private: bool m_needRateAck; - QValueList<int> m_rateGroups; + TQValueList<int> m_rateGroups; }; //kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/rtf.cc b/kopete/protocols/oscar/liboscar/rtf.cc index bb4d88ee..39c16bc4 100644 --- a/kopete/protocols/oscar/liboscar/rtf.cc +++ b/kopete/protocols/oscar/liboscar/rtf.cc @@ -1627,25 +1627,25 @@ void ParStyle::clearFormatting() // dir is not a formatting item. } -QString RTF2HTML::quoteString(const QString &_str, quoteMode mode) +TQString RTF2HTML::quoteString(const TQString &_str, quoteMode mode) { - QString str = _str; - str.replace(QRegExp("&"), "&"); - str.replace(QRegExp("<"), "<"); - str.replace(QRegExp(">"), ">"); - str.replace(QRegExp("\""), """); - str.replace(QRegExp("\r"), ""); + TQString str = _str; + str.replace(TQRegExp("&"), "&"); + str.replace(TQRegExp("<"), "<"); + str.replace(TQRegExp(">"), ">"); + str.replace(TQRegExp("\""), """); + str.replace(TQRegExp("\r"), ""); switch (mode){ case quoteHTML: - str.replace(QRegExp("\n"), "<br>\n"); + str.replace(TQRegExp("\n"), "<br>\n"); break; case quoteXML: - str.replace(QRegExp("\n"), "<br/>\n"); + str.replace(TQRegExp("\n"), "<br/>\n"); break; default: break; } - QRegExp re(" +"); + TQRegExp re(" +"); int len; int pos = 0; @@ -1654,7 +1654,7 @@ QString RTF2HTML::quoteString(const QString &_str, quoteMode mode) if (len == 1) continue; - QString s = " "; + TQString s = " "; for (int i = 1; i < len; i++) s += " "; str.replace(pos, len, s); @@ -1690,7 +1690,7 @@ void RTF2HTML::FlushOutTags() // RTF colors are 1-based; colors[] is a 0-based array. if (t.param > colors.size() || t.param == 0) break; - QColor &c = colors[t.param-1]; + TQColor &c = colors[t.param-1]; PrintUnquoted("<span style=\"color:#%02X%02X%02X\">", c.red(), c.green(), c.blue()); } break; @@ -1707,7 +1707,7 @@ void RTF2HTML::FlushOutTags() case TAG_BG_COLOR:{ if (t.param > colors.size()) break; - QColor &c = colors[t.param]; + TQColor &c = colors[t.param]; PrintUnquoted("<span style=\"background-color:#%02X%02X%02X;\">", c.red(), c.green(), c.blue()); break; } @@ -1878,7 +1878,7 @@ void RTF2HTML::PrintUnquoted(const char *str, ...) sParagraph += buff; } -void RTF2HTML::PrintQuoted(const QString &str) +void RTF2HTML::PrintQuoted(const TQString &str) { sParagraph += quoteString(str); } @@ -2110,7 +2110,7 @@ void Level::reset() resetTag(TAG_ALL); if (m_bColors){ if (m_bColorInit){ - QColor c(m_nRed, m_nGreen, m_nBlue); + TQColor c(m_nRed, m_nGreen, m_nBlue); p->colors.push_back(c); resetColors(); } @@ -2181,7 +2181,7 @@ void Level::flush() if (encoding == NULL) encoding = p->encoding; - QTextCodec *codec = ICQClient::_getCodec(encoding); + TQTextCodec *codec = ICQClient::_getCodec(encoding); */ //p->PrintQuoted(codec->toUnicode(text.c_str(), text.length())); p->PrintQuoted(text.c_str()); @@ -2245,7 +2245,7 @@ static char h2d(char c) return 0; } -QString RTF2HTML::Parse(const char *rtf, const char *_encoding) +TQString RTF2HTML::Parse(const char *rtf, const char *_encoding) { encoding = _encoding; YY_BUFFER_STATE yy_current_buffer = yy_scan_string(rtf); @@ -2313,7 +2313,7 @@ QString RTF2HTML::Parse(const char *rtf, const char *_encoding) break; case UNICODE_CHAR:{ cur_level.flush(); - sParagraph += QChar((unsigned short)(atol(yytext + 2))); + sParagraph += TQChar((unsigned short)(atol(yytext + 2))); break; } case HEX:{ @@ -2412,7 +2412,7 @@ QString RTF2HTML::Parse(const char *rtf, const char *_encoding) } /* -bool ICQClient::parseRTF(const char *rtf, const char *encoding, QString &res) +bool ICQClient::parseRTF(const char *rtf, const char *encoding, TQString &res) { char _RTF[] = "{\\rtf"; if ((strlen(rtf) > strlen(_RTF)) && !memcmp(rtf, _RTF, strlen(_RTF))){ @@ -2420,7 +2420,7 @@ bool ICQClient::parseRTF(const char *rtf, const char *encoding, QString &res) res = p.Parse(rtf, encoding); return true; } - QTextCodec *codec = ICQClient::_getCodec(encoding); + TQTextCodec *codec = ICQClient::_getCodec(encoding); res = codec->toUnicode(rtf, strlen(rtf)); return false; } diff --git a/kopete/protocols/oscar/liboscar/rtf2html.h b/kopete/protocols/oscar/liboscar/rtf2html.h index a305b89d..5685e4a1 100644 --- a/kopete/protocols/oscar/liboscar/rtf2html.h +++ b/kopete/protocols/oscar/liboscar/rtf2html.h @@ -18,12 +18,12 @@ #ifndef RTF2HTML_H #define RTF2HTML_H -#include <qstring.h> +#include <tqstring.h> #include <stdio.h> -#include <qtextcodec.h> -#include <qcolor.h> -#include <qregexp.h> +#include <tqtextcodec.h> +#include <tqcolor.h> +#include <tqregexp.h> #include <kdebug.h> #include <vector> @@ -149,15 +149,15 @@ class RTF2HTML public: RTF2HTML(); - QString Parse(const char *rtf, const char *encoding); + TQString Parse(const char *rtf, const char *encoding); // Paragraph-specific functions: - QString quoteString(const QString &_str, quoteMode mode = quoteHTML); + TQString quoteString(const TQString &_str, quoteMode mode = quoteHTML); // Appends a string with formatting into the paragraph buffer. void PrintUnquoted(const char *str, ...); // Quotes and appends a string to the paragraph buffer. - void PrintQuoted(const QString &str); + void PrintQuoted(const TQString &str); // Writes down the tags from oTags into the paragraph buffer. void FlushOutTags(); // Retrieves the top not-yet-written tag. @@ -179,7 +179,7 @@ protected: // True if the paragraph was opened explicitly. bool bExplicitParagraph; // The paragraph's HTML buffer. - QString sParagraph; + TQString sParagraph; // Defines the paragraph's formatting. ParStyle parStyle; // Tags which weren't yet printed out. @@ -188,11 +188,11 @@ protected: // Document members // The document HTML buffer. - QString s; + TQString s; // Fonts table. vector<FontDef> fonts; // Colors table. - vector<QColor> colors; + vector<TQColor> colors; // Stack of tags (across all levels, not just current level) stack<TagEnum> tags; diff --git a/kopete/protocols/oscar/liboscar/safedelete.cpp b/kopete/protocols/oscar/liboscar/safedelete.cpp index 703e8ed3..5dde3725 100644 --- a/kopete/protocols/oscar/liboscar/safedelete.cpp +++ b/kopete/protocols/oscar/liboscar/safedelete.cpp @@ -19,7 +19,7 @@ #include "safedelete.h" -#include <qtimer.h> +#include <tqtimer.h> //---------------------------------------------------------------------------- // SafeDelete @@ -35,7 +35,7 @@ SafeDelete::~SafeDelete() lock->dying(); } -void SafeDelete::deleteLater(QObject *o) +void SafeDelete::deleteLater(TQObject *o) { if(!lock) deleteSingle(o); @@ -54,16 +54,16 @@ void SafeDelete::deleteAll() if(list.isEmpty()) return; - QObjectListIt it(list); - for(QObject *o; (o = it.current()); ++it) + TQObjectListIt it(list); + for(TQObject *o; (o = it.current()); ++it) deleteSingle(o); list.clear(); } -void SafeDelete::deleteSingle(QObject *o) +void SafeDelete::deleteSingle(TQObject *o) { #if QT_VERSION < 0x030000 - // roll our own QObject::deleteLater() + // roll our own TQObject::deleteLater() SafeDeleteLater *sdl = SafeDeleteLater::ensureExists(); sdl->deleteItLater(o); #else @@ -116,7 +116,7 @@ SafeDeleteLater::SafeDeleteLater() { list.setAutoDelete(true); self = this; - QTimer::singleShot(0, this, SLOT(explode())); + TQTimer::singleShot(0, this, TQT_SLOT(explode())); } SafeDeleteLater::~SafeDeleteLater() @@ -125,7 +125,7 @@ SafeDeleteLater::~SafeDeleteLater() self = 0; } -void SafeDeleteLater::deleteItLater(QObject *o) +void SafeDeleteLater::deleteItLater(TQObject *o) { list.append(o); } diff --git a/kopete/protocols/oscar/liboscar/safedelete.h b/kopete/protocols/oscar/liboscar/safedelete.h index e8215c06..0d4150d9 100644 --- a/kopete/protocols/oscar/liboscar/safedelete.h +++ b/kopete/protocols/oscar/liboscar/safedelete.h @@ -20,8 +20,8 @@ #ifndef SAFEDELETE_H #define SAFEDELETE_H -#include<qobject.h> -#include<qobjectlist.h> +#include<tqobject.h> +#include<tqobjectlist.h> class SafeDelete; class SafeDeleteLock @@ -43,13 +43,13 @@ public: SafeDelete(); ~SafeDelete(); - void deleteLater(QObject *o); + void deleteLater(TQObject *o); - // same as QObject::deleteLater() - static void deleteSingle(QObject *o); + // same as TQObject::deleteLater() + static void deleteSingle(TQObject *o); private: - QObjectList list; + TQObjectList list; void deleteAll(); friend class SafeDeleteLock; @@ -62,7 +62,7 @@ class SafeDeleteLater : public QObject Q_OBJECT public: static SafeDeleteLater *ensureExists(); - void deleteItLater(QObject *o); + void deleteItLater(TQObject *o); private slots: void explode(); @@ -71,7 +71,7 @@ private: SafeDeleteLater(); ~SafeDeleteLater(); - QObjectList list; + TQObjectList list; friend class SafeDelete; static SafeDeleteLater *self; }; diff --git a/kopete/protocols/oscar/liboscar/senddcinfotask.cpp b/kopete/protocols/oscar/liboscar/senddcinfotask.cpp index af80e191..2b5dbbae 100644 --- a/kopete/protocols/oscar/liboscar/senddcinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/senddcinfotask.cpp @@ -100,7 +100,7 @@ void SendDCInfoTask::onGo() Transfer* t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/sendidletimetask.cpp b/kopete/protocols/oscar/liboscar/sendidletimetask.cpp index f0601e22..ba753471 100644 --- a/kopete/protocols/oscar/liboscar/sendidletimetask.cpp +++ b/kopete/protocols/oscar/liboscar/sendidletimetask.cpp @@ -45,7 +45,7 @@ void SendIdleTimeTask::onGo() Transfer *t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/sendmessagetask.cpp b/kopete/protocols/oscar/liboscar/sendmessagetask.cpp index 48509595..1b8cbfbc 100644 --- a/kopete/protocols/oscar/liboscar/sendmessagetask.cpp +++ b/kopete/protocols/oscar/liboscar/sendmessagetask.cpp @@ -344,13 +344,13 @@ void SendMessageTask::addRendezvousMessageData( Buffer* b ) /* Old oscarsocket code, which is here for reference in case this doesn't work -QTextCodec *codec = 0L; +TQTextCodec *codec = 0L; WORD charset = 0x0000; // default to ascii WORD charsubset = 0x0000; int length = message.length(); unsigned char *utfMessage = 0L; -codec=QTextCodec::codecForMib(3); // US-ASCII +codec=TQTextCodec::codecForMib(3); // US-ASCII if(codec) { @@ -360,7 +360,7 @@ if(codec) // We are forcing kopete to send messages using ISO-8859-1 // It's a hack and should be reimplemented in a better way charset=0x0003; - codec=QTextCodec::codecForMib(4); + codec=TQTextCodec::codecForMib(4); //kdDebug(14151) << k_funcinfo << "Now trying ISO-8859-1" << endl; } else @@ -388,7 +388,7 @@ if ( !codec && ( contact->hasCap(CAP_UTF8) || !contact->encoding() ) ) // no codec and no charset and per-contact encoding set if(!codec && charset != 0x0002 && contact->encoding() != 0) { - codec=QTextCodec::codecForMib(contact->encoding()); + codec=TQTextCodec::codecForMib(contact->encoding()); if(codec) charset=0x0003; //send as ISO-8859-1 } @@ -399,7 +399,7 @@ if(!codec && charset != 0x0002) // it's neither unicode nor did we find a codec "Couldn't find suitable encoding for outgoing message, " << "encoding using ISO-8859-1, prepare for receiver getting unreadable text :)" << endl; charset=0x0003; - codec=QTextCodec::codecForMib(4); // ISO-8859-1 + codec=TQTextCodec::codecForMib(4); // ISO-8859-1 } tlv2.addWord(0x0101); //add TLV(0x0101) also known as TLV(257) @@ -416,7 +416,7 @@ if(utfMessage) else { kdDebug(14151) << k_funcinfo << "Outgoing message encoded as '" << codec->name() << "'" << endl; - QCString outgoingMessage=codec->fromUnicode(message); + TQCString outgoingMessage=codec->fromUnicode(message); tlv2.addString(outgoingMessage, length); // the actual message } // ==================================================================================== diff --git a/kopete/protocols/oscar/liboscar/sendmessagetask.h b/kopete/protocols/oscar/liboscar/sendmessagetask.h index 0eaff13f..18e03c73 100644 --- a/kopete/protocols/oscar/liboscar/sendmessagetask.h +++ b/kopete/protocols/oscar/liboscar/sendmessagetask.h @@ -18,7 +18,7 @@ #define SENDMESSAGETASK_H #include "task.h" -#include <qstring.h> +#include <tqstring.h> #include "oscarmessage.h" /** @author Kopete Developers diff --git a/kopete/protocols/oscar/liboscar/serverredirecttask.cpp b/kopete/protocols/oscar/liboscar/serverredirecttask.cpp index 32cb105f..5875e6a8 100644 --- a/kopete/protocols/oscar/liboscar/serverredirecttask.cpp +++ b/kopete/protocols/oscar/liboscar/serverredirecttask.cpp @@ -36,7 +36,7 @@ void ServerRedirectTask::setService( WORD family ) m_service = family; } -void ServerRedirectTask::setChatParams( WORD exchange, QByteArray cookie, WORD instance ) +void ServerRedirectTask::setChatParams( WORD exchange, TQByteArray cookie, WORD instance ) { m_chatExchange = exchange; m_chatCookie.duplicate( cookie ); @@ -44,7 +44,7 @@ void ServerRedirectTask::setChatParams( WORD exchange, QByteArray cookie, WORD i m_chatInstance = instance; } -void ServerRedirectTask::setChatRoom( const QString& roomName ) +void ServerRedirectTask::setChatRoom( const TQString& roomName ) { m_chatRoom = roomName; } @@ -75,7 +75,7 @@ bool ServerRedirectTask::take( Transfer* transfer ) setTransfer( transfer ); bool value = handleRedirect(); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return value; } @@ -126,7 +126,7 @@ bool ServerRedirectTask::handleRedirect() return false; TLV server = b->getTLV(); - m_newHost = QString( server.data ); + m_newHost = TQString( server.data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Host for service " << m_service << " is " << m_newHost << endl; if ( m_newHost.isEmpty() ) @@ -143,12 +143,12 @@ bool ServerRedirectTask::handleRedirect() return true; } -QByteArray ServerRedirectTask::cookie() const +TQByteArray ServerRedirectTask::cookie() const { return m_cookie; } -QString ServerRedirectTask::newHost() const +TQString ServerRedirectTask::newHost() const { return m_newHost; } @@ -163,7 +163,7 @@ WORD ServerRedirectTask::chatExchange() const return m_chatExchange; } -QString ServerRedirectTask::chatRoomName() const +TQString ServerRedirectTask::chatRoomName() const { return m_chatRoom; } diff --git a/kopete/protocols/oscar/liboscar/serverredirecttask.h b/kopete/protocols/oscar/liboscar/serverredirecttask.h index 785ac0df..972e28ce 100644 --- a/kopete/protocols/oscar/liboscar/serverredirecttask.h +++ b/kopete/protocols/oscar/liboscar/serverredirecttask.h @@ -23,7 +23,7 @@ #include "task.h" -#include <qcstring.h> +#include <tqcstring.h> #include "oscartypes.h" @@ -36,11 +36,11 @@ public: ServerRedirectTask( Task* parent ); void setService( WORD family ); - void setChatParams( WORD exchange, QByteArray cookie, WORD instance ); - void setChatRoom( const QString& roomName ); + void setChatParams( WORD exchange, TQByteArray cookie, WORD instance ); + void setChatRoom( const TQString& roomName ); WORD chatExchange() const; - QString chatRoomName() const; + TQString chatRoomName() const; //Task implementation void onGo(); @@ -50,22 +50,22 @@ public: void requestNewService(); bool handleRedirect(); - QByteArray cookie() const; - QString newHost() const; + TQByteArray cookie() const; + TQString newHost() const; WORD service() const; signals: - void haveServer( const QString&, const QByteArray&, WORD ); + void haveServer( const TQString&, const TQByteArray&, WORD ); private: WORD m_service; - QString m_newHost; - QByteArray m_cookie; + TQString m_newHost; + TQByteArray m_cookie; WORD m_chatExchange; - QByteArray m_chatCookie; + TQByteArray m_chatCookie; WORD m_chatInstance; - QString m_chatRoom; + TQString m_chatRoom; }; diff --git a/kopete/protocols/oscar/liboscar/serverversionstask.cpp b/kopete/protocols/oscar/liboscar/serverversionstask.cpp index e4186f18..b2e7dfa6 100644 --- a/kopete/protocols/oscar/liboscar/serverversionstask.cpp +++ b/kopete/protocols/oscar/liboscar/serverversionstask.cpp @@ -101,7 +101,7 @@ void ServerVersionsTask::handleFamilies() Buffer* outbuf = transfer()->buffer(); if ( outbuf->length() % 2 != 0 ) { - setError( -1, QString::null ); + setError( -1, TQString::null ); 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, QString::null ); + setSuccess( 0, TQString::null ); } #include "serverversionstask.moc" diff --git a/kopete/protocols/oscar/liboscar/serverversionstask.h b/kopete/protocols/oscar/liboscar/serverversionstask.h index a9c56f35..f3a72a38 100644 --- a/kopete/protocols/oscar/liboscar/serverversionstask.h +++ b/kopete/protocols/oscar/liboscar/serverversionstask.h @@ -20,7 +20,7 @@ #define SERVERVERSIONSTASK_H #include "task.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "oscartypes.h" class Transfer; @@ -52,7 +52,7 @@ private: void requestFamilyVersions(); private: - QValueList<int> m_familiesList; + TQValueList<int> m_familiesList; WORD m_family; }; diff --git a/kopete/protocols/oscar/liboscar/servicesetuptask.cpp b/kopete/protocols/oscar/liboscar/servicesetuptask.cpp index 13e30101..61f53279 100644 --- a/kopete/protocols/oscar/liboscar/servicesetuptask.cpp +++ b/kopete/protocols/oscar/liboscar/servicesetuptask.cpp @@ -47,14 +47,14 @@ ServiceSetupTask::ServiceSetupTask( Task* parent ) m_ssiListTask = new SSIListTask( parent ); m_ssiActivateTask = new SSIActivateTask( parent ); - QObject::connect( m_ssiListTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_ssiParamTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_prmTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_icbmTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_blmLimitsTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_profileTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_locRightsTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_ssiActivateTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); + TQObject::connect( m_ssiListTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_ssiParamTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_prmTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_icbmTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_blmLimitsTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_profileTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_locRightsTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_ssiActivateTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); } @@ -95,7 +95,7 @@ void ServiceSetupTask::childTaskFinished() kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Sending DC info and client ready" << endl; SendIdleTimeTask* sitt = new SendIdleTimeTask( client()->rootTask() ); - QValueList<int> familyList; + TQValueList<int> familyList; familyList.append( 0x0001 ); familyList.append( 0x0002 ); familyList.append( 0x0003 ); @@ -114,7 +114,7 @@ void ServiceSetupTask::childTaskFinished() if ( m_finishedTaskCount == 8 ) { kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Service setup finished" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } } diff --git a/kopete/protocols/oscar/liboscar/snacprotocol.cpp b/kopete/protocols/oscar/liboscar/snacprotocol.cpp index 3bf16bbc..3ec5c348 100644 --- a/kopete/protocols/oscar/liboscar/snacprotocol.cpp +++ b/kopete/protocols/oscar/liboscar/snacprotocol.cpp @@ -19,9 +19,9 @@ #include "snacprotocol.h" -#include <qcstring.h> -#include <qdatastream.h> -#include <qobject.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqobject.h> #include <kdebug.h> #include <stdlib.h> #include "transfer.h" @@ -29,7 +29,7 @@ using namespace Oscar; -SnacProtocol::SnacProtocol(QObject *parent, const char *name) +SnacProtocol::SnacProtocol(TQObject *parent, const char *name) : InputProtocolBase(parent, name) { } @@ -38,7 +38,7 @@ SnacProtocol::~SnacProtocol() { } -Transfer* SnacProtocol::parse( const QByteArray & packet, uint& bytes ) +Transfer* SnacProtocol::parse( const TQByteArray & packet, uint& bytes ) { BYTE b; WORD w; @@ -47,7 +47,7 @@ Transfer* SnacProtocol::parse( const QByteArray & packet, uint& bytes ) FLAP f; SNAC s; SnacTransfer *st; - QDataStream* m_din = new QDataStream( packet, IO_ReadOnly ); + TQDataStream* m_din = new TQDataStream( packet, IO_ReadOnly ); //flap parsing *m_din >> b; //this should be the start byte diff --git a/kopete/protocols/oscar/liboscar/snacprotocol.h b/kopete/protocols/oscar/liboscar/snacprotocol.h index eea5c032..18c6aaaa 100644 --- a/kopete/protocols/oscar/liboscar/snacprotocol.h +++ b/kopete/protocols/oscar/liboscar/snacprotocol.h @@ -29,7 +29,7 @@ class SnacProtocol : public InputProtocolBase { Q_OBJECT public: - SnacProtocol( QObject *parent = 0, const char *name = 0 ); + SnacProtocol( TQObject *parent = 0, const char *name = 0 ); ~SnacProtocol(); /** @@ -39,7 +39,7 @@ public: * @param bytes An integer used to return the number of bytes read. * @return A pointer to an EventTransfer object if successfull, otherwise 0. The caller is responsible for deleting this object. */ - Transfer * parse( const QByteArray &, uint & bytes ); + Transfer * parse( const TQByteArray &, uint & bytes ); }; diff --git a/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp b/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp index 1e7a17d6..795d9999 100644 --- a/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp +++ b/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp @@ -44,7 +44,7 @@ void SSIActivateTask::onGo() Buffer* buffer = new Buffer(); Transfer* t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } // kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/ssiauthtask.cpp b/kopete/protocols/oscar/liboscar/ssiauthtask.cpp index 59188d2b..bccb754e 100644 --- a/kopete/protocols/oscar/liboscar/ssiauthtask.cpp +++ b/kopete/protocols/oscar/liboscar/ssiauthtask.cpp @@ -86,7 +86,7 @@ bool SSIAuthTask::take( Transfer* t ) return false; } -void SSIAuthTask::grantFutureAuth( const QString& uin, const QString& reason ) +void SSIAuthTask::grantFutureAuth( const TQString& uin, const TQString& reason ) { FLAP f = { 0x02, 0, 0 }; SNAC s = { 0x0013, 0x0014, 0x0000, client()->snacSequence() }; @@ -100,7 +100,7 @@ void SSIAuthTask::grantFutureAuth( const QString& uin, const QString& reason ) send( t ); } -void SSIAuthTask::sendAuthRequest( const QString& uin, const QString& reason ) +void SSIAuthTask::sendAuthRequest( const TQString& uin, const TQString& reason ) { FLAP f = { 0x02, 0, 0 }; SNAC s = { 0x0013, 0x0018, 0x0000, client()->snacSequence() }; @@ -114,7 +114,7 @@ void SSIAuthTask::sendAuthRequest( const QString& uin, const QString& reason ) send( t ); } -void SSIAuthTask::sendAuthReply( const QString& uin, const QString& reason, bool auth ) +void SSIAuthTask::sendAuthReply( const TQString& uin, const TQString& reason, bool auth ) { FLAP f = { 0x02, 0, 0 }; SNAC s = { 0x0013, 0x001A, 0x0000, client()->snacSequence() }; @@ -132,38 +132,38 @@ void SSIAuthTask::handleFutureAuthGranted() { Buffer* buf = transfer()->buffer(); - QString uin = Oscar::normalize( buf->getBUIN() ); - QByteArray reason = buf->getBSTR(); + TQString uin = Oscar::normalize( buf->getBUIN() ); + TQByteArray reason = buf->getBSTR(); buf->getWord(); // 0x0000 - Unknown kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Future authorization granted from " << uin << endl; kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Reason: " << reason << endl; - emit futureAuthGranted( uin, QString::fromUtf8( reason.data(), reason.size() ) ); + emit futureAuthGranted( uin, TQString::fromUtf8( reason.data(), reason.size() ) ); } void SSIAuthTask::handleAuthRequested() { Buffer* buf = transfer()->buffer(); - QString uin = Oscar::normalize( buf->getBUIN() ); - QByteArray reason = buf->getBSTR(); + TQString uin = Oscar::normalize( buf->getBUIN() ); + TQByteArray reason = buf->getBSTR(); buf->getWord(); // 0x0000 - Unknown kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Authorization requested from " << uin << endl; kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Reason: " << reason << endl; - emit authRequested( uin, QString::fromUtf8( reason.data(), reason.size() ) ); + emit authRequested( uin, TQString::fromUtf8( reason.data(), reason.size() ) ); } void SSIAuthTask::handleAuthReplied() { Buffer* buf = transfer()->buffer(); - QString uin = Oscar::normalize( buf->getBUIN() ); + TQString uin = Oscar::normalize( buf->getBUIN() ); bool accepted = buf->getByte(); - QByteArray reason = buf->getBSTR(); + TQByteArray reason = buf->getBSTR(); if ( accepted ) kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Authorization request accepted by " << uin << endl; @@ -171,14 +171,14 @@ void SSIAuthTask::handleAuthReplied() kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Authorization request declined by " << uin << endl; kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Reason: " << reason << endl; - emit authReplied( uin, QString::fromUtf8( reason.data(), reason.size() ), accepted ); + emit authReplied( uin, TQString::fromUtf8( reason.data(), reason.size() ), accepted ); } void SSIAuthTask::handleAddedMessage() { Buffer* buf = transfer()->buffer(); - QString uin = Oscar::normalize( buf->getBUIN() ); + TQString uin = Oscar::normalize( buf->getBUIN() ); kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "User " << uin << " added you to the contact list" << endl; emit contactAddedYou( uin ); diff --git a/kopete/protocols/oscar/liboscar/ssiauthtask.h b/kopete/protocols/oscar/liboscar/ssiauthtask.h index d470cfe9..1760f344 100644 --- a/kopete/protocols/oscar/liboscar/ssiauthtask.h +++ b/kopete/protocols/oscar/liboscar/ssiauthtask.h @@ -37,14 +37,14 @@ public: virtual bool forMe( const Transfer* t ) const; virtual bool take( Transfer* t ); - void grantFutureAuth( const QString& uin, const QString& reason ); - void sendAuthRequest( const QString& uin, const QString& reason ); - void sendAuthReply( const QString& uin, const QString& reason, bool auth ); + void grantFutureAuth( const TQString& uin, const TQString& reason ); + void sendAuthRequest( const TQString& uin, const TQString& reason ); + void sendAuthReply( const TQString& uin, const TQString& reason, bool auth ); signals: - void futureAuthGranted( const QString& uin, const QString& reason ); - void authRequested( const QString& uin, const QString& reason ); - void authReplied( const QString& uin, const QString& reason, bool auth ); - void contactAddedYou( const QString& uin ); + void futureAuthGranted( const TQString& uin, const TQString& reason ); + void authRequested( const TQString& uin, const TQString& reason ); + void authReplied( const TQString& uin, const TQString& reason, bool auth ); + void contactAddedYou( const TQString& uin ); private: void handleFutureAuthGranted(); void handleAuthRequested(); diff --git a/kopete/protocols/oscar/liboscar/ssilisttask.cpp b/kopete/protocols/oscar/liboscar/ssilisttask.cpp index fe2a981d..d52f7f4e 100644 --- a/kopete/protocols/oscar/liboscar/ssilisttask.cpp +++ b/kopete/protocols/oscar/liboscar/ssilisttask.cpp @@ -26,9 +26,9 @@ SSIListTask::SSIListTask( Task* parent ) : Task( parent ) { m_ssiManager = client()->ssiManager(); - QObject::connect( this, SIGNAL( newContact( const Oscar::SSI& ) ), m_ssiManager, SLOT( newContact( const Oscar::SSI& ) ) ); - QObject::connect( this, SIGNAL( newGroup( const Oscar::SSI& ) ), m_ssiManager, SLOT( newGroup( const Oscar::SSI& ) ) ); - QObject::connect( this, SIGNAL( newItem( const Oscar::SSI& ) ), m_ssiManager, SLOT( newItem( const Oscar::SSI& ) ) ); + TQObject::connect( this, TQT_SIGNAL( newContact( const Oscar::SSI& ) ), m_ssiManager, TQT_SLOT( newContact( const Oscar::SSI& ) ) ); + TQObject::connect( this, TQT_SIGNAL( newGroup( const Oscar::SSI& ) ), m_ssiManager, TQT_SLOT( newGroup( const Oscar::SSI& ) ) ); + TQObject::connect( this, TQT_SIGNAL( newItem( const Oscar::SSI& ) ), m_ssiManager, TQT_SLOT( newItem( const Oscar::SSI& ) ) ); } @@ -87,7 +87,7 @@ void SSIListTask::onGo() void SSIListTask::handleSSIListReply() { - QValueList<TLV> tlvList; + TQValueList<TLV> tlvList; Buffer* buffer = transfer()->buffer(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "SSI Protocol version: " << buffer->getByte() << endl; @@ -98,7 +98,7 @@ void SSIListTask::handleSSIListReply() { tlvList.clear(); WORD strlength = buffer->getWord(); - QString itemName = QString::fromUtf8( buffer->getBlock( strlength ), strlength ); + TQString itemName = TQString::fromUtf8( buffer->getBlock( strlength ), strlength ); WORD groupId = buffer->getWord(); WORD itemId = buffer->getWord(); WORD itemType = buffer->getWord(); @@ -136,7 +136,7 @@ void SSIListTask::handleSSIListReply() { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "SSI List complete" << endl; client()->ssiManager()->setListComplete( true ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } 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, QString::null ); + setSuccess( 0, TQString::null ); } void SSIListTask::checkSSITimestamp() diff --git a/kopete/protocols/oscar/liboscar/ssimanager.cpp b/kopete/protocols/oscar/liboscar/ssimanager.cpp index 066e93fa..1351c237 100644 --- a/kopete/protocols/oscar/liboscar/ssimanager.cpp +++ b/kopete/protocols/oscar/liboscar/ssimanager.cpp @@ -28,9 +28,9 @@ class SSIManagerPrivate { public: - QValueList<Oscar::SSI> SSIList; - QValueList<WORD> groupIdList; - QValueList<WORD> itemIdList; + TQValueList<Oscar::SSI> SSIList; + TQValueList<WORD> groupIdList; + TQValueList<WORD> itemIdList; bool complete; DWORD lastModTime; WORD maxContacts; @@ -42,8 +42,8 @@ public: WORD nextGroupId; }; -SSIManager::SSIManager( QObject *parent, const char *name ) - : QObject( parent, name ) +SSIManager::SSIManager( TQObject *parent, const char *name ) + : TQObject( parent, name ) { d = new SSIManagerPrivate; d->complete = false; @@ -70,7 +70,7 @@ void SSIManager::clear() if ( d->SSIList.count() > 0 ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Clearing the SSI list" << endl; - QValueList<Oscar::SSI>::iterator it = d->SSIList.begin(); + TQValueList<Oscar::SSI>::iterator it = d->SSIList.begin(); while ( it != d->SSIList.end() && d->SSIList.count() > 0 ) it = d->SSIList.remove( it ); @@ -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 - QString funcName = QString::fromLatin1( "[void SSIManager::setParameters] " ); + TQString funcName = TQString::fromLatin1( "[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: " @@ -160,7 +160,7 @@ void SSIManager::setParameters( WORD maxContacts, WORD maxGroups, WORD maxVisibl d->maxIgnore = maxIgnore; } -void SSIManager::loadFromExisting( const QValueList<Oscar::SSI*>& newList ) +void SSIManager::loadFromExisting( const TQValueList<Oscar::SSI*>& newList ) { Q_UNUSED( newList ); //FIXME: NOT Implemented! @@ -168,7 +168,7 @@ void SSIManager::loadFromExisting( const QValueList<Oscar::SSI*>& newList ) bool SSIManager::hasItem( const Oscar::SSI& item ) const { - QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) { @@ -180,9 +180,9 @@ bool SSIManager::hasItem( const Oscar::SSI& item ) const return false; } -Oscar::SSI SSIManager::findGroup( const QString &group ) const +Oscar::SSI SSIManager::findGroup( const TQString &group ) const { - QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_GROUP && (*it ).name().lower() == group.lower() ) @@ -194,7 +194,7 @@ Oscar::SSI SSIManager::findGroup( const QString &group ) const Oscar::SSI SSIManager::findGroup( int groupId ) const { - QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_GROUP && (*it ).gid() == groupId ) @@ -203,7 +203,7 @@ Oscar::SSI SSIManager::findGroup( int groupId ) const return m_dummyItem; } -Oscar::SSI SSIManager::findContact( const QString &contact, const QString &group ) const +Oscar::SSI SSIManager::findContact( const TQString &contact, const TQString &group ) const { if ( contact.isNull() || group.isNull() ) @@ -222,7 +222,7 @@ Oscar::SSI SSIManager::findContact( const QString &contact, const QString &group ", gr->bid= " << gr.bid() << ", gr->type= " << gr.type() << endl; - QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) { @@ -243,10 +243,10 @@ Oscar::SSI SSIManager::findContact( const QString &contact, const QString &group return m_dummyItem; } -Oscar::SSI SSIManager::findContact( const QString &contact ) const +Oscar::SSI SSIManager::findContact( const TQString &contact ) const { - QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT && (*it ).name() == contact ) @@ -257,7 +257,7 @@ Oscar::SSI SSIManager::findContact( const QString &contact ) const Oscar::SSI SSIManager::findContact( int contactId ) const { - QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it!= listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT && ( *it ).bid() == contactId ) @@ -266,9 +266,9 @@ Oscar::SSI SSIManager::findContact( int contactId ) const return m_dummyItem; } -Oscar::SSI SSIManager::findItemForIcon( QByteArray iconHash ) const +Oscar::SSI SSIManager::findItemForIcon( TQByteArray iconHash ) const { - QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it!= listEnd; ++it ) { @@ -278,7 +278,7 @@ Oscar::SSI SSIManager::findItemForIcon( QByteArray iconHash ) const Buffer b(t.data); b.skipBytes(1); //don't care about flags BYTE iconSize = b.getByte(); - QByteArray hash( b.getBlock( iconSize ) ); + TQByteArray hash( b.getBlock( iconSize ) ); if ( hash == iconHash ) { Oscar::SSI s = ( *it ); @@ -291,7 +291,7 @@ Oscar::SSI SSIManager::findItemForIcon( QByteArray iconHash ) const Oscar::SSI SSIManager::findItemForIconByRef( int ref ) const { - QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it!= listEnd; ++it ) { @@ -307,9 +307,9 @@ Oscar::SSI SSIManager::findItemForIconByRef( int ref ) const return m_dummyItem; } -Oscar::SSI SSIManager::findItem( const QString &contact, int type ) const +Oscar::SSI SSIManager::findItem( const TQString &contact, int type ) const { - QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it!= listEnd; ++it ) if ( ( *it ).type() == type && ( *it ).name() == contact ) @@ -318,11 +318,11 @@ Oscar::SSI SSIManager::findItem( const QString &contact, int type ) const return m_dummyItem; } -QValueList<Oscar::SSI> SSIManager::groupList() const +TQValueList<Oscar::SSI> SSIManager::groupList() const { - QValueList<Oscar::SSI> list; + TQValueList<Oscar::SSI> list; - QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_GROUP ) list.append( ( *it ) ); @@ -330,11 +330,11 @@ QValueList<Oscar::SSI> SSIManager::groupList() const return list; } -QValueList<Oscar::SSI> SSIManager::contactList() const +TQValueList<Oscar::SSI> SSIManager::contactList() const { - QValueList<Oscar::SSI> list; + TQValueList<Oscar::SSI> list; - QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT ) list.append( ( *it ) ); @@ -342,11 +342,11 @@ QValueList<Oscar::SSI> SSIManager::contactList() const return list; } -QValueList<Oscar::SSI> SSIManager::visibleList() const +TQValueList<Oscar::SSI> SSIManager::visibleList() const { - QValueList<Oscar::SSI> list; + TQValueList<Oscar::SSI> list; - QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_VISIBLE ) list.append( ( *it ) ); @@ -354,11 +354,11 @@ QValueList<Oscar::SSI> SSIManager::visibleList() const return list; } -QValueList<Oscar::SSI> SSIManager::invisibleList() const +TQValueList<Oscar::SSI> SSIManager::invisibleList() const { - QValueList<Oscar::SSI> list; + TQValueList<Oscar::SSI> list; - QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_INVISIBLE ) list.append( ( *it ) ); @@ -366,14 +366,14 @@ QValueList<Oscar::SSI> SSIManager::invisibleList() const return list; } -QValueList<Oscar::SSI> SSIManager::contactsFromGroup( const QString &group ) const +TQValueList<Oscar::SSI> SSIManager::contactsFromGroup( const TQString &group ) const { - QValueList<Oscar::SSI> list; + TQValueList<Oscar::SSI> list; Oscar::SSI gr = findGroup( group ); if ( gr.isValid() ) { - QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT && (*it ).gid() == gr.gid() ) list.append( ( *it ) ); @@ -381,11 +381,11 @@ QValueList<Oscar::SSI> SSIManager::contactsFromGroup( const QString &group ) con return list; } -QValueList<Oscar::SSI> SSIManager::contactsFromGroup( int groupId ) const +TQValueList<Oscar::SSI> SSIManager::contactsFromGroup( int groupId ) const { - QValueList<Oscar::SSI> list; + TQValueList<Oscar::SSI> list; - QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT && (*it ).gid() == groupId ) list.append( ( *it ) ); @@ -396,7 +396,7 @@ QValueList<Oscar::SSI> SSIManager::contactsFromGroup( int groupId ) const Oscar::SSI SSIManager::visibilityItem() const { Oscar::SSI item = m_dummyItem; - QValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) { if ( ( *it ).type() == 0x0004 ) @@ -423,7 +423,7 @@ bool SSIManager::listComplete() const bool SSIManager::newGroup( const Oscar::SSI& group ) { //trying to find the group by its ID - QValueList<Oscar::SSI>::iterator it, listEnd = d->SSIList.end(); + TQValueList<Oscar::SSI>::iterator it, listEnd = d->SSIList.end(); if ( findGroup( group.name() ).isValid() ) return false; @@ -465,7 +465,7 @@ bool SSIManager::updateGroup( const Oscar::SSI& group ) bool SSIManager::removeGroup( const Oscar::SSI& group ) { - QString groupName = group.name(); + TQString groupName = group.name(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Removing group " << group.name() << endl; int remcount = d->SSIList.remove( group ); removeID( group ); @@ -480,7 +480,7 @@ bool SSIManager::removeGroup( const Oscar::SSI& group ) return true; } -bool SSIManager::removeGroup( const QString &group ) +bool SSIManager::removeGroup( const TQString &group ) { Oscar::SSI gr = findGroup( group ); @@ -534,7 +534,7 @@ bool SSIManager::updateContact( const Oscar::SSI& contact ) bool SSIManager::removeContact( const Oscar::SSI& contact ) { - QString contactName = contact.name(); + TQString contactName = contact.name(); int remcount = d->SSIList.remove( contact ); removeID( contact ); @@ -548,7 +548,7 @@ bool SSIManager::removeContact( const Oscar::SSI& contact ) return true; } -bool SSIManager::removeContact( const QString &contact ) +bool SSIManager::removeContact( const TQString &contact ) { Oscar::SSI ct = findContact( contact ); @@ -642,7 +642,7 @@ void SSIManager::removeID( const Oscar::SSI& item ) } } -WORD SSIManager::findFreeId( const QValueList<WORD>& idList, WORD fromId ) const +WORD SSIManager::findFreeId( const TQValueList<WORD>& idList, WORD fromId ) const { for ( WORD id = fromId; id < 0x8000; id++ ) { diff --git a/kopete/protocols/oscar/liboscar/ssimanager.h b/kopete/protocols/oscar/liboscar/ssimanager.h index 24e87c6a..df39268c 100644 --- a/kopete/protocols/oscar/liboscar/ssimanager.h +++ b/kopete/protocols/oscar/liboscar/ssimanager.h @@ -22,8 +22,8 @@ #ifndef SSIMANAGER_H #define SSIMANAGER_H -#include <qobject.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqvaluelist.h> #include "oscartypes.h" #include "oscartypeclasses.h" @@ -42,7 +42,7 @@ class KOPETE_EXPORT SSIManager : public QObject { Q_OBJECT public: - SSIManager( QObject* parent = 0, const char* name = 0 ); + SSIManager( TQObject* parent = 0, const char* name = 0 ); ~SSIManager(); @@ -73,29 +73,29 @@ public: * The current SSI list will be overwritten and it's contents * replaced with the data from the new list */ - void loadFromExisting( const QValueList<Oscar::SSI*>& newList ); + void loadFromExisting( const TQValueList<Oscar::SSI*>& newList ); bool hasItem( const Oscar::SSI& item ) const; - Oscar::SSI findGroup( const QString& group ) const; + Oscar::SSI findGroup( const TQString& group ) const; Oscar::SSI findGroup( int groupId ) const; - Oscar::SSI findContact( const QString& contact, const QString& group ) const; - Oscar::SSI findContact( const QString& contact ) const; + Oscar::SSI findContact( const TQString& contact, const TQString& group ) const; + Oscar::SSI findContact( const TQString& contact ) const; Oscar::SSI findContact( int contactId ) const; - Oscar::SSI findItemForIcon( QByteArray iconHash ) const; + Oscar::SSI findItemForIcon( TQByteArray iconHash ) const; Oscar::SSI findItemForIconByRef( int ) const; - Oscar::SSI findItem( const QString &contact, int type ) const; + Oscar::SSI findItem( const TQString &contact, int type ) const; - QValueList<Oscar::SSI> groupList() const; - QValueList<Oscar::SSI> contactList() const; - QValueList<Oscar::SSI> visibleList() const; - QValueList<Oscar::SSI> invisibleList() const; - QValueList<Oscar::SSI> contactsFromGroup( const QString& group ) const; - QValueList<Oscar::SSI> contactsFromGroup( int groupId ) const; + TQValueList<Oscar::SSI> groupList() const; + TQValueList<Oscar::SSI> contactList() const; + TQValueList<Oscar::SSI> visibleList() const; + TQValueList<Oscar::SSI> invisibleList() const; + TQValueList<Oscar::SSI> contactsFromGroup( const TQString& group ) const; + TQValueList<Oscar::SSI> contactsFromGroup( int groupId ) const; Oscar::SSI visibilityItem() const; @@ -106,12 +106,12 @@ public slots: bool newGroup( const Oscar::SSI& group ); bool updateGroup( const Oscar::SSI& group ); bool removeGroup( const Oscar::SSI& group ); - bool removeGroup( const QString& group ); + bool removeGroup( const TQString& group ); bool newContact( const Oscar::SSI& contact ); bool updateContact( const Oscar::SSI& contact ); bool removeContact( const Oscar::SSI& contact ); - bool removeContact( const QString& contact ); + bool removeContact( const TQString& contact ); bool newItem( const Oscar::SSI& item ); bool updateItem( const Oscar::SSI& item ); @@ -129,7 +129,7 @@ signals: void contactUpdated( const Oscar::SSI& ); //! Emitted when we've removed a contact from the list - void contactRemoved( const QString& contactName ); + void contactRemoved( const TQString& contactName ); //! Emitted when we've added a new group to the list void groupAdded( const Oscar::SSI& ); @@ -138,12 +138,12 @@ signals: void groupUpdated( const Oscar::SSI& ); //! Emitted when we've removed a group from the ssi list - void groupRemoved( const QString& groupName ); + void groupRemoved( const TQString& groupName ); - void modifyError( const QString& error ); + void modifyError( const TQString& error ); private: - WORD findFreeId( const QValueList<WORD>& idList, WORD fromId ) const; + WORD findFreeId( const TQValueList<WORD>& idList, WORD fromId ) const; SSIManagerPrivate* d; Oscar::SSI m_dummyItem; diff --git a/kopete/protocols/oscar/liboscar/ssimodifytask.cpp b/kopete/protocols/oscar/liboscar/ssimodifytask.cpp index 2091fca8..b4194b5e 100644 --- a/kopete/protocols/oscar/liboscar/ssimodifytask.cpp +++ b/kopete/protocols/oscar/liboscar/ssimodifytask.cpp @@ -22,7 +22,7 @@ #include <kdebug.h> #include <klocale.h> -#include <qstring.h> +#include <tqstring.h> #include "connection.h" #include "oscarutils.h" #include "transfer.h" @@ -73,12 +73,12 @@ bool SSIModifyTask::take( Transfer* transfer ) return false; } -bool SSIModifyTask::addContact( const QString& contact, const QString& group, bool requiresAuth ) +bool SSIModifyTask::addContact( const TQString& contact, const TQString& group, bool requiresAuth ) { m_opType = Add; m_opSubject = Contact; - QString newContact = Oscar::normalize( contact ); + TQString newContact = Oscar::normalize( contact ); Oscar::SSI oldItem = m_ssiManager->findContact( newContact ); Oscar::SSI groupItem = m_ssiManager->findGroup( group ); @@ -90,7 +90,7 @@ bool SSIModifyTask::addContact( const QString& contact, const QString& group, bo } //create new SSI item and populate the TLV list - QValueList<TLV> tlvList; + TQValueList<TLV> tlvList; if ( requiresAuth ) { kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "This contact requires auth. adding appropriate tlv" << endl; @@ -104,7 +104,7 @@ bool SSIModifyTask::addContact( const QString& contact, const QString& group, bo return true; } -bool SSIModifyTask::removeContact( const QString& contact ) +bool SSIModifyTask::removeContact( const TQString& contact ) { m_opType = Remove; m_opSubject = Contact; @@ -113,7 +113,7 @@ bool SSIModifyTask::removeContact( const QString& contact ) return true; } -bool SSIModifyTask::changeGroup( const QString& contact, const QString& newGroup ) +bool SSIModifyTask::changeGroup( const TQString& contact, const TQString& newGroup ) { m_opType = Change; m_opSubject = Group; @@ -144,19 +144,19 @@ bool SSIModifyTask::changeGroup( const QString& contact, const QString& newGroup return true; } -bool SSIModifyTask::addGroup( const QString& groupName ) +bool SSIModifyTask::addGroup( const TQString& groupName ) { m_opType = Add; m_opSubject = Group; m_newItem = m_ssiManager->findGroup( groupName ); - QValueList<TLV> dummy; + TQValueList<TLV> dummy; Oscar::SSI newItem( groupName, m_ssiManager->nextGroupId(), 0, ROSTER_GROUP, dummy ); m_newItem = newItem; kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding group '" << m_newItem.name() << "' to SSI" << endl; return true; } -bool SSIModifyTask::removeGroup( const QString& groupName ) +bool SSIModifyTask::removeGroup( const TQString& groupName ) { m_opType = Remove; m_opSubject = Group; @@ -165,7 +165,7 @@ bool SSIModifyTask::removeGroup( const QString& groupName ) return true; } -bool SSIModifyTask::renameGroup( const QString& oldName, const QString & newName ) +bool SSIModifyTask::renameGroup( const TQString& oldName, const TQString & newName ) { m_opType = Rename; m_opSubject = Group; @@ -254,36 +254,36 @@ void SSIModifyTask::handleSSIAck() break; case 0x0002: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Item to modify not found in list" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x0003: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Item already exists in SSI" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000A: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Error adding item ( invalid id, already in list, invalid data )" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000C: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add item. Limit exceeded." << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000D: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add ICQ item to AIM list ( and vice versa )" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000E: { kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add item because contact requires authorization" << endl; Oscar::SSI groupItem = m_ssiManager->findGroup( m_newItem.gid() ); - QString groupName = groupItem.name(); + TQString groupName = groupItem.name(); addContact( m_newItem.name(), groupName, true ); go(); break; } default: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Unknown acknowledgement code" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; } }; @@ -391,7 +391,7 @@ void SSIModifyTask::changeGroupOnServer() //Change the 0x00C8 TLV in the old group item to remove the bid we're //moving to a different group - QValueList<TLV> list = oldGroupItem.tlvList(); + TQValueList<TLV> list = oldGroupItem.tlvList(); TLV oldIds = Oscar::findTLV( list, 0x00C8 ); if ( oldIds.type == 0x00C8 ) { @@ -414,7 +414,7 @@ void SSIModifyTask::changeGroupOnServer() //Change the 0x00C8 TLV in the new group item to add the bid we're //adding to this group - QValueList<TLV> list2 = m_groupItem.tlvList(); + TQValueList<TLV> list2 = m_groupItem.tlvList(); TLV oldIds2 = Oscar::findTLV( list2, 0x00C8 ); TLV newGroupTLV; if ( oldIds2.type == 0x00C8 ) @@ -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, QString::null ); + setSuccess( 0, TQString::null ); 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, QString::null ); + setSuccess( 0, TQString::null ); 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, QString::null ); + setSuccess( 0, TQString::null ); return; } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } void SSIModifyTask::freeIdOnError() @@ -550,18 +550,18 @@ void SSIModifyTask::addItemToBuffer( Oscar::SSI item, Buffer* buffer ) buffer->addWord( item.type() ); buffer->addWord( item.tlvListLength() ); - QValueList<TLV>::const_iterator it = item.tlvList().begin(); - QValueList<TLV>::const_iterator listEnd = item.tlvList().end(); + TQValueList<TLV>::const_iterator it = item.tlvList().begin(); + TQValueList<TLV>::const_iterator listEnd = item.tlvList().end(); for( ; it != listEnd; ++it ) buffer->addTLV( ( *it ) ); } Oscar::SSI SSIModifyTask::getItemFromBuffer( Buffer* buffer ) const { - QValueList<TLV> tlvList; + TQValueList<TLV> tlvList; WORD strlength = buffer->getWord(); - QString itemName = QString::fromUtf8( buffer->getBlock( strlength ), strlength ); + TQString itemName = TQString::fromUtf8( buffer->getBlock( strlength ), strlength ); WORD groupId = buffer->getWord(); WORD itemId = buffer->getWord(); WORD itemType = buffer->getWord(); diff --git a/kopete/protocols/oscar/liboscar/ssimodifytask.h b/kopete/protocols/oscar/liboscar/ssimodifytask.h index 2c32dda3..70486cbc 100644 --- a/kopete/protocols/oscar/liboscar/ssimodifytask.h +++ b/kopete/protocols/oscar/liboscar/ssimodifytask.h @@ -63,29 +63,29 @@ public: //! Set up the stuff needed to add a contact. //! @return true if we can send the packet - bool addContact( const QString& contact, const QString& group, bool requiresAuth = false ); + bool addContact( const TQString& contact, const TQString& group, bool requiresAuth = false ); //! Set up the stuff needed to remove a contact. //! @return true if we can send the packet - bool removeContact( const QString& contact ); + bool removeContact( const TQString& contact ); //! Set up the stuff needed to change groups //! @return true if we can send the packet - bool changeGroup( const QString& contact, const QString& newGroup ); + bool changeGroup( const TQString& contact, const TQString& newGroup ); /* Group properties */ //! Add a new group to the SSI list //! @return true if we can send the packet - bool addGroup( const QString& groupName ); + bool addGroup( const TQString& groupName ); //! Remove a group from the SSI list //! @return true if we can send the packet - bool removeGroup( const QString& groupName ); + bool removeGroup( const TQString& groupName ); //! Rename a group on the SSI list //! @return true if we can send the packet - bool renameGroup( const QString& oldName, const QString& newName ); + bool renameGroup( const TQString& oldName, const TQString& newName ); //! Add an item to the SSI list //! Should be used for other items we don't have explicit functions for diff --git a/kopete/protocols/oscar/liboscar/ssiparamstask.cpp b/kopete/protocols/oscar/liboscar/ssiparamstask.cpp index 0be172e8..d279061c 100644 --- a/kopete/protocols/oscar/liboscar/ssiparamstask.cpp +++ b/kopete/protocols/oscar/liboscar/ssiparamstask.cpp @@ -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, QString::null ); + setError( -1, TQString::null ); 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, QString::null ); + setSuccess( 0, TQString::null ); } // kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/stream.cpp b/kopete/protocols/oscar/liboscar/stream.cpp index 02967416..2fb302c1 100644 --- a/kopete/protocols/oscar/liboscar/stream.cpp +++ b/kopete/protocols/oscar/liboscar/stream.cpp @@ -19,8 +19,8 @@ #include "stream.h" -Stream::Stream(QObject *parent) -:QObject(parent) +Stream::Stream(TQObject *parent) +:TQObject(parent) { } diff --git a/kopete/protocols/oscar/liboscar/stream.h b/kopete/protocols/oscar/liboscar/stream.h index 9fbacbda..d5bfabad 100644 --- a/kopete/protocols/oscar/liboscar/stream.h +++ b/kopete/protocols/oscar/liboscar/stream.h @@ -18,7 +18,7 @@ ************************************************************************* */ -#include <qobject.h> +#include <tqobject.h> #ifndef OSCAR_STREAM_H #define OSCAR_STREAM_H @@ -42,12 +42,12 @@ public: SystemShutdown }; - Stream(QObject *parent=0); + Stream(TQObject *parent=0); virtual ~Stream(); virtual void close()=0; virtual int errorCondition() const=0; - virtual QString errorText() const=0; + virtual TQString errorText() const=0; /** * Are there any messages waiting to be read diff --git a/kopete/protocols/oscar/liboscar/task.cpp b/kopete/protocols/oscar/liboscar/task.cpp index 2c7628d7..2ec342ac 100644 --- a/kopete/protocols/oscar/liboscar/task.cpp +++ b/kopete/protocols/oscar/liboscar/task.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include <qtimer.h> +#include <tqtimer.h> #include "connection.h" #include "transfer.h" @@ -34,7 +34,7 @@ public: Q_UINT32 id; bool success; int statusCode; - QString statusString; + TQString statusString; Connection* client; bool insignificant, deleteme, autoDelete; bool done; @@ -42,19 +42,19 @@ public: }; Task::Task(Task *parent) -:QObject(parent) +:TQObject(parent) { init(); d->client = parent->client(); - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::Task(Connection* parent, bool) -:QObject(0) +:TQObject(0) { init(); d->client = parent; - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::~Task() @@ -77,7 +77,7 @@ void Task::init() Task *Task::parent() const { - return (Task *)QObject::parent(); + return (Task *)TQObject::parent(); } Connection *Task::client() const @@ -110,7 +110,7 @@ int Task::statusCode() const return d->statusCode; } -const QString & Task::statusString() const +const TQString & Task::statusString() const { return d->statusString; } @@ -124,15 +124,15 @@ void Task::go(bool autoDelete) bool Task::take( Transfer * transfer) { - const QObjectList *p = children(); + const TQObjectList *p = children(); if(!p) return false; // pass along the transfer to our children - QObjectListIt it(*p); + TQObjectListIt it(*p); Task *t; for(; it.current(); ++it) { - QObject *obj = it.current(); + TQObject *obj = it.current(); if(!obj->inherits("Task")) continue; @@ -173,7 +173,7 @@ void Task::onDisconnect() d->statusString = tr("Disconnected"); // delay this so that tasks that react don't block the shutdown - QTimer::singleShot(0, this, SLOT(done())); + TQTimer::singleShot(0, this, TQT_SLOT(done())); } } @@ -182,7 +182,7 @@ void Task::send( Transfer * request ) client()->send( request ); } -void Task::setSuccess(int code, const QString &str) +void Task::setSuccess(int code, const TQString &str) { if(!d->done) { d->success = true; @@ -192,7 +192,7 @@ void Task::setSuccess(int code, const QString &str) } } -void Task::setError(int code, const QString &str) +void Task::setError(int code, const TQString &str) { if(!d->done) { d->success = false; @@ -245,7 +245,7 @@ Transfer* Task::createTransfer( Buffer* buffer ) // void Task::debug(const char *fmt, ...) // { // char *buf; -// QString str; +// TQString str; // int size = 1024; // int r; // @@ -257,7 +257,7 @@ Transfer* Task::createTransfer( Buffer* buffer ) // va_end(ap); // // if(r != -1) -// str = QString(buf); +// str = TQString(buf); // // delete [] buf; // @@ -267,11 +267,11 @@ Transfer* Task::createTransfer( Buffer* buffer ) // debug(str); // } -void Task::debug(const QString &str) +void Task::debug(const TQString &str) { //black hole Q_UNUSED( str ); - //client()->debug(QString("%1: ").arg(className()) + str); + //client()->debug(TQString("%1: ").arg(className()) + str); } bool Task::forMe( const Transfer * transfer ) const diff --git a/kopete/protocols/oscar/liboscar/task.h b/kopete/protocols/oscar/liboscar/task.h index e48e02de..04513824 100644 --- a/kopete/protocols/oscar/liboscar/task.h +++ b/kopete/protocols/oscar/liboscar/task.h @@ -21,7 +21,7 @@ #ifndef OSCAR_TASK_H #define OSCAR_TASK_H -#include <qobject.h> +#include <tqobject.h> #include "oscartypes.h" @@ -52,7 +52,7 @@ public: bool success() const; int statusCode() const; - const QString & statusString() const; + const TQString & statusString() const; void go( bool autoDelete = false ); @@ -76,10 +76,10 @@ protected: virtual void onDisconnect(); void setId( Q_UINT32 id ); void send( Transfer * request ); - void setSuccess( int code=0, const QString &str="" ); - void setError( int code=0, const QString &str="" ); + void setSuccess( int code=0, const TQString &str="" ); + void setError( int code=0, const TQString &str="" ); // void debug( const char *, ... ); - void debug( const QString & ); + void debug( const TQString & ); /** * Used in take() to check if the offered transfer is for this Task diff --git a/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp b/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp index 59f392de..a7c16cea 100644 --- a/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp +++ b/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp @@ -2,7 +2,7 @@ #include "clientstream_test.h" -ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, argv ) +ClientStreamTest::ClientStreamTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -10,12 +10,12 @@ ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, myConnector->setOptHostPort( "login.oscar.aol.com", 5190 ); myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); // notify and start sending - //connect( myTestObject, SIGNAL( warning(int) ), SLOT( slotWarning(int) ) ); + //connect( myTestObject, TQT_SIGNAL( warning(int) ), TQT_SLOT( slotWarning(int) ) ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -27,7 +27,7 @@ ClientStreamTest::~ClientStreamTest() void ClientStreamTest::slotDoTest() { - QString server = QString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::fromLatin1("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 32a0e3a9..47aeac86 100644 --- a/kopete/protocols/oscar/liboscar/tests/clientstream_test.h +++ b/kopete/protocols/oscar/liboscar/tests/clientstream_test.h @@ -10,9 +10,9 @@ #ifndef clientstream_test_h #define clientstream_test_h -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "oscarclientstream.h" #include "oscarconnector.h" diff --git a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp index 4f4e8df2..0f37f614 100644 --- a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp @@ -2,11 +2,11 @@ #include <iostream> #include "ipaddrtest.h" -#include <qstring.h> +#include <tqstring.h> using namespace std; IPAddrTest::IPAddrTest(int argc, char ** argv) -: QApplication( argc, argv ) +: TQApplication( argc, argv ) { } @@ -28,13 +28,13 @@ bool IPAddrTest::testAllZeroDotted() bool IPAddrTest::testNumericalIP() { - QString address = "65.93.151.168"; + TQString address = "65.93.151.168"; return ( Oscar::getNumericalIP( address ) == 1096652712 ); } bool IPAddrTest::testAllZeroNumerical() { - QString address = "0.0.0.0"; + TQString address = "0.0.0.0"; return ( Oscar::getNumericalIP( address ) == 0 ); } diff --git a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h index 9452ad82..f2fa0fec 100644 --- a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h +++ b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h @@ -10,9 +10,9 @@ #ifndef IPADDRTEST_H #define IPADDRTEST_H -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "oscarutils.h" diff --git a/kopete/protocols/oscar/liboscar/tests/kunittest.cpp b/kopete/protocols/oscar/liboscar/tests/kunittest.cpp index 9f7ba693..2181fda3 100644 --- a/kopete/protocols/oscar/liboscar/tests/kunittest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/kunittest.cpp @@ -29,8 +29,8 @@ #include "tester.h" #include "chatnavtests.h" -#include <qapplication.h> -#include <qtimer.h> +#include <tqapplication.h> +#include <tqtimer.h> #include <iostream> using namespace std; @@ -51,7 +51,7 @@ void KUnitTest::registerTests() KUnitTest::KUnitTest() { - QTimer::singleShot( 0, this, SLOT(checkRun()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(checkRun()) ); m_tests.setAutoDelete( TRUE ); // m_qtests.setAutoDelete( TRUE ); @@ -75,7 +75,7 @@ int KUnitTest::runTests() int globalSkipped = 0; cout << "# Running normal tests... #" << endl << endl; - QAsciiDictIterator<Tester> it( m_tests ); + TQAsciiDictIterator<Tester> it( m_tests ); for( ; it.current(); ++it ) { Tester* test = it.current(); @@ -109,29 +109,29 @@ int KUnitTest::runTests() if ( 0 < numXPass ) { cout << " Unexpected pass" << ( ( 1 == numXPass )?"":"es") << ":" << endl; - QStringList list = test->xpassList(); - for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + TQStringList list = test->xpassList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { cout << "\t" << (*itr).latin1() << endl; } } if ( 0 < (numFail - numXFail) ) { cout << " Unexpected failure" << ( ( 1 == numFail )?"":"s") << ":" << endl; - QStringList list = test->errorList(); - for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + TQStringList list = test->errorList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { cout << "\t" << (*itr).latin1() << endl; } } if ( 0 < numXFail ) { cout << " Expected failure" << ( ( 1 == numXFail)?"":"s") << ":" << endl; - QStringList list = test->xfailList(); - for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + TQStringList list = test->xfailList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { cout << "\t" << (*itr).latin1() << endl; } } if ( 0 < numSkip ) { cout << " Skipped test" << ( ( 1 == numSkip )?"":"s") << ":" << endl; - QStringList list = test->skipList(); - for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + TQStringList list = test->skipList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { cout << "\t" << (*itr).latin1() << endl; } } @@ -153,11 +153,11 @@ int KUnitTest::runTests() //void KUnitTest::addTester( QTester *test ) //{ // m_qtests.insert( test, test ); -// connect( test, SIGNAL(destroyed(QObject*)), -// SLOT(qtesterDone(QObject* )) ); +// connect( test, TQT_SIGNAL(destroyed(TQObject*)), +// TQT_SLOT(qtesterDone(TQObject* )) ); //} -void KUnitTest::qtesterDone( QObject *obj ) +void KUnitTest::qtesterDone( TQObject *obj ) { // m_qtests.remove( obj ); // if ( m_qtests.isEmpty() ) diff --git a/kopete/protocols/oscar/liboscar/tests/kunittest.h b/kopete/protocols/oscar/liboscar/tests/kunittest.h index 5148a82a..d2d6a04a 100644 --- a/kopete/protocols/oscar/liboscar/tests/kunittest.h +++ b/kopete/protocols/oscar/liboscar/tests/kunittest.h @@ -29,9 +29,9 @@ #include "tester.h" -#include <qobject.h> -#include <qasciidict.h> -#include <qptrdict.h> +#include <tqobject.h> +#include <tqasciidict.h> +#include <tqptrdict.h> #define ADD_TEST(x) addTester( #x, new x ) #define ADD_QTEST(x) addTester( new x ) @@ -51,15 +51,15 @@ public: // void addTester( QTester *test ); private slots: - void qtesterDone( QObject *obj ); + void qtesterDone( TQObject *obj ); void checkRun(); private: void registerTests(); private: - QAsciiDict<Tester> m_tests; -// QPtrDict<QTester> m_qtests; + TQAsciiDict<Tester> m_tests; +// TQPtrDict<QTester> 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 6dbc9646..1d3728aa 100644 --- a/kopete/protocols/oscar/liboscar/tests/logintest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/logintest.cpp @@ -2,7 +2,7 @@ #include "logintest.h" -LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) +LoginTest::LoginTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -10,13 +10,13 @@ LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - //connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + //connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); myClient = new Client(); myConnection = new Connection( myConnector, myTestObject, "AUTHORIZER" ); myConnection->setClient( myClient ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -29,7 +29,7 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - QString server = QString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::fromLatin1("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 898a3d99..d97c336d 100644 --- a/kopete/protocols/oscar/liboscar/tests/logintest.h +++ b/kopete/protocols/oscar/liboscar/tests/logintest.h @@ -10,9 +10,9 @@ #ifndef logintest_h #define logintest_h -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "oscarclientstream.h" #include "oscarconnector.h" diff --git a/kopete/protocols/oscar/liboscar/tests/redirecttest.cpp b/kopete/protocols/oscar/liboscar/tests/redirecttest.cpp index a220e13e..3086ca64 100644 --- a/kopete/protocols/oscar/liboscar/tests/redirecttest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/redirecttest.cpp @@ -2,11 +2,11 @@ #include <iostream> #include "redirecttest.h" -#include <qcstring.h> +#include <tqcstring.h> using namespace std; RedirectTest::RedirectTest(int argc, char ** argv) -: QApplication( argc, argv ), +: TQApplication( argc, argv ), m_transfer(0), m_task(0) { @@ -73,7 +73,7 @@ bool RedirectTest::testCookieIsSet() return !m_task->cookie().isEmpty(); } -Buffer* RedirectTest::SetupBuffer(WORD Service, QString Cookie) +Buffer* RedirectTest::SetupBuffer(WORD Service, TQString Cookie) { Buffer* b = new Buffer; b->addTLV16(0x000D, Service); diff --git a/kopete/protocols/oscar/liboscar/tests/redirecttest.h b/kopete/protocols/oscar/liboscar/tests/redirecttest.h index eda5d67a..785d61c8 100644 --- a/kopete/protocols/oscar/liboscar/tests/redirecttest.h +++ b/kopete/protocols/oscar/liboscar/tests/redirecttest.h @@ -10,9 +10,9 @@ #ifndef RedirectTest_h #define RedirectTest_h -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "transfer.h" #include "oscartypes.h" @@ -39,7 +39,7 @@ public: private: //Helper functions - Buffer* SetupBuffer(WORD Service, QString Cookie); + Buffer* SetupBuffer(WORD Service, TQString Cookie); Task *m_root; SnacTransfer * m_transfer; diff --git a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp index a1a9e754..6ca733cc 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp @@ -2,7 +2,7 @@ #include "ssigrouptest.h" -LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) +LoginTest::LoginTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -10,13 +10,13 @@ LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - //connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + //connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); myClient = new Client(); myConnection = new Connection( myConnector, myTestObject, "AUTHORIZER" ); myConnection->setClient( myClient ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -29,14 +29,14 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - QString server = QString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::fromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); myClient->setIsIcq( true ); myClient->start( server, 5190, "userid", "password" ); myClient->connectToServer( myConnection, server, true ); - QTimer::singleShot( 10000, this, SLOT(runAddGroupTest() ) ); + TQTimer::singleShot( 10000, this, TQT_SLOT(runAddGroupTest() ) ); connected = true; } @@ -57,15 +57,15 @@ int main(int argc, char ** argv) void LoginTest::runAddGroupTest() { qDebug( "running ssi group add test" ); - QString group = QString::fromLatin1( "dummygroup" ); + TQString group = TQString::fromLatin1( "dummygroup" ); myClient->addGroup( group ); - QTimer::singleShot( 5000, this, SLOT( runDelGroupTest() ) ); + TQTimer::singleShot( 5000, this, TQT_SLOT( runDelGroupTest() ) ); } void LoginTest::runDelGroupTest() { qDebug( "running ssi group del test" ); - QString group = QString::fromLatin1( "dummygroup" ); + TQString group = TQString::fromLatin1( "dummygroup" ); myClient->removeGroup( group ); } diff --git a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h index 361c053b..291698ec 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h +++ b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h @@ -10,9 +10,9 @@ #ifndef logintest_h #define logintest_h -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "oscarclientstream.h" #include "oscarconnector.h" diff --git a/kopete/protocols/oscar/liboscar/tests/ssitest.cpp b/kopete/protocols/oscar/liboscar/tests/ssitest.cpp index d8e05b36..7669a945 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssitest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/ssitest.cpp @@ -2,9 +2,9 @@ #include "ssitest.h" -#include <qstring.h> +#include <tqstring.h> -SSITest::SSITest(int argc, char ** argv) : QApplication( argc, argv ) +SSITest::SSITest(int argc, char ** argv) : TQApplication( argc, argv ) { m_manager = new SSIManager(this); @@ -19,7 +19,7 @@ SSITest::~SSITest() void SSITest::testIt() { - QPtrList<TLV> tlvs; + TQPtrList<TLV> tlvs; //add three groups SSI *ssi = new SSI( "FirstGroup", 1, 1, ROSTER_GROUP, tlvs); @@ -53,28 +53,28 @@ void SSITest::testIt() //try to find a group by name ssi = m_manager->findGroup("SecondGroup"); if ( ssi ) - qDebug( QString("Found group SecondGroup with gid=%1").arg( ssi->gid() ).latin1()); + qDebug( TQString("Found group SecondGroup with gid=%1").arg( 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( QString("Found group 3 with name=%1").arg( ssi->name() ).latin1() ); + qDebug( TQString("Found group 3 with name=%1").arg( 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( QString( "Found contact ThirdContact with gid=%1" ).arg( ssi->gid() ).latin1() ); + qDebug( TQString( "Found contact ThirdContact with gid=%1" ).arg( 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( QString("Found contact FourthContact with bid=%1").arg( ssi->bid() ).latin1() ); + qDebug( TQString("Found contact FourthContact with bid=%1").arg( ssi->bid() ).latin1() ); else qDebug( "Oops, contact FourthContact not found" ); @@ -85,17 +85,17 @@ void SSITest::testIt() qDebug( "Good! It has detected the group is invalid :)" ); //contacts from a group - QValueList<SSI*> list = m_manager->contactsFromGroup("FirstGroup"); - QValueList<SSI*>::iterator it; + TQValueList<SSI*> list = m_manager->contactsFromGroup("FirstGroup"); + TQValueList<SSI*>::iterator it; qDebug( "Contacts from group FirtsGroup:" ); for ( it = list.begin(); it != list.end(); ++it) - qDebug( QString(" name=%1").arg( (*it)->name() ).latin1() ); + qDebug( TQString(" name=%1").arg( (*it)->name() ).latin1() ); //the group list - QValueList<SSI*> list2 = m_manager->groupList(); + TQValueList<SSI*> list2 = m_manager->groupList(); qDebug( "Group list:" ); for ( it = list2.begin(); it != list2.end(); ++it) - qDebug( QString(" name=%1").arg( (*it)->name() ).latin1() ); + qDebug( TQString(" name=%1").arg( (*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 19206465..fbdcf2fb 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssitest.h +++ b/kopete/protocols/oscar/liboscar/tests/ssitest.h @@ -10,9 +10,9 @@ #ifndef ssitest_h #define ssitest_h -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "ssimanager.h" diff --git a/kopete/protocols/oscar/liboscar/tests/tester.h b/kopete/protocols/oscar/liboscar/tests/tester.h index 2cb1f3af..162473dd 100644 --- a/kopete/protocols/oscar/liboscar/tests/tester.h +++ b/kopete/protocols/oscar/liboscar/tests/tester.h @@ -27,7 +27,7 @@ #ifndef TESTER_H #define TESTER_H -#include <qstringlist.h> +#include <tqstringlist.h> #define CHECK( x, y ) check( __FILE__, __LINE__, #x, x, y, false ) #define XFAIL( x, y ) check( __FILE__, __LINE__, #x, x, y, true ) @@ -50,26 +50,26 @@ public: return m_tests; } - QStringList errorList() const { + TQStringList errorList() const { return m_errorList; } - QStringList xfailList() const { + TQStringList xfailList() const { return m_xfailList; } - QStringList xpassList() const { + TQStringList xpassList() const { return m_xpassList; } - QStringList skipList() const { + TQStringList skipList() const { return m_skipList; } - void skip( const char *file, int line, QString msg ) + void skip( const char *file, int line, TQString msg ) { - QString skipEntry; - QTextStream ts( &skipEntry, IO_WriteOnly ); + TQString skipEntry; + TQTextStream ts( &skipEntry, IO_WriteOnly ); ts << file << "["<< line <<"]: " << msg; m_skipList.append( skipEntry ); @@ -83,8 +83,8 @@ protected: bool expectedFailure ) { if ( result != expectedResult ) { - QString error; - QTextStream ts( &error, IO_WriteOnly ); + TQString error; + TQTextStream ts( &error, IO_WriteOnly ); ts << file << "["<< line <<"]:" <<" failed on \""<< str <<"\"" << "\n\t\t result = '" @@ -99,8 +99,8 @@ protected: // then the test passed, but we want to record it if // we were expecting a failure if (expectedFailure) { - QString error; - QTextStream ts( &error, IO_WriteOnly ); + TQString error; + TQTextStream ts( &error, IO_WriteOnly ); ts << file << "["<< line <<"]:" <<" unexpectedly passed on \"" << str <<"\""; @@ -111,10 +111,10 @@ protected: } private: - QStringList m_errorList; - QStringList m_xfailList; - QStringList m_xpassList; - QStringList m_skipList; + TQStringList m_errorList; + TQStringList m_xfailList; + TQStringList m_xpassList; + TQStringList m_skipList; int m_tests; }; diff --git a/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp b/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp index 72ef5acb..fb346d26 100644 --- a/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp @@ -2,7 +2,7 @@ #include "userinfotest.h" -LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) +LoginTest::LoginTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -10,13 +10,13 @@ LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - //connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + //connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); myClient = new Client(); myConnection = new Connection( myConnector, myTestObject, "AUTHORIZER" ); myConnection->setClient( myClient ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -29,15 +29,15 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - QString server = QString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::fromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); myClient->setIsIcq( true ); myClient->start( server, 5190, "userid", "password" ); myClient->connectToServer( myConnection, server, true ); - //QObject::connect( myClient, SIGNAL( userIsOnline( const QString& ) ), this, SLOT( runUserInfoTest())); - //QTimer::singleShot( 6000, this, SLOT(runUserInfoTest() ) ); + //TQObject::connect( myClient, TQT_SIGNAL( userIsOnline( const TQString& ) ), this, TQT_SLOT( runUserInfoTest())); + //TQTimer::singleShot( 6000, this, TQT_SLOT(runUserInfoTest() ) ); connected = true; } @@ -58,7 +58,7 @@ int main(int argc, char ** argv) void LoginTest::runUserInfoTest() { qDebug( "running user info test" ); - QString contact = QString::fromLatin1( "userid" ); + TQString contact = TQString::fromLatin1( "userid" ); myClient->requestFullInfo( contact ); } diff --git a/kopete/protocols/oscar/liboscar/tests/userinfotest.h b/kopete/protocols/oscar/liboscar/tests/userinfotest.h index 433a6c48..76450466 100644 --- a/kopete/protocols/oscar/liboscar/tests/userinfotest.h +++ b/kopete/protocols/oscar/liboscar/tests/userinfotest.h @@ -10,9 +10,9 @@ #ifndef logintest_h #define logintest_h -#include <qglobal.h> -#include <qapplication.h> -#include <qtimer.h> +#include <tqglobal.h> +#include <tqapplication.h> +#include <tqtimer.h> #include "oscarclientstream.h" #include "oscarconnector.h" diff --git a/kopete/protocols/oscar/liboscar/transfer.cpp b/kopete/protocols/oscar/liboscar/transfer.cpp index b442a97c..ac83ac06 100644 --- a/kopete/protocols/oscar/liboscar/transfer.cpp +++ b/kopete/protocols/oscar/liboscar/transfer.cpp @@ -19,7 +19,7 @@ #include "transfer.h" #include <ctype.h> -#include <qdeepcopy.h> +#include <tqdeepcopy.h> #include <kdebug.h> Transfer::Transfer() @@ -38,10 +38,10 @@ Transfer::TransferType Transfer::type() const return Transfer::RawTransfer; } -QByteArray Transfer::toWire() +TQByteArray Transfer::toWire() { m_wireFormat.duplicate( m_buffer->buffer(), m_buffer->length() ); - QByteArray wire = QDeepCopy<QByteArray>( m_wireFormat ); + TQByteArray wire = TQDeepCopy<TQByteArray>( m_wireFormat ); return wire; } @@ -71,17 +71,17 @@ bool Transfer::dataValid() const return m_isBufferValid; } -QString Transfer::toString() const +TQString Transfer::toString() const { // line format: //00 03 00 0b 00 00 90 b8 f5 9f 09 31 31 33 37 38 |;tJ�..........| int i = 0; - QString output = "\n"; - QString hex, ascii; + TQString output = "\n"; + TQString hex, ascii; - QByteArray::ConstIterator it; - QByteArray::ConstIterator end = m_wireFormat.end(); + TQByteArray::ConstIterator it; + TQByteArray::ConstIterator end = m_wireFormat.end(); for ( it = m_wireFormat.begin(); it != end; ++it ) { i++; @@ -90,7 +90,7 @@ QString Transfer::toString() const if(c < 0x10) hex.append("0"); - hex.append(QString("%1 ").arg(c, 0, 16)); + hex.append(TQString("%1 ").arg(c, 0, 16)); ascii.append(isprint(c) ? c : '.'); @@ -98,8 +98,8 @@ QString Transfer::toString() const { output += hex + " |" + ascii + "|\n"; i=0; - hex=QString::null; - ascii=QString::null; + hex=TQString::null; + ascii=TQString::null; } } @@ -110,7 +110,7 @@ QString Transfer::toString() const return output; } -void Transfer::populateWireBuffer( int offset, const QByteArray& buffer ) +void Transfer::populateWireBuffer( int offset, const TQByteArray& buffer ) { int j; for ( uint i = 0; i < buffer.size(); ++i ) @@ -159,13 +159,13 @@ FlapTransfer::~FlapTransfer() } -QByteArray FlapTransfer::toWire() +TQByteArray FlapTransfer::toWire() { //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Buffer length is " << m_buffer.length() << endl; //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Buffer is " << m_buffer.toString() << endl; m_wireFormat.truncate( 0 ); - QByteArray useBuf; + TQByteArray useBuf; useBuf.duplicate( m_buffer->buffer(), m_buffer->length() ); m_flapLength = useBuf.size(); m_wireFormat.resize( 6 + m_flapLength ); @@ -178,7 +178,7 @@ QByteArray FlapTransfer::toWire() //deepcopy the high-level buffer to the wire format buffer populateWireBuffer( 6, useBuf ); - QByteArray wire = QDeepCopy<QByteArray>( m_wireFormat ); + TQByteArray wire = TQDeepCopy<TQByteArray>( m_wireFormat ); return wire; } @@ -273,11 +273,11 @@ SnacTransfer::~SnacTransfer() } -QByteArray SnacTransfer::toWire() +TQByteArray SnacTransfer::toWire() { m_wireFormat.truncate( 0 ); - QByteArray useBuf; + TQByteArray useBuf; useBuf.duplicate( m_buffer->buffer(), m_buffer->length() ); setFlapLength( useBuf.size() + 10 ); m_wireFormat.resize( 16 + useBuf.size() ); @@ -304,7 +304,7 @@ QByteArray SnacTransfer::toWire() //deepcopy the high-level buffer to the wire format buffer populateWireBuffer( 16, useBuf ); - QByteArray wire = QDeepCopy<QByteArray>( m_wireFormat ); + TQByteArray wire = TQDeepCopy<TQByteArray>( m_wireFormat ); return wire; } diff --git a/kopete/protocols/oscar/liboscar/transfer.h b/kopete/protocols/oscar/liboscar/transfer.h index f42b1e83..0ec4fc41 100644 --- a/kopete/protocols/oscar/liboscar/transfer.h +++ b/kopete/protocols/oscar/liboscar/transfer.h @@ -34,7 +34,7 @@ public: virtual TransferType type() const; - virtual QByteArray toWire(); + virtual TQByteArray toWire(); //! Set the data buffer void setBuffer( Buffer* buffer ); @@ -47,13 +47,13 @@ public: //! Get the validity of the data after the flap header bool dataValid() const; - QString toString() const; + TQString toString() const; - void populateWireBuffer( int offset, const QByteArray& buffer ); + void populateWireBuffer( int offset, const TQByteArray& buffer ); protected: //! The wire-format representation of our buffer - QByteArray m_wireFormat; + TQByteArray m_wireFormat; //! The high-level representation of our data Buffer* m_buffer; @@ -75,7 +75,7 @@ public: virtual ~FlapTransfer(); virtual TransferType type() const; - virtual QByteArray toWire(); + virtual TQByteArray toWire(); //! Set the FLAP channel @@ -123,7 +123,7 @@ public: virtual ~SnacTransfer(); TransferType type() const; - virtual QByteArray toWire(); + virtual TQByteArray toWire(); //! Set the SNAC service diff --git a/kopete/protocols/oscar/liboscar/typingnotifytask.cpp b/kopete/protocols/oscar/liboscar/typingnotifytask.cpp index 76503116..f3c34f96 100644 --- a/kopete/protocols/oscar/liboscar/typingnotifytask.cpp +++ b/kopete/protocols/oscar/liboscar/typingnotifytask.cpp @@ -16,7 +16,7 @@ #include "typingnotifytask.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> #include "transfer.h" #include "buffer.h" @@ -79,7 +79,7 @@ void TypingNotifyTask::onGo() Transfer* t = createTransfer( f, s, b ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } void TypingNotifyTask::handleNotification() @@ -90,7 +90,7 @@ void TypingNotifyTask::handleNotification() //I don't care about the QWORD or the channel b->skipBytes( 10 ); - QString contact( b->getBUIN() ); + TQString contact( b->getBUIN() ); Q_UINT32 word = b->getWord(); switch ( word ) @@ -112,7 +112,7 @@ void TypingNotifyTask::handleNotification() } } -void TypingNotifyTask::setParams( const QString& contact, int notifyType ) +void TypingNotifyTask::setParams( const TQString& contact, int notifyType ) { m_contact = contact; m_notificationType = notifyType; diff --git a/kopete/protocols/oscar/liboscar/typingnotifytask.h b/kopete/protocols/oscar/liboscar/typingnotifytask.h index b2c9bfef..34c5d86a 100644 --- a/kopete/protocols/oscar/liboscar/typingnotifytask.h +++ b/kopete/protocols/oscar/liboscar/typingnotifytask.h @@ -18,7 +18,7 @@ #define _TYPINGNOTIFYTASK_H_ #include "task.h" -#include <qstring.h> +#include <tqstring.h> #include "oscartypeclasses.h" /** @@ -38,14 +38,14 @@ public: virtual bool take( Transfer* transfer ); virtual void onGo(); - void setParams( const QString & contact, int notifyType ); + void setParams( const TQString & contact, int notifyType ); signals: //! somebody started typing on the other end - void typingStarted( const QString& contact ); + void typingStarted( const TQString& contact ); //! somebody finished typing - void typingFinished( const QString& contact ); + void typingFinished( const TQString& contact ); private: @@ -54,7 +54,7 @@ private: private: WORD m_notificationType; - QString m_contact; + TQString m_contact; }; #endif diff --git a/kopete/protocols/oscar/liboscar/userdetails.cpp b/kopete/protocols/oscar/liboscar/userdetails.cpp index db7d4d1d..8a1b6c4e 100644 --- a/kopete/protocols/oscar/liboscar/userdetails.cpp +++ b/kopete/protocols/oscar/liboscar/userdetails.cpp @@ -23,7 +23,7 @@ #include <netinet/in.h> #include <kdebug.h> #include <klocale.h> -#include <qptrlist.h> +#include <tqptrlist.h> #include "oscarutils.h" #include "oscardebug.h" @@ -67,7 +67,7 @@ int UserDetails::warningLevel() const return m_warningLevel; } -QString UserDetails::userId() const +TQString UserDetails::userId() const { return m_userId; } @@ -92,12 +92,12 @@ DWORD UserDetails::dcPort() const return m_dcPort; } -QDateTime UserDetails::onlineSinceTime() const +TQDateTime UserDetails::onlineSinceTime() const { return m_onlineSince; } -QDateTime UserDetails::memberSinceTime() const +TQDateTime UserDetails::memberSinceTime() const { return m_memberSince; } @@ -117,12 +117,12 @@ BYTE UserDetails::iconCheckSumType() const return m_iconChecksumType; } -QByteArray UserDetails::buddyIconHash() const +TQByteArray UserDetails::buddyIconHash() const { return m_md5IconHash; } -QString UserDetails::clientName() const +TQString UserDetails::clientName() const { if ( !m_clientVersion.isEmpty() ) return i18n("Translators: client-name client-version", @@ -134,7 +134,7 @@ QString UserDetails::clientName() const void UserDetails::fill( Buffer * buffer ) { BYTE snLen = buffer->getByte(); - QString user = QString( buffer->getBlock( snLen ) ); + TQString user = TQString( buffer->getBlock( snLen ) ); if ( !user.isEmpty() ) m_userId = user; m_warningLevel = buffer->getWord(); @@ -186,7 +186,7 @@ void UserDetails::fill( Buffer * buffer ) m_extendedStatus = b.getDWord(); m_extendedStatusSpecified = true; #ifdef OSCAR_USERINFO_DEBUG - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Extended status is " << QString::number( m_extendedStatus, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Extended status is " << TQString::number( m_extendedStatus, 16 ) << endl; #endif break; case 0x000A: //external IP address @@ -270,7 +270,7 @@ void UserDetails::fill( Buffer * buffer ) case 0x0002: if ( length > 0 ) { - m_availableMessage = QString( b.getBSTR() ); + m_availableMessage = TQString( b.getBSTR() ); #ifdef OSCAR_USERINFO_DEBUG kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "available message:" << m_availableMessage << endl; #endif @@ -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=QString::fromLatin1("Miranda alpha"); + m_clientName=TQString::fromLatin1("Miranda alpha"); else - m_clientName=QString::fromLatin1("Miranda"); + m_clientName=TQString::fromLatin1("Miranda"); DWORD version = (m_dcLastExtInfoUpdateTime & 0xFFFFFF); BYTE major1 = ((version >> 24) & 0xFF); @@ -391,25 +391,25 @@ void UserDetails::detectClient() } break; case 0xFFFFFF8FL: - m_clientName = QString::fromLatin1("StrICQ"); + m_clientName = TQString::fromLatin1("StrICQ"); break; case 0xFFFFFF42L: - m_clientName = QString::fromLatin1("mICQ"); + m_clientName = TQString::fromLatin1("mICQ"); break; case 0xFFFFFFBEL: - m_clientName = QString::fromLatin1("alicq"); + m_clientName = TQString::fromLatin1("alicq"); break; case 0xFFFFFF7FL: - m_clientName = QString::fromLatin1("&RQ"); + m_clientName = TQString::fromLatin1("&RQ"); break; case 0xFFFFFFABL: - m_clientName = QString::fromLatin1("YSM"); + m_clientName = TQString::fromLatin1("YSM"); break; case 0x3AA773EEL: if ((m_dcLastExtStatusUpdateTime == 0x3AA66380L) && (m_dcLastExtInfoUpdateTime == 0x3A877A42L)) { - m_clientName=QString::fromLatin1("libicq2000"); + m_clientName=TQString::fromLatin1("libicq2000"); } break; default: @@ -427,48 +427,48 @@ void UserDetails::detectClient() switch (m_dcProtoVersion) { case 10: - m_clientName=QString::fromLatin1("ICQ 2003b"); + m_clientName=TQString::fromLatin1("ICQ 2003b"); break; case 9: - m_clientName=QString::fromLatin1("ICQ Lite"); + m_clientName=TQString::fromLatin1("ICQ Lite"); break; case 8: - m_clientName=QString::fromLatin1("Miranda"); + m_clientName=TQString::fromLatin1("Miranda"); break; default: - m_clientName=QString::fromLatin1("ICQ2go"); + m_clientName=TQString::fromLatin1("ICQ2go"); } } else if (hasCap(CAP_BUDDYICON)) // only gaim seems to advertize this on ICQ { - m_clientName = QString::fromLatin1("Gaim"); + m_clientName = TQString::fromLatin1("Gaim"); } else if (hasCap(CAP_XTRAZ)) { - m_clientName = QString::fromLatin1("ICQ 4.0 Lite"); + m_clientName = TQString::fromLatin1("ICQ 4.0 Lite"); } else if ((hasCap(CAP_STR_2001) || hasCap(CAP_ICQSERVERRELAY)) && hasCap(CAP_IS_2001)) { - m_clientName = QString::fromLatin1( "ICQ 2001"); + m_clientName = TQString::fromLatin1( "ICQ 2001"); } else if ((hasCap(CAP_STR_2001) || hasCap(CAP_ICQSERVERRELAY)) && hasCap(CAP_STR_2002)) { - m_clientName = QString::fromLatin1("ICQ 2002"); + m_clientName = TQString::fromLatin1("ICQ 2002"); } else if (hasCap(CAP_RTFMSGS) && hasCap(CAP_UTF8) && hasCap(CAP_ICQSERVERRELAY) && hasCap(CAP_ISICQ)) { - m_clientName = QString::fromLatin1("ICQ 2003a"); + m_clientName = TQString::fromLatin1("ICQ 2003a"); } else if (hasCap(CAP_ICQSERVERRELAY) && hasCap(CAP_ISICQ)) { - m_clientName =QString::fromLatin1("ICQ 2001b"); + m_clientName =TQString::fromLatin1("ICQ 2001b"); } else if ((m_dcProtoVersion == 7) && hasCap(CAP_RTFMSGS)) { - m_clientName = QString::fromLatin1("GnomeICU"); + m_clientName = TQString::fromLatin1("GnomeICU"); } } diff --git a/kopete/protocols/oscar/liboscar/userdetails.h b/kopete/protocols/oscar/liboscar/userdetails.h index fad79172..8835f6f9 100644 --- a/kopete/protocols/oscar/liboscar/userdetails.h +++ b/kopete/protocols/oscar/liboscar/userdetails.h @@ -35,19 +35,19 @@ public: UserDetails(); ~UserDetails(); - QString userId() const; //! User ID accessor + TQString userId() const; //! User ID accessor int warningLevel() const; //! Warning level accessor WORD idleTime() const; //! Idle time accessor KNetwork::KIpAddress dcInternalIp() const; //! DC local IP accessor KNetwork::KIpAddress dcExternalIp() const; //! DC outside IP accessor DWORD dcPort() const; //! DC port number - QDateTime onlineSinceTime() const; //! Online since accessor - QDateTime memberSinceTime() const; //! Member since accessor + TQDateTime onlineSinceTime() const; //! Online since accessor + TQDateTime memberSinceTime() const; //! Member since accessor int userClass() const; //! User class accessor DWORD extendedStatus() const; //!User status accessor BYTE iconCheckSumType() const; //!Buddy icon hash type - QByteArray buddyIconHash() const; //! Buddy icon md5 hash accessor - QString clientName() const; //! Client name and version + TQByteArray buddyIconHash() const; //! Buddy icon md5 hash accessor + TQString clientName() const; //! Client name and version bool hasCap( int capNumber ) const; //! Tell if we have this capability /** @@ -78,17 +78,17 @@ private: private: - QString m_userId; /// the screename/uin of the contact + TQString m_userId; /// the screename/uin of the contact int m_warningLevel; /// the warning level of the contact int m_userClass; /// the class of the user - TLV 0x01 - QDateTime m_memberSince; /// how long the user's been a member - TLV 0x05 - QDateTime m_onlineSince; /// how long the contact's been online - TLV 0x03 + TQDateTime m_memberSince; /// how long the user's been a member - TLV 0x05 + 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_capabilities; //TLV 0x05 - QString m_clientVersion; /// the version of client they're using - QString m_clientName; /// the name of the client they're using + TQString m_clientVersion; /// the version of client they're using + TQString m_clientName; /// the name of the client they're using KNetwork::KIpAddress m_dcOutsideIp; /// DC Real IP Address - TLV 0x0A KNetwork::KIpAddress m_dcInsideIp; /// DC Internal IP Address - TLV 0x0C DWORD m_dcPort; /// DC Port - TLV 0x0C @@ -101,8 +101,8 @@ private: DWORD m_dcLastExtInfoUpdateTime; /// DC last exteneded info update time - TLV 0x0C DWORD m_dcLastExtStatusUpdateTime; /// DC last extended status update time - TLV 0x0C BYTE m_iconChecksumType; /// The OSCAR checksum type for the buddy icon TLV 0x1D - QByteArray m_md5IconHash; /// Buddy Icon MD5 Hash - TLV 0x1D - QString m_availableMessage; /// Message a person can have when available - TLV 0x0D + TQByteArray m_md5IconHash; /// Buddy Icon MD5 Hash - TLV 0x1D + TQString m_availableMessage; /// Message a person can have when available - TLV 0x0D bool m_userClassSpecified; bool m_memberSinceSpecified; diff --git a/kopete/protocols/oscar/liboscar/userinfotask.cpp b/kopete/protocols/oscar/liboscar/userinfotask.cpp index a204c475..66197316 100644 --- a/kopete/protocols/oscar/liboscar/userinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/userinfotask.cpp @@ -75,28 +75,28 @@ bool UserInfoTask::take( Transfer * transfer ) m_sequenceInfoMap[seq] = ud; emit gotInfo( seq ); - QValueList<TLV> list = b->getTLVList(); - QValueList<TLV>::iterator it = list.begin(); - QString profile; - QString away; + TQValueList<TLV> list = b->getTLVList(); + TQValueList<TLV>::iterator it = list.begin(); + TQString profile; + TQString away; for ( ; ( *it ); ++it ) { switch( ( *it ).type ) { case 0x0001: //profile text encoding - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "text encoding is " << QString( ( *it ).data )<< endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "text encoding is " << TQString( ( *it ).data )<< endl; break; case 0x0002: //profile text - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "The profile is '" << QString( ( *it ).data ) << "'" << endl; - profile = QString( ( *it ).data ); // aim always seems to use us-ascii encoding + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "The profile is '" << TQString( ( *it ).data ) << "'" << endl; + profile = TQString( ( *it ).data ); // aim always seems to use us-ascii encoding emit receivedProfile( m_contactSequenceMap[seq], profile ); break; case 0x0003: //away message encoding - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Away message encoding is " << QString( ( *it ).data ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Away message encoding is " << TQString( ( *it ).data ) << endl; break; case 0x0004: //away message - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Away message is '" << QString( ( *it ).data ) << "'" << endl; - away = QString( (*it ).data ); // aim always seems to use us-ascii encoding + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Away message is '" << TQString( ( *it ).data ) << "'" << endl; + away = TQString( (*it ).data ); // aim always seems to use us-ascii encoding emit receivedAwayMessage( m_contactSequenceMap[seq], away ); break; case 0x0005: //capabilities @@ -133,7 +133,7 @@ void UserInfoTask::onGo() send( t ); } -void UserInfoTask::requestInfoFor( const QString& contact, unsigned int types ) +void UserInfoTask::requestInfoFor( const TQString& contact, unsigned int types ) { Q_UINT16 seq = client()->snacSequence(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting sequence " << seq << " for contact " << contact << endl; diff --git a/kopete/protocols/oscar/liboscar/userinfotask.h b/kopete/protocols/oscar/liboscar/userinfotask.h index 063eedd7..4b973a04 100644 --- a/kopete/protocols/oscar/liboscar/userinfotask.h +++ b/kopete/protocols/oscar/liboscar/userinfotask.h @@ -20,7 +20,7 @@ #include "task.h" -#include <qstring.h> +#include <tqstring.h> #include "userdetails.h" class Transfer; @@ -44,20 +44,20 @@ public: bool take( Transfer* transfer ); void onGo(); - void requestInfoFor( const QString& userId, unsigned int types ); + void requestInfoFor( const TQString& userId, unsigned int types ); UserDetails getInfoFor( Q_UINT16 sequence ) const; - QString contactForSequence( Q_UINT16 sequence ) const; + TQString contactForSequence( Q_UINT16 sequence ) const; signals: void gotInfo( Q_UINT16 seqNumber ); - void receivedProfile( const QString& contact, const QString& profile ); - void receivedAwayMessage( const QString& contact, const QString& message ); + void receivedProfile( const TQString& contact, const TQString& profile ); + void receivedAwayMessage( const TQString& contact, const TQString& message ); private: - QMap<Q_UINT16, UserDetails> m_sequenceInfoMap; - QMap<Q_UINT16, QString> m_contactSequenceMap; - QMap<Q_UINT16, unsigned int> m_typesSequenceMap; + TQMap<Q_UINT16, UserDetails> m_sequenceInfoMap; + TQMap<Q_UINT16, TQString> m_contactSequenceMap; + TQMap<Q_UINT16, unsigned int> m_typesSequenceMap; Q_UINT16 m_seq; }; diff --git a/kopete/protocols/oscar/liboscar/usersearchtask.cpp b/kopete/protocols/oscar/liboscar/usersearchtask.cpp index 3fd31010..545706a5 100644 --- a/kopete/protocols/oscar/liboscar/usersearchtask.cpp +++ b/kopete/protocols/oscar/liboscar/usersearchtask.cpp @@ -98,14 +98,14 @@ bool UserSearchTask::take( Transfer* t ) { int moreUsersCount = buffer->getLEDWord(); emit searchFinished( moreUsersCount ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } setTransfer( 0 ); } return true; } -void UserSearchTask::searchUserByUIN( const QString& uin ) +void UserSearchTask::searchUserByUIN( const TQString& uin ) { //create a new result list m_type = UINSearch; diff --git a/kopete/protocols/oscar/liboscar/usersearchtask.h b/kopete/protocols/oscar/liboscar/usersearchtask.h index 239efe36..781a311a 100644 --- a/kopete/protocols/oscar/liboscar/usersearchtask.h +++ b/kopete/protocols/oscar/liboscar/usersearchtask.h @@ -20,7 +20,7 @@ #define USERSEARCHTASK_H #include "icqtask.h" -#include <qstring.h> +#include <tqstring.h> #include "icquserinfo.h" /** @@ -43,7 +43,7 @@ public: virtual bool take( Transfer* t ); /** Search by UIN */ - void searchUserByUIN( const QString& uin ); + void searchUserByUIN( const TQString& uin ); void searchWhitePages( const ICQWPSearchInfo& info ); @@ -52,8 +52,8 @@ signals: void searchFinished( int ); private: - QValueList<ICQSearchResult> m_results; - QString m_uin; + TQValueList<ICQSearchResult> m_results; + TQString m_uin; Q_UINT16 m_seq; SearchType m_type; }; diff --git a/kopete/protocols/oscar/liboscar/warningtask.cpp b/kopete/protocols/oscar/liboscar/warningtask.cpp index 56051dc8..7b895b5c 100644 --- a/kopete/protocols/oscar/liboscar/warningtask.cpp +++ b/kopete/protocols/oscar/liboscar/warningtask.cpp @@ -18,7 +18,7 @@ #include "warningtask.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> #include "transfer.h" #include "connection.h" @@ -32,7 +32,7 @@ WarningTask::~WarningTask() { } -void WarningTask::setContact( const QString& contact ) +void WarningTask::setContact( const TQString& contact ) { m_contact = contact; } @@ -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, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; } else { - setError( 0, QString::null ); + setError( 0, TQString::null ); return false; } } diff --git a/kopete/protocols/oscar/liboscar/warningtask.h b/kopete/protocols/oscar/liboscar/warningtask.h index 1280fab9..af56968c 100644 --- a/kopete/protocols/oscar/liboscar/warningtask.h +++ b/kopete/protocols/oscar/liboscar/warningtask.h @@ -20,7 +20,7 @@ #define WARNINGTASK_H #include "task.h" -#include <qmap.h> +#include <tqmap.h> #include "oscartypes.h" /** @@ -33,7 +33,7 @@ public: WarningTask( Task* parent ); ~WarningTask(); - void setContact( const QString& contact ); + void setContact( const TQString& contact ); void setAnonymous( bool anon ); WORD levelIncrease(); @@ -44,10 +44,10 @@ public: virtual void onGo(); signals: - void userWarned( const QString&, Q_UINT16, Q_UINT16 ); + void userWarned( const TQString&, Q_UINT16, Q_UINT16 ); private: - QString m_contact; + TQString m_contact; bool m_sendAnon; WORD m_sequence; WORD m_increase; diff --git a/kopete/protocols/oscar/oscaraccount.cpp b/kopete/protocols/oscar/oscaraccount.cpp index 353e3201..2a9b4e82 100644 --- a/kopete/protocols/oscar/oscaraccount.cpp +++ b/kopete/protocols/oscar/oscaraccount.cpp @@ -32,14 +32,14 @@ #include <assert.h> -#include <qapplication.h> -#include <qregexp.h> -#include <qstylesheet.h> -#include <qtimer.h> -#include <qptrlist.h> -#include <qtextcodec.h> -#include <qimage.h> -#include <qfile.h> +#include <tqapplication.h> +#include <tqregexp.h> +#include <tqstylesheet.h> +#include <tqtimer.h> +#include <tqptrlist.h> +#include <tqtextcodec.h> +#include <tqimage.h> +#include <tqfile.h> #include <kdebug.h> #include <kconfig.h> @@ -72,29 +72,29 @@ public: Q_UINT32 ssiLastModTime; //contacts waiting on SSI add ack and their metacontact - QMap<QString, Kopete::MetaContact*> addContactMap; + TQMap<TQString, Kopete::MetaContact*> addContactMap; //contacts waiting on their group to be added - QMap<QString, QString> contactAddQueue; - QMap<QString, QString> contactChangeQueue; + TQMap<TQString, TQString> contactAddQueue; + TQMap<TQString, TQString> contactChangeQueue; OscarListNonServerContacts* olnscDialog; unsigned int versionUpdaterStamp; bool versionAlreadyUpdated; - virtual QTextCodec* codecForContact( const QString& contactName ) const + virtual TQTextCodec* codecForContact( const TQString& contactName ) const { return account.contactCodec( Oscar::normalize( contactName ) ); } - virtual QTextCodec* codecForAccount() const + virtual TQTextCodec* codecForAccount() const { return account.defaultCodec(); } }; -OscarAccount::OscarAccount(Kopete::Protocol *parent, const QString &accountID, const char *name, bool isICQ) +OscarAccount::OscarAccount(Kopete::Protocol *parent, const TQString &accountID, const char *name, bool isICQ) : Kopete::PasswordedAccount( parent, accountID, isICQ ? 8 : 16, name ) { kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << " accountID='" << accountID << @@ -113,19 +113,19 @@ OscarAccount::OscarAccount(Kopete::Protocol *parent, const QString &accountID, c d->engine->setCodecProvider( d ); d->olnscDialog = 0L; - QObject::connect( d->engine, SIGNAL( loggedIn() ), this, SLOT( loginActions() ) ); - QObject::connect( d->engine, SIGNAL( messageReceived( const Oscar::Message& ) ), - this, SLOT( messageReceived(const Oscar::Message& ) ) ); - QObject::connect( d->engine, SIGNAL( socketError( int, const QString& ) ), - this, SLOT( slotSocketError( int, const QString& ) ) ); - QObject::connect( d->engine, SIGNAL( taskError( const Oscar::SNAC&, int, bool ) ), - this, SLOT( slotTaskError( const Oscar::SNAC&, int, bool ) ) ); - QObject::connect( d->engine, SIGNAL( userStartedTyping( const QString& ) ), - this, SLOT( userStartedTyping( const QString& ) ) ); - QObject::connect( d->engine, SIGNAL( userStoppedTyping( const QString& ) ), - this, SLOT( userStoppedTyping( const QString& ) ) ); - QObject::connect( d->engine, SIGNAL( iconNeedsUploading() ), - this, SLOT( slotSendBuddyIcon() ) ); + TQObject::connect( d->engine, TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( loginActions() ) ); + TQObject::connect( d->engine, TQT_SIGNAL( messageReceived( const Oscar::Message& ) ), + this, TQT_SLOT( messageReceived(const Oscar::Message& ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( socketError( int, const TQString& ) ), + this, TQT_SLOT( slotSocketError( int, const TQString& ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( taskError( const Oscar::SNAC&, int, bool ) ), + this, TQT_SLOT( slotTaskError( const Oscar::SNAC&, int, bool ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( userStartedTyping( const TQString& ) ), + this, TQT_SLOT( userStartedTyping( const TQString& ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( userStoppedTyping( const TQString& ) ), + this, TQT_SLOT( userStoppedTyping( const TQString& ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( iconNeedsUploading() ), + this, TQT_SLOT( slotSendBuddyIcon() ) ); } OscarAccount::~OscarAccount() @@ -144,18 +144,18 @@ void OscarAccount::logOff( Kopete::Account::DisconnectReason reason ) kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "accountId='" << accountId() << "'" << endl; //disconnect the signals Kopete::ContactList* kcl = Kopete::ContactList::self(); - QObject::disconnect( kcl, SIGNAL( groupRenamed( Kopete::Group*, const QString& ) ), - this, SLOT( kopeteGroupRenamed( Kopete::Group*, const QString& ) ) ); - QObject::disconnect( kcl, SIGNAL( groupRemoved( Kopete::Group* ) ), - this, SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); - QObject::disconnect( d->engine->ssiManager(), SIGNAL( contactAdded( const Oscar::SSI& ) ), - this, SLOT( ssiContactAdded( const Oscar::SSI& ) ) ); - QObject::disconnect( d->engine->ssiManager(), SIGNAL( groupAdded( const Oscar::SSI& ) ), - this, SLOT( ssiGroupAdded( const Oscar::SSI& ) ) ); - QObject::disconnect( d->engine->ssiManager(), SIGNAL( groupUpdated( const Oscar::SSI& ) ), - this, SLOT( ssiGroupUpdated( const Oscar::SSI& ) ) ); - QObject::disconnect( d->engine->ssiManager(), SIGNAL( contactUpdated( const Oscar::SSI& ) ), - this, SLOT( ssiContactUpdated( const Oscar::SSI& ) ) ); + TQObject::disconnect( kcl, TQT_SIGNAL( groupRenamed( Kopete::Group*, const TQString& ) ), + this, TQT_SLOT( kopeteGroupRenamed( Kopete::Group*, const TQString& ) ) ); + TQObject::disconnect( kcl, TQT_SIGNAL( groupRemoved( Kopete::Group* ) ), + this, TQT_SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); + TQObject::disconnect( d->engine->ssiManager(), TQT_SIGNAL( contactAdded( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiContactAdded( const Oscar::SSI& ) ) ); + TQObject::disconnect( d->engine->ssiManager(), TQT_SIGNAL( groupAdded( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiGroupAdded( const Oscar::SSI& ) ) ); + TQObject::disconnect( d->engine->ssiManager(), TQT_SIGNAL( groupUpdated( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiGroupUpdated( const Oscar::SSI& ) ) ); + TQObject::disconnect( d->engine->ssiManager(), TQT_SIGNAL( contactUpdated( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiContactUpdated( const Oscar::SSI& ) ) ); d->engine->close(); myself()->setOnlineStatus( Kopete::OnlineStatus::Offline ); @@ -198,19 +198,19 @@ void OscarAccount::processSSIList() { //disconnect signals so we don't attempt to add things to SSI! Kopete::ContactList* kcl = Kopete::ContactList::self(); - QObject::disconnect( kcl, SIGNAL( groupRenamed( Kopete::Group*, const QString& ) ), - this, SLOT( kopeteGroupRenamed( Kopete::Group*, const QString& ) ) ); - QObject::disconnect( kcl, SIGNAL( groupRemoved( Kopete::Group* ) ), - this, SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); + TQObject::disconnect( kcl, TQT_SIGNAL( groupRenamed( Kopete::Group*, const TQString& ) ), + this, TQT_SLOT( kopeteGroupRenamed( Kopete::Group*, const TQString& ) ) ); + TQObject::disconnect( kcl, TQT_SIGNAL( groupRemoved( Kopete::Group* ) ), + this, TQT_SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; SSIManager* listManager = d->engine->ssiManager(); //first add groups - QValueList<SSI> groupList = listManager->groupList(); - QValueList<SSI>::const_iterator git = groupList.constBegin(); - QValueList<SSI>::const_iterator listEnd = groupList.constEnd(); + TQValueList<SSI> groupList = listManager->groupList(); + TQValueList<SSI>::const_iterator git = groupList.constBegin(); + TQValueList<SSI>::const_iterator listEnd = groupList.constEnd(); //the protocol dictates that there is at least one group that has contacts //so i don't have to check for an empty group list @@ -223,9 +223,9 @@ void OscarAccount::processSSIList() } //then add contacts - QValueList<SSI> contactList = listManager->contactList(); - QValueList<SSI>::const_iterator bit = contactList.constBegin(); - QValueList<SSI>::const_iterator blistEnd = contactList.constEnd(); + TQValueList<SSI> contactList = listManager->contactList(); + TQValueList<SSI>::const_iterator bit = contactList.constBegin(); + TQValueList<SSI>::const_iterator blistEnd = contactList.constEnd(); kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Adding " << contactList.count() << " contacts to contact list" << endl; for ( ; bit != blistEnd; ++bit ) { @@ -245,26 +245,26 @@ void OscarAccount::processSSIList() oc->setSSIItem( item ); } else - addContact( ( *bit ).name(), QString::null, group, Kopete::Account::DontChangeKABC ); + addContact( ( *bit ).name(), TQString::null, group, Kopete::Account::DontChangeKABC ); } - QObject::connect( kcl, SIGNAL( groupRenamed( Kopete::Group*, const QString& ) ), - this, SLOT( kopeteGroupRenamed( Kopete::Group*, const QString& ) ) ); - QObject::connect( kcl, SIGNAL( groupRemoved( Kopete::Group* ) ), - this, SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); - QObject::connect( listManager, SIGNAL( contactAdded( const Oscar::SSI& ) ), - this, SLOT( ssiContactAdded( const Oscar::SSI& ) ) ); - QObject::connect( listManager, SIGNAL( groupAdded( const Oscar::SSI& ) ), - this, SLOT( ssiGroupAdded( const Oscar::SSI& ) ) ); - QObject::connect( listManager, SIGNAL( groupUpdated( const Oscar::SSI& ) ), - this, SLOT( ssiGroupUpdated( const Oscar::SSI& ) ) ); - QObject::connect( listManager, SIGNAL( contactUpdated( const Oscar::SSI& ) ), - this, SLOT( ssiContactUpdated( const Oscar::SSI& ) ) ); + TQObject::connect( kcl, TQT_SIGNAL( groupRenamed( Kopete::Group*, const TQString& ) ), + this, TQT_SLOT( kopeteGroupRenamed( Kopete::Group*, const TQString& ) ) ); + TQObject::connect( kcl, TQT_SIGNAL( groupRemoved( Kopete::Group* ) ), + this, TQT_SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); + TQObject::connect( listManager, TQT_SIGNAL( contactAdded( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiContactAdded( const Oscar::SSI& ) ) ); + TQObject::connect( listManager, TQT_SIGNAL( groupAdded( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiGroupAdded( const Oscar::SSI& ) ) ); + TQObject::connect( listManager, TQT_SIGNAL( groupUpdated( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiGroupUpdated( const Oscar::SSI& ) ) ); + TQObject::connect( listManager, TQT_SIGNAL( contactUpdated( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiContactUpdated( const Oscar::SSI& ) ) ); //TODO: check the kopete contact list and handle non server side contacts appropriately. - QDict<Kopete::Contact> nonServerContacts = contacts(); - QDictIterator<Kopete::Contact> it( nonServerContacts ); - QStringList nonServerContactList; + TQDict<Kopete::Contact> nonServerContacts = contacts(); + TQDictIterator<Kopete::Contact> it( nonServerContacts ); + TQStringList nonServerContactList; for ( ; it.current(); ++it ) { OscarContact* oc = dynamic_cast<OscarContact*>( ( *it ) ); @@ -276,12 +276,12 @@ void OscarAccount::processSSIList() } kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "the following contacts are not on the server side list" << nonServerContactList << endl; - bool showMissingContactsDialog = configGroup()->readBoolEntry(QString::fromLatin1("ShowMissingContactsDialog"), true); + bool showMissingContactsDialog = configGroup()->readBoolEntry(TQString::fromLatin1("ShowMissingContactsDialog"), true); if ( !nonServerContactList.isEmpty() && showMissingContactsDialog ) { d->olnscDialog = new OscarListNonServerContacts( Kopete::UI::Global::mainWidget() ); - QObject::connect( d->olnscDialog, SIGNAL( closing() ), - this, SLOT( nonServerAddContactDialogClosed() ) ); + TQObject::connect( d->olnscDialog, TQT_SIGNAL( closing() ), + this, TQT_SLOT( nonServerAddContactDialogClosed() ) ); d->olnscDialog->addContacts( nonServerContactList ); d->olnscDialog->show(); } @@ -292,15 +292,15 @@ void OscarAccount::nonServerAddContactDialogClosed() if ( !d->olnscDialog ) return; - if ( d->olnscDialog->result() == QDialog::Accepted ) + if ( d->olnscDialog->result() == TQDialog::Accepted ) { //start adding contacts kdDebug(OSCAR_GEN_DEBUG) << "adding non server contacts to the contact list" << endl; //get the contact list. get the OscarContact object, then the group //check if the group is on ssi, if not, add it //if so, add the contact. - QStringList offliners = d->olnscDialog->nonServerContactList(); - QStringList::iterator it, itEnd = offliners.end(); + TQStringList offliners = d->olnscDialog->nonServerContactList(); + TQStringList::iterator it, itEnd = offliners.end(); for ( it = offliners.begin(); it != itEnd; ++it ) { OscarContact* oc = dynamic_cast<OscarContact*>( contacts()[( *it )] ); @@ -334,7 +334,7 @@ void OscarAccount::nonServerAddContactDialogClosed() } bool showOnce = d->olnscDialog->onlyShowOnce(); - configGroup()->writeEntry( QString::fromLatin1("ShowMissingContactsDialog") , !showOnce); + configGroup()->writeEntry( TQString::fromLatin1("ShowMissingContactsDialog") , !showOnce); configGroup()->sync(); d->olnscDialog->delayedDestruct(); @@ -363,7 +363,7 @@ void OscarAccount::kopeteGroupAdded( Kopete::Group* group ) d->engine->addGroup( group->displayName() ); } -void OscarAccount::kopeteGroupRenamed( Kopete::Group* group, const QString& oldName ) +void OscarAccount::kopeteGroupRenamed( Kopete::Group* group, const TQString& oldName ) { if ( isConnected() ) d->engine->renameGroup( oldName, group->displayName() ); @@ -385,11 +385,11 @@ void OscarAccount::messageReceived( const Oscar::Message& message ) * Get the sanitized message back * Append to the chat window */ - QString sender = Oscar::normalize( message.sender() ); + TQString sender = Oscar::normalize( message.sender() ); if ( !contacts()[sender] ) { kdDebug(OSCAR_RAW_DEBUG) << "Adding '" << sender << "' as temporary contact" << endl; - addContact( sender, QString::null, 0, Kopete::Account::Temporary ); + addContact( sender, TQString::null, 0, Kopete::Account::Temporary ); } OscarContact* ocSender = static_cast<OscarContact *> ( contacts()[sender] ); //should exist now @@ -413,10 +413,10 @@ void OscarAccount::messageReceived( const Oscar::Message& message ) //decode message - QString realText( message.text( contactCodec( ocSender ) ) ); + TQString realText( message.text( contactCodec( ocSender ) ) ); //sanitize; - QString sanitizedMsg = sanitizedMessage( realText ); + TQString sanitizedMsg = sanitizedMessage( realText ); Kopete::ContactPtrList me; me.append( myself() ); @@ -427,25 +427,25 @@ void OscarAccount::messageReceived( const Oscar::Message& message ) } -void OscarAccount::setServerAddress(const QString &server) +void OscarAccount::setServerAddress(const TQString &server) { - configGroup()->writeEntry( QString::fromLatin1( "Server" ), server ); + configGroup()->writeEntry( TQString::fromLatin1( "Server" ), server ); } void OscarAccount::setServerPort(int port) { if ( port > 0 ) - configGroup()->writeEntry( QString::fromLatin1( "Port" ), port ); + configGroup()->writeEntry( TQString::fromLatin1( "Port" ), port ); else //set to default 5190 - configGroup()->writeEntry( QString::fromLatin1( "Port" ), 5190 ); + configGroup()->writeEntry( TQString::fromLatin1( "Port" ), 5190 ); } -QTextCodec* OscarAccount::defaultCodec() const +TQTextCodec* OscarAccount::defaultCodec() const { - return QTextCodec::codecForMib( configGroup()->readNumEntry( "DefaultEncoding", 4 ) ); + return TQTextCodec::codecForMib( configGroup()->readNumEntry( "DefaultEncoding", 4 ) ); } -QTextCodec* OscarAccount::contactCodec( const OscarContact* contact ) const +TQTextCodec* OscarAccount::contactCodec( const OscarContact* contact ) const { if ( contact ) return contact->contactCodec(); @@ -453,7 +453,7 @@ QTextCodec* OscarAccount::contactCodec( const OscarContact* contact ) const return defaultCodec(); } -QTextCodec* OscarAccount::contactCodec( const QString& contactName ) const +TQTextCodec* OscarAccount::contactCodec( const TQString& contactName ) const { // XXX Need const_cast because Kopete::Account::contacts() // XXX method is not const for some strange reason. @@ -469,20 +469,20 @@ void OscarAccount::setBuddyIcon( KURL url ) } else { - QImage image( url.path() ); + TQImage image( url.path() ); if ( image.isNull() ) return; - const QSize size = ( d->engine->isIcq() ) ? QSize( 52, 64 ) : QSize( 48, 48 ); + const TQSize size = ( d->engine->isIcq() ) ? TQSize( 52, 64 ) : TQSize( 48, 48 ); - image = image.smoothScale( size, QImage::ScaleMax ); + image = image.smoothScale( size, TQImage::ScaleMax ); if( image.width() > size.width()) image = image.copy( ( image.width() - size.width() ) / 2, 0, size.width(), image.height() ); if( image.height() > size.height()) image = image.copy( 0, ( image.height() - size.height() ) / 2, image.width(), size.height() ); - QString newlocation( locateLocal( "appdata", "oscarpictures/"+ accountId() + ".jpg" ) ); + TQString newlocation( locateLocal( "appdata", "oscarpictures/"+ accountId() + ".jpg" ) ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Saving buddy icon: " << newlocation << endl; if ( !image.save( newlocation, "JPEG" ) ) @@ -494,7 +494,7 @@ void OscarAccount::setBuddyIcon( KURL url ) emit buddyIconChanged(); } -bool OscarAccount::addContactToSSI( const QString& contactName, const QString& groupName, bool autoAddGroup ) +bool OscarAccount::addContactToSSI( const TQString& contactName, const TQString& groupName, bool autoAddGroup ) { SSIManager* listManager = d->engine->ssiManager(); if ( !listManager->findGroup( groupName ) ) @@ -516,7 +516,7 @@ bool OscarAccount::addContactToSSI( const QString& contactName, const QString& g return true; } -bool OscarAccount::changeContactGroupInSSI( const QString& contact, const QString& newGroupName, bool autoAddGroup ) +bool OscarAccount::changeContactGroupInSSI( const TQString& contact, const TQString& newGroupName, bool autoAddGroup ) { SSIManager* listManager = d->engine->ssiManager(); if ( !listManager->findGroup( newGroupName ) ) @@ -538,7 +538,7 @@ bool OscarAccount::changeContactGroupInSSI( const QString& contact, const QStrin return true; } -Connection* OscarAccount::setupConnection( const QString& server, uint port ) +Connection* OscarAccount::setupConnection( const TQString& server, uint port ) { //set up the connector KNetworkConnector* knc = new KNetworkConnector( 0 ); @@ -554,7 +554,7 @@ Connection* OscarAccount::setupConnection( const QString& server, uint port ) } -bool OscarAccount::createContact(const QString &contactId, +bool OscarAccount::createContact(const TQString &contactId, Kopete::MetaContact *parentContact) { /* We're not even online or connecting @@ -576,7 +576,7 @@ bool OscarAccount::createContact(const QString &contactId, 2.c. create kopete contact */ - QValueList<TLV> dummyList; + TQValueList<TLV> dummyList; if ( parentContact->isTemporary() ) { SSI tempItem( contactId, 0, 0, 0xFFFF, dummyList, 0 ); @@ -607,7 +607,7 @@ bool OscarAccount::createContact(const QString &contactId, kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Adding " << contactId << " to server side list" << endl; - QString groupName; + TQString groupName; Kopete::GroupList kopeteGroups = parentContact->groups(); //get the group list if ( kopeteGroups.isEmpty() || kopeteGroups.first() == Kopete::Group::topLevel() ) @@ -618,7 +618,7 @@ bool OscarAccount::createContact(const QString &contactId, else { //apparently kopeteGroups.first() can be invalid. Attempt to prevent - //crashes in SSIData::findGroup(const QString& name) + //crashes in SSIData::findGroup(const TQString& name) groupName = kopeteGroups.first() ? kopeteGroups.first()->displayName() : i18n("Buddies"); kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Contact with group." << " No. of groups = " << kopeteGroups.count() << @@ -665,7 +665,7 @@ void OscarAccount::ssiGroupAdded( const Oscar::SSI& item ) //check the contact add queue for any contacts matching the //group name we just added kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Looking for contacts to be added in group " << item.name() << endl; - QMap<QString,QString>::iterator it; + TQMap<TQString,TQString>::iterator it; for ( it = d->contactAddQueue.begin(); it != d->contactAddQueue.end(); ++it ) { if ( Oscar::normalize( it.data() ) == Oscar::normalize( item.name() ) ) @@ -704,7 +704,7 @@ void OscarAccount::ssiContactUpdated( const Oscar::SSI& item ) } } -void OscarAccount::userStartedTyping( const QString & contact ) +void OscarAccount::userStartedTyping( const TQString & contact ) { Kopete::Contact * ct = contacts()[ Oscar::normalize( contact ) ]; if ( ct && contact != accountId() ) @@ -714,7 +714,7 @@ void OscarAccount::userStartedTyping( const QString & contact ) } } -void OscarAccount::userStoppedTyping( const QString & contact ) +void OscarAccount::userStoppedTyping( const TQString & contact ) { Kopete::Contact * ct = contacts()[ Oscar::normalize( contact ) ]; if ( ct && contact != accountId() ) @@ -724,7 +724,7 @@ void OscarAccount::userStoppedTyping( const QString & contact ) } } -void OscarAccount::slotSocketError( int errCode, const QString& errString ) +void OscarAccount::slotSocketError( int errCode, const TQString& errString ) { Q_UNUSED( errCode ); KPassivePopup::message( i18n( "account has been disconnected", "%1 disconnected" ).arg( accountId() ), @@ -740,7 +740,7 @@ void OscarAccount::slotTaskError( const Oscar::SNAC& s, int code, bool fatal ) kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "service: " << s.family << " subtype: " << s.subtype << " code: " << code << endl; - QString message; + TQString message; if ( s.family == 0 && s.subtype == 0 ) { message = getFLAPErrorMessage( code ); @@ -781,34 +781,34 @@ void OscarAccount::slotTaskError( const Oscar::SNAC& s, int code, bool fatal ) void OscarAccount::slotSendBuddyIcon() { //need to disconnect because we could end up with many connections - QObject::disconnect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotSendBuddyIcon() ) ); - QString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); + TQObject::disconnect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotSendBuddyIcon() ) ); + TQString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); if ( photoPath.isEmpty() ) return; kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << photoPath << endl; - QFile iconFile( photoPath ); + TQFile iconFile( photoPath ); if ( iconFile.open( IO_ReadOnly ) ) { if ( !engine()->hasIconConnection() ) { //will send icon when we connect to icon server - QObject::connect( engine(), SIGNAL( iconServerConnected() ), - this, SLOT( slotSendBuddyIcon() ) ); + TQObject::connect( engine(), TQT_SIGNAL( iconServerConnected() ), + this, TQT_SLOT( slotSendBuddyIcon() ) ); return; } - QByteArray imageData = iconFile.readAll(); + TQByteArray imageData = iconFile.readAll(); engine()->sendBuddyIcon( imageData ); } } -QString OscarAccount::getFLAPErrorMessage( int code ) +TQString OscarAccount::getFLAPErrorMessage( int code ) { bool isICQ = d->engine->isIcq(); - QString acctType = isICQ ? i18n("ICQ") : i18n("AIM"); - QString acctDescription = isICQ ? i18n("ICQ user id", "UIN") : i18n("AIM user id", "screen name"); - QString reason; + TQString acctType = isICQ ? i18n("ICQ") : i18n("AIM"); + TQString acctDescription = isICQ ? i18n("ICQ user id", "UIN") : i18n("AIM user id", "screen name"); + TQString reason; //FLAP errors are always fatal //negative codes are things added by liboscar developers //to indicate generic errors in the task diff --git a/kopete/protocols/oscar/oscaraccount.h b/kopete/protocols/oscar/oscaraccount.h index aa8e806d..d135df3a 100644 --- a/kopete/protocols/oscar/oscaraccount.h +++ b/kopete/protocols/oscar/oscaraccount.h @@ -18,9 +18,9 @@ #ifndef OSCARACCOUNT_H #define OSCARACCOUNT_H -#include <qdict.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqdict.h> +#include <tqstring.h> +#include <tqwidget.h> #include "kopetepasswordedaccount.h" #include "oscartypeclasses.h" @@ -44,7 +44,7 @@ class KDE_EXPORT OscarAccount : public Kopete::PasswordedAccount Q_OBJECT public: - OscarAccount(Kopete::Protocol *parent, const QString &accountID, const char *name=0L, bool isICQ=false); + OscarAccount(Kopete::Protocol *parent, const TQString &accountID, const char *name=0L, bool isICQ=false); virtual ~OscarAccount(); /** Provide the derived accounts and contacts with access to the backend */ @@ -67,7 +67,7 @@ public: /** * Sets the account away */ - virtual void setAway( bool away, const QString &awayMessage = QString::null ) = 0; + virtual void setAway( bool away, const TQString &awayMessage = TQString::null ) = 0; /** * Accessor method for the action menu @@ -75,25 +75,25 @@ public: virtual KActionMenu* actionMenu() = 0; /** Set the server address */ - void setServerAddress( const QString& server ); + void setServerAddress( const TQString& server ); /** Set the server port */ void setServerPort( int port ); /** Returns codec for account's default encoding */ - QTextCodec* defaultCodec() const; + TQTextCodec* defaultCodec() const; /** * Returns codec for given contact's encoding or default one * if contact has no encoding */ - QTextCodec* contactCodec( const OscarContact* contact ) const; + TQTextCodec* contactCodec( const OscarContact* contact ) const; /** * Returns codec for given contact's encoding or default one * if contact has no encoding */ - QTextCodec* contactCodec( const QString& contactName ) const; + TQTextCodec* contactCodec( const TQString& contactName ) const; /** * Sets buddy icon @@ -107,7 +107,7 @@ public: * \param autoAddGroup if the group doesn't exist add that group * \return true if the contact will be added */ - bool addContactToSSI( const QString& contactName, const QString& groupName, bool autoAddGroup ); + bool addContactToSSI( const TQString& contactName, const TQString& groupName, bool autoAddGroup ); /** * Change a contact's group on the server @@ -116,7 +116,7 @@ public: * \param autoAddGroup if the new group doesn't exist add that group * \return true if the contact will be added */ - bool changeContactGroupInSSI( const QString& contact, const QString& newGroupName, bool autoAddGroup ); + bool changeContactGroupInSSI( const TQString& contact, const TQString& newGroupName, bool autoAddGroup ); public slots: void slotGoOffline(); @@ -127,12 +127,12 @@ protected: /** * Setup a connection for a derived account based on the host and port */ - Connection* setupConnection( const QString& server, uint port ); + Connection* setupConnection( const TQString& server, uint port ); /** * Adds a contact to a meta contact */ - virtual bool createContact(const QString &contactId, + virtual bool createContact(const TQString &contactId, Kopete::MetaContact *parentContact ); /** @@ -142,9 +142,9 @@ protected: * @param parentContact the parent metacontact * @return whether the creation succeeded or not */ - virtual OscarContact *createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) = 0; + virtual OscarContact *createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) = 0; - virtual QString sanitizedMessage( const QString& message ) = 0; + virtual TQString sanitizedMessage( const TQString& message ) = 0; void updateVersionUpdaterStamp(); @@ -157,7 +157,7 @@ protected slots: void kopeteGroupRemoved( Kopete::Group* g ); void kopeteGroupAdded( Kopete::Group* g ); - void kopeteGroupRenamed( Kopete::Group* g, const QString& oldName ); + void kopeteGroupRenamed( Kopete::Group* g, const TQString& oldName ); virtual void messageReceived( const Oscar::Message& message ); @@ -169,8 +169,8 @@ protected slots: void ssiContactRemoved( const Oscar::SSI& ) {} /* slots for receiving typing notifications, and notify the appropriate OscarContact */ - void userStartedTyping( const QString & contact ); - void userStoppedTyping( const QString & contact ); + void userStartedTyping( const TQString & contact ); + void userStoppedTyping( const TQString & contact ); void nonServerAddContactDialogClosed(); @@ -181,11 +181,11 @@ signals: void buddyIconChanged(); private: - QString getFLAPErrorMessage( int code ); + TQString getFLAPErrorMessage( int code ); private slots: /** Handler from socket errors from a connection */ - void slotSocketError( int, const QString& ); + void slotSocketError( int, const TQString& ); /** Handle task errors from the client */ void slotTaskError( const Oscar::SNAC& s, int errCode, bool fatal ) ; diff --git a/kopete/protocols/oscar/oscarcontact.cpp b/kopete/protocols/oscar/oscarcontact.cpp index 660a82e6..cb9f06c6 100644 --- a/kopete/protocols/oscar/oscarcontact.cpp +++ b/kopete/protocols/oscar/oscarcontact.cpp @@ -18,8 +18,8 @@ #include <time.h> -#include <qapplication.h> -#include <qtextcodec.h> +#include <tqapplication.h> +#include <tqtextcodec.h> #include <kaction.h> #include <kdebug.h> @@ -43,30 +43,30 @@ #include <assert.h> -OscarContact::OscarContact( Kopete::Account* account, const QString& name, - Kopete::MetaContact* parent, const QString& icon, const SSI& ssiItem ) +OscarContact::OscarContact( Kopete::Account* account, const TQString& name, + Kopete::MetaContact* parent, const TQString& icon, const SSI& ssiItem ) : Kopete::Contact( account, name, parent, icon ) { mAccount = static_cast<OscarAccount*>(account); mName = name; mMsgManager = 0L; m_ssiItem = ssiItem; - connect( this, SIGNAL( updatedSSI() ), this, SLOT( updateSSIItem() ) ); + connect( this, TQT_SIGNAL( updatedSSI() ), this, TQT_SLOT( updateSSIItem() ) ); } OscarContact::~OscarContact() { } -void OscarContact::serialize(QMap<QString, QString> &serializedData, - QMap<QString, QString> &/*addressBookData*/) +void OscarContact::serialize(TQMap<TQString, TQString> &serializedData, + TQMap<TQString, TQString> &/*addressBookData*/) { serializedData["ssi_name"] = m_ssiItem.name(); - serializedData["ssi_type"] = QString::number( m_ssiItem.type() ); - serializedData["ssi_gid"] = QString::number( m_ssiItem.gid() ); - serializedData["ssi_bid"] = QString::number( m_ssiItem.bid() ); + serializedData["ssi_type"] = TQString::number( m_ssiItem.type() ); + serializedData["ssi_gid"] = TQString::number( m_ssiItem.gid() ); + serializedData["ssi_bid"] = TQString::number( m_ssiItem.bid() ); serializedData["ssi_alias"] = m_ssiItem.alias(); - serializedData["ssi_waitingAuth"] = m_ssiItem.waitingAuth() ? QString::fromLatin1( "true" ) : QString::fromLatin1( "false" ); + serializedData["ssi_waitingAuth"] = m_ssiItem.waitingAuth() ? TQString::fromLatin1( "true" ) : TQString::fromLatin1( "false" ); } bool OscarContact::isOnServer() const @@ -99,21 +99,21 @@ Kopete::ChatSession* OscarContact::manager( CanCreateFlags canCreate ) /*kdDebug(14190) << k_funcinfo << "Creating new ChatSession for contact '" << displayName() << "'" << endl;*/ - QPtrList<Kopete::Contact> theContact; + TQPtrList<Kopete::Contact> theContact; theContact.append(this); mMsgManager = Kopete::ChatSessionManager::self()->create(account()->myself(), theContact, protocol()); // This is for when the user types a message and presses send - connect(mMsgManager, SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession * ) ), - this, SLOT( slotSendMsg( Kopete::Message&, Kopete::ChatSession * ) ) ); + connect(mMsgManager, TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession * ) ), + this, TQT_SLOT( slotSendMsg( Kopete::Message&, Kopete::ChatSession * ) ) ); // For when the message manager is destroyed - connect(mMsgManager, SIGNAL( destroyed() ), - this, SLOT( chatSessionDestroyed() ) ); + connect(mMsgManager, TQT_SIGNAL( destroyed() ), + this, TQT_SLOT( chatSessionDestroyed() ) ); - connect(mMsgManager, SIGNAL( myselfTyping( bool ) ), - this, SLOT( slotTyping( bool ) ) ); + connect(mMsgManager, TQT_SIGNAL( myselfTyping( bool ) ), + this, TQT_SLOT( slotTyping( bool ) ) ); } return mMsgManager; } @@ -160,7 +160,7 @@ void OscarContact::sync(unsigned int flags) return; } -void OscarContact::userInfoUpdated( const QString& contact, const UserDetails& details ) +void OscarContact::userInfoUpdated( const TQString& contact, const UserDetails& details ) { Q_UNUSED( contact ); setProperty( Kopete::Global::Properties::self()->onlineSince(), details.onlineSinceTime() ); @@ -168,7 +168,7 @@ void OscarContact::userInfoUpdated( const QString& contact, const UserDetails& d m_warningLevel = details.warningLevel(); m_details.merge( details ); - QStringList capList; + TQStringList capList; // Append client name and version in case we found one if ( m_details.userClass() & 0x0080 /* WIRELESS */ ) capList << i18n( "Mobile AIM Client" ); @@ -225,10 +225,10 @@ void OscarContact::slotTyping( bool typing ) account()->engine()->sendTyping( contactId(), typing ); } -QTextCodec* OscarContact::contactCodec() const +TQTextCodec* OscarContact::contactCodec() const { if ( hasProperty( "contactEncoding" ) ) - return QTextCodec::codecForMib( property( "contactEncoding" ).value().toInt() ); + return TQTextCodec::codecForMib( property( "contactEncoding" ).value().toInt() ); else return mAccount->defaultCodec(); } diff --git a/kopete/protocols/oscar/oscarcontact.h b/kopete/protocols/oscar/oscarcontact.h index 51c31dd2..659e649e 100644 --- a/kopete/protocols/oscar/oscarcontact.h +++ b/kopete/protocols/oscar/oscarcontact.h @@ -18,8 +18,8 @@ #ifndef OSCARCONTACT_H #define OSCARCONTACT_H -#include <qwidget.h> -#include <qdatetime.h> +#include <tqwidget.h> +#include <tqdatetime.h> #include "kopetecontact.h" #include "kopetemessage.h" #include "userdetails.h" @@ -62,16 +62,16 @@ class KDE_EXPORT OscarContact : public Kopete::Contact Q_OBJECT public: - OscarContact( Kopete::Account* account, const QString& name, - Kopete::MetaContact* parent, const QString& icon = QString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); + OscarContact( Kopete::Account* account, const TQString& name, + Kopete::MetaContact* parent, const TQString& icon = TQString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); virtual ~OscarContact(); - virtual void serialize(QMap<QString, QString>&, QMap<QString, QString>&); + virtual void serialize(TQMap<TQString, TQString>&, TQMap<TQString, TQString>&); virtual Kopete::ChatSession *manager( Kopete::Contact::CanCreateFlags canCreate = Kopete::Contact::CanCreate ); - const QString &contactName() const { return mName; }; + const TQString &contactName() const { return mName; }; OscarAccount *account() const { return mAccount; }; bool isOnServer() const; @@ -87,7 +87,7 @@ public: * Returns codec for contact's encoding or default one * if contact has no encoding */ - QTextCodec *contactCodec() const; + TQTextCodec *contactCodec() const; public slots: /** slot so that properties can be updated based on a new SSI item */ @@ -100,13 +100,13 @@ public slots: virtual void sync(unsigned int flags); /** our user info has been updated */ - virtual void userInfoUpdated( const QString& contact, const UserDetails& details ); + virtual void userInfoUpdated( const TQString& contact, const UserDetails& details ); /** a user is online */ - virtual void userOnline( const QString& ) = 0; + virtual void userOnline( const TQString& ) = 0; /** a user is offline */ - virtual void userOffline( const QString& ) = 0; + virtual void userOffline( const TQString& ) = 0; protected slots: void slotTyping( bool typing ); @@ -118,12 +118,12 @@ signals: protected: OscarAccount *mAccount; - QString mName; + TQString mName; Kopete::ChatSession *mMsgManager; UserDetails m_details; SSI m_ssiItem; int m_warningLevel; - QString m_clientFeatures; + TQString m_clientFeatures; private: void initActions(); diff --git a/kopete/protocols/oscar/oscarencodingselectiondialog.cpp b/kopete/protocols/oscar/oscarencodingselectiondialog.cpp index 72e9081a..7a1826cb 100644 --- a/kopete/protocols/oscar/oscarencodingselectiondialog.cpp +++ b/kopete/protocols/oscar/oscarencodingselectiondialog.cpp @@ -21,15 +21,15 @@ #include "oscarencodingselectiondialog.h" #include <kdebug.h> -#include <qcombobox.h> +#include <tqcombobox.h> #include <klocale.h> -OscarEncodingSelectionDialog::OscarEncodingSelectionDialog( QWidget* parent, int initialEncoding ) +OscarEncodingSelectionDialog::OscarEncodingSelectionDialog( TQWidget* parent, int initialEncoding ) : KDialogBase( parent, 0, false, i18n( "Select Encoding" ), Ok | Cancel ) { int initialEncodingIndex; - clearWFlags( QWidget::WDestructiveClose ); + clearWFlags( TQWidget::WDestructiveClose ); m_encodingUI = new OscarEncodingBaseUI( this ); //fill the encoding combo boxes m_encodings.insert(0, i18n("Default")); @@ -99,7 +99,7 @@ OscarEncodingSelectionDialog::OscarEncodingSelectionDialog( QWidget* parent, int int OscarEncodingSelectionDialog::selectedEncoding() const { - QString encoding = m_encodingUI->encodingCombo->currentText(); + TQString encoding = m_encodingUI->encodingCombo->currentText(); int mib = m_encodings.keys()[ m_encodings.values().findIndex(encoding) ]; if( mib == -1 ) @@ -109,12 +109,12 @@ int OscarEncodingSelectionDialog::selectedEncoding() const void OscarEncodingSelectionDialog::slotOk() { - emit closing( QDialog::Accepted ); + emit closing( TQDialog::Accepted ); } void OscarEncodingSelectionDialog::slotCancel() { - emit closing( QDialog::Rejected ); + emit closing( TQDialog::Rejected ); } #include "oscarencodingselectiondialog.moc" diff --git a/kopete/protocols/oscar/oscarencodingselectiondialog.h b/kopete/protocols/oscar/oscarencodingselectiondialog.h index f99655e4..2ab8d529 100644 --- a/kopete/protocols/oscar/oscarencodingselectiondialog.h +++ b/kopete/protocols/oscar/oscarencodingselectiondialog.h @@ -28,7 +28,7 @@ class KOPETE_EXPORT OscarEncodingSelectionDialog : public KDialogBase { Q_OBJECT public: - OscarEncodingSelectionDialog( QWidget* parent = 0, int initialEncoding = 4); + OscarEncodingSelectionDialog( TQWidget* parent = 0, int initialEncoding = 4); ~OscarEncodingSelectionDialog() {} int selectedEncoding() const; @@ -42,7 +42,7 @@ protected slots: private: OscarEncodingBaseUI* m_encodingUI; - QMap<int, QString> m_encodings; + TQMap<int, TQString> m_encodings; }; #endif diff --git a/kopete/protocols/oscar/oscarlistnonservercontacts.cpp b/kopete/protocols/oscar/oscarlistnonservercontacts.cpp index 804849a4..4529f562 100644 --- a/kopete/protocols/oscar/oscarlistnonservercontacts.cpp +++ b/kopete/protocols/oscar/oscarlistnonservercontacts.cpp @@ -20,11 +20,11 @@ #include "oscarlistnonservercontacts.h" #include "oscarlistcontactsbase.h" -#include <qstringlist.h> -#include <qcheckbox.h> +#include <tqstringlist.h> +#include <tqcheckbox.h> #include <klocale.h> -OscarListNonServerContacts::OscarListNonServerContacts(QWidget* parent) +OscarListNonServerContacts::OscarListNonServerContacts(TQWidget* parent) : KDialogBase( parent, 0, false, i18n( "Add Contacts to Server List" ), Ok | Cancel ) { @@ -39,13 +39,13 @@ OscarListNonServerContacts::~OscarListNonServerContacts() } -void OscarListNonServerContacts::addContacts( const QStringList& contactList ) +void OscarListNonServerContacts::addContacts( const TQStringList& contactList ) { m_nonServerContacts = contactList; m_contactsList->notServerContacts->insertStringList( contactList ); } -QStringList OscarListNonServerContacts::nonServerContactList() const +TQStringList OscarListNonServerContacts::nonServerContactList() const { return m_nonServerContacts; } diff --git a/kopete/protocols/oscar/oscarlistnonservercontacts.h b/kopete/protocols/oscar/oscarlistnonservercontacts.h index 7f3fb4f8..e7db0848 100644 --- a/kopete/protocols/oscar/oscarlistnonservercontacts.h +++ b/kopete/protocols/oscar/oscarlistnonservercontacts.h @@ -29,11 +29,11 @@ class KOPETE_EXPORT OscarListNonServerContacts : public KDialogBase { Q_OBJECT public: - OscarListNonServerContacts( QWidget* parent ); + OscarListNonServerContacts( TQWidget* parent ); ~OscarListNonServerContacts(); - void addContacts( const QStringList& contactList ); - QStringList nonServerContactList() const; + void addContacts( const TQStringList& contactList ); + TQStringList nonServerContactList() const; bool onlyShowOnce(); @@ -46,7 +46,7 @@ signals: private: OscarListContactsBase* m_contactsList; - QStringList m_nonServerContacts; + TQStringList m_nonServerContacts; }; #endif diff --git a/kopete/protocols/oscar/oscarmyselfcontact.cpp b/kopete/protocols/oscar/oscarmyselfcontact.cpp index e234cf0f..28aeb8f2 100644 --- a/kopete/protocols/oscar/oscarmyselfcontact.cpp +++ b/kopete/protocols/oscar/oscarmyselfcontact.cpp @@ -27,7 +27,7 @@ OscarMyselfContact::OscarMyselfContact( OscarAccount* account ) : Kopete::Contact( account, account->accountId(), Kopete::ContactList::self()->myself() ) { - QObject::connect( account->engine(), SIGNAL( haveOwnInfo() ), this, SLOT( userInfoUpdated() ) ); + TQObject::connect( account->engine(), TQT_SIGNAL( haveOwnInfo() ), this, TQT_SLOT( userInfoUpdated() ) ); } OscarMyselfContact::~OscarMyselfContact() diff --git a/kopete/protocols/oscar/oscarversionupdater.cpp b/kopete/protocols/oscar/oscarversionupdater.cpp index 6e2cea09..75f38b74 100644 --- a/kopete/protocols/oscar/oscarversionupdater.cpp +++ b/kopete/protocols/oscar/oscarversionupdater.cpp @@ -16,8 +16,8 @@ #include "oscarversionupdater.h" -#include <qdom.h> -#include <qmutex.h> +#include <tqdom.h> +#include <tqmutex.h> #include <kdebug.h> #include <kio/job.h> @@ -25,7 +25,7 @@ #include <kglobal.h> -QMutex updateMutex; +TQMutex updateMutex; OscarVersionUpdater *OscarVersionUpdater::versionUpdaterStatic = 0L; OscarVersionUpdater::OscarVersionUpdater() @@ -67,14 +67,14 @@ bool OscarVersionUpdater::update( unsigned int stamp ) mVersionData.resize( 0 ); KConfigGroup config( KGlobal::config(), "Oscar" ); - QString url = config.readEntry( "NewVersionURL", "http://kopete.kde.org/oscarversions.xml" ); + TQString url = config.readEntry( "NewVersionURL", "http://kopete.kde.org/oscarversions.xml" ); mTransferJob = KIO::get ( url ); kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Download version info from server."<< endl; - connect ( mTransferJob, SIGNAL ( result ( KIO::Job* ) ), - this, SLOT ( slotTransferResult ( KIO::Job* ) ) ); - connect ( mTransferJob, SIGNAL ( data ( KIO::Job*, const QByteArray& ) ), - this, SLOT ( slotTransferData ( KIO::Job*, const QByteArray& ) ) ); + connect ( mTransferJob, TQT_SIGNAL ( result ( KIO::Job* ) ), + this, TQT_SLOT ( slotTransferResult ( KIO::Job* ) ) ); + connect ( mTransferJob, TQT_SIGNAL ( data ( KIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT ( slotTransferData ( KIO::Job*, const TQByteArray& ) ) ); } return isUpdating; } @@ -121,30 +121,30 @@ void OscarVersionUpdater::printDebug() { kdDebug(OSCAR_RAW_DEBUG) << "*************** AIM VERSION INFO ***************" << endl; kdDebug(OSCAR_RAW_DEBUG) << "client string: " << mAIMVersion.clientString << endl; - kdDebug(OSCAR_RAW_DEBUG) << "client id: " << QString::number( mAIMVersion.clientId, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "major: " << QString::number( mAIMVersion.major, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "minor: " << QString::number( mAIMVersion.minor, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "point: " << QString::number( mAIMVersion.point, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "build: " << QString::number( mAIMVersion.build, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "other: " << QString::number( mAIMVersion.other, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "client id: " << TQString::number( mAIMVersion.clientId, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "major: " << TQString::number( mAIMVersion.major, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "minor: " << TQString::number( mAIMVersion.minor, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "point: " << TQString::number( mAIMVersion.point, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "build: " << TQString::number( mAIMVersion.build, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "other: " << TQString::number( mAIMVersion.other, 16 ) << endl; kdDebug(OSCAR_RAW_DEBUG) << "country: " << mAIMVersion.country << endl; kdDebug(OSCAR_RAW_DEBUG) << "lang: " << mAIMVersion.lang << endl; kdDebug(OSCAR_RAW_DEBUG) << "************************************************" << endl; kdDebug(OSCAR_RAW_DEBUG) << "*************** ICQ VERSION INFO ***************" << endl; kdDebug(OSCAR_RAW_DEBUG) << "client string: " << mICQVersion.clientString << endl; - kdDebug(OSCAR_RAW_DEBUG) << "client id: " << QString::number( mICQVersion.clientId, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "major: " << QString::number( mICQVersion.major, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "minor: " << QString::number( mICQVersion.minor, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "point: " << QString::number( mICQVersion.point, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "build: " << QString::number( mICQVersion.build, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "other: " << QString::number( mICQVersion.other, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "client id: " << TQString::number( mICQVersion.clientId, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "major: " << TQString::number( mICQVersion.major, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "minor: " << TQString::number( mICQVersion.minor, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "point: " << TQString::number( mICQVersion.point, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "build: " << TQString::number( mICQVersion.build, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "other: " << TQString::number( mICQVersion.other, 16 ) << endl; kdDebug(OSCAR_RAW_DEBUG) << "country: " << mICQVersion.country << endl; kdDebug(OSCAR_RAW_DEBUG) << "lang: " << mICQVersion.lang << endl; kdDebug(OSCAR_RAW_DEBUG) << "************************************************" << endl; } -void OscarVersionUpdater::slotTransferData ( KIO::Job */*job*/, const QByteArray &data ) +void OscarVersionUpdater::slotTransferData ( KIO::Job */*job*/, const TQByteArray &data ) { unsigned oldSize = mVersionData.size(); mVersionData.resize ( oldSize + data.size() ); @@ -165,7 +165,7 @@ void OscarVersionUpdater::slotTransferResult ( KIO::Job *job ) { kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Updating version info" << endl; - QDomDocument doc; + TQDomDocument doc; if ( doc.setContent ( mVersionData ) ) { Oscar::ClientVersion tmpICQ = mICQVersion; @@ -198,15 +198,15 @@ void OscarVersionUpdater::slotTransferResult ( KIO::Job *job ) updateMutex.unlock(); } -void OscarVersionUpdater::parseDocument( QDomDocument& doc ) +void OscarVersionUpdater::parseDocument( TQDomDocument& doc ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; - QDomElement root = doc.documentElement(); + TQDomElement root = doc.documentElement(); if ( root.tagName() != "oscar" ) return; - QDomElement versionElement = root.firstChild().toElement(); + TQDomElement versionElement = root.firstChild().toElement(); while( !versionElement.isNull() ) { if ( versionElement.tagName() == "icq" ) @@ -218,22 +218,22 @@ void OscarVersionUpdater::parseDocument( QDomDocument& doc ) } } -bool OscarVersionUpdater::parseVersion( Oscar::ClientVersion& version, QDomElement& element ) +bool OscarVersionUpdater::parseVersion( Oscar::ClientVersion& version, TQDomElement& element ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; // clear structure - version.clientString = QString::null; + version.clientString = TQString::null; version.clientId = 0x0000; version.major = 0x0000; version.minor = 0x0000; version.point = 0x0000; version.build = 0x0000; version.other = 0x00000000; - version.country = QString::null; - version.lang = QString::null; + version.country = TQString::null; + version.lang = TQString::null; - QDomElement versionChild = element.firstChild().toElement(); + TQDomElement versionChild = element.firstChild().toElement(); while ( !versionChild.isNull() ) { if ( versionChild.tagName() == "client" ) @@ -261,7 +261,7 @@ bool OscarVersionUpdater::parseVersion( Oscar::ClientVersion& version, QDomEleme return true; } -void OscarVersionUpdater::storeVersionInfo( const QString& group, const Oscar::ClientVersion& version ) const +void OscarVersionUpdater::storeVersionInfo( const TQString& group, const Oscar::ClientVersion& version ) const { kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Storing version info to group: " << group << endl; KConfigGroup config( KGlobal::config(), group ); diff --git a/kopete/protocols/oscar/oscarversionupdater.h b/kopete/protocols/oscar/oscarversionupdater.h index d6851f73..bb51cc9b 100644 --- a/kopete/protocols/oscar/oscarversionupdater.h +++ b/kopete/protocols/oscar/oscarversionupdater.h @@ -17,7 +17,7 @@ #ifndef OSCARVERSIONUPDATER_H #define OSCARVERSIONUPDATER_H -#include <qobject.h> +#include <tqobject.h> #include <oscartypes.h> @@ -84,19 +84,19 @@ public: void printDebug(); private slots: - void slotTransferData( KIO::Job *job, const QByteArray &data ); + void slotTransferData( KIO::Job *job, const TQByteArray &data ); void slotTransferResult( KIO::Job *job ); private: - void parseDocument( QDomDocument& doc ); - bool parseVersion( Oscar::ClientVersion& version, QDomElement& element ); + void parseDocument( TQDomDocument& doc ); + bool parseVersion( Oscar::ClientVersion& version, TQDomElement& element ); /** * Store version info structure to KConfigGroup * @param group is the group name. * @param version is version info structure. */ - void storeVersionInfo( const QString& group, const Oscar::ClientVersion& version ) const; + void storeVersionInfo( const TQString& group, const Oscar::ClientVersion& version ) const; /** * Compare two versions. @@ -111,7 +111,7 @@ private: Oscar::ClientVersion mAIMVersion; KIO::TransferJob *mTransferJob; - QByteArray mVersionData; + TQByteArray mVersionData; unsigned int mStamp; bool mUpdating; diff --git a/kopete/protocols/oscar/oscarvisibilitydialog.cpp b/kopete/protocols/oscar/oscarvisibilitydialog.cpp index 7958432c..77f3894a 100644 --- a/kopete/protocols/oscar/oscarvisibilitydialog.cpp +++ b/kopete/protocols/oscar/oscarvisibilitydialog.cpp @@ -16,8 +16,8 @@ #include "oscarvisibilitydialog.h" -#include <qstringlist.h> -#include <qpushbutton.h> +#include <tqstringlist.h> +#include <tqpushbutton.h> #include <klocale.h> @@ -25,21 +25,21 @@ #include "client.h" -OscarVisibilityDialog::OscarVisibilityDialog( Client* client, QWidget* parent ) +OscarVisibilityDialog::OscarVisibilityDialog( Client* client, TQWidget* parent ) : KDialogBase( parent, 0, false, i18n( "Add Contacts to Visible or Invisible List" ), Ok | Cancel ), m_client( client ) { m_visibilityUI = new OscarVisibilityBase( this ); setMainWidget( m_visibilityUI ); - QObject::connect(m_visibilityUI->visibleAdd, SIGNAL(clicked()), - this, SLOT(slotAddToVisible())); - QObject::connect(m_visibilityUI->visibleRemove, SIGNAL(clicked()), - this, SLOT(slotRemoveFromVisible())); - QObject::connect(m_visibilityUI->invisibleAdd, SIGNAL(clicked()), - this, SLOT(slotAddToInvisible())); - QObject::connect(m_visibilityUI->invisibleRemove, SIGNAL(clicked()), - this, SLOT(slotRemoveFromInvisible())); + TQObject::connect(m_visibilityUI->visibleAdd, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddToVisible())); + TQObject::connect(m_visibilityUI->visibleRemove, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveFromVisible())); + TQObject::connect(m_visibilityUI->invisibleAdd, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddToInvisible())); + TQObject::connect(m_visibilityUI->invisibleRemove, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveFromInvisible())); } void OscarVisibilityDialog::addContacts( const ContactMap& contacts ) @@ -52,22 +52,22 @@ void OscarVisibilityDialog::addContacts( const ContactMap& contacts ) } -void OscarVisibilityDialog::addVisibleContacts( const QStringList& contactList ) +void OscarVisibilityDialog::addVisibleContacts( const TQStringList& contactList ) { m_visibilityUI->visibleContacts->insertStringList( contactList ); } -void OscarVisibilityDialog::addInvisibleContacts( const QStringList& contactList ) +void OscarVisibilityDialog::addInvisibleContacts( const TQStringList& contactList ) { m_visibilityUI->invisibleContacts->insertStringList( contactList ); } void OscarVisibilityDialog::slotAddToVisible() { - QListBoxItem *itm = m_visibilityUI->contacts->selectedItem(); + TQListBoxItem *itm = m_visibilityUI->contacts->selectedItem(); if ( !itm ) return; - QString contactId = m_contactMap[itm->text()]; + TQString contactId = m_contactMap[itm->text()]; m_visibleListChangesMap[contactId] = Add; if ( !m_visibilityUI->visibleContacts->findItem( itm->text(), Qt::CaseSensitive | Qt::ExactMatch ) ) @@ -76,10 +76,10 @@ void OscarVisibilityDialog::slotAddToVisible() void OscarVisibilityDialog::slotRemoveFromVisible() { - QListBoxItem *itm = m_visibilityUI->visibleContacts->selectedItem(); + TQListBoxItem *itm = m_visibilityUI->visibleContacts->selectedItem(); if ( !itm ) return; - QString contactId = m_contactMap[itm->text()]; + TQString contactId = m_contactMap[itm->text()]; m_visibleListChangesMap[contactId] = Remove; int visIdx = m_visibilityUI->visibleContacts->index( itm ); @@ -88,10 +88,10 @@ void OscarVisibilityDialog::slotRemoveFromVisible() void OscarVisibilityDialog::slotAddToInvisible() { - QListBoxItem *itm = m_visibilityUI->contacts->selectedItem(); + TQListBoxItem *itm = m_visibilityUI->contacts->selectedItem(); if ( !itm ) return; - QString contactId = m_contactMap[itm->text()]; + TQString contactId = m_contactMap[itm->text()]; m_invisibleListChangesMap[contactId] = Add; if ( !m_visibilityUI->invisibleContacts->findItem( itm->text(), Qt::CaseSensitive | Qt::ExactMatch ) ) @@ -100,10 +100,10 @@ void OscarVisibilityDialog::slotAddToInvisible() void OscarVisibilityDialog::slotRemoveFromInvisible() { - QListBoxItem *itm = m_visibilityUI->invisibleContacts->selectedItem(); + TQListBoxItem *itm = m_visibilityUI->invisibleContacts->selectedItem(); if ( !itm ) return; - QString contactId = m_contactMap[itm->text()]; + TQString contactId = m_contactMap[itm->text()]; m_invisibleListChangesMap[contactId] = Remove; int visIdx = m_visibilityUI->invisibleContacts->index( itm ); diff --git a/kopete/protocols/oscar/oscarvisibilitydialog.h b/kopete/protocols/oscar/oscarvisibilitydialog.h index fc45039f..719243d3 100644 --- a/kopete/protocols/oscar/oscarvisibilitydialog.h +++ b/kopete/protocols/oscar/oscarvisibilitydialog.h @@ -31,14 +31,14 @@ class KOPETE_EXPORT OscarVisibilityDialog : public KDialogBase { Q_OBJECT public: - typedef QMap<QString, QString> ContactMap; + typedef TQMap<TQString, TQString> ContactMap; - OscarVisibilityDialog( Client* client, QWidget* parent ); + OscarVisibilityDialog( Client* client, TQWidget* parent ); ~OscarVisibilityDialog() {} void addContacts( const ContactMap& contacts ); - void addVisibleContacts( const QStringList& contactList ); - void addInvisibleContacts( const QStringList& contactList ); + void addVisibleContacts( const TQStringList& contactList ); + void addInvisibleContacts( const TQStringList& contactList ); signals: void closing(); @@ -55,7 +55,7 @@ protected slots: private: enum Action{ Remove = 0, Add }; - typedef QMap<QString, Action> ChangeMap; + typedef TQMap<TQString, Action> ChangeMap; //maps with changes that should be send to server ChangeMap m_visibleListChangesMap; |