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/gadu | |
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/gadu')
32 files changed, 588 insertions, 588 deletions
diff --git a/kopete/protocols/gadu/gaduaccount.cpp b/kopete/protocols/gadu/gaduaccount.cpp index 9d7846d5..2293143f 100644 --- a/kopete/protocols/gadu/gaduaccount.cpp +++ b/kopete/protocols/gadu/gaduaccount.cpp @@ -46,13 +46,13 @@ #include <ktempfile.h> #include <kio/netaccess.h> -#include <qapplication.h> -#include <qdialog.h> -#include <qtimer.h> -#include <qtextcodec.h> -#include <qptrlist.h> -#include <qtextstream.h> -#include <qhostaddress.h> +#include <tqapplication.h> +#include <tqdialog.h> +#include <tqtimer.h> +#include <tqtextcodec.h> +#include <tqptrlist.h> +#include <tqtextstream.h> +#include <tqhostaddress.h> #include <netinet/in.h> @@ -64,9 +64,9 @@ public: GaduSession* session_; GaduDCC* gaduDcc_; - QTimer* pingTimer_; + TQTimer* pingTimer_; - QTextCodec* textcodec_; + TQTextCodec* textcodec_; KFileDialog* saveListDialog; KFileDialog* loadListDialog; @@ -85,12 +85,12 @@ public: bool forFriends; bool ignoreAnons; - QTimer* exportTimer_; + TQTimer* exportTimer_; bool exportUserlist; KConfigGroup* config; Kopete::OnlineStatus status; - QValueList<unsigned int> servers; + TQValueList<unsigned int> servers; KGaduLoginParams loginInfo; }; @@ -114,10 +114,10 @@ static const char* const servers_ip[] = { #define NUM_SERVERS (sizeof(servers_ip)/sizeof(char*)) - GaduAccount::GaduAccount( Kopete::Protocol* parent, const QString& accountID,const char* name ) + GaduAccount::GaduAccount( Kopete::Protocol* parent, const TQString& accountID,const char* name ) : Kopete::PasswordedAccount( parent, accountID, 0, name ) { - QHostAddress ip; + TQHostAddress ip; p = new GaduAccountPrivate; p->pingTimer_ = NULL; @@ -125,7 +125,7 @@ static const char* const servers_ip[] = { p->loadListDialog = NULL; p->forFriends = false; - p->textcodec_ = QTextCodec::codecForName( "CP1250" ); + p->textcodec_ = TQTextCodec::codecForName( "CP1250" ); p->session_ = new GaduSession( this, "GaduSession" ); KGlobal::config()->setGroup( "Gadu" ); @@ -133,10 +133,10 @@ static const char* const servers_ip[] = { setMyself( new GaduContact( accountId().toInt(), accountId(), this, Kopete::ContactList::self()->myself() ) ); p->status = GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ); - p->lastDescription = QString::null; + p->lastDescription = TQString::null; for ( unsigned int i = 0; i < NUM_SERVERS ; i++ ) { - ip.setAddress( QString( servers_ip[i] ) ); + ip.setAddress( TQString( servers_ip[i] ) ); p->servers.append( htonl( ip.toIPv4Address() ) ); kdDebug( 14100 ) << "adding IP: " << p->servers[ i ] << " to cache" << endl; } @@ -151,8 +151,8 @@ static const char* const servers_ip[] = { p->loginInfo.client_port = 0; p->loginInfo.client_addr = 0; - p->pingTimer_ = new QTimer( this ); - p->exportTimer_ = new QTimer( this ); + p->pingTimer_ = new TQTimer( this ); + p->exportTimer_ = new TQTimer( this ); p->exportUserlist = false; p->gaduDcc_ = NULL; @@ -165,13 +165,13 @@ static const char* const servers_ip[] = { initConnections(); initActions(); - QString nick = p->config->readEntry( QString::fromAscii( "nickName" ) ); + TQString nick = p->config->readEntry( TQString::fromAscii( "nickName" ) ); if ( !nick.isNull() ) { myself()->setProperty( Kopete::Global::Properties::self()->nickName(), nick ); } else { myself()->setProperty( Kopete::Global::Properties::self()->nickName(), accountId() ); - p->config->writeEntry( QString::fromAscii( "nickName" ), accountId() ); + p->config->writeEntry( TQString::fromAscii( "nickName" ), accountId() ); } } @@ -184,15 +184,15 @@ void GaduAccount::initActions() { p->searchAction = new KAction( i18n( "&Search for Friends" ), "", 0, - this, SLOT( slotSearch() ), this, "actionSearch" ); + this, TQT_SLOT( slotSearch() ), this, "actionSearch" ); p->listputAction = new KAction( i18n( "Export Contacts to Server" ), "", 0, - this, SLOT( slotExportContactsList() ), this, "actionListput" ); + this, TQT_SLOT( slotExportContactsList() ), this, "actionListput" ); p->listToFileAction = new KAction( i18n( "Export Contacts to File..." ), "", 0, - this, SLOT( slotExportContactsListToFile() ), this, "actionListputFile" ); + this, TQT_SLOT( slotExportContactsListToFile() ), this, "actionListputFile" ); p->listFromFileAction = new KAction( i18n( "Import Contacts From File..." ), "", 0, - this, SLOT( slotImportContactsFromFile() ), this, "actionListgetFile" ); + this, TQT_SLOT( slotImportContactsFromFile() ), this, "actionListgetFile" ); p->friendsModeAction = new KToggleAction( i18n( "Only for Friends" ), "", 0, - this, SLOT( slotFriendsMode() ), this, + this, TQT_SLOT( slotFriendsMode() ), this, "actionFriendsMode" ); static_cast<KToggleAction*>(p->friendsModeAction)->setChecked( p->forFriends ); @@ -201,38 +201,38 @@ GaduAccount::initActions() void GaduAccount::initConnections() { - QObject::connect( p->session_, SIGNAL( error( const QString&, const QString& ) ), - SLOT( error( const QString&, const QString& ) ) ); - QObject::connect( p->session_, SIGNAL( messageReceived( KGaduMessage* ) ), - SLOT( messageReceived( KGaduMessage* ) ) ); - QObject::connect( p->session_, SIGNAL( contactStatusChanged( KGaduNotify* ) ), - SLOT( contactStatusChanged( KGaduNotify* ) ) ); - QObject::connect( p->session_, SIGNAL( connectionFailed( gg_failure_t )), - SLOT( connectionFailed( gg_failure_t ) ) ); - QObject::connect( p->session_, SIGNAL( connectionSucceed( ) ), - SLOT( connectionSucceed( ) ) ); - QObject::connect( p->session_, SIGNAL( disconnect( Kopete::Account::DisconnectReason ) ), - SLOT( slotSessionDisconnect( Kopete::Account::DisconnectReason ) ) ); - QObject::connect( p->session_, SIGNAL( ackReceived( unsigned int ) ), - SLOT( ackReceived( unsigned int ) ) ); - QObject::connect( p->session_, SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ), - SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) ); - QObject::connect( p->session_, SIGNAL( userListExported() ), - SLOT( userListExportDone() ) ); - QObject::connect( p->session_, SIGNAL( userListRecieved( const QString& ) ), - SLOT( userlist( const QString& ) ) ); - QObject::connect( p->session_, SIGNAL( incomingCtcp( unsigned int ) ), - SLOT( slotIncomingDcc( unsigned int ) ) ); - - QObject::connect( p->pingTimer_, SIGNAL( timeout() ), - SLOT( pingServer() ) ); - - QObject::connect( p->exportTimer_, SIGNAL( timeout() ), - SLOT( slotUserlistSynch() ) ); + TQObject::connect( p->session_, TQT_SIGNAL( error( const TQString&, const TQString& ) ), + TQT_SLOT( error( const TQString&, const TQString& ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( messageReceived( KGaduMessage* ) ), + TQT_SLOT( messageReceived( KGaduMessage* ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( contactStatusChanged( KGaduNotify* ) ), + TQT_SLOT( contactStatusChanged( KGaduNotify* ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( connectionFailed( gg_failure_t )), + TQT_SLOT( connectionFailed( gg_failure_t ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( connectionSucceed( ) ), + TQT_SLOT( connectionSucceed( ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( disconnect( Kopete::Account::DisconnectReason ) ), + TQT_SLOT( slotSessionDisconnect( Kopete::Account::DisconnectReason ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( ackReceived( unsigned int ) ), + TQT_SLOT( ackReceived( unsigned int ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ), + TQT_SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( userListExported() ), + TQT_SLOT( userListExportDone() ) ); + TQObject::connect( p->session_, TQT_SIGNAL( userListRecieved( const TQString& ) ), + TQT_SLOT( userlist( const TQString& ) ) ); + TQObject::connect( p->session_, TQT_SIGNAL( incomingCtcp( unsigned int ) ), + TQT_SLOT( slotIncomingDcc( unsigned int ) ) ); + + TQObject::connect( p->pingTimer_, TQT_SIGNAL( timeout() ), + TQT_SLOT( pingServer() ) ); + + TQObject::connect( p->exportTimer_, TQT_SIGNAL( timeout() ), + TQT_SLOT( slotUserlistSynch() ) ); } void -GaduAccount::setAway( bool isAway, const QString& awayMessage ) +GaduAccount::setAway( bool isAway, const TQString& awayMessage ) { unsigned int currentStatus; @@ -288,22 +288,22 @@ GaduAccount::actionMenu() } p->actionMenu_->insert( new KAction( i18n( "Go O&nline" ), GaduProtocol::protocol()->convertStatus( GG_STATUS_AVAIL ).iconFor( this ), - 0, this, SLOT( slotGoOnline() ), this, "actionGaduConnect" ) ); + 0, this, TQT_SLOT( slotGoOnline() ), this, "actionGaduConnect" ) ); p->actionMenu_->insert( new KAction( i18n( "Set &Busy" ), GaduProtocol::protocol()->convertStatus( GG_STATUS_BUSY ).iconFor( this ), - 0, this, SLOT( slotGoBusy() ), this, "actionGaduConnect" ) ); + 0, this, TQT_SLOT( slotGoBusy() ), this, "actionGaduConnect" ) ); p->actionMenu_->insert( new KAction( i18n( "Set &Invisible" ), GaduProtocol::protocol()->convertStatus( GG_STATUS_INVISIBLE ).iconFor( this ), - 0, this, SLOT( slotGoInvisible() ), this, "actionGaduConnect" ) ); + 0, this, TQT_SLOT( slotGoInvisible() ), this, "actionGaduConnect" ) ); p->actionMenu_->insert( new KAction( i18n( "Go &Offline" ), GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ).iconFor( this ), - 0, this, SLOT( slotGoOffline() ), this, "actionGaduConnect" ) ); + 0, this, TQT_SLOT( slotGoOffline() ), this, "actionGaduConnect" ) ); p->actionMenu_->insert( new KAction( i18n( "Set &Description..." ), "info", - 0, this, SLOT( slotDescription() ), this, "actionGaduDescription" ) ); + 0, this, TQT_SLOT( slotDescription() ), this, "actionGaduDescription" ) ); p->actionMenu_->insert( p->friendsModeAction ); @@ -324,7 +324,7 @@ GaduAccount::actionMenu() } void -GaduAccount::connectWithPassword(const QString& password) +GaduAccount::connectWithPassword(const TQString& password) { if (password.isEmpty()) { return; @@ -350,7 +350,7 @@ GaduAccount::disconnect( DisconnectReason reason ) } void -GaduAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason ) +GaduAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason ) { kdDebug(14100) << k_funcinfo << "Called" << endl; changeStatus( status, reason); @@ -375,7 +375,7 @@ GaduAccount::userlistChanged() } bool -GaduAccount::createContact( const QString& contactId, Kopete::MetaContact* parentContact ) +GaduAccount::createContact( const TQString& contactId, Kopete::MetaContact* parentContact ) { kdDebug(14100) << "createContact " << contactId << endl; @@ -390,7 +390,7 @@ GaduAccount::createContact( const QString& contactId, Kopete::MetaContact* paren } void -GaduAccount::changeStatus( const Kopete::OnlineStatus& status, const QString& descr ) +GaduAccount::changeStatus( const Kopete::OnlineStatus& status, const TQString& descr ) { unsigned int ns; @@ -477,7 +477,7 @@ GaduAccount::changeStatus( const Kopete::OnlineStatus& status, const QString& de } void -GaduAccount::slotLogin( int status, const QString& dscr ) +GaduAccount::slotLogin( int status, const TQString& dscr ) { p->lastDescription = dscr; @@ -581,7 +581,7 @@ GaduAccount::sendMessage( uin_t recipient, const Kopete::Message& msg, int msgCl } void -GaduAccount::error( const QString& title, const QString& message ) +GaduAccount::error( const TQString& title, const TQString& message ) { KMessageBox::error( Kopete::UI::Global::mainWidget(), title, message ); } @@ -590,7 +590,7 @@ void GaduAccount::messageReceived( KGaduMessage* gaduMessage ) { GaduContact* contact = 0; - QPtrList<Kopete::Contact> contactsListTmp; + TQPtrList<Kopete::Contact> contactsListTmp; // FIXME:check for ignored users list @@ -600,7 +600,7 @@ GaduAccount::messageReceived( KGaduMessage* gaduMessage ) return; } - contact = static_cast<GaduContact*> ( contacts()[ QString::number( gaduMessage->sender_id ) ] ); + contact = static_cast<GaduContact*> ( contacts()[ TQString::number( gaduMessage->sender_id ) ] ); if ( !contact ) { if ( p->ignoreAnons == true ) { @@ -610,7 +610,7 @@ GaduAccount::messageReceived( KGaduMessage* gaduMessage ) Kopete::MetaContact* metaContact = new Kopete::MetaContact (); metaContact->setTemporary ( true ); contact = new GaduContact( gaduMessage->sender_id, - QString::number( gaduMessage->sender_id ), this, metaContact ); + TQString::number( gaduMessage->sender_id ), this, metaContact ); Kopete::ContactList::self ()->addMetaContact( metaContact ); addNotify( gaduMessage->sender_id ); } @@ -625,7 +625,7 @@ GaduAccount::ackReceived( unsigned int recipient ) { GaduContact* contact; - contact = static_cast<GaduContact*> ( contacts()[ QString::number( recipient ) ] ); + contact = static_cast<GaduContact*> ( contacts()[ TQString::number( recipient ) ] ); if ( contact ) { kdDebug(14100) << "####" << "Received an ACK from " << contact->uin() << endl; contact->messageAck(); @@ -642,7 +642,7 @@ GaduAccount::contactStatusChanged( KGaduNotify* gaduNotify ) GaduContact* contact; - contact = static_cast<GaduContact*>( contacts()[ QString::number( gaduNotify->contact_id ) ] ); + contact = static_cast<GaduContact*>( contacts()[ TQString::number( gaduNotify->contact_id ) ] ); if( !contact ) { kdDebug(14100) << "Notify not in the list " << gaduNotify->contact_id << endl; return; @@ -668,7 +668,7 @@ void GaduAccount::connectionFailed( gg_failure_t failure ) { bool tryReconnect = false; - QString pass; + TQString pass; switch (failure) { @@ -682,7 +682,7 @@ GaduAccount::connectionFailed( gg_failure_t failure ) default: if ( p->connectWithSSL ) { if ( useTls() != TLS_only ) { - slotCommandDone( QString::null, i18n( "connection using SSL was not possible, retrying without." ) ); + slotCommandDone( TQString::null, i18n( "connection using SSL was not possible, retrying without." ) ); kdDebug( 14100 ) << "try without tls now" << endl; p->connectWithSSL = false; tryReconnect = true; @@ -753,7 +753,7 @@ GaduAccount::slotIncomingDcc( unsigned int uin ) return; } - contact = static_cast<GaduContact*>( contacts()[ QString::number( uin ) ] ); + contact = static_cast<GaduContact*>( contacts()[ TQString::number( uin ) ] ); if ( !contact ) { kdDebug(14100) << "attempt to make dcc connection from unknown uin " << uin << endl; @@ -798,7 +798,7 @@ GaduAccount::startNotify() return; } - QDictIterator<Kopete::Contact> kopeteContactsList( contacts() ); + TQDictIterator<Kopete::Contact> kopeteContactsList( contacts() ); uin_t* userlist = 0; userlist = new uin_t[ contacts().count() ]; @@ -832,13 +832,13 @@ GaduAccount::slotSessionDisconnect( Kopete::Account::DisconnectReason reason ) } void -GaduAccount::userlist( const QString& contactsListString ) +GaduAccount::userlist( const TQString& contactsListString ) { kdDebug(14100)<<"### Got userlist - gadu account"<<endl; GaduContactsList contactsList( contactsListString ); - QString contactName; - QStringList groups; + TQString contactName; + TQStringList groups; GaduContact* contact; Kopete::MetaContact* metaContact; unsigned int i; @@ -880,8 +880,8 @@ GaduAccount::userlist( const QString& contactsListString ) metaContact = contact->metaContact(); metaContact->removeFromGroup( Kopete::Group::topLevel() ); // put him in all desired groups: - groups = QStringList::split( ",", contactsList[i].group ); - for ( QStringList::Iterator groupsIterator = groups.begin(); groupsIterator != groups.end(); ++groupsIterator ) { + groups = TQStringList::split( ",", contactsList[i].group ); + for ( TQStringList::Iterator groupsIterator = groups.begin(); groupsIterator != groups.end(); ++groupsIterator ) { metaContact->addToGroup( Kopete::ContactList::self ()->findGroup ( *groupsIterator) ); } } @@ -894,7 +894,7 @@ GaduAccount::userlist( const QString& contactsListString ) void GaduAccount::userListExportDone() { - slotCommandDone( QString::null, i18n( "Contacts exported to the server.") ); + slotCommandDone( TQString::null, i18n( "Contacts exported to the server.") ); } void @@ -922,21 +922,21 @@ GaduAccount::slotExportContactsListToFile() return; } - p->saveListDialog = new KFileDialog( "::kopete-gadu" + accountId(), QString::null, + p->saveListDialog = new KFileDialog( "::kopete-gadu" + accountId(), TQString::null, Kopete::UI::Global::mainWidget(), "gadu-list-save", false ); p->saveListDialog->setCaption( i18n("Save Contacts List for Account %1 As").arg( myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString() ) ); - if ( p->saveListDialog->exec() == QDialog::Accepted ) { - QCString list = p->textcodec_->fromUnicode( userlist()->asString() ); + if ( p->saveListDialog->exec() == TQDialog::Accepted ) { + TQCString list = p->textcodec_->fromUnicode( userlist()->asString() ); if ( tempFile.status() ) { // say cheese, can't create file..... error( i18n( "Unable to create temporary file." ), i18n( "Save Contacts List Failed" ) ); } else { - QTextStream* tempStream = tempFile.textStream(); + TQTextStream* tempStream = tempFile.textStream(); (*tempStream) << list.data(); tempFile.close(); @@ -960,25 +960,25 @@ void GaduAccount::slotImportContactsFromFile() { KURL url; - QCString list; - QString oname; + TQCString list; + TQString oname; if ( p->loadListDialog ) { kdDebug( 14100 ) << "load contacts from file: alread waiting for input " << endl ; return; } - p->loadListDialog = new KFileDialog( "::kopete-gadu" + accountId(), QString::null, + p->loadListDialog = new KFileDialog( "::kopete-gadu" + accountId(), TQString::null, Kopete::UI::Global::mainWidget(), "gadu-list-load", true ); p->loadListDialog->setCaption( i18n("Load Contacts List for Account %1 As").arg( myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString() ) ); - if ( p->loadListDialog->exec() == QDialog::Accepted ) { + if ( p->loadListDialog->exec() == TQDialog::Accepted ) { url = p->loadListDialog->selectedURL(); kdDebug(14100) << "a:" << url << "\nb:" << oname << endl; if ( KIO::NetAccess::download( url, oname, Kopete::UI::Global::mainWidget() ) ) { - QFile tempFile( oname ); + TQFile tempFile( oname ); if ( tempFile.open( IO_ReadOnly ) ) { list = tempFile.readAll(); tempFile.close(); @@ -1034,7 +1034,7 @@ GaduAccount::userlist() return contactsList; } - QDictIterator<Kopete::Contact> contactsIterator( contacts() ); + TQDictIterator<Kopete::Contact> contactsIterator( contacts() ); for( i=0 ; contactsIterator.current() ; ++contactsIterator ) { contact = static_cast<GaduContact*>( *contactsIterator ); @@ -1058,7 +1058,7 @@ GaduAccount::slotChangePassword() } void -GaduAccount::slotCommandDone( const QString& /*title*/, const QString& what ) +GaduAccount::slotCommandDone( const TQString& /*title*/, const TQString& what ) { //FIXME: any chance to have my own title in event popup ? KNotifyClient::userEvent( 0, what, @@ -1066,7 +1066,7 @@ GaduAccount::slotCommandDone( const QString& /*title*/, const QString& what ) } void -GaduAccount::slotCommandError(const QString& title, const QString& what ) +GaduAccount::slotCommandError(const TQString& title, const TQString& what ) { error( title, what ); } @@ -1076,7 +1076,7 @@ GaduAccount::slotDescription() { GaduAway* away = new GaduAway( this ); - if( away->exec() == QDialog::Accepted ) { + if( away->exec() == TQDialog::Accepted ) { changeStatus( GaduProtocol::protocol()->convertStatus( away->status() ), away->awayText() ); } @@ -1102,7 +1102,7 @@ GaduAccount::slotSearchResult( const SearchResult& result, unsigned int seq ) } void -GaduAccount::sendFile( GaduContact* peer, QString& filePath ) +GaduAccount::sendFile( GaduContact* peer, TQString& filePath ) { GaduDCCTransaction* gtran = new GaduDCCTransaction( p->gaduDcc_ ); gtran->setupOutgoing( peer, filePath ); @@ -1120,9 +1120,9 @@ GaduAccount::dccRequest( GaduContact* peer ) bool GaduAccount::dccEnabled() { - QString s = p->config->readEntry( QString::fromAscii( "useDcc" ) ); + TQString s = p->config->readEntry( TQString::fromAscii( "useDcc" ) ); kdDebug( 14100 ) << "dccEnabled: "<< s << endl; - if ( s == QString::fromAscii( "enabled" ) ) { + if ( s == TQString::fromAscii( "enabled" ) ) { return true; } return false; @@ -1131,18 +1131,18 @@ GaduAccount::dccEnabled() bool GaduAccount::setDcc( bool d ) { - QString s; + TQString s; bool f = true; if ( d == false ) { dccOff(); - s = QString::fromAscii( "disabled" ); + s = TQString::fromAscii( "disabled" ); } else { - s = QString::fromAscii( "enabled" ); + s = TQString::fromAscii( "enabled" ); } - p->config->writeEntry( QString::fromAscii( "useDcc" ), s ); + p->config->writeEntry( TQString::fromAscii( "useDcc" ), s ); if ( p->session_->isConnected() && d ) { dccOn(); @@ -1156,18 +1156,18 @@ GaduAccount::setDcc( bool d ) void GaduAccount::saveFriendsMode( bool i ) { - p->config->writeEntry( QString::fromAscii( "forFriends" ), - i == true ? QString::fromAscii( "1" ) : QString::fromAscii( "0" ) ); + p->config->writeEntry( TQString::fromAscii( "forFriends" ), + i == true ? TQString::fromAscii( "1" ) : TQString::fromAscii( "0" ) ); } bool GaduAccount::loadFriendsMode() { - QString s; + TQString s; bool r; int n; - s = p->config->readEntry( QString::fromAscii( "forFriends" ) ); + s = p->config->readEntry( TQString::fromAscii( "forFriends" ) ); n = s.toInt( &r ); if ( n ) { @@ -1182,11 +1182,11 @@ GaduAccount::loadFriendsMode() bool GaduAccount::ignoreAnons() { - QString s; + TQString s; bool r; int n; - s = p->config->readEntry( QString::fromAscii( "ignoreAnons" ) ); + s = p->config->readEntry( TQString::fromAscii( "ignoreAnons" ) ); n = s.toInt( &r ); if ( n ) { @@ -1201,19 +1201,19 @@ void GaduAccount::setIgnoreAnons( bool i ) { p->ignoreAnons = i; - p->config->writeEntry( QString::fromAscii( "ignoreAnons" ), - i == true ? QString::fromAscii( "1" ) : QString::fromAscii( "0" ) ); + p->config->writeEntry( TQString::fromAscii( "ignoreAnons" ), + i == true ? TQString::fromAscii( "1" ) : TQString::fromAscii( "0" ) ); } GaduAccount::tlsConnection GaduAccount::useTls() { - QString s; + TQString s; bool c; unsigned int oldC; tlsConnection Tls; - s = p->config->readEntry( QString::fromAscii( "useEncryptedConnection" ) ); + s = p->config->readEntry( TQString::fromAscii( "useEncryptedConnection" ) ); oldC = s.toUInt( &c ); // we have old format if ( c ) { @@ -1221,7 +1221,7 @@ GaduAccount::useTls() oldC << " willl be converted to new string value" << endl; setUseTls( (tlsConnection) oldC ); // should be string now, unless there was an error reading - s = p->config->readEntry( QString::fromAscii( "useEncryptedConnection" ) ); + s = p->config->readEntry( TQString::fromAscii( "useEncryptedConnection" ) ); kdDebug( 14100 ) << "new useEncryptedConnection value : " << s << endl; } @@ -1239,7 +1239,7 @@ GaduAccount::useTls() void GaduAccount::setUseTls( tlsConnection ut ) { - QString s; + TQString s; switch( ut ) { case TLS_ifAvaliable: s = "TLS_ifAvaliable"; @@ -1255,7 +1255,7 @@ GaduAccount::setUseTls( tlsConnection ut ) break; } - p->config->writeEntry( QString::fromAscii( "useEncryptedConnection" ), s ); + p->config->writeEntry( TQString::fromAscii( "useEncryptedConnection" ), s ); } #include "gaduaccount.moc" diff --git a/kopete/protocols/gadu/gaduaccount.h b/kopete/protocols/gadu/gaduaccount.h index 22d68842..234f3514 100644 --- a/kopete/protocols/gadu/gaduaccount.h +++ b/kopete/protocols/gadu/gaduaccount.h @@ -32,10 +32,10 @@ #include <libgadu.h> -#include <qhostaddress.h> -#include <qmap.h> -#include <qstring.h> -#include <qptrlist.h> +#include <tqhostaddress.h> +#include <tqmap.h> +#include <tqstring.h> +#include <tqptrlist.h> #include <kaction.h> #include <kfiledialog.h> @@ -56,13 +56,13 @@ class GaduAccount : public Kopete::PasswordedAccount Q_OBJECT public: - GaduAccount( Kopete::Protocol*, const QString& accountID, const char* name = 0L ); + GaduAccount( Kopete::Protocol*, const TQString& accountID, const char* name = 0L ); ~GaduAccount(); //{ - void setAway( bool isAway, const QString& awayMessage = QString::null ); + void setAway( bool isAway, const TQString& awayMessage = TQString::null ); KActionMenu* actionMenu(); void dccRequest( GaduContact* ); - void sendFile( GaduContact* , QString& ); + void sendFile( GaduContact* , TQString& ); //} enum tlsConnection{ TLS_ifAvaliable = 0, TLS_only, TLS_no }; unsigned int getPersonalInformation(); @@ -70,14 +70,14 @@ public: public slots: //{ - void connectWithPassword(const QString &password); + void connectWithPassword(const TQString &password); void disconnect( DisconnectReason ); void disconnect(); - void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null); + void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null); //} - void changeStatus( const Kopete::OnlineStatus& status, const QString& descr = QString::null ); - void slotLogin( int status = GG_STATUS_AVAIL, const QString& dscr = QString::null ); + void changeStatus( const Kopete::OnlineStatus& status, const TQString& descr = TQString::null ); + void slotLogin( int status = GG_STATUS_AVAIL, const TQString& dscr = TQString::null ); void slotLogoff(); void slotGoOnline(); void slotGoOffline(); @@ -94,7 +94,7 @@ public slots: void sendMessage( uin_t recipient, const Kopete::Message& msg, int msgClass = GG_CLASS_CHAT ); - void error( const QString& title, const QString& message ); + void error( const TQString& title, const TQString& message ); void pong(); void pingServer(); @@ -126,7 +126,7 @@ signals: protected: //{ - bool createContact( const QString& contactId, + bool createContact( const TQString& contactId, Kopete::MetaContact* parentContact ); //} @@ -143,7 +143,7 @@ private slots: void slotImportContactsFromFile(); void slotFriendsMode(); - void userlist( const QString& contacts ); + void userlist( const TQString& contacts ); GaduContactsList* userlist(); void slotUserlistSynch(); @@ -152,8 +152,8 @@ private slots: void slotChangePassword(); - void slotCommandDone( const QString&, const QString& ); - void slotCommandError( const QString&, const QString& ); + void slotCommandDone( const TQString&, const TQString& ); + void slotCommandError( const TQString&, const TQString& ); void slotSearchResult( const SearchResult& result, unsigned int seq ); void userListExportDone(); diff --git a/kopete/protocols/gadu/gaduaddcontactpage.cpp b/kopete/protocols/gadu/gaduaddcontactpage.cpp index 2b914bab..89645afd 100644 --- a/kopete/protocols/gadu/gaduaddcontactpage.cpp +++ b/kopete/protocols/gadu/gaduaddcontactpage.cpp @@ -34,22 +34,22 @@ #include <kopetecontactlist.h> #include <kopetegroup.h> -#include <qwidget.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qlistview.h> -#include <qptrlist.h> -#include <qcombobox.h> +#include <tqwidget.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqlistview.h> +#include <tqptrlist.h> +#include <tqcombobox.h> #include <krestrictedline.h> -GaduAddContactPage::GaduAddContactPage( GaduAccount* owner, QWidget* parent, const char* name ) +GaduAddContactPage::GaduAddContactPage( GaduAccount* owner, TQWidget* parent, const char* name ) : AddContactPage( parent, name ) { account_ = owner; - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); addUI_ = new GaduAddUI( this ); - connect( addUI_->addEdit_, SIGNAL( textChanged( const QString & ) ), SLOT( slotUinChanged( const QString & ) ) ); + connect( addUI_->addEdit_, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotUinChanged( const TQString & ) ) ); addUI_->addEdit_->setValidChars( "1234567890" ); addUI_->addEdit_->setText( "" ); addUI_->groups->setDisabled( TRUE ); @@ -69,23 +69,23 @@ GaduAddContactPage::fillGroups() { /* Kopete::Group *g; - QPtrList<Kopete::Group> gl = Kopete::ContactList::self()->groups(); + TQPtrList<Kopete::Group> gl = Kopete::ContactList::self()->groups(); for( g = gl.first(); g; g = gl.next() ) { - QCheckListItem* item = new QCheckListItem( addUI_->groups, g->displayName(), QCheckListItem::CheckBox ); + TQCheckListItem* item = new TQCheckListItem( addUI_->groups, g->displayName(), TQCheckListItem::CheckBox ); kdDebug(14100) << g->displayName() << " " << g->groupId() << endl; } */ } void -GaduAddContactPage::showEvent( QShowEvent* e ) +GaduAddContactPage::showEvent( TQShowEvent* e ) { - slotUinChanged( QString::null ); + slotUinChanged( TQString::null ); AddContactPage::showEvent( e ); } void -GaduAddContactPage::slotUinChanged( const QString & ) +GaduAddContactPage::slotUinChanged( const TQString & ) { emit dataValid( this, validateData() ); } @@ -108,8 +108,8 @@ bool GaduAddContactPage::apply( Kopete::Account* a , Kopete::MetaContact* mc ) { if ( validateData() ) { - QString userid = addUI_->addEdit_->text().stripWhiteSpace(); - QString name = addUI_->nickEdit_->text().stripWhiteSpace(); + TQString userid = addUI_->addEdit_->text().stripWhiteSpace(); + TQString name = addUI_->nickEdit_->text().stripWhiteSpace(); if ( a != account_ ) { kdDebug(14100) << "Problem because accounts differ: " << a->accountId() << " , " << account_->accountId() << endl; diff --git a/kopete/protocols/gadu/gaduaddcontactpage.h b/kopete/protocols/gadu/gaduaddcontactpage.h index e922bde7..8ba36bc8 100644 --- a/kopete/protocols/gadu/gaduaddcontactpage.h +++ b/kopete/protocols/gadu/gaduaddcontactpage.h @@ -39,23 +39,23 @@ class GaduAddContactPage : public AddContactPage Q_OBJECT public: - GaduAddContactPage( GaduAccount*, QWidget* parent = 0, const char* name = 0 ); + GaduAddContactPage( GaduAccount*, TQWidget* parent = 0, const char* name = 0 ); ~GaduAddContactPage(); virtual bool validateData(); virtual bool apply( Kopete::Account* , Kopete::MetaContact * ); protected: - void showEvent(QShowEvent *e); + void showEvent(TQShowEvent *e); public slots: - void slotUinChanged( const QString& ); + void slotUinChanged( const TQString& ); private: void fillGroups(); GaduAccount* account_; GaduAddUI* addUI_; - QLabel* noaddMsg1_; - QLabel* noaddMsg2_; + TQLabel* noaddMsg1_; + TQLabel* noaddMsg2_; }; #endif diff --git a/kopete/protocols/gadu/gaduaway.cpp b/kopete/protocols/gadu/gaduaway.cpp index 3fe42d62..dd86fa23 100644 --- a/kopete/protocols/gadu/gaduaway.cpp +++ b/kopete/protocols/gadu/gaduaway.cpp @@ -29,14 +29,14 @@ #include <ktextedit.h> #include <klocale.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qlineedit.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqlineedit.h> #include "gaduawayui.h" #include "gaduaway.h" -GaduAway::GaduAway( GaduAccount* account, QWidget* parent, const char* name ) +GaduAway::GaduAway( GaduAccount* account, TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "Away Dialog" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ), account_( account ) @@ -59,7 +59,7 @@ GaduAway::GaduAway( GaduAccount* account, QWidget* parent, const char* name ) } ui_->textEdit_->setText( account->myself()->property( "awayMessage" ).value().toString() ); - connect( this, SIGNAL( applyClicked() ), SLOT( slotApply() ) ); + connect( this, TQT_SIGNAL( applyClicked() ), TQT_SLOT( slotApply() ) ); } int diff --git a/kopete/protocols/gadu/gaduaway.h b/kopete/protocols/gadu/gaduaway.h index 525291d2..c7ec2f5f 100644 --- a/kopete/protocols/gadu/gaduaway.h +++ b/kopete/protocols/gadu/gaduaway.h @@ -24,7 +24,7 @@ #define GADUAWAY_H #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> class GaduAccount; class GaduAwayUI; @@ -34,9 +34,9 @@ class GaduAway : public KDialogBase Q_OBJECT public: - GaduAway( GaduAccount*, QWidget* parent = 0, const char* name = 0 ); + GaduAway( GaduAccount*, TQWidget* parent = 0, const char* name = 0 ); int status() const; - QString awayText() const; + TQString awayText() const; protected slots: void slotApply(); diff --git a/kopete/protocols/gadu/gaducommands.cpp b/kopete/protocols/gadu/gaducommands.cpp index 00a571ff..2be539c0 100644 --- a/kopete/protocols/gadu/gaducommands.cpp +++ b/kopete/protocols/gadu/gaducommands.cpp @@ -27,18 +27,18 @@ #include "gaducommands.h" #include "gadusession.h" -#include <qsocketnotifier.h> -#include <qregexp.h> -#include <qtextcodec.h> -#include <qimage.h> +#include <tqsocketnotifier.h> +#include <tqregexp.h> +#include <tqtextcodec.h> +#include <tqimage.h> #include <klocale.h> #include <kdebug.h> #include <errno.h> -GaduCommand::GaduCommand( QObject* parent, const char* name ) -: QObject( parent, name ), read_( 0 ), write_( 0 ) +GaduCommand::GaduCommand( TQObject* parent, const char* name ) +: TQObject( parent, name ), read_( 0 ), write_( 0 ) { } @@ -57,13 +57,13 @@ GaduCommand::done() const void GaduCommand::checkSocket( int fd, int checkWhat ) { - read_ = new QSocketNotifier( fd, QSocketNotifier::Read, this ); + read_ = new TQSocketNotifier( fd, TQSocketNotifier::Read, this ); read_->setEnabled( false ); - QObject::connect( read_, SIGNAL( activated(int) ), SLOT( forwarder() ) ); + TQObject::connect( read_, TQT_SIGNAL( activated(int) ), TQT_SLOT( forwarder() ) ); - write_ = new QSocketNotifier( fd, QSocketNotifier::Write, this ); + write_ = new TQSocketNotifier( fd, TQSocketNotifier::Write, this ); write_->setEnabled( false ); - QObject::connect( write_, SIGNAL( activated(int) ), SLOT( forwarder() ) ); + TQObject::connect( write_, TQT_SIGNAL( activated(int) ), TQT_SLOT( forwarder() ) ); enableNotifiers( checkWhat ); } @@ -114,12 +114,12 @@ GaduCommand::forwarder() emit socketReady(); } -RegisterCommand::RegisterCommand( QObject* parent, const char* name ) +RegisterCommand::RegisterCommand( TQObject* parent, const char* name ) :GaduCommand( parent, name ), state( RegisterStateNoToken ), session_( 0 ), uin( 0 ) { } -RegisterCommand::RegisterCommand( const QString& email, const QString& password, QObject* parent, const char* name ) +RegisterCommand::RegisterCommand( const TQString& email, const TQString& password, TQObject* parent, const char* name ) :GaduCommand( parent, name ), state( RegisterStateNoToken ), email_( email ), password_( password ), session_( 0 ), uin( 0 ) { } @@ -148,14 +148,14 @@ RegisterCommand::requestToken() return; } - connect( this, SIGNAL( socketReady() ), SLOT( watcher() ) ); + connect( this, TQT_SIGNAL( socketReady() ), TQT_SLOT( watcher() ) ); checkSocket( session_->fd, session_->check ); return; } void -RegisterCommand::setUserinfo( const QString& email, const QString& password, const QString& token ) +RegisterCommand::setUserinfo( const TQString& email, const TQString& password, const TQString& token ) { email_ = email; password_ = password; @@ -184,7 +184,7 @@ RegisterCommand::execute() return; } state = RegisterStateWaitingForNumber; - connect( this, SIGNAL( socketReady() ), SLOT( watcher() ) ); + connect( this, TQT_SIGNAL( socketReady() ), TQT_SLOT( watcher() ) ); checkSocket( session_->fd, session_->check ); } @@ -225,7 +225,7 @@ void RegisterCommand::watcher() kdDebug( 14100 ) << "got Token!, ID: " << tokenId << endl; deleteNotifiers(); if ( pubDir->success ) { - QPixmap tokenImg; + TQPixmap tokenImg; tokenImg.loadFromData( (const unsigned char *)session_->body, session_->body_size ); state = RegisterStateGotToken; emit tokenRecieved( tokenImg, tokenId ); @@ -237,7 +237,7 @@ void RegisterCommand::watcher() } gg_token_free( session_ ); session_ = NULL; - disconnect( this, SLOT( watcher() ) ); + disconnect( this, TQT_SLOT( watcher() ) ); return; break; } @@ -283,7 +283,7 @@ void RegisterCommand::watcher() } gg_free_register( session_ ); session_ = NULL; - disconnect( this, SLOT( watcher() ) ); + disconnect( this, TQT_SLOT( watcher() ) ); deleteLater(); return; break; @@ -293,12 +293,12 @@ void RegisterCommand::watcher() } } -RemindPasswordCommand::RemindPasswordCommand( QObject* parent, const char* name ) +RemindPasswordCommand::RemindPasswordCommand( TQObject* parent, const char* name ) : GaduCommand( parent, name ), uin_( 0 ), session_( 0 ) { } -RemindPasswordCommand::RemindPasswordCommand( uin_t uin, QObject* parent, const char* name ) +RemindPasswordCommand::RemindPasswordCommand( uin_t uin, TQObject* parent, const char* name ) : GaduCommand( parent, name ), uin_( uin ), session_( 0 ) { } @@ -341,7 +341,7 @@ RemindPasswordCommand::watcher() if ( session_->state == GG_STATE_DONE ) { struct gg_pubdir* p = static_cast<struct gg_pubdir*>( session_->data ); - QString finished = (p->success) ? i18n( "Successfully" ) : i18n( "Unsuccessful. Please retry." ); + TQString finished = (p->success) ? i18n( "Successfully" ) : i18n( "Unsuccessful. Please retry." ); emit done( i18n( "Remind Password" ), i18n( "Remind password finished: " ) + finished ); gg_free_remind_passwd( session_ ); done_ = true; @@ -351,7 +351,7 @@ RemindPasswordCommand::watcher() enableNotifiers( session_->check ); } -ChangePasswordCommand::ChangePasswordCommand( QObject* parent, const char* name ) +ChangePasswordCommand::ChangePasswordCommand( TQObject* parent, const char* name ) : GaduCommand( parent, name ), session_( 0 ) { } @@ -361,7 +361,7 @@ ChangePasswordCommand::~ChangePasswordCommand() } void -ChangePasswordCommand::setInfo( uin_t uin, const QString& passwd, const QString& newpasswd, const QString& newemail ) +ChangePasswordCommand::setInfo( uin_t uin, const TQString& passwd, const TQString& newpasswd, const TQString& newemail ) { uin_ = uin; passwd_ = passwd; diff --git a/kopete/protocols/gadu/gaducommands.h b/kopete/protocols/gadu/gaducommands.h index 7253734e..2c56ba8a 100644 --- a/kopete/protocols/gadu/gaducommands.h +++ b/kopete/protocols/gadu/gaducommands.h @@ -29,7 +29,7 @@ #include <libgadu.h> -#include <qobject.h> +#include <tqobject.h> class QSocketNotifier; class QStringList; @@ -40,7 +40,7 @@ class GaduCommand : public QObject Q_OBJECT public: - GaduCommand( QObject* parent = 0, const char* name = 0 ); + GaduCommand( TQObject* parent = 0, const char* name = 0 ); virtual ~GaduCommand(); virtual void execute() = 0; @@ -49,10 +49,10 @@ public: signals: //e.g. emit done( i18n("Done"), i18n("Registration complete") ); - void done( const QString& title, const QString& what ); - void error( const QString& title, const QString& error ); + void done( const TQString& title, const TQString& what ); + void error( const TQString& title, const TQString& error ); void socketReady(); - void operationStatus( const QString ); + void operationStatus( const TQString ); protected: void checkSocket( int, int ); @@ -66,8 +66,8 @@ protected slots: void forwarder(); private: - QSocketNotifier* read_; - QSocketNotifier* write_; + TQSocketNotifier* read_; + TQSocketNotifier* write_; }; class RegisterCommand : public GaduCommand @@ -75,19 +75,19 @@ class RegisterCommand : public GaduCommand Q_OBJECT public: - RegisterCommand( QObject* parent = 0, const char* name = 0 ); - RegisterCommand( const QString& email, const QString& password , - QObject* parent = 0, const char* name = 0 ); + RegisterCommand( TQObject* parent = 0, const char* name = 0 ); + RegisterCommand( const TQString& email, const TQString& password , + TQObject* parent = 0, const char* name = 0 ); ~RegisterCommand(); - void setUserinfo( const QString& email, const QString& password, const QString& token ); + void setUserinfo( const TQString& email, const TQString& password, const TQString& token ); void execute(); unsigned int newUin(); void requestToken(); void cancel(); signals: - void tokenRecieved( QPixmap, QString ); + void tokenRecieved( TQPixmap, TQString ); protected slots: void watcher(); @@ -108,8 +108,8 @@ class RemindPasswordCommand : public GaduCommand Q_OBJECT public: - RemindPasswordCommand( uin_t uin, QObject* parent = 0, const char* name = 0 ); - RemindPasswordCommand( QObject* parent = 0, const char* name = 0 ); + RemindPasswordCommand( uin_t uin, TQObject* parent = 0, const char* name = 0 ); + RemindPasswordCommand( TQObject* parent = 0, const char* name = 0 ); ~RemindPasswordCommand(); void setUIN( uin_t ); @@ -128,11 +128,11 @@ class ChangePasswordCommand : public GaduCommand Q_OBJECT public: - ChangePasswordCommand( QObject* parent = 0, const char* name = 0 ); + ChangePasswordCommand( TQObject* parent = 0, const char* name = 0 ); ~ChangePasswordCommand(); - void setInfo( uin_t uin, const QString& passwd, const QString& newpasswd, - const QString& newemail ); + void setInfo( uin_t uin, const TQString& passwd, const TQString& newpasswd, + const TQString& newemail ); void execute(); protected slots: diff --git a/kopete/protocols/gadu/gaducontact.cpp b/kopete/protocols/gadu/gaducontact.cpp index 2cb4806f..dfbb93a4 100644 --- a/kopete/protocols/gadu/gaducontact.cpp +++ b/kopete/protocols/gadu/gaducontact.cpp @@ -44,8 +44,8 @@ using Kopete::UserInfoDialog; -GaduContact::GaduContact( uin_t uin, const QString& name, Kopete::Account* account, Kopete::MetaContact* parent ) -: Kopete::Contact( account, QString::number( uin ), parent ), uin_( uin ) +GaduContact::GaduContact( uin_t uin, const TQString& name, Kopete::Account* account, Kopete::MetaContact* parent ) +: Kopete::Contact( account, TQString::number( uin ), parent ), uin_( uin ) { msgManager_ = 0L; account_ = static_cast<GaduAccount*>( account ); @@ -78,7 +78,7 @@ GaduContact::identityId() const } void -GaduContact::setParentIdentity( const QString& id) +GaduContact::setParentIdentity( const TQString& id) { parentIdentity_ = id; } @@ -90,13 +90,13 @@ GaduContact::uin() const } void -GaduContact::sendFile( const KURL &sourceURL, const QString &/*fileName*/, uint /*fileSize*/ ) +GaduContact::sendFile( const KURL &sourceURL, const TQString &/*fileName*/, uint /*fileSize*/ ) { - QString filePath; + TQString filePath; //If the file location is null, then get it from a file open dialog if( !sourceURL.isValid() ) - filePath = KFileDialog::getOpenFileName(QString::null, "*", 0l , i18n("Kopete File Transfer")); + filePath = KFileDialog::getOpenFileName(TQString::null, "*", 0l , i18n("Kopete File Transfer")); else filePath = sourceURL.path(-1); @@ -129,7 +129,7 @@ GaduContact::changedStatus( KGaduNotify* newstatus ) } -QHostAddress& +TQHostAddress& GaduContact::contactIp() { return remote_ip; @@ -146,9 +146,9 @@ GaduContact::manager( Kopete::Contact::CanCreateFlags canCreate ) { if ( !msgManager_ && canCreate ) { msgManager_ = Kopete::ChatSessionManager::self()->create( account_->myself(), thisContact_, GaduProtocol::protocol() ); - connect( msgManager_, SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession*) ), - this, SLOT( messageSend( Kopete::Message&, Kopete::ChatSession*) ) ); - connect( msgManager_, SIGNAL( destroyed() ), this, SLOT( slotChatSessionDestroyed() ) ); + connect( msgManager_, TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession*) ), + this, TQT_SLOT( messageSend( Kopete::Message&, Kopete::ChatSession*) ) ); + connect( msgManager_, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotChatSessionDestroyed() ) ); } kdDebug(14100) << "GaduContact::manager returning: " << msgManager_ << endl; @@ -164,8 +164,8 @@ GaduContact::slotChatSessionDestroyed() void GaduContact::initActions() { - actionSendMessage_ = KopeteStdAction::sendMessage( this, SLOT( execute() ), this, "actionMessage" ); - actionInfo_ = KopeteStdAction::contactInfo( this, SLOT( slotUserInfo() ), this, "actionInfo" ); + actionSendMessage_ = KopeteStdAction::sendMessage( this, TQT_SLOT( execute() ), this, "actionMessage" ); + actionInfo_ = KopeteStdAction::contactInfo( this, TQT_SLOT( slotUserInfo() ), this, "actionInfo" ); } void @@ -190,19 +190,19 @@ GaduContact::isReachable() return account_->isConnected(); } -QPtrList<KAction>* +TQPtrList<KAction>* GaduContact::customContextMenuActions() { - QPtrList<KAction> *fakeCollection = new QPtrList<KAction>(); + TQPtrList<KAction> *fakeCollection = new TQPtrList<KAction>(); //show profile KAction* actionShowProfile = new KAction( i18n("Show Profile") , "info", 0, - this, SLOT( slotShowPublicProfile() ), + this, TQT_SLOT( slotShowPublicProfile() ), this, "actionShowPublicProfile" ); fakeCollection->append( actionShowProfile ); KAction* actionEditContact = new KAction( i18n("Edit...") , "edit", 0, - this, SLOT( slotEditContact() ), + this, TQT_SLOT( slotEditContact() ), this, "actionEditContact" ); fakeCollection->append( actionEditContact ); @@ -229,7 +229,7 @@ GaduContact::slotUserInfo() UserInfoDialog *dlg = new UserInfoDialog( i18n( "Gadu contact" ) ); dlg->setName( metaContact()->displayName() ); - dlg->setId( QString::number( uin_ ) ); + dlg->setId( TQString::number( uin_ ) ); dlg->setStatus( onlineStatus().description() ); dlg->setAwayMessage( description_ ); dlg->show(); @@ -250,7 +250,7 @@ GaduContact::deleteContact() } void -GaduContact::serialize( QMap<QString, QString>& serializedData, QMap<QString, QString>& ) +GaduContact::serialize( TQMap<TQString, TQString>& serializedData, TQMap<TQString, TQString>& ) { serializedData[ "email" ] = property( GaduProtocol::protocol()->propEmail ).value().toString(); serializedData[ "FirstName" ] = property( GaduProtocol::protocol()->propFirstName ).value().toString(); @@ -288,11 +288,11 @@ GaduContact::contactDetails() cl->phonenr = property( GaduProtocol::protocol()->propPhoneNr ).value().toString(); cl->ignored = ignored_; //( property( "ignored" ).value().toString() == "true" ); - cl->uin = QString::number( uin_ ); + cl->uin = TQString::number( uin_ ); cl->displayname = metaContact()->displayName(); cl->offlineTo = false; - cl->landline = QString(""); + cl->landline = TQString(""); groupList = metaContact()->groups(); @@ -318,7 +318,7 @@ GaduContact::contactDetails() QString GaduContact::findBestContactName( const GaduContactsList::ContactLine* cl ) { - QString name; + TQString name; if ( cl == NULL ) { return name; diff --git a/kopete/protocols/gadu/gaducontact.h b/kopete/protocols/gadu/gaducontact.h index 16278215..a96c1ded 100644 --- a/kopete/protocols/gadu/gaducontact.h +++ b/kopete/protocols/gadu/gaducontact.h @@ -23,8 +23,8 @@ #ifndef GADUCONTACT_H #define GADUCONTACT_H -#include <qpoint.h> -#include <qhostaddress.h> +#include <tqpoint.h> +#include <tqhostaddress.h> #include "gaducontactlist.h" @@ -47,12 +47,12 @@ class GaduContact : public Kopete::Contact Q_OBJECT public: - GaduContact( unsigned int, const QString&, Kopete::Account*, Kopete::MetaContact* ); + GaduContact( unsigned int, const TQString&, Kopete::Account*, Kopete::MetaContact* ); virtual bool isReachable(); - virtual void serialize( QMap<QString, QString>&, QMap<QString, QString>& ); - virtual QPtrList<KAction>* customContextMenuActions(); - virtual QString identityId() const; + virtual void serialize( TQMap<TQString, TQString>&, TQMap<TQString, TQString>& ); + virtual TQPtrList<KAction>* customContextMenuActions(); + virtual TQString identityId() const; GaduContactsList::ContactLine* contactDetails(); @@ -61,16 +61,16 @@ public: // uin is const for GaduContact, and displayname needs to be changed through metaContact bool setContactDetails( const GaduContactsList::ContactLine* ); - void setParentIdentity( const QString& ); + void setParentIdentity( const TQString& ); void setIgnored( bool ); bool ignored(); - static QString findBestContactName( const GaduContactsList::ContactLine* ); + static TQString findBestContactName( const GaduContactsList::ContactLine* ); void changedStatus( KGaduNotify* ); uin_t uin() const; - QHostAddress& contactIp(); + TQHostAddress& contactIp(); unsigned short contactPort(); public slots: @@ -82,7 +82,7 @@ public slots: void slotShowPublicProfile(); void slotEditContact(); virtual void sendFile( const KURL &sourceURL = KURL(), - const QString &fileName = QString::null, uint fileSize = 0L ); + const TQString &fileName = TQString::null, uint fileSize = 0L ); protected: @@ -102,10 +102,10 @@ private: KAction* actionInfo_; KAction* actionRemove_; - QPtrList<Kopete::Contact> thisContact_; + TQPtrList<Kopete::Contact> thisContact_; - QHostAddress remote_ip; + TQHostAddress remote_ip; unsigned int remote_port; unsigned int version; unsigned int image_size; diff --git a/kopete/protocols/gadu/gaducontactlist.cpp b/kopete/protocols/gadu/gaducontactlist.cpp index 6601800d..314e661f 100644 --- a/kopete/protocols/gadu/gaducontactlist.cpp +++ b/kopete/protocols/gadu/gaducontactlist.cpp @@ -22,7 +22,7 @@ #include "gaducontactlist.h" -#include "qstringlist.h" +#include "tqstringlist.h" #include "kdebug.h" GaduContactsList::GaduContactsList() @@ -33,11 +33,11 @@ GaduContactsList::~GaduContactsList() { } -GaduContactsList::GaduContactsList( QString sList ) +GaduContactsList::GaduContactsList( TQString sList ) { - QStringList::iterator stringIterator; - QStringList strList; - QString empty; + TQStringList::iterator stringIterator; + TQStringList strList; + TQString empty; ContactLine cl; bool email; @@ -49,17 +49,17 @@ GaduContactsList::GaduContactsList( QString sList ) return; } - QStringList ln = QStringList::split( QChar( '\n' ), sList, true ); - QStringList::iterator lni = ln.begin( ); + TQStringList ln = TQStringList::split( TQChar( '\n' ), sList, true ); + TQStringList::iterator lni = ln.begin( ); while( lni != ln.end() ) { - QString cline = (*lni); + TQString cline = (*lni); if ( cline.isNull() ) { break; } - strList = QStringList::split( QChar( ';' ), cline, true ); + strList = TQStringList::split( TQChar( ';' ), cline, true ); stringIterator = strList.begin(); @@ -78,7 +78,7 @@ GaduContactsList::GaduContactsList( QString sList ) cl.firstname = (*stringIterator); - if ( cl.firstname == QString( "i" ) ) { + if ( cl.firstname == TQString( "i" ) ) { kdDebug(14100) << cline << " ignored" << endl; cl.ignored = true; cl.uin = strList[6]; @@ -105,7 +105,7 @@ GaduContactsList::GaduContactsList( QString sList ) ++stringIterator; if ( stringIterator != strList.end() ) { - cl.offlineTo = (*++stringIterator) == QString("0") ? false : true; + cl.offlineTo = (*++stringIterator) == TQString("0") ? false : true; cl.landline = (*++stringIterator); } } @@ -133,17 +133,17 @@ GaduContactsList::addContact( ContactLine& cl ) void GaduContactsList::addContact( - QString& displayname, - QString& group, - QString& uin, - QString& firstname, - QString& surname, - QString& nickname, - QString& phonenr, - QString& email, + TQString& displayname, + TQString& group, + TQString& uin, + TQString& firstname, + TQString& surname, + TQString& nickname, + TQString& phonenr, + TQString& email, bool ignored, bool offlineTo, - QString& landline + TQString& landline ) { ContactLine cl; @@ -167,7 +167,7 @@ GaduContactsList::addContact( QString GaduContactsList::asString() { - QString contacts; + TQString contacts; for ( it = cList.begin(); it != cList.end(); ++it ) { if ( (*it).ignored ) { @@ -185,7 +185,7 @@ GaduContactsList::asString() (*it).uin + ";"+ (*it).email + ";;0;0;;" + - ((*it).offlineTo == true ? QString("1") : QString("0")) + ((*it).offlineTo == true ? TQString("1") : TQString("0")) + ";" + (*it).landline + ";\r\n"; diff --git a/kopete/protocols/gadu/gaducontactlist.h b/kopete/protocols/gadu/gaducontactlist.h index d4aa9e6e..389a8443 100644 --- a/kopete/protocols/gadu/gaducontactlist.h +++ b/kopete/protocols/gadu/gaducontactlist.h @@ -23,7 +23,7 @@ #ifndef GADUCONTACTLIST_H #define GADUCONTACTLIST_H -#include <qvaluelist.h> +#include <tqvaluelist.h> class QString; @@ -32,35 +32,35 @@ class GaduContactsList public: struct ContactLine { - QString displayname; - QString group; - QString uin; - QString firstname; - QString surname; - QString nickname; - QString phonenr; - QString email; + TQString displayname; + TQString group; + TQString uin; + TQString firstname; + TQString surname; + TQString nickname; + TQString phonenr; + TQString email; bool ignored; bool offlineTo; - QString landline; + TQString landline; }; GaduContactsList(); - GaduContactsList( QString ); + GaduContactsList( TQString ); ~GaduContactsList(); - QString asString(); + TQString asString(); void addContact( ContactLine &cl ); - void addContact( QString& displayname, QString& group, - QString& uin, QString& firstname, - QString& surname, QString& nickname, - QString& phonenr, QString& email, + void addContact( TQString& displayname, TQString& group, + TQString& uin, TQString& firstname, + TQString& surname, TQString& nickname, + TQString& phonenr, TQString& email, bool ignored, bool offlineTo, - QString& landline + TQString& landline ); unsigned int size(); const GaduContactsList::ContactLine& operator[]( unsigned int i ); private: - typedef QValueList<ContactLine> CList; + typedef TQValueList<ContactLine> CList; CList cList; CList::iterator it; }; diff --git a/kopete/protocols/gadu/gadudcc.cpp b/kopete/protocols/gadu/gadudcc.cpp index d81eaf67..4235d4e3 100644 --- a/kopete/protocols/gadu/gadudcc.cpp +++ b/kopete/protocols/gadu/gadudcc.cpp @@ -35,23 +35,23 @@ #include "libgadu.h" -#include <qsocketnotifier.h> -#include <qhostaddress.h> -#include <qmutex.h> -#include <qmap.h> -#include <qstring.h> +#include <tqsocketnotifier.h> +#include <tqhostaddress.h> +#include <tqmutex.h> +#include <tqmap.h> +#include <tqstring.h> volatile unsigned int GaduDCC::referenceCount = 0; GaduDCCServer* GaduDCC::dccServer = NULL; -static QMutex initmutex; +static TQMutex initmutex; -typedef QMap< unsigned int, GaduAccount* > gaduAccounts; +typedef TQMap< unsigned int, GaduAccount* > gaduAccounts; static gaduAccounts accounts; -GaduDCC::GaduDCC( QObject* parent, const char* name ) -:QObject( parent, name ) +GaduDCC::GaduDCC( TQObject* parent, const char* name ) +:TQObject( parent, name ) { } @@ -135,7 +135,7 @@ GaduDCC::registerAccount( GaduAccount* account ) dccServer = new GaduDCCServer(); } - connect( dccServer, SIGNAL( incoming( gg_dcc*, bool& ) ), SLOT( slotIncoming( gg_dcc*, bool& ) ) ); + connect( dccServer, TQT_SIGNAL( incoming( gg_dcc*, bool& ) ), TQT_SLOT( slotIncoming( gg_dcc*, bool& ) ) ); initmutex.unlock(); diff --git a/kopete/protocols/gadu/gadudcc.h b/kopete/protocols/gadu/gadudcc.h index 25ae27cf..05d5c992 100644 --- a/kopete/protocols/gadu/gadudcc.h +++ b/kopete/protocols/gadu/gadudcc.h @@ -23,7 +23,7 @@ #ifndef GADUDCC_H #define GADUDCC_H -#include <qobject.h> +#include <tqobject.h> class QSocketNotifier; class QHostAddress; @@ -33,10 +33,10 @@ class GaduDCCTransaction; class GaduAccount; class GaduDCCServer; -class GaduDCC: public QObject { +class GaduDCC: public TQObject { Q_OBJECT public: - GaduDCC( QObject* parent, const char* name = NULL ); + GaduDCC( TQObject* parent, const char* name = NULL ); ~GaduDCC(); bool unregisterAccount(); bool registerAccount( GaduAccount* ); @@ -45,7 +45,7 @@ public: void execute(); GaduAccount* account( unsigned int ); - QMap<unsigned int,QString> requests; + TQMap<unsigned int,TQString> requests; signals: void dccConnect( GaduDCCTransaction* dccTransaction ); diff --git a/kopete/protocols/gadu/gadudccserver.cpp b/kopete/protocols/gadu/gadudccserver.cpp index d3f37982..6e6c370b 100644 --- a/kopete/protocols/gadu/gadudccserver.cpp +++ b/kopete/protocols/gadu/gadudccserver.cpp @@ -32,12 +32,12 @@ #include "libgadu.h" #include "gaduaccount.h" -#include <qobject.h> -#include <qsocketnotifier.h> -#include <qhostaddress.h> +#include <tqobject.h> +#include <tqsocketnotifier.h> +#include <tqhostaddress.h> -GaduDCCServer::GaduDCCServer( QHostAddress* dccIp, unsigned int port ) -:QObject() +GaduDCCServer::GaduDCCServer( TQHostAddress* dccIp, unsigned int port ) +:TQObject() { kdDebug( 14100 ) << "dcc socket NULL, creating new liteining socket " << endl; @@ -115,15 +115,15 @@ GaduDCCServer::createNotifiers( bool connect ) return; } - read_ = new QSocketNotifier( dccSock->fd, QSocketNotifier::Read, this ); + read_ = new TQSocketNotifier( dccSock->fd, TQSocketNotifier::Read, this ); read_->setEnabled( false ); - write_ = new QSocketNotifier( dccSock->fd, QSocketNotifier::Write, this ); + write_ = new TQSocketNotifier( dccSock->fd, TQSocketNotifier::Write, this ); write_->setEnabled( false ); if ( connect ) { - QObject::connect( read_, SIGNAL( activated( int ) ), SLOT( watcher() ) ); - QObject::connect( write_, SIGNAL( activated( int ) ), SLOT( watcher() ) ); + TQObject::connect( read_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( watcher() ) ); + TQObject::connect( write_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( watcher() ) ); } } diff --git a/kopete/protocols/gadu/gadudccserver.h b/kopete/protocols/gadu/gadudccserver.h index df984650..7db791e5 100644 --- a/kopete/protocols/gadu/gadudccserver.h +++ b/kopete/protocols/gadu/gadudccserver.h @@ -23,8 +23,8 @@ #ifndef GADUDCCSERVER_H #define GADUDCCSERVER_H -#include <qobject.h> -#include <qhostaddress.h> +#include <tqobject.h> +#include <tqhostaddress.h> class QSocketNotifier; class QString; @@ -32,10 +32,10 @@ class gg_dcc; class GaduDCCTransaction; class GaduAccount; -class GaduDCCServer: public QObject { +class GaduDCCServer: public TQObject { Q_OBJECT public: - GaduDCCServer( QHostAddress* dccIp = NULL, unsigned int port = 1550 ); + GaduDCCServer( TQHostAddress* dccIp = NULL, unsigned int port = 1550 ); ~GaduDCCServer(); unsigned int listeingPort(); @@ -54,13 +54,13 @@ private: void createNotifiers( bool ); void closeDCC(); - QHostAddress config_dccip; - QHostAddress config_extip; + TQHostAddress config_dccip; + TQHostAddress config_extip; gg_dcc* dccSock; - QSocketNotifier* read_; - QSocketNotifier* write_; + TQSocketNotifier* read_; + TQSocketNotifier* write_; }; #endif diff --git a/kopete/protocols/gadu/gadudcctransaction.cpp b/kopete/protocols/gadu/gadudcctransaction.cpp index 92d9ffa8..7ec8d2ac 100644 --- a/kopete/protocols/gadu/gadudcctransaction.cpp +++ b/kopete/protocols/gadu/gadudcctransaction.cpp @@ -34,8 +34,8 @@ #include "kopetemetacontact.h" #include "kopeteuiglobal.h" -#include <qsocketnotifier.h> -#include <qfile.h> +#include <tqsocketnotifier.h> +#include <tqfile.h> #include "gadudcctransaction.h" #include "gaducontact.h" @@ -45,7 +45,7 @@ #include "libgadu.h" GaduDCCTransaction::GaduDCCTransaction( GaduDCC* parent, const char* name ) -:QObject( parent, name ), gaduDCC_( parent ) +:TQObject( parent, name ), gaduDCC_( parent ) { read_ = NULL; write_ = NULL; @@ -79,7 +79,7 @@ GaduDCCTransaction::peerUIN() } bool -GaduDCCTransaction::setupOutgoing( GaduContact* peerContact, QString& filePath ) +GaduDCCTransaction::setupOutgoing( GaduContact* peerContact, TQString& filePath ) { GaduContact* me; GaduAccount* metoo; @@ -90,7 +90,7 @@ GaduDCCTransaction::setupOutgoing( GaduContact* peerContact, QString& filePath ) me = static_cast<GaduContact*>( peerContact->account()->myself() ); - QString aaa = peerContact->contactIp().toString(); + TQString aaa = peerContact->contactIp().toString(); kdDebug( 14100 ) << "slotOutgoin for UIN: " << peerContact->uin() << " port " << peerContact->contactPort() << " ip " <<aaa<< endl; kdDebug( 14100 ) << "File path is " << filePath << endl; @@ -121,7 +121,7 @@ GaduDCCTransaction::setupIncoming( const unsigned int uin, GaduContact* peerCont return false; } - QString aaa = peerContact->contactIp().toString(); + TQString aaa = peerContact->contactIp().toString(); kdDebug( 14100 ) << "setupIncoming for UIN: " << uin << " port " << peerContact->contactPort() << " ip " <<aaa<< endl; peer = peerContact->uin(); @@ -144,10 +144,10 @@ GaduDCCTransaction::setupIncoming( gg_dcc* dccS ) peer = dccS->uin; - connect ( Kopete::TransferManager::transferManager(), SIGNAL( accepted( Kopete::Transfer *, const QString & ) ), - this, SLOT( slotIncomingTransferAccepted ( Kopete::Transfer *, const QString & ) ) ); - connect ( Kopete::TransferManager::transferManager(), SIGNAL( refused( const Kopete::FileTransferInfo & ) ), - this, SLOT( slotTransferRefused( const Kopete::FileTransferInfo & ) ) ); + connect ( Kopete::TransferManager::transferManager(), TQT_SIGNAL( accepted( Kopete::Transfer *, const TQString & ) ), + this, TQT_SLOT( slotIncomingTransferAccepted ( Kopete::Transfer *, const TQString & ) ) ); + connect ( Kopete::TransferManager::transferManager(), TQT_SIGNAL( refused( const Kopete::FileTransferInfo & ) ), + this, TQT_SLOT( slotTransferRefused( const Kopete::FileTransferInfo & ) ) ); incoming = true; createNotifiers( true ); @@ -189,15 +189,15 @@ GaduDCCTransaction::createNotifiers( bool connect ) return; } - read_ = new QSocketNotifier( dccSock_->fd, QSocketNotifier::Read, this ); + read_ = new TQSocketNotifier( dccSock_->fd, TQSocketNotifier::Read, this ); read_->setEnabled( false ); - write_ = new QSocketNotifier( dccSock_->fd, QSocketNotifier::Write, this ); + write_ = new TQSocketNotifier( dccSock_->fd, TQSocketNotifier::Write, this ); write_->setEnabled( false ); if ( connect ) { - QObject::connect( read_, SIGNAL( activated( int ) ), SLOT( watcher() ) ); - QObject::connect( write_, SIGNAL( activated( int ) ), SLOT( watcher() ) ); + TQObject::connect( read_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( watcher() ) ); + TQObject::connect( write_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( watcher() ) ); } } @@ -223,7 +223,7 @@ GaduDCCTransaction::disableNotifiers() } } void -GaduDCCTransaction::slotIncomingTransferAccepted ( Kopete::Transfer* transfer, const QString& fileName ) +GaduDCCTransaction::slotIncomingTransferAccepted ( Kopete::Transfer* transfer, const TQString& fileName ) { if ( (long)transfer->info().transferId () != transferId_ ) { @@ -280,7 +280,7 @@ GaduDCCTransaction::slotIncomingTransferAccepted ( Kopete::Transfer* transfer, c dccSock_->file_fd = localFile_.handle(); } - connect ( transfer, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotTransferResult() ) ); + connect ( transfer, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotTransferResult() ) ); // reenable notifiers enableNotifiers( dccSock_->check ); @@ -310,7 +310,7 @@ GaduDCCTransaction::askIncommingTransfer() { transferId_ = Kopete::TransferManager::transferManager()->askIncomingTransfer ( contact, - QString( (const char*)dccSock_->file_info.filename ), dccSock_->file_info.size ); + TQString( (const char*)dccSock_->file_info.filename ), dccSock_->file_info.size ); } @@ -345,10 +345,10 @@ GaduDCCTransaction::watcher() { } if ( !peer ) { - contact = static_cast<GaduContact*> (account->contacts()[ QString::number( dccSock_->peer_uin ) ]); + contact = static_cast<GaduContact*> (account->contacts()[ TQString::number( dccSock_->peer_uin ) ]); } else { - contact = static_cast<GaduContact*> (account->contacts()[ QString::number( peer ) ]); + contact = static_cast<GaduContact*> (account->contacts()[ TQString::number( peer ) ]); } if ( contact == NULL ) { @@ -385,7 +385,7 @@ GaduDCCTransaction::watcher() { break; case GG_EVENT_DCC_NEED_FILE_INFO: if (gaduDCC_->requests.contains(dccSock_->peer_uin)) { - QString filePath = gaduDCC_->requests[dccSock_->peer_uin]; + TQString filePath = gaduDCC_->requests[dccSock_->peer_uin]; kdDebug() << "Callback request found. Sending " << filePath << endl; gaduDCC_->requests.remove(dccSock_->peer_uin); gg_dcc_fill_file_info(dccSock_,filePath.ascii()); diff --git a/kopete/protocols/gadu/gadudcctransaction.h b/kopete/protocols/gadu/gadudcctransaction.h index 541f3838..8f5b57b8 100644 --- a/kopete/protocols/gadu/gadudcctransaction.h +++ b/kopete/protocols/gadu/gadudcctransaction.h @@ -23,8 +23,8 @@ #ifndef GADUDCCTRANS_H #define GADUDCCTRANS_H -#include <qobject.h> -#include <qfile.h> +#include <tqobject.h> +#include <tqfile.h> class QSocketNotifier; class gg_dcc; @@ -34,7 +34,7 @@ namespace Kopete { class Transfer; } namespace Kopete { class FileTransferInfo; } class GaduDCC; -class GaduDCCTransaction: QObject { +class GaduDCCTransaction: TQObject { Q_OBJECT public: GaduDCCTransaction( GaduDCC*, const char* name = NULL ); @@ -42,7 +42,7 @@ public: bool setupIncoming( const unsigned int, GaduContact* ); bool setupIncoming( gg_dcc* ); - bool setupOutgoing( GaduContact*, QString& ); + bool setupOutgoing( GaduContact*, TQString& ); unsigned int recvUIN(); unsigned int peerUIN(); @@ -56,7 +56,7 @@ protected slots: private slots: void watcher(); - void slotIncomingTransferAccepted ( Kopete::Transfer*, const QString& ); + void slotIncomingTransferAccepted ( Kopete::Transfer*, const TQString& ); void slotTransferRefused ( const Kopete::FileTransferInfo& ); void slotTransferResult(); @@ -71,14 +71,14 @@ private: gg_dcc* dccSock_; - QSocketNotifier* read_; - QSocketNotifier* write_; + TQSocketNotifier* read_; + TQSocketNotifier* write_; GaduContact* contact; Kopete::Transfer* transfer_; long transferId_; - QFile localFile_; + TQFile localFile_; int peer; unsigned int incoming; GaduDCC* gaduDCC_; diff --git a/kopete/protocols/gadu/gadueditaccount.cpp b/kopete/protocols/gadu/gadueditaccount.cpp index cf38c4bc..08987c16 100644 --- a/kopete/protocols/gadu/gadueditaccount.cpp +++ b/kopete/protocols/gadu/gadueditaccount.cpp @@ -24,16 +24,16 @@ #include "gaduprotocol.h" #include "gadusession.h" -#include <qradiobutton.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qstring.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qbutton.h> -#include <qregexp.h> -#include <qpushbutton.h> -#include <qgroupbox.h> +#include <tqradiobutton.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqbutton.h> +#include <tqregexp.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> #include <klineedit.h> #include <kmessagebox.h> @@ -43,7 +43,7 @@ #include "kopetepasswordwidget.h" -GaduEditAccount::GaduEditAccount( GaduProtocol* proto, Kopete::Account* ident, QWidget* parent, const char* name ) +GaduEditAccount::GaduEditAccount( GaduProtocol* proto, Kopete::Account* ident, TQWidget* parent, const char* name ) : GaduAccountEditUI( parent, name ), KopeteEditAccountWidget( ident ), protocol_( proto ), rcmd( 0 ) { @@ -69,7 +69,7 @@ GaduEditAccount::GaduEditAccount( GaduProtocol* proto, Kopete::Account* ident, Q passwordWidget_->load( &account_->password() ); - QString nick = account()->myself()->property( + TQString nick = account()->myself()->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if ( nick.isEmpty() ) { nick = account_->myself()->contactId(); @@ -82,18 +82,18 @@ GaduEditAccount::GaduEditAccount( GaduProtocol* proto, Kopete::Account* ident, Q useTls_->setCurrentItem( isSsl ? ( account_->useTls() ) : 2 ); ignoreCheck_->setChecked( account_->ignoreAnons() ); - connect( account(), SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ), - SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) ); + connect( account(), TQT_SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ), + TQT_SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) ); connectLabel->setText( i18n( "personal information being fetched from server", "<p align=\"center\">Fetching from server</p>" ) ); seqNr = account_->getPersonalInformation(); } - connect( registerNew, SIGNAL( clicked( ) ), SLOT( registerNewAccount( ) ) ); + connect( registerNew, TQT_SIGNAL( clicked( ) ), TQT_SLOT( registerNewAccount( ) ) ); - QWidget::setTabOrder( loginEdit_, passwordWidget_->mRemembered ); - QWidget::setTabOrder( passwordWidget_->mRemembered, passwordWidget_->mPassword ); - QWidget::setTabOrder( passwordWidget_->mPassword, autoLoginCheck_ ); + TQWidget::setTabOrder( loginEdit_, passwordWidget_->mRemembered ); + TQWidget::setTabOrder( passwordWidget_->mRemembered, passwordWidget_->mPassword ); + TQWidget::setTabOrder( passwordWidget_->mPassword, autoLoginCheck_ ); } void @@ -114,11 +114,11 @@ GaduEditAccount::publishUserInfo() kdDebug(14100) << uiGender->currentItem() << " gender " << endl; if ( uiGender->currentItem() == 1 ) { kdDebug(14100) << "so you become female now" << endl; - sr.gender = QString( GG_PUBDIR50_GENDER_SET_FEMALE ); + sr.gender = TQString( GG_PUBDIR50_GENDER_SET_FEMALE ); } if ( uiGender->currentItem() == 2 ) { kdDebug(14100) << "so you become male now" << endl; - sr.gender = QString( GG_PUBDIR50_GENDER_SET_MALE ); + sr.gender = TQString( GG_PUBDIR50_GENDER_SET_MALE ); } if ( account_ ) { @@ -142,12 +142,12 @@ GaduEditAccount::slotSearchResult( const SearchResult& result, unsigned int seq uiCity->setText( result[0].city ); kdDebug( 14100 ) << "gender found: " << result[0].gender << endl; - if ( result[0].gender == QString( GG_PUBDIR50_GENDER_SET_FEMALE ) ) { + if ( result[0].gender == TQString( GG_PUBDIR50_GENDER_SET_FEMALE ) ) { uiGender->setCurrentItem( 1 ); kdDebug(14100) << "looks like female" << endl; } else { - if ( result[0].gender == QString( GG_PUBDIR50_GENDER_SET_MALE ) ) { + if ( result[0].gender == TQString( GG_PUBDIR50_GENDER_SET_MALE ) ) { uiGender->setCurrentItem( 2 ); kdDebug( 14100 ) <<" looks like male" << endl; } @@ -158,7 +158,7 @@ GaduEditAccount::slotSearchResult( const SearchResult& result, unsigned int seq enableUserInfo( true ); - disconnect( SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) ); + disconnect( TQT_SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) ); } void @@ -180,8 +180,8 @@ GaduEditAccount::registerNewAccount() { registerNew->setDisabled( true ); regDialog = new GaduRegisterAccount( NULL , "Register account dialog" ); - connect( regDialog, SIGNAL( registeredNumber( unsigned int, QString ) ), SLOT( newUin( unsigned int, QString ) ) ); - if ( regDialog->exec() != QDialog::Accepted ) { + connect( regDialog, TQT_SIGNAL( registeredNumber( unsigned int, TQString ) ), TQT_SLOT( newUin( unsigned int, TQString ) ) ); + if ( regDialog->exec() != TQDialog::Accepted ) { loginEdit_->setText( "" ); return; } @@ -195,10 +195,10 @@ GaduEditAccount::registrationFailed() } void -GaduEditAccount::newUin( unsigned int uin, QString password ) +GaduEditAccount::newUin( unsigned int uin, TQString password ) { if ( uin ) { - loginEdit_->setText( QString::number( uin ) ); + loginEdit_->setText( TQString::number( uin ) ); passwordWidget_->setPassword( password ); } else { @@ -246,7 +246,7 @@ GaduEditAccount::apply() account_->myself()->setProperty( Kopete::Global::Properties::self()->nickName(), nickName->text() ); // this is changed only here, so i won't add any proper handling now - account_->configGroup()->writeEntry( QString::fromAscii( "nickName" ), nickName->text() ); + account_->configGroup()->writeEntry( TQString::fromAscii( "nickName" ), nickName->text() ); account_->setExcludeConnect( autoLoginCheck_->isChecked() ); account_->setUseTls( (GaduAccount::tlsConnection) useTls_->currentItem() ); diff --git a/kopete/protocols/gadu/gadueditaccount.h b/kopete/protocols/gadu/gadueditaccount.h index 4782cb68..1b870496 100644 --- a/kopete/protocols/gadu/gadueditaccount.h +++ b/kopete/protocols/gadu/gadueditaccount.h @@ -37,13 +37,13 @@ class GaduEditAccount : public GaduAccountEditUI, public KopeteEditAccountWidget Q_OBJECT public: - GaduEditAccount( GaduProtocol*, Kopete::Account*, QWidget* parent = 0, const char* name = 0 ); + GaduEditAccount( GaduProtocol*, Kopete::Account*, TQWidget* parent = 0, const char* name = 0 ); virtual bool validateData(); Kopete::Account* apply(); private slots: void registerNewAccount(); - void newUin( unsigned int, QString ); + void newUin( unsigned int, TQString ); void registrationFailed(); void slotSearchResult( const SearchResult&, unsigned int ); diff --git a/kopete/protocols/gadu/gadueditcontact.cpp b/kopete/protocols/gadu/gadueditcontact.cpp index 24aa8940..985a9874 100644 --- a/kopete/protocols/gadu/gadueditcontact.cpp +++ b/kopete/protocols/gadu/gadueditcontact.cpp @@ -34,19 +34,19 @@ #include <kopetecontactlist.h> #include <kopetemetacontact.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qlineedit.h> -#include <qlayout.h> -#include <qlistview.h> -#include <qptrlist.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqlineedit.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqptrlist.h> #include <krestrictedline.h> // FIXME: this and gaduadcontactpage should have one base class, with some code duplicated in both. GaduEditContact::GaduEditContact( GaduAccount* account, GaduContact* contact, - QWidget* parent, const char* name ) + TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "Edit Contact's Properties" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ), account_( account ), contact_( contact ) @@ -64,7 +64,7 @@ GaduEditContact::GaduEditContact( GaduAccount* account, GaduContact* contact, } GaduEditContact::GaduEditContact( GaduAccount* account, GaduContactsList::ContactLine* clin, - QWidget* parent , const char* name ) + TQWidget* parent , const char* name ) : KDialogBase( parent, name, true, i18n( "Edit Contact's Properties" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ), account_( account ), contact_( NULL ) @@ -83,8 +83,8 @@ void GaduEditContact::fillGroups() { Kopete::Group *g, *cg; - QPtrList<Kopete::Group> cgl; - QPtrList<Kopete::Group> gl; + TQPtrList<Kopete::Group> cgl; + TQPtrList<Kopete::Group> gl; if ( contact_ ) { cgl = contact_->metaContact()->groups(); @@ -96,7 +96,7 @@ GaduEditContact::fillGroups() if ( g->type() == Kopete::Group::Temporary ) { continue; } - QCheckListItem* item = new QCheckListItem( ui_->groups, g->displayName(), QCheckListItem::CheckBox ); + TQCheckListItem* item = new TQCheckListItem( ui_->groups, g->displayName(), TQCheckListItem::CheckBox ); // FIXME: optimize this O(2) search for( cg = cgl.first(); cg; cg = cgl.next() ) { if ( cg->groupId() == g->groupId() ) { @@ -118,12 +118,12 @@ GaduEditContact::init() // fill values from cl into proper fields on widget show(); - connect( this, SIGNAL( okClicked() ), SLOT( slotApply() ) ); - connect( ui_->groups, SIGNAL( clicked( QListViewItem * ) ), SLOT( listClicked( QListViewItem * ) ) ); + connect( this, TQT_SIGNAL( okClicked() ), TQT_SLOT( slotApply() ) ); + connect( ui_->groups, TQT_SIGNAL( clicked( TQListViewItem * ) ), TQT_SLOT( listClicked( TQListViewItem * ) ) ); } void -GaduEditContact::listClicked( QListViewItem* /*item*/ ) +GaduEditContact::listClicked( TQListViewItem* /*item*/ ) { } @@ -147,7 +147,7 @@ GaduEditContact::fillIn() void GaduEditContact::slotApply() { - QPtrList<Kopete::Group> gl; + TQPtrList<Kopete::Group> gl; Kopete::Group* group; cl_->firstname = ui_->fornameEdit_->text().stripWhiteSpace(); @@ -173,8 +173,8 @@ GaduEditContact::slotApply() contact_->setContactDetails( cl_ ); gl = Kopete::ContactList::self()->groups(); - for ( QListViewItemIterator it( ui_->groups ); it.current(); ++it ) { - QCheckListItem *check = dynamic_cast<QCheckListItem *>( it.current() ); + for ( TQListViewItemIterator it( ui_->groups ); it.current(); ++it ) { + TQCheckListItem *check = dynamic_cast<TQCheckListItem *>( it.current() ); if ( !check ) { continue; diff --git a/kopete/protocols/gadu/gadueditcontact.h b/kopete/protocols/gadu/gadueditcontact.h index 9c4596fa..c27a5e7e 100644 --- a/kopete/protocols/gadu/gadueditcontact.h +++ b/kopete/protocols/gadu/gadueditcontact.h @@ -40,12 +40,12 @@ class GaduEditContact : public KDialogBase public: GaduEditContact( GaduAccount*, GaduContact*, - QWidget* parent = 0, const char* name = 0 ); + TQWidget* parent = 0, const char* name = 0 ); GaduEditContact( GaduAccount*, GaduContactsList::ContactLine*, - QWidget* parent = 0, const char* name = 0 ); + TQWidget* parent = 0, const char* name = 0 ); protected slots: void slotApply(); - void listClicked( QListViewItem* ); + void listClicked( TQListViewItem* ); private: void init(); diff --git a/kopete/protocols/gadu/gaduprotocol.cpp b/kopete/protocols/gadu/gaduprotocol.cpp index 1e0e06a9..1a59f17f 100644 --- a/kopete/protocols/gadu/gaduprotocol.cpp +++ b/kopete/protocols/gadu/gaduprotocol.cpp @@ -45,7 +45,7 @@ K_EXPORT_COMPONENT_FACTORY( kopete_gadu, KGenericFactory<GaduProtocol>( "kopete_ GaduProtocol* GaduProtocol::protocolStatic_ = 0L; -GaduProtocol::GaduProtocol( QObject* parent, const char* name, const QStringList& ) +GaduProtocol::GaduProtocol( TQObject* parent, const char* name, const TQStringList& ) :Kopete::Protocol( GaduProtocolFactory::instance(), parent, name ), propFirstName(Kopete::Global::Properties::self()->firstName()), propLastName(Kopete::Global::Properties::self()->lastName()), @@ -58,17 +58,17 @@ GaduProtocol::GaduProtocol( QObject* parent, const char* name, const QStringList gaduStatusOffline_( Kopete::OnlineStatus::Offline, GG_STATUS_NOT_AVAIL, this, GG_STATUS_NOT_AVAIL, "gg_offline", i18n( "Offline" ) , i18n( "O&ffline" ) , Kopete::OnlineStatusManager::Offline ), gaduStatusOfflineDescr_( Kopete::OnlineStatus::Offline, GG_STATUS_NOT_AVAIL_DESCR, this, GG_STATUS_NOT_AVAIL_DESCR, - QStringList::split( '|', "contact_away_overlay|gg_description_overlay" ), i18n( "Offline" ), i18n( "A&way" ) , Kopete::OnlineStatusManager::Offline ), + TQStringList::split( '|', "contact_away_overlay|gg_description_overlay" ), i18n( "Offline" ), i18n( "A&way" ) , Kopete::OnlineStatusManager::Offline ), gaduStatusBusy_(Kopete::OnlineStatus::Away, GG_STATUS_BUSY, this, GG_STATUS_BUSY, "contact_away_overlay", i18n( "Busy" ) , i18n( "B&usy" ) , Kopete::OnlineStatusManager::Busy ), gaduStatusBusyDescr_(Kopete::OnlineStatus::Away, GG_STATUS_BUSY_DESCR, this, GG_STATUS_BUSY_DESCR, - QStringList::split( '|', "contact_away_overlay|gg_description_overlay" ), i18n( "Busy" ) , i18n( "B&usy" ) , Kopete::OnlineStatusManager::Idle ), + TQStringList::split( '|', "contact_away_overlay|gg_description_overlay" ), i18n( "Busy" ) , i18n( "B&usy" ) , Kopete::OnlineStatusManager::Idle ), gaduStatusInvisible_( Kopete::OnlineStatus::Invisible, GG_STATUS_INVISIBLE, this, GG_STATUS_INVISIBLE, "contact_invisible_overlay", i18n( "Invisible" ) , i18n( "I&nvisible" ) , Kopete::OnlineStatusManager::Invisible), gaduStatusInvisibleDescr_(Kopete::OnlineStatus::Invisible, GG_STATUS_INVISIBLE_DESCR, this, GG_STATUS_INVISIBLE_DESCR, - QStringList::split( '|', "contact_invisible_overlay|gg_description_overlay" ), i18n( "Invisible" ) , i18n( "I&nvisible" )), + TQStringList::split( '|', "contact_invisible_overlay|gg_description_overlay" ), i18n( "Invisible" ) , i18n( "I&nvisible" )), gaduStatusAvail_(Kopete::OnlineStatus::Online, GG_STATUS_AVAIL, this, GG_STATUS_AVAIL, - QString::null, i18n( "Online" ) , i18n( "&Online" ) , Kopete::OnlineStatusManager::Online ), + TQString::null, i18n( "Online" ) , i18n( "&Online" ) , Kopete::OnlineStatusManager::Online ), gaduStatusAvailDescr_(Kopete::OnlineStatus::Online, GG_STATUS_AVAIL_DESCR, this, GG_STATUS_AVAIL_DESCR, "gg_description_overlay", i18n( "Online" ) , i18n( "&Online" )), gaduConnecting_(Kopete::OnlineStatus::Offline, GG_STATUS_CONNECTING, this, GG_STATUS_CONNECTING, @@ -99,7 +99,7 @@ GaduProtocol::protocol() } AddContactPage* -GaduProtocol::createAddContactWidget( QWidget* parent, Kopete::Account* account ) +GaduProtocol::createAddContactWidget( TQWidget* parent, Kopete::Account* account ) { return new GaduAddContactPage( static_cast<GaduAccount*>( account ), parent ); } @@ -111,15 +111,15 @@ GaduProtocol::settingsChanged() Kopete::Contact * GaduProtocol::deserializeContact( Kopete::MetaContact* metaContact, - const QMap<QString, QString>& serializedData, - const QMap<QString, QString>& /* addressBookData */ ) + const TQMap<TQString, TQString>& serializedData, + const TQMap<TQString, TQString>& /* addressBookData */ ) { - const QString aid = serializedData[ "accountId" ]; - const QString cid = serializedData[ "contactId" ]; - const QString dn = serializedData[ "displayName" ]; + const TQString aid = serializedData[ "accountId" ]; + const TQString cid = serializedData[ "contactId" ]; + const TQString dn = serializedData[ "displayName" ]; - QDict<Kopete::Account> daccounts = Kopete::AccountManager::self()->accounts( this ); + TQDict<Kopete::Account> daccounts = Kopete::AccountManager::self()->accounts( this ); Kopete::Account* account = daccounts[ aid ]; if (!account) { @@ -228,14 +228,14 @@ GaduProtocol::convertStatus( uint status ) const } Kopete::Account* -GaduProtocol::createNewAccount( const QString& accountId ) +GaduProtocol::createNewAccount( const TQString& accountId ) { defaultAccount_ = new GaduAccount( this, accountId ); return defaultAccount_ ; } KopeteEditAccountWidget* -GaduProtocol::createEditAccountWidget( Kopete::Account* account, QWidget* parent ) +GaduProtocol::createEditAccountWidget( Kopete::Account* account, TQWidget* parent ) { return( new GaduEditAccount( this, account, parent ) ); } diff --git a/kopete/protocols/gadu/gaduprotocol.h b/kopete/protocols/gadu/gaduprotocol.h index 7baf481c..f277ef35 100644 --- a/kopete/protocols/gadu/gaduprotocol.h +++ b/kopete/protocols/gadu/gaduprotocol.h @@ -23,7 +23,7 @@ #ifndef GADUPROTOCOL_H #define GADUPROTOCOL_H -#include <qmap.h> +#include <tqmap.h> #include "kopeteprotocol.h" #include "kopeteonlinestatus.h" @@ -52,21 +52,21 @@ class GaduProtocol : public Kopete::Protocol Q_OBJECT public: - GaduProtocol( QObject* parent, const char* name, const QStringList& str); + GaduProtocol( TQObject* parent, const char* name, const TQStringList& str); ~GaduProtocol(); static GaduProtocol *protocol(); // Plugin reimplementation // { - AddContactPage* createAddContactWidget( QWidget* parent, Kopete::Account* account ); - Kopete::Account* createNewAccount( const QString& accountId ); - KopeteEditAccountWidget *createEditAccountWidget( Kopete::Account* account, QWidget* parent ); + AddContactPage* createAddContactWidget( TQWidget* parent, Kopete::Account* account ); + Kopete::Account* createNewAccount( const TQString& accountId ); + KopeteEditAccountWidget *createEditAccountWidget( Kopete::Account* account, TQWidget* parent ); bool canSendOffline() const { return true; } 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 ); // } //!Plugin reimplementation diff --git a/kopete/protocols/gadu/gadupubdir.cpp b/kopete/protocols/gadu/gadupubdir.cpp index 2b61d3ff..1c329cf0 100644 --- a/kopete/protocols/gadu/gadupubdir.cpp +++ b/kopete/protocols/gadu/gadupubdir.cpp @@ -27,12 +27,12 @@ #include "gaduaccount.h" #include "gaduprotocol.h" -#include <qwidgetstack.h> -#include <qlistview.h> -#include <qptrlist.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <qcheckbox.h> +#include <tqwidgetstack.h> +#include <tqlistview.h> +#include <tqptrlist.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> #include <kcombobox.h> #include <krestrictedline.h> @@ -40,8 +40,8 @@ #include <klistview.h> #include <klocale.h> -GaduPublicDir::GaduPublicDir( GaduAccount* account, QWidget* parent, const char* name ) -: KDialogBase( parent, name, false, QString::null, User1|User2|User3|Cancel, User2 ) +GaduPublicDir::GaduPublicDir( GaduAccount* account, TQWidget* parent, const char* name ) +: KDialogBase( parent, name, false, TQString::null, User1|User2|User3|Cancel, User2 ) { mAccount = account; createWidget(); @@ -50,8 +50,8 @@ GaduPublicDir::GaduPublicDir( GaduAccount* account, QWidget* parent, const char* show(); } -GaduPublicDir::GaduPublicDir( GaduAccount* account, int searchFor, QWidget* parent, const char* name ) -: KDialogBase( parent, name, false, QString::null, User1|User2|User3|Cancel, User2 ) +GaduPublicDir::GaduPublicDir( GaduAccount* account, int searchFor, TQWidget* parent, const char* name ) +: KDialogBase( parent, name, false, TQString::null, User1|User2|User3|Cancel, User2 ) { ResLine rs; @@ -80,7 +80,7 @@ GaduPublicDir::GaduPublicDir( GaduAccount* account, int searchFor, QWidget* pare // now it is time to switch to Right Page(tm) rs.uin = searchFor; - fName = fSurname = fNick = fCity = QString::null; + fName = fSurname = fNick = fCity = TQString::null; fUin = searchFor; fGender = fAgeFrom = fAgeTo = 0; fOnlyOnline = false; @@ -118,7 +118,7 @@ void GaduPublicDir::slotAddContact() { GaduContactsList::ContactLine* cl = new GaduContactsList::ContactLine; - QListViewItem* item = mMainWidget->listFound->currentItem(); + TQListViewItem* item = mMainWidget->listFound->currentItem(); cl->ignored = false; cl->firstname = item->text( 1 ); @@ -134,7 +134,7 @@ GaduPublicDir::slotAddContact() void GaduPublicDir::slotListSelected( ) { - QListViewItem* item = mMainWidget->listFound->currentItem(); + TQListViewItem* item = mMainWidget->listFound->currentItem(); if ( item ) { enableButton( User3, true ); } @@ -146,35 +146,35 @@ GaduPublicDir::slotListSelected( ) void GaduPublicDir::initConnections() { - connect( this, SIGNAL( user2Clicked() ), SLOT( slotSearch() ) ); - connect( this, SIGNAL( user1Clicked() ), SLOT( slotNewSearch() ) ); - connect( this, SIGNAL( user3Clicked() ), SLOT( slotAddContact() ) ); + connect( this, TQT_SIGNAL( user2Clicked() ), TQT_SLOT( slotSearch() ) ); + connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotNewSearch() ) ); + connect( this, TQT_SIGNAL( user3Clicked() ), TQT_SLOT( slotAddContact() ) ); - connect( mAccount, SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ), - SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) ); + connect( mAccount, TQT_SIGNAL( pubDirSearchResult( const SearchResult&, unsigned int ) ), + TQT_SLOT( slotSearchResult( const SearchResult&, unsigned int ) ) ); - connect( mMainWidget->nameS, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( mMainWidget->surname, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( mMainWidget->nick, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( mMainWidget->UIN, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( mMainWidget->cityS, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( mMainWidget->gender, SIGNAL( activated( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( mMainWidget->ageFrom, SIGNAL( valueChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( mMainWidget->ageTo, SIGNAL( valueChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( mMainWidget->radioByData, SIGNAL( toggled( bool ) ), SLOT( inputChanged( bool ) ) ); + connect( mMainWidget->nameS, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( mMainWidget->surname, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( mMainWidget->nick, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( mMainWidget->UIN, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( mMainWidget->cityS, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( mMainWidget->gender, TQT_SIGNAL( activated( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( mMainWidget->ageFrom, TQT_SIGNAL( valueChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( mMainWidget->ageTo, TQT_SIGNAL( valueChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( mMainWidget->radioByData, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( inputChanged( bool ) ) ); - connect( mMainWidget->listFound, SIGNAL( selectionChanged () ), SLOT( slotListSelected() ) ); + connect( mMainWidget->listFound, TQT_SIGNAL( selectionChanged () ), TQT_SLOT( slotListSelected() ) ); } void GaduPublicDir::inputChanged( bool ) { - inputChanged( QString::null ); + inputChanged( TQString::null ); } void -GaduPublicDir::inputChanged( const QString& ) +GaduPublicDir::inputChanged( const TQString& ) { if ( validateData() == false ) { enableButton( User2, false ); @@ -217,7 +217,7 @@ GaduPublicDir::validateData() CHECK_INT( fAgeTo ); } else { - fSurname = QString::null; + fSurname = TQString::null; CHECK_INT( fUin ); } return false; @@ -227,7 +227,7 @@ GaduPublicDir::validateData() QPixmap GaduPublicDir::iconForStatus( uint status ) { - QPixmap n; + TQPixmap n; if ( GaduProtocol::protocol() ) { return GaduProtocol::protocol()->convertStatus( status ).protocolIcon(); @@ -238,23 +238,23 @@ GaduPublicDir::iconForStatus( uint status ) void GaduPublicDir::slotSearchResult( const SearchResult& result, unsigned int ) { - QListView* list = mMainWidget->listFound; + TQListView* list = mMainWidget->listFound; kdDebug(14100) << "searchResults(" << result.count() <<")" << endl; - QListViewItem* sl; + TQListViewItem* sl; SearchResult::const_iterator r; for ( r = result.begin(); r != result.end() ; ++r ){ kdDebug(14100) << "adding" << (*r).uin << endl; - sl= new QListViewItem( - list, QString::fromAscii(""), + sl= new TQListViewItem( + list, TQString::fromAscii(""), (*r).firstname, (*r).nickname, (*r).age, (*r).city, - QString::number( (*r).uin ).ascii() + TQString::number( (*r).uin ).ascii() ); sl->setPixmap( 0, iconForStatus( (*r).status ) ); } @@ -282,7 +282,7 @@ GaduPublicDir::slotNewSearch() showButton( User1, false ); showButton( User3, false ); enableButton( User2, false ); - inputChanged( QString::null ); + inputChanged( TQString::null ); mAccount->pubDirSearchClose(); } @@ -291,7 +291,7 @@ GaduPublicDir::slotSearch() { mMainWidget->listFound->clear(); - QString empty; + TQString empty; // search more, or search ? if ( mMainWidget->pubsearch->id( mMainWidget->pubsearch->visibleWidget() ) == 0 ) { diff --git a/kopete/protocols/gadu/gadupubdir.h b/kopete/protocols/gadu/gadupubdir.h index 022c353d..b69c21b0 100644 --- a/kopete/protocols/gadu/gadupubdir.h +++ b/kopete/protocols/gadu/gadupubdir.h @@ -41,16 +41,16 @@ class GaduPublicDir : public KDialogBase Q_OBJECT public: - GaduPublicDir( GaduAccount* , QWidget *parent = 0, const char* name = "GaduPublicDir" ); - GaduPublicDir( GaduAccount* , int searchFor, QWidget* parent = 0, const char* name = "GaduPublicDir" ); - QPixmap iconForStatus( uint status ); + GaduPublicDir( GaduAccount* , TQWidget *parent = 0, const char* name = "GaduPublicDir" ); + GaduPublicDir( GaduAccount* , int searchFor, TQWidget* parent = 0, const char* name = "GaduPublicDir" ); + TQPixmap iconForStatus( uint status ); private slots: void slotSearch(); void slotNewSearch(); void slotSearchResult( const SearchResult& result, unsigned int seq ); void slotAddContact(); - void inputChanged( const QString& ); + void inputChanged( const TQString& ); void inputChanged( bool ); void slotListSelected(); diff --git a/kopete/protocols/gadu/gaduregisteraccount.cpp b/kopete/protocols/gadu/gaduregisteraccount.cpp index 92126cb5..b2ee0bc1 100644 --- a/kopete/protocols/gadu/gaduregisteraccount.cpp +++ b/kopete/protocols/gadu/gaduregisteraccount.cpp @@ -19,10 +19,10 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA // 02110-1301, USA. -#include <qstring.h> -#include <qregexp.h> -#include <qpushbutton.h> -#include <qlabel.h> +#include <tqstring.h> +#include <tqregexp.h> +#include <tqpushbutton.h> +#include <tqlabel.h> #include <klineedit.h> #include <kmessagebox.h> @@ -35,7 +35,7 @@ #include "gaduregisteraccount.h" #include "gaducommands.h" -GaduRegisterAccount::GaduRegisterAccount( QWidget* parent, const char* name ) +GaduRegisterAccount::GaduRegisterAccount( TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "Register New Account" ), KDialogBase::User1 | KDialogBase::Ok, KDialogBase::User1, true ) { ui = new GaduRegisterAccountUI( this ); @@ -48,21 +48,21 @@ GaduRegisterAccount::GaduRegisterAccount( QWidget* parent, const char* name ) cRegister = new RegisterCommand( this ); - emailRegexp = new QRegExp( "[\\w\\d.+_-]{1,}@[\\w\\d.-]{1,}" ); + emailRegexp = new TQRegExp( "[\\w\\d.+_-]{1,}@[\\w\\d.-]{1,}" ); hintPixmap = KGlobal::iconLoader()->loadIcon ( "gadu_protocol", KIcon::Small ); - connect( this, SIGNAL( user1Clicked() ), SLOT( doRegister() ) ); - connect( this, SIGNAL( okClicked() ), SLOT( slotClose() ) ); + connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( doRegister() ) ); + connect( this, TQT_SIGNAL( okClicked() ), TQT_SLOT( slotClose() ) ); - connect( ui->valueEmailAddress, SIGNAL( textChanged( const QString &) ), SLOT( inputChanged( const QString & ) ) ); - connect( ui->valuePassword, SIGNAL( textChanged( const QString & ) ), SLOT( inputChanged( const QString & ) ) ); - connect( ui->valuePasswordVerify, SIGNAL( textChanged( const QString & ) ), SLOT( inputChanged( const QString & ) ) ); - connect( ui->valueVerificationSequence, SIGNAL( textChanged( const QString & ) ), SLOT( inputChanged( const QString & ) ) ); + connect( ui->valueEmailAddress, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( ui->valuePassword, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( ui->valuePasswordVerify, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( inputChanged( const TQString & ) ) ); + connect( ui->valueVerificationSequence, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( inputChanged( const TQString & ) ) ); - connect( cRegister, SIGNAL( tokenRecieved( QPixmap, QString ) ), SLOT( displayToken( QPixmap, QString ) ) ); - connect( cRegister, SIGNAL( done( const QString&, const QString& ) ), SLOT( registrationDone( const QString&, const QString& ) ) ); - connect( cRegister, SIGNAL( error( const QString&, const QString& ) ), SLOT( registrationError( const QString&, const QString& ) ) ); - connect( cRegister, SIGNAL( operationStatus( const QString ) ), SLOT( updateStatus( const QString ) ) ); + connect( cRegister, TQT_SIGNAL( tokenRecieved( TQPixmap, TQString ) ), TQT_SLOT( displayToken( TQPixmap, TQString ) ) ); + connect( cRegister, TQT_SIGNAL( done( const TQString&, const TQString& ) ), TQT_SLOT( registrationDone( const TQString&, const TQString& ) ) ); + connect( cRegister, TQT_SIGNAL( error( const TQString&, const TQString& ) ), TQT_SLOT( registrationError( const TQString&, const TQString& ) ) ); + connect( cRegister, TQT_SIGNAL( operationStatus( const TQString ) ), TQT_SLOT( updateStatus( const TQString ) ) ); updateStatus( i18n( "Retrieving token" ) ); cRegister->requestToken(); @@ -138,13 +138,13 @@ GaduRegisterAccount::validateInput() } void -GaduRegisterAccount::inputChanged( const QString & ) +GaduRegisterAccount::inputChanged( const TQString & ) { validateInput(); } void -GaduRegisterAccount::registrationDone( const QString& /*title*/, const QString& /*what */ ) +GaduRegisterAccount::registrationDone( const TQString& /*title*/, const TQString& /*what */ ) { ui->valueEmailAddress->setDisabled( true ); ui->valuePassword->setDisabled( true ); @@ -156,21 +156,21 @@ GaduRegisterAccount::registrationDone( const QString& /*title*/, const QString ui->labelVerificationSequence->setDisabled( true ); ui->labelInstructions->setDisabled( true ); emit registeredNumber( cRegister->newUin(), ui->valuePassword->text() ); - updateStatus( i18n( "Account created; your new UIN is %1." ).arg(QString::number( cRegister->newUin() ) ) ); + updateStatus( i18n( "Account created; your new UIN is %1." ).arg(TQString::number( cRegister->newUin() ) ) ); enableButton( User1, false ); setButtonText( Ok, i18n( "&Close" ) ); } void -GaduRegisterAccount::registrationError( const QString& title, const QString& what ) +GaduRegisterAccount::registrationError( const TQString& title, const TQString& what ) { updateStatus( i18n( "Registration failed: %1" ).arg( what ) ); KMessageBox::sorry( this, "Registration was unsucessful, please try again.", title ); - disconnect( this, SLOT( displayToken( QPixmap, QString ) ) ); - disconnect( this, SLOT( registrationDone( const QString&, const QString& ) ) ); - disconnect( this, SLOT( registrationError( const QString&, const QString& ) ) ); - disconnect( this, SLOT( updateStatus( const QString ) ) ); + disconnect( this, TQT_SLOT( displayToken( TQPixmap, TQString ) ) ); + disconnect( this, TQT_SLOT( registrationDone( const TQString&, const TQString& ) ) ); + disconnect( this, TQT_SLOT( registrationError( const TQString&, const TQString& ) ) ); + disconnect( this, TQT_SLOT( updateStatus( const TQString ) ) ); ui->valueVerificationSequence->setDisabled( true ); ui->valueVerificationSequence->setText( "" ); @@ -178,13 +178,13 @@ GaduRegisterAccount::registrationError( const QString& title, const QString& w updateStatus( "" ); // emit UIN 0, to enable 'register new account' button again in dialog below - emit registeredNumber( 0, QString( "" ) ); + emit registeredNumber( 0, TQString( "" ) ); deleteLater(); } void -GaduRegisterAccount::displayToken( QPixmap image, QString /*tokenId */ ) +GaduRegisterAccount::displayToken( TQPixmap image, TQString /*tokenId */ ) { ui->valueVerificationSequence->setDisabled( false ); ui->pixmapToken->setPixmap( image ); @@ -192,7 +192,7 @@ GaduRegisterAccount::displayToken( QPixmap image, QString /*tokenId */ ) } void -GaduRegisterAccount::updateStatus( const QString status ) +GaduRegisterAccount::updateStatus( const TQString status ) { ui->labelStatusMessage->setAlignment( AlignCenter ); ui->labelStatusMessage->setText( status ); diff --git a/kopete/protocols/gadu/gaduregisteraccount.h b/kopete/protocols/gadu/gaduregisteraccount.h index 27a0c7b5..f3f03260 100644 --- a/kopete/protocols/gadu/gaduregisteraccount.h +++ b/kopete/protocols/gadu/gaduregisteraccount.h @@ -35,27 +35,27 @@ class GaduRegisterAccount : public KDialogBase Q_OBJECT public: - GaduRegisterAccount( QWidget* , const char* ); + GaduRegisterAccount( TQWidget* , const char* ); ~GaduRegisterAccount( ); signals: - void registeredNumber( unsigned int, QString ); + void registeredNumber( unsigned int, TQString ); protected slots: void slotClose(); - void displayToken( QPixmap, QString ); - void registrationError( const QString&, const QString& ); - void registrationDone( const QString&, const QString& ); - void inputChanged( const QString & ); + void displayToken( TQPixmap, TQString ); + void registrationError( const TQString&, const TQString& ); + void registrationDone( const TQString&, const TQString& ); + void inputChanged( const TQString & ); void doRegister(); - void updateStatus( const QString status ); + void updateStatus( const TQString status ); private: void validateInput(); GaduRegisterAccountUI* ui; RegisterCommand* cRegister; - QRegExp* emailRegexp; + TQRegExp* emailRegexp; QPixmap hintPixmap; }; diff --git a/kopete/protocols/gadu/gadurichtextformat.cpp b/kopete/protocols/gadu/gadurichtextformat.cpp index 049d665b..fd567bf6 100644 --- a/kopete/protocols/gadu/gadurichtextformat.cpp +++ b/kopete/protocols/gadu/gadurichtextformat.cpp @@ -26,8 +26,8 @@ #include "gadurichtextformat.h" #include "gadusession.h" -#include <qstring.h> -#include <qregexp.h> +#include <tqstring.h> +#include <tqregexp.h> GaduRichTextFormat::GaduRichTextFormat() { @@ -38,9 +38,9 @@ GaduRichTextFormat::~GaduRichTextFormat() } QString -GaduRichTextFormat::convertToHtml( const QString& msg, unsigned int formats, void* formatStructure) +GaduRichTextFormat::convertToHtml( const TQString& msg, unsigned int formats, void* formatStructure) { - QString tmp, nb; + TQString tmp, nb; gg_msg_richtext_format *format; char *pointer = (char*) formatStructure; @@ -59,7 +59,7 @@ GaduRichTextFormat::convertToHtml( const QString& msg, unsigned int formats, voi format = (gg_msg_richtext_format*) pointer; unsigned int position = format->position; char font = format->font; - QString style; + TQString style; if ( position < j || position > msg.length() ) { break; @@ -100,9 +100,9 @@ GaduRichTextFormat::convertToHtml( const QString& msg, unsigned int formats, voi g = (int)color->green; b = (int)color->blue; } - style += QString(" color: rgb( %1, %2, %3 ); ").arg( r ).arg( g ).arg( b ); + style += TQString(" color: rgb( %1, %2, %3 ); ").arg( r ).arg( g ).arg( b ); - tmp += formatOpeningTag( QString::fromLatin1("span"), QString::fromLatin1("style=\"%1\"").arg( style ) ); + tmp += formatOpeningTag( TQString::fromLatin1("span"), TQString::fromLatin1("style=\"%1\"").arg( style ) ); opened = true; } @@ -122,16 +122,16 @@ GaduRichTextFormat::convertToHtml( const QString& msg, unsigned int formats, voi } QString -GaduRichTextFormat::formatOpeningTag( const QString& tag, const QString& attributes ) +GaduRichTextFormat::formatOpeningTag( const TQString& tag, const TQString& attributes ) { - QString res = "<" + tag; + TQString res = "<" + tag; if(!attributes.isEmpty()) res.append(" " + attributes); return res + ">"; } QString -GaduRichTextFormat::formatClosingTag( const QString& tag ) +GaduRichTextFormat::formatClosingTag( const TQString& tag ) { return "</" + tag + ">"; } @@ -140,18 +140,18 @@ GaduRichTextFormat::formatClosingTag( const QString& tag ) KGaduMessage* GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message ) { - QString htmlString = message.escapedBody(); + TQString htmlString = message.escapedBody(); KGaduMessage* output = new KGaduMessage; rtcs.blue = rtcs.green = rtcs.red = 0; - color = QColor(); + color = TQColor(); int position = 0; rtf.resize( sizeof( gg_msg_richtext) ); output->rtf.resize(0); // test first if there is any HTML formating in it - if( htmlString.find( QString::fromLatin1("</span") ) > -1 ) { - QRegExp findTags( QString::fromLatin1("<span style=\"(.*)\">(.*)</span>") ); + if( htmlString.find( TQString::fromLatin1("</span") ) > -1 ) { + TQRegExp findTags( TQString::fromLatin1("<span style=\"(.*)\">(.*)</span>") ); findTags.setMinimal( true ); int pos = 0; int lastpos = 0; @@ -160,7 +160,7 @@ GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message ) pos = findTags.search( htmlString ); rtfs.font = 0; if ( pos != lastpos ) { - QString tmp; + TQString tmp; if ( pos < 0 ) { tmp = htmlString.mid( lastpos ); } @@ -180,16 +180,16 @@ GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message ) } if ( pos > -1 ) { - QString styleHTML = findTags.cap(1); - QString replacement = findTags.cap(2); - QStringList styleAttrs = QStringList::split( ';', styleHTML ); + TQString styleHTML = findTags.cap(1); + TQString replacement = findTags.cap(2); + TQStringList styleAttrs = TQStringList::split( ';', styleHTML ); rtfs.font = 0; lastpos = pos + replacement.length(); - for( QStringList::Iterator attrPair = styleAttrs.begin(); attrPair != styleAttrs.end(); ++attrPair ) { - QString attribute = (*attrPair).section(':',0,0); - QString value = (*attrPair).section(':',1); + for( TQStringList::Iterator attrPair = styleAttrs.begin(); attrPair != styleAttrs.end(); ++attrPair ) { + TQString attribute = (*attrPair).section(':',0,0); + TQString value = (*attrPair).section(':',1); parseAttributes( attribute, value ); } @@ -198,7 +198,7 @@ GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message ) return NULL; } - QString rep = QString("<span style=\"%1\">%2</span>" ).arg( styleHTML ).arg( replacement ); + TQString rep = TQString("<span style=\"%1\">%2</span>" ).arg( styleHTML ).arg( replacement ); htmlString.replace( findTags.pos( 0 ), rep.length(), replacement ); replacement = unescapeGaduMessage( replacement ); @@ -224,35 +224,35 @@ GaduRichTextFormat::convertToGaduMessage( const Kopete::Message& message ) } void -GaduRichTextFormat::parseAttributes( const QString attribute, const QString value ) +GaduRichTextFormat::parseAttributes( const TQString attribute, const TQString value ) { - if( attribute == QString::fromLatin1("color") ) { + if( attribute == TQString::fromLatin1("color") ) { color.setNamedColor( value ); } - if( attribute == QString::fromLatin1("font-weight") && value == QString::fromLatin1("600") ) { + if( attribute == TQString::fromLatin1("font-weight") && value == TQString::fromLatin1("600") ) { rtfs.font |= GG_FONT_BOLD; } - if( attribute == QString::fromLatin1("text-decoration") && value == QString::fromLatin1("underline") ) { + if( attribute == TQString::fromLatin1("text-decoration") && value == TQString::fromLatin1("underline") ) { rtfs.font |= GG_FONT_UNDERLINE ; } - if( attribute == QString::fromLatin1("font-style") && value == QString::fromLatin1("italic") ) { + if( attribute == TQString::fromLatin1("font-style") && value == TQString::fromLatin1("italic") ) { rtfs.font |= GG_FONT_ITALIC; } } QString -GaduRichTextFormat::unescapeGaduMessage( QString& ns ) +GaduRichTextFormat::unescapeGaduMessage( TQString& ns ) { - QString s; + TQString s; s = Kopete::Message::unescape( ns ); - s.replace( QString::fromAscii( "\n" ), QString::fromAscii( "\r\n" ) ); + s.replace( TQString::fromAscii( "\n" ), TQString::fromAscii( "\r\n" ) ); return s; } bool GaduRichTextFormat::insertRtf( uint position) { - if ( color != QColor( rtcs.red, rtcs.green, rtcs.blue ) ) { + if ( color != TQColor( rtcs.red, rtcs.green, rtcs.blue ) ) { rtcs.red = color.red(); rtcs.green = color.green(); rtcs.blue = color.blue(); @@ -280,12 +280,12 @@ GaduRichTextFormat::insertRtf( uint position) } QString -GaduRichTextFormat::escapeBody( QString& input ) +GaduRichTextFormat::escapeBody( TQString& input ) { - input.replace( '<', QString::fromLatin1("<") ); - input.replace( '>', QString::fromLatin1(">") ); - input.replace( '\n', QString::fromLatin1( "<br />" ) ); - input.replace( '\t', QString::fromLatin1( " " ) ); - input.replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ), QString::fromLatin1( " " ) ); + input.replace( '<', TQString::fromLatin1("<") ); + input.replace( '>', TQString::fromLatin1(">") ); + input.replace( '\n', TQString::fromLatin1( "<br />" ) ); + input.replace( '\t', TQString::fromLatin1( " " ) ); + input.replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( " " ) ); return input; } diff --git a/kopete/protocols/gadu/gadurichtextformat.h b/kopete/protocols/gadu/gadurichtextformat.h index 4f508f17..9476539e 100644 --- a/kopete/protocols/gadu/gadurichtextformat.h +++ b/kopete/protocols/gadu/gadurichtextformat.h @@ -33,17 +33,17 @@ class GaduRichTextFormat { public: GaduRichTextFormat(); ~GaduRichTextFormat(); - QString convertToHtml( const QString&, unsigned int, void* ); + TQString convertToHtml( const TQString&, unsigned int, void* ); KGaduMessage* convertToGaduMessage( const Kopete::Message& ); private: - QString formatOpeningTag( const QString& , const QString& = QString::null ); - QString formatClosingTag( const QString& ); + TQString formatOpeningTag( const TQString& , const TQString& = TQString::null ); + TQString formatClosingTag( const TQString& ); bool insertRtf( uint ); - QString unescapeGaduMessage( QString& ); - void parseAttributes( const QString, const QString ); - QString escapeBody( QString& ); - QColor color; + TQString unescapeGaduMessage( TQString& ); + void parseAttributes( const TQString, const TQString ); + TQString escapeBody( TQString& ); + TQColor color; gg_msg_richtext_format rtfs; gg_msg_richtext_color rtcs; gg_msg_richtext* header; diff --git a/kopete/protocols/gadu/gadusession.cpp b/kopete/protocols/gadu/gadusession.cpp index 3f7c6617..63b696d4 100644 --- a/kopete/protocols/gadu/gadusession.cpp +++ b/kopete/protocols/gadu/gadusession.cpp @@ -29,19 +29,19 @@ #include <kdebug.h> #include "kopetemessage.h" -#include <qsocketnotifier.h> -#include <qtextcodec.h> -#include <qdatetime.h> +#include <tqsocketnotifier.h> +#include <tqtextcodec.h> +#include <tqdatetime.h> #include "gadurichtextformat.h" #include <errno.h> #include <string.h> #include <netinet/in.h> -GaduSession::GaduSession( QObject* parent, const char* name ) -: QObject( parent, name ), session_( 0 ), searchSeqNr_( 0 ) +GaduSession::GaduSession( TQObject* parent, const char* name ) +: TQObject( parent, name ), session_( 0 ), searchSeqNr_( 0 ) { - textcodec = QTextCodec::codecForName( "CP1250" ); + textcodec = TQTextCodec::codecForName( "CP1250" ); rtf = new GaduRichTextFormat; } @@ -114,15 +114,15 @@ GaduSession::createNotifiers( bool connect ) return; } - read_ = new QSocketNotifier( session_->fd, QSocketNotifier::Read, this ); + read_ = new TQSocketNotifier( session_->fd, TQSocketNotifier::Read, this ); read_->setEnabled( false ); - write_ = new QSocketNotifier( session_->fd, QSocketNotifier::Write, this ); + write_ = new TQSocketNotifier( session_->fd, TQSocketNotifier::Write, this ); write_->setEnabled( false ); if ( connect ) { - QObject::connect( read_, SIGNAL( activated( int ) ), SLOT( checkDescriptor() ) ); - QObject::connect( write_, SIGNAL( activated( int ) ), SLOT( checkDescriptor() ) ); + TQObject::connect( read_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( checkDescriptor() ) ); + TQObject::connect( write_, TQT_SIGNAL( activated( int ) ), TQT_SLOT( checkDescriptor() ) ); } } @@ -159,7 +159,7 @@ GaduSession::dccRequest( const unsigned int uin ) void GaduSession::login( KGaduLoginParams* loginp ) { - QCString desc = textcodec->fromUnicode( loginp->statusDescr ); + TQCString desc = textcodec->fromUnicode( loginp->statusDescr ); memset( ¶ms_, 0, sizeof(params_) ); @@ -248,8 +248,8 @@ GaduSession::removeNotify( uin_t uin ) int GaduSession::sendMessage( uin_t recipient, const Kopete::Message& msg, int msgClass ) { - QString sendMsg; - QCString cpMsg; + TQString sendMsg; + TQCString cpMsg; KGaduMessage* gadumessage; if ( isConnected() ) { @@ -265,7 +265,7 @@ GaduSession::sendMessage( uin_t recipient, const Kopete::Message& msg, int msgCl } else { sendMsg = msg.plainBody(); - sendMsg.replace( QString::fromAscii( "\n" ), QString::fromAscii( "\r\n" ) ); + sendMsg.replace( TQString::fromAscii( "\n" ), TQString::fromAscii( "\r\n" ) ); cpMsg = textcodec->fromUnicode( sendMsg ); return gg_send_message( session_, msgClass, recipient, (const unsigned char *)cpMsg.data() ); @@ -293,9 +293,9 @@ GaduSession::changeStatus( int status, bool forFriends ) } int -GaduSession::changeStatusDescription( int status, const QString& descr, bool forFriends ) +GaduSession::changeStatusDescription( int status, const TQString& descr, bool forFriends ) { - QCString ndescr; + TQCString ndescr; ndescr= textcodec->fromUnicode(descr); @@ -393,7 +393,7 @@ GaduSession::publishPersonalInformation( ResLine& d ) unsigned int GaduSession::pubDirSearch( ResLine& query, int ageFrom, int ageTo, bool onlyAlive ) { - QString bufYear; + TQString bufYear; unsigned int reqNr; gg_pubdir50_t searchRequest; @@ -424,8 +424,8 @@ GaduSession::pubDirSearch( ResLine& query, int ageFrom, int ageTo, bool onlyAli (const char*)textcodec->fromUnicode( query.city ) ); } if ( ageFrom || ageTo ) { - QString yearFrom = QString::number( QDate::currentDate().year() - ageFrom ); - QString yearTo = QString::number( QDate::currentDate().year() - ageTo ); + TQString yearFrom = TQString::number( TQDate::currentDate().year() - ageFrom ); + TQString yearTo = TQString::number( TQDate::currentDate().year() - ageTo ); if ( ageFrom && ageTo ) { gg_pubdir50_add( searchRequest, GG_PUBDIR50_BIRTHYEAR, @@ -452,10 +452,10 @@ GaduSession::pubDirSearch( ResLine& query, int ageFrom, int ageTo, bool onlyAli } // otherwise we are looking only for one fellow with this nice UIN else{ - gg_pubdir50_add( searchRequest, GG_PUBDIR50_UIN, QString::number( query.uin ).ascii() ); + gg_pubdir50_add( searchRequest, GG_PUBDIR50_UIN, TQString::number( query.uin ).ascii() ); } - gg_pubdir50_add( searchRequest, GG_PUBDIR50_START, QString::number( searchSeqNr_ ).ascii() ); + gg_pubdir50_add( searchRequest, GG_PUBDIR50_START, TQString::number( searchSeqNr_ ).ascii() ); reqNr = gg_pubdir50( session_, searchRequest ); gg_pubdir50_free( searchRequest ); @@ -476,13 +476,13 @@ GaduSession::sendResult( gg_pubdir50_t result ) } for ( i = 0; i < count; i++ ) { - resultLine.uin = QString( gg_pubdir50_get( result, i, GG_PUBDIR50_UIN ) ).toInt(); + resultLine.uin = TQString( gg_pubdir50_get( result, i, GG_PUBDIR50_UIN ) ).toInt(); resultLine.firstname = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_FIRSTNAME ) ); resultLine.surname = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_LASTNAME ) ); resultLine.nickname = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_NICKNAME ) ); resultLine.age = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_BIRTHYEAR ) ); resultLine.city = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_CITY ) ); - QString stat = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_STATUS ) ); + TQString stat = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_STATUS ) ); resultLine.orgin = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_FAMILYCITY ) ); resultLine.meiden = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_FAMILYNAME ) ); resultLine.gender = textcodec->toUnicode( gg_pubdir50_get( result, i, GG_PUBDIR50_GENDER ) ); @@ -490,7 +490,7 @@ GaduSession::sendResult( gg_pubdir50_t result ) resultLine.status = stat.toInt(); age = resultLine.age.toInt(); if ( age ) { - resultLine.age = QString::number( QDate::currentDate().year() - age ); + resultLine.age = TQString::number( TQDate::currentDate().year() - age ); } else { resultLine.age.truncate( 0 ); @@ -522,7 +522,7 @@ GaduSession::requestContacts() void GaduSession::exportContactsOnServer( GaduContactsList* contactsList ) { - QCString plist; + TQCString plist; if ( !session_ || session_->state != GG_STATE_CONNECTED ) { kdDebug( 14100 ) << "you need to connect to export Contacts list " << endl; @@ -544,7 +544,7 @@ GaduSession::exportContactsOnServer( GaduContactsList* contactsList ) void GaduSession::handleUserlist( gg_event* event ) { - QString ul; + TQString ul; switch( event->event.userlist.type ) { case GG_USERLIST_GET_REPLY: if ( event->event.userlist.reply ) { @@ -617,7 +617,7 @@ GaduSession::errorDescription( int err ) case GG_ERROR_WRITING: return i18n( "Writing error." ); default: - return i18n( "Unknown error number %1." ).arg( QString::number( (unsigned int)err ) ); + return i18n( "Unknown error number %1." ).arg( TQString::number( (unsigned int)err ) ); } } @@ -638,11 +638,11 @@ GaduSession::failureDescription( gg_failure_t f ) case GG_FAILURE_PASSWORD: return i18n( "Incorrect password." ); case GG_FAILURE_404: - return QString::fromAscii( "404." ); + return TQString::fromAscii( "404." ); case GG_FAILURE_TLS: return i18n( "Unable to connect over encrypted channel.\nTry to turn off encryption support in Gadu account settings and reconnect." ); default: - return i18n( "Unknown error number %1." ).arg( QString::number( (unsigned int)f ) ); + return i18n( "Unknown error number %1." ).arg( TQString::number( (unsigned int)f ) ); } } @@ -730,7 +730,7 @@ GaduSession::checkDescriptor() gaduNotify.description = textcodec->toUnicode( event->event.status.descr ); } else { - gaduNotify.description = QString::null; + gaduNotify.description = TQString::null; } gaduNotify.remote_port = 0; gaduNotify.version = 0; @@ -747,7 +747,7 @@ GaduSession::checkDescriptor() gaduNotify.description = textcodec->toUnicode( event->event.status60.descr ); } else { - gaduNotify.description = QString::null; + gaduNotify.description = TQString::null; } gaduNotify.remote_ip.setAddress( ntohl( event->event.status60.remote_ip ) ); gaduNotify.remote_port = event->event.status60.remote_port; diff --git a/kopete/protocols/gadu/gadusession.h b/kopete/protocols/gadu/gadusession.h index 9ace0f18..f690ed46 100644 --- a/kopete/protocols/gadu/gadusession.h +++ b/kopete/protocols/gadu/gadusession.h @@ -25,14 +25,14 @@ #include "kopeteaccount.h" -#include <qvaluelist.h> -#include <qptrlist.h> -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qdatetime.h> -#include <qcstring.h> -#include <qhostaddress.h> +#include <tqvaluelist.h> +#include <tqptrlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqdatetime.h> +#include <tqcstring.h> +#include <tqhostaddress.h> #include "gaducontactlist.h" @@ -47,10 +47,10 @@ struct KGaduMessage { struct KGaduLoginParams { uin_t uin; - QString password; + TQString password; bool useTls; int status; - QString statusDescr; + TQString statusDescr; unsigned int server; bool forFriends; unsigned int client_addr; @@ -59,30 +59,30 @@ struct KGaduLoginParams { struct KGaduNotify { int status; - QHostAddress remote_ip; + TQHostAddress remote_ip; unsigned short remote_port; bool fileCap; int version; int image_size; int time; - QString description; + TQString description; unsigned int contact_id; }; struct ResLine{ unsigned int uin; - QString firstname; - QString surname; - QString nickname; - QString age; - QString city; - QString orgin; - QString meiden; - QString gender; + TQString firstname; + TQString surname; + TQString nickname; + TQString age; + TQString city; + TQString orgin; + TQString meiden; + TQString gender; int status; }; -typedef QValueList<ResLine> SearchResult; +typedef TQValueList<ResLine> SearchResult; class QSocketNotifier; class QStringList; @@ -94,15 +94,15 @@ class GaduSession : public QObject Q_OBJECT public: - GaduSession( QObject* parent = 0, const char* name = 0 ); + GaduSession( TQObject* parent = 0, const char* name = 0 ); virtual ~GaduSession(); bool isConnected() const; int status() const; - QString contactsToString( GaduContactsList* contactsList ); - bool stringToContacts( GaduContactsList& , const QString& ); - static QString failureDescription( gg_failure_t ); - static QString errorDescription( int err ); - static QString stateDescription( int state ); + TQString contactsToString( GaduContactsList* contactsList ); + bool stringToContacts( GaduContactsList& , const TQString& ); + static TQString failureDescription( gg_failure_t ); + static TQString errorDescription( int err ); + static TQString stateDescription( int state ); void dccRequest( const unsigned int ); unsigned int getPersonalInformation(); /* @@ -124,7 +124,7 @@ public slots: int removeNotify( uin_t ); int sendMessage( uin_t recipient, const Kopete::Message& msg, int msgClass ); int changeStatus( int, bool forFriends = false ); - int changeStatusDescription( int, const QString&, bool forFriends = false ); + int changeStatusDescription( int, const TQString&, bool forFriends = false ); int ping(); void requestContacts(); @@ -138,7 +138,7 @@ public slots: bool publishPersonalInformation( ResLine& ); signals: - void error( const QString&, const QString& ); + void error( const TQString&, const TQString& ); void messageReceived( KGaduMessage* ); void ackReceived( unsigned int ); void contactStatusChanged( KGaduNotify* ); @@ -147,7 +147,7 @@ signals: void connectionSucceed( ); void disconnect( Kopete::Account::DisconnectReason ); void pubDirSearchResult( const SearchResult&, unsigned int ); - void userListRecieved( const QString& ); + void userListRecieved( const TQString& ); void userListExported(); void incomingCtcp( unsigned int ); @@ -167,10 +167,10 @@ private: void createNotifiers( bool connect ); gg_session* session_; - QSocketNotifier* read_; - QSocketNotifier* write_; + TQSocketNotifier* read_; + TQSocketNotifier* write_; gg_login_params params_; - QTextCodec* textcodec; + TQTextCodec* textcodec; int searchSeqNr_; GaduRichTextFormat* rtf; }; |