diff options
Diffstat (limited to 'kopete/protocols/irc/libkirc/kirctransfer.cpp')
-rw-r--r-- | kopete/protocols/irc/libkirc/kirctransfer.cpp | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/kopete/protocols/irc/libkirc/kirctransfer.cpp b/kopete/protocols/irc/libkirc/kirctransfer.cpp index 2466d6a9..af7d8948 100644 --- a/kopete/protocols/irc/libkirc/kirctransfer.cpp +++ b/kopete/protocols/irc/libkirc/kirctransfer.cpp @@ -19,30 +19,30 @@ #include <kextsock.h> #include <klocale.h> -#include <qfile.h> -#include <qtimer.h> +#include <tqfile.h> +#include <tqtimer.h> #include "kirctransfer.h" using namespace KIRC; -Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress +Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress Type type, - QObject *parent, const char *name ) - : QObject( parent, name ), + TQObject *parent, const char *name ) + : TQObject( parent, name ), m_engine(engine), m_nick(nick), m_type(type), m_socket(0), m_initiated(false), - m_file(0), m_fileName(QString::null), m_fileSize(0), m_fileSizeCur(0), m_fileSizeAck(0), + m_file(0), m_fileName(TQString::null), m_fileSize(0), m_fileSizeCur(0), m_fileSizeAck(0), m_receivedBytes(0), m_receivedBytesLimit(0), m_sentBytes(0), m_sentBytesLimit(0) { } -Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress +Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress Transfer::Type type, - QString fileName, Q_UINT32 fileSize, // put this in a QVariant ? - QObject *parent, const char *name ) - : QObject( parent, name ), + TQString fileName, Q_UINT32 fileSize, // put this in a TQVariant ? + TQObject *parent, const char *name ) + : TQObject( parent, name ), m_engine(engine), m_nick(nick), m_type(type), m_socket(0), m_initiated(false), @@ -51,12 +51,12 @@ Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress { } -Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress - QHostAddress hostAdress, Q_UINT16 port, // put this in a QVariant ? +Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress + TQHostAddress hostAdress, Q_UINT16 port, // put this in a TQVariant ? Transfer::Type type, - QString fileName, Q_UINT32 fileSize, // put this in a QVariant ? - QObject *parent, const char *name ) - : QObject( parent, name ), + TQString fileName, Q_UINT32 fileSize, // put this in a TQVariant ? + TQObject *parent, const char *name ) + : TQObject( parent, name ), m_engine(engine), m_nick(nick), m_type(type), m_socket(0), m_initiated(false), @@ -66,10 +66,10 @@ Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress setSocket(new KExtendedSocket(hostAdress.toString(), port)); } /* -Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress - Transfer::Type type, QVariant properties, - QObject *parent, const char *name ) - : QObject( parent, name ), +Transfer::Transfer( Engine *engine, TQString nick,// TQString nick_peer_adress + Transfer::Type type, TQVariant properties, + TQObject *parent, const char *name ) + : TQObject( parent, name ), m_engine(engine), m_nick(nick), m_type(type), m_socket(properties[socket]), m_initiated(false), @@ -81,11 +81,11 @@ Transfer::Transfer( Engine *engine, QString nick,// QString nick_peer_adress else if(!properites["hostAddress"].isNull() && !properites["hostPort"].isNull()) setSocket(new KExtendedSocket(properites["hostAddress"], properites["hostPort"])); - connect(this, SIGNAL(complete()), - this, SLOT(closeSocket())); + connect(this, TQT_SIGNAL(complete()), + this, TQT_SLOT(closeSocket())); - connect(this, SIGNAL(abort(QString)), - this, SLOT(closeSocket())); + connect(this, TQT_SIGNAL(abort(TQString)), + this, TQT_SLOT(closeSocket())); } */ Transfer::~Transfer() @@ -116,7 +116,7 @@ void Transfer::slotError( int error ) bool Transfer::initiate() { - QTimer *timer = 0; + TQTimer *timer = 0; if(m_initiated) { @@ -134,39 +134,39 @@ bool Transfer::initiate() m_file.setName(m_fileName); - connect(this, SIGNAL(complete()), - this, SLOT(closeSocket())); - connect(this, SIGNAL(abort(QString)), - this, SLOT(closeSocket())); + connect(this, TQT_SIGNAL(complete()), + this, TQT_SLOT(closeSocket())); + connect(this, TQT_SIGNAL(abort(TQString)), + this, TQT_SLOT(closeSocket())); -// connect(m_socket, SIGNAL(connectionClosed()), -// this, SLOT(slotConnectionClosed())); -// connect(m_socket, SIGNAL(delayedCloseFinished()), -// this, SLOT(slotConnectionClosed())); - connect(m_socket, SIGNAL(error(int)), // FIXME: connection failed: No such signal KExtendedSocket::error(int) - this, SLOT(slotError(int))); +// connect(m_socket, TQT_SIGNAL(connectionClosed()), +// this, TQT_SLOT(slotConnectionClosed())); +// connect(m_socket, TQT_SIGNAL(delayedCloseFinished()), +// this, TQT_SLOT(slotConnectionClosed())); + connect(m_socket, TQT_SIGNAL(error(int)), // FIXME: connection failed: No such signal KExtendedSocket::error(int) + this, TQT_SLOT(slotError(int))); switch( m_type ) { case Chat: kdDebug(14121) << k_funcinfo << "Stting up a chat." << endl; - connect(m_socket, SIGNAL(readyRead()), - this, SLOT(readyReadFileIncoming())); + connect(m_socket, TQT_SIGNAL(readyRead()), + this, TQT_SLOT(readyReadFileIncoming())); break; case FileIncoming: kdDebug(14121) << k_funcinfo << "Stting up an incoming file transfer." << endl; m_file.open(IO_WriteOnly); - connect(m_socket, SIGNAL(readyRead()), - this, SLOT(readyReadFileIncoming())); + connect(m_socket, TQT_SIGNAL(readyRead()), + this, TQT_SLOT(readyReadFileIncoming())); break; case FileOutgoing: kdDebug(14121) << k_funcinfo << "Stting up an outgoing file transfer." << endl; m_file.open(IO_ReadOnly); - connect(m_socket, SIGNAL(readyRead()), - this, SLOT(readyReadFileOutgoing())); -// timer = new QTimer(this); -// connect(timer, SIGNAL(timeout()), -// this, SLOT(writeFileOutgoing())); + connect(m_socket, TQT_SIGNAL(readyRead()), + this, TQT_SLOT(readyReadFileOutgoing())); +// timer = new TQTimer(this); +// connect(timer, TQT_SIGNAL(timeout()), +// this, TQT_SLOT(writeFileOutgoing())); // timer->start(1000, false); writeFileOutgoing(); // send a first packet. break; @@ -189,9 +189,9 @@ bool Transfer::initiate() // I wonder if calling this is really necessary // As far as I understand, buffer (socket buffer at least) should be flushed while event-looping. // But I'm not really sure of this, so I force the flush. - timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), - this, SLOT(flush())); + timer = new TQTimer(this); + connect(timer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(flush())); timer->start(1000, FALSE); // flush the streams at every seconds return true; @@ -240,12 +240,12 @@ void Transfer::closeSocket() m_socket->flush(); } -void Transfer::userAbort(QString msg) +void Transfer::userAbort(TQString msg) { emit abort(msg); } -void Transfer::setCodec( QTextCodec *codec ) +void Transfer::setCodec( TQTextCodec *codec ) { switch( m_type ) { @@ -258,7 +258,7 @@ void Transfer::setCodec( QTextCodec *codec ) } } -void Transfer::writeLine( const QString &line ) +void Transfer::writeLine( const TQString &line ) { switch( m_type ) { @@ -275,7 +275,7 @@ void Transfer::readyReadLine() { if( m_socket->canReadLine() ) { - QString msg = m_socket_textStream.readLine(); + TQString msg = m_socket_textStream.readLine(); emit readLine(msg); } } |