summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/gadu/gaduaccount.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/gadu/gaduaccount.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-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/gaduaccount.cpp')
-rw-r--r--kopete/protocols/gadu/gaduaccount.cpp226
1 files changed, 113 insertions, 113 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"