summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/gadu/gadusession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/gadu/gadusession.cpp')
-rw-r--r--kopete/protocols/gadu/gadusession.cpp62
1 files changed, 31 insertions, 31 deletions
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( &params_, 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;