summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/gadu/gaduaccount.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/gadu/gaduaccount.cpp')
-rw-r--r--kopete/protocols/gadu/gaduaccount.cpp106
1 files changed, 53 insertions, 53 deletions
diff --git a/kopete/protocols/gadu/gaduaccount.cpp b/kopete/protocols/gadu/gaduaccount.cpp
index 2293143f..985111a4 100644
--- a/kopete/protocols/gadu/gaduaccount.cpp
+++ b/kopete/protocols/gadu/gaduaccount.cpp
@@ -81,7 +81,7 @@ public:
int currentServer;
unsigned int serverIP;
- QString lastDescription;
+ TQString lastDescription;
bool forFriends;
bool ignoreAnons;
@@ -114,8 +114,8 @@ static const char* const servers_ip[] = {
#define NUM_SERVERS (sizeof(servers_ip)/sizeof(char*))
- GaduAccount::GaduAccount( Kopete::Protocol* parent, const TQString& accountID,const char* name )
-: Kopete::PasswordedAccount( parent, accountID, 0, name )
+ GaduAccount::GaduAccount( Kopete::Protocol* tqparent, const TQString& accountID,const char* name )
+: Kopete::PasswordedAccount( tqparent, accountID, 0, name )
{
TQHostAddress ip;
p = new GaduAccountPrivate;
@@ -132,8 +132,8 @@ 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 = TQString::null;
+ p->status = GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL );
+ p->lastDescription = TQString();
for ( unsigned int i = 0; i < NUM_SERVERS ; i++ ) {
ip.setAddress( TQString( servers_ip[i] ) );
@@ -234,15 +234,15 @@ GaduAccount::initConnections()
void
GaduAccount::setAway( bool isAway, const TQString& awayMessage )
{
- unsigned int currentStatus;
+ unsigned int currenttqStatus;
if ( isAway ) {
- currentStatus = ( awayMessage.isEmpty() ) ? GG_STATUS_BUSY : GG_STATUS_BUSY_DESCR;
+ currenttqStatus = ( awayMessage.isEmpty() ) ? GG_STATUS_BUSY : GG_STATUS_BUSY_DESCR;
}
else{
- currentStatus = ( awayMessage.isEmpty() ) ? GG_STATUS_AVAIL : GG_STATUS_AVAIL_DESCR;
+ currenttqStatus = ( awayMessage.isEmpty() ) ? GG_STATUS_AVAIL : GG_STATUS_AVAIL_DESCR;
}
- changeStatus( GaduProtocol::protocol()->convertStatus( currentStatus ), awayMessage );
+ changetqStatus( GaduProtocol::protocol()->converttqStatus( currenttqStatus ), awayMessage );
}
@@ -251,8 +251,8 @@ GaduAccount::actionMenu()
{
kdDebug(14100) << "actionMenu() " << endl;
- p->actionMenu_ = new KActionMenu( accountId(), myself()->onlineStatus().iconFor( this ), this );
- p->actionMenu_->popupMenu()->insertTitle( myself()->onlineStatus().iconFor( myself() ), i18n( "%1 <%2> " ).
+ p->actionMenu_ = new KActionMenu( accountId(), myself()->onlinetqStatus().iconFor( this ), this );
+ p->actionMenu_->popupMenu()->insertTitle( myself()->onlinetqStatus().iconFor( myself() ), i18n( "%1 <%2> " ).
arg( myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString(), accountId() ) );
if ( p->session_->isConnected() ) {
@@ -287,19 +287,19 @@ GaduAccount::actionMenu()
p->listFromFileAction->setEnabled( TRUE );
}
p->actionMenu_->insert( new KAction( i18n( "Go O&nline" ),
- GaduProtocol::protocol()->convertStatus( GG_STATUS_AVAIL ).iconFor( this ),
+ GaduProtocol::protocol()->converttqStatus( GG_STATUS_AVAIL ).iconFor( this ),
0, this, TQT_SLOT( slotGoOnline() ), this, "actionGaduConnect" ) );
p->actionMenu_->insert( new KAction( i18n( "Set &Busy" ),
- GaduProtocol::protocol()->convertStatus( GG_STATUS_BUSY ).iconFor( this ),
+ GaduProtocol::protocol()->converttqStatus( GG_STATUS_BUSY ).iconFor( this ),
0, this, TQT_SLOT( slotGoBusy() ), this, "actionGaduConnect" ) );
p->actionMenu_->insert( new KAction( i18n( "Set &Invisible" ),
- GaduProtocol::protocol()->convertStatus( GG_STATUS_INVISIBLE ).iconFor( this ),
+ GaduProtocol::protocol()->converttqStatus( GG_STATUS_INVISIBLE ).iconFor( this ),
0, this, TQT_SLOT( slotGoInvisible() ), this, "actionGaduConnect" ) );
p->actionMenu_->insert( new KAction( i18n( "Go &Offline" ),
- GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ).iconFor( this ),
+ GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL ).iconFor( this ),
0, this, TQT_SLOT( slotGoOffline() ), this, "actionGaduConnect" ) );
p->actionMenu_->insert( new KAction( i18n( "Set &Description..." ), "info",
@@ -332,7 +332,7 @@ GaduAccount::connectWithPassword(const TQString& password)
if (isConnected ())
return;
// FIXME: add status description to this mechainsm, this is a hack now. libkopete design issue.
- changeStatus( initialStatus(), p->lastDescription );
+ changetqStatus( initialtqStatus(), p->lastDescription );
}
void
@@ -353,7 +353,7 @@ void
GaduAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason )
{
kdDebug(14100) << k_funcinfo << "Called" << endl;
- changeStatus( status, reason);
+ changetqStatus( status, reason);
}
void
@@ -375,12 +375,12 @@ GaduAccount::userlistChanged()
}
bool
-GaduAccount::createContact( const TQString& contactId, Kopete::MetaContact* parentContact )
+GaduAccount::createContact( const TQString& contactId, Kopete::MetaContact* tqparentContact )
{
kdDebug(14100) << "createContact " << contactId << endl;
uin_t uinNumber = contactId.toUInt();
- GaduContact* newContact = new GaduContact( uinNumber, parentContact->displayName(),this, parentContact );
+ GaduContact* newContact = new GaduContact( uinNumber, tqparentContact->displayName(),this, tqparentContact );
newContact->setParentIdentity( accountId() );
addNotify( uinNumber );
@@ -390,13 +390,13 @@ GaduAccount::createContact( const TQString& contactId, Kopete::MetaContact* pare
}
void
-GaduAccount::changeStatus( const Kopete::OnlineStatus& status, const TQString& descr )
+GaduAccount::changetqStatus( const Kopete::OnlineStatus& status, const TQString& descr )
{
unsigned int ns;
kdDebug(14100) << "##### change status #####" << endl;
- kdDebug(14100) << "### Status = " << p->session_->isConnected() << endl;
- kdDebug(14100) << "### Status description = \"" << descr << "\"" << endl;
+ kdDebug(14100) << "### tqStatus = " << p->session_->isConnected() << endl;
+ kdDebug(14100) << "### tqStatus description = \"" << descr << "\"" << endl;
// if change to not available, log off
if ( GG_S_NA( status.internalStatus() ) ) {
@@ -418,14 +418,14 @@ GaduAccount::changeStatus( const Kopete::OnlineStatus& status, const TQString& d
if (!descr.isEmpty() && !GaduProtocol::protocol()->statusWithDescription( status.internalStatus() ) ) {
// and rerun us again. This won't cause any recursive call, as both conversions are static
ns = GaduProtocol::protocol()->statusToWithDescription( status );
- changeStatus( GaduProtocol::protocol()->convertStatus( ns ), descr );
+ changetqStatus( GaduProtocol::protocol()->converttqStatus( ns ), descr );
return;
}
// well, if it's empty but we want to set status with desc, change it too
if (descr.isEmpty() && GaduProtocol::protocol()->statusWithDescription( status.internalStatus() ) ) {
ns = GaduProtocol::protocol()->statusToWithoutDescription( status );
- changeStatus( GaduProtocol::protocol()->convertStatus( ns ), descr );
+ changetqStatus( GaduProtocol::protocol()->converttqStatus( ns ), descr );
return;
}
@@ -455,7 +455,7 @@ GaduAccount::changeStatus( const Kopete::OnlineStatus& status, const TQString& d
else {
p->status = status;
if ( descr.isEmpty() ) {
- if ( p->session_->changeStatus( status.internalStatus(), p->forFriends ) != 0 )
+ if ( p->session_->changetqStatus( status.internalStatus(), p->forFriends ) != 0 )
return;
}
else {
@@ -481,7 +481,7 @@ GaduAccount::slotLogin( int status, const TQString& dscr )
{
p->lastDescription = dscr;
- myself()->setOnlineStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_CONNECTING ));
+ myself()->setOnlineStatus( GaduProtocol::protocol()->converttqStatus( GG_STATUS_CONNECTING ));
myself()->setProperty( GaduProtocol::protocol()->propAwayMessage, dscr );
if ( !p->session_->isConnected() ) {
@@ -507,16 +507,16 @@ GaduAccount::slotLogin( int status, const TQString& dscr )
}
}
else {
- p->session_->changeStatus( status );
+ p->session_->changetqStatus( status );
}
}
void
GaduAccount::slotLogoff()
{
- if ( p->session_->isConnected() || p->status == GaduProtocol::protocol()->convertStatus( GG_STATUS_CONNECTING )) {
- p->status = GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL );
- changeStatus( p->status );
+ if ( p->session_->isConnected() || p->status == GaduProtocol::protocol()->converttqStatus( GG_STATUS_CONNECTING )) {
+ p->status = GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL );
+ changetqStatus( p->status );
p->session_->logoff();
dccOff();
}
@@ -525,7 +525,7 @@ GaduAccount::slotLogoff()
void
GaduAccount::slotGoOnline()
{
- changeStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_AVAIL ) );
+ changetqStatus( GaduProtocol::protocol()->converttqStatus( GG_STATUS_AVAIL ) );
}
void
GaduAccount::slotGoOffline()
@@ -537,13 +537,13 @@ GaduAccount::slotGoOffline()
void
GaduAccount::slotGoInvisible()
{
- changeStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_INVISIBLE ) );
+ changetqStatus( GaduProtocol::protocol()->converttqStatus( GG_STATUS_INVISIBLE ) );
}
void
GaduAccount::slotGoBusy()
{
- changeStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_BUSY ) );
+ changetqStatus( GaduProtocol::protocol()->converttqStatus( GG_STATUS_BUSY ) );
}
void
@@ -648,7 +648,7 @@ GaduAccount::contactStatusChanged( KGaduNotify* gaduNotify )
return;
}
- contact->changedStatus( gaduNotify );
+ contact->changedtqStatus( gaduNotify );
}
void
@@ -675,14 +675,14 @@ GaduAccount::connectionFailed( gg_failure_t failure )
case GG_FAILURE_PASSWORD:
password().setWrong();
// user pressed CANCEL
- p->status = GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL );
+ p->status = GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL );
myself()->setOnlineStatus( p->status );
disconnected( BadPassword );
return;
default:
if ( p->connectWithSSL ) {
if ( useTls() != TLS_only ) {
- slotCommandDone( TQString::null, i18n( "connection using SSL was not possible, retrying without." ) );
+ slotCommandDone( TQString(), i18n( "connection using SSL was not possible, retrying without." ) );
kdDebug( 14100 ) << "try without tls now" << endl;
p->connectWithSSL = false;
tryReconnect = true;
@@ -710,9 +710,9 @@ GaduAccount::connectionFailed( gg_failure_t failure )
slotLogin( p->status.internalStatus() , p->lastDescription );
}
else {
- error( i18n( "unable to connect to the Gadu-Gadu server(\"%1\")." ).arg( GaduSession::failureDescription( failure ) ),
+ error( i18n( "unable to connect to the Gadu-Gadu server(\"%1\")." ).tqarg( GaduSession::failureDescription( failure ) ),
i18n( "Connection Error" ) );
- p->status = GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL );
+ p->status = GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL );
myself()->setOnlineStatus( p->status );
disconnected( InvalidHost );
}
@@ -777,7 +777,7 @@ void
GaduAccount::connectionSucceed( )
{
kdDebug(14100) << "#### Gadu-Gadu connected! " << endl;
- p->status = GaduProtocol::protocol()->convertStatus( p->session_->status() );
+ p->status = GaduProtocol::protocol()->converttqStatus( p->session_->status() );
myself()->setOnlineStatus( p->status );
myself()->setProperty( GaduProtocol::protocol()->propAwayMessage, p->lastDescription );
startNotify();
@@ -822,11 +822,11 @@ GaduAccount::slotSessionDisconnect( Kopete::Account::DisconnectReason reason )
p->pingTimer_->stop();
}
- setAllContactsStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ) );
+ setAllContactstqStatus( GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL ) );
- status = myself()->onlineStatus().internalStatus();
+ status = myself()->onlinetqStatus().internalStatus();
if ( status != GG_STATUS_NOT_AVAIL || status != GG_STATUS_NOT_AVAIL_DESCR ) {
- myself()->setOnlineStatus( GaduProtocol::protocol()->convertStatus( GG_STATUS_NOT_AVAIL ) );
+ myself()->setOnlineStatus( GaduProtocol::protocol()->converttqStatus( GG_STATUS_NOT_AVAIL ) );
}
GaduAccount::disconnect( reason );
}
@@ -894,7 +894,7 @@ GaduAccount::userlist( const TQString& contactsListString )
void
GaduAccount::userListExportDone()
{
- slotCommandDone( TQString::null, i18n( "Contacts exported to the server.") );
+ slotCommandDone( TQString(), i18n( "Contacts exported to the server.") );
}
void
@@ -903,7 +903,7 @@ GaduAccount::slotFriendsMode()
p->forFriends = !p->forFriends;
kdDebug( 14100 ) << "for friends mode: " << p->forFriends << " desc" << p->lastDescription << endl;
// now change status, it will changing it with p->forFriends flag
- changeStatus( p->status, p->lastDescription );
+ changetqStatus( p->status, p->lastDescription );
saveFriendsMode( p->forFriends );
@@ -922,10 +922,10 @@ GaduAccount::slotExportContactsListToFile()
return;
}
- p->saveListDialog = new KFileDialog( "::kopete-gadu" + accountId(), TQString::null,
+ p->saveListDialog = new KFileDialog( "::kopete-gadu" + accountId(), TQString(),
Kopete::UI::Global::mainWidget(), "gadu-list-save", false );
p->saveListDialog->setCaption(
- i18n("Save Contacts List for Account %1 As").arg(
+ i18n("Save Contacts List for Account %1 As").tqarg(
myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString() ) );
if ( p->saveListDialog->exec() == TQDialog::Accepted ) {
@@ -968,10 +968,10 @@ GaduAccount::slotImportContactsFromFile()
return;
}
- p->loadListDialog = new KFileDialog( "::kopete-gadu" + accountId(), TQString::null,
+ p->loadListDialog = new KFileDialog( "::kopete-gadu" + accountId(), TQString(),
Kopete::UI::Global::mainWidget(), "gadu-list-load", true );
p->loadListDialog->setCaption(
- i18n("Load Contacts List for Account %1 As").arg(
+ i18n("Load Contacts List for Account %1 As").tqarg(
myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString() ) );
if ( p->loadListDialog->exec() == TQDialog::Accepted ) {
@@ -1077,7 +1077,7 @@ GaduAccount::slotDescription()
GaduAway* away = new GaduAway( this );
if( away->exec() == TQDialog::Accepted ) {
- changeStatus( GaduProtocol::protocol()->convertStatus( away->status() ),
+ changetqStatus( GaduProtocol::protocol()->converttqStatus( away->status() ),
away->awayText() );
}
delete away;
@@ -1156,8 +1156,8 @@ GaduAccount::setDcc( bool d )
void
GaduAccount::saveFriendsMode( bool i )
{
- p->config->writeEntry( TQString::fromAscii( "forFriends" ),
- i == true ? TQString::fromAscii( "1" ) : TQString::fromAscii( "0" ) );
+ p->config->writeEntry( TQString(TQString::fromAscii( "forFriends" )),
+ TQString(i == true ? TQString::fromAscii( "1" ) : TQString::fromAscii( "0" ) ));
}
bool
@@ -1201,8 +1201,8 @@ void
GaduAccount::setIgnoreAnons( bool i )
{
p->ignoreAnons = i;
- p->config->writeEntry( TQString::fromAscii( "ignoreAnons" ),
- i == true ? TQString::fromAscii( "1" ) : TQString::fromAscii( "0" ) );
+ p->config->writeEntry( TQString(TQString::fromAscii( "ignoreAnons" )),
+ TQString(i == true ? TQString::fromAscii( "1" ) : TQString::fromAscii( "0" ) ));
}
GaduAccount::tlsConnection