summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/irc/libkirc/kirctransfer.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/irc/libkirc/kirctransfer.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/irc/libkirc/kirctransfer.cpp')
-rw-r--r--kopete/protocols/irc/libkirc/kirctransfer.cpp100
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);
}
}