summaryrefslogtreecommitdiffstats
path: root/src/modules/dcc/send.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/dcc/send.cpp')
-rw-r--r--src/modules/dcc/send.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/modules/dcc/send.cpp b/src/modules/dcc/send.cpp
index a7485ca2..e3ef9e7d 100644
--- a/src/modules/dcc/send.cpp
+++ b/src/modules/dcc/send.cpp
@@ -67,7 +67,7 @@
#include <tqglobal.h>
#include <tqcheckbox.h>
#include <tqspinbox.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqpushbutton.h>
#define INSTANT_BANDWIDTH_CHECK_INTERVAL_IN_MSECS 3000
@@ -753,7 +753,7 @@ KviDccFileTransfer::KviDccFileTransfer(KviDccDescriptor * dcc)
m_tTransferEndTime = 0;
m_szStatusString = __tr2qs_ctx("Setting up the connection","dcc");
- m_eGeneraltqStatus = Connecting;
+ m_eGeneralStatus = Connecting;
bool bOk;
m_uTotalFileSize = dcc->bRecvFile ? dcc->szFileSize.toUInt(&bOk) : dcc->szLocalFileSize.toUInt(&bOk);
@@ -811,11 +811,11 @@ void KviDccFileTransfer::startConnection()
if(!(m_pDescriptor->bActive))
{
// PASSIVE CONNECTION
- m_szStatusString = __tr2qs_ctx("Attempting a passive DCC %1 connection","dcc").tqarg(m_szDccType.ptr());
+ m_szStatusString = __tr2qs_ctx("Attempting a passive DCC %1 connection","dcc").arg(m_szDccType.ptr());
outputAndLog(m_szStatusString);
} else {
// ACTIVE CONNECTION
- m_szStatusString = __tr2qs_ctx("Attempting an active DCC %1 connection","dcc").tqarg(m_szDccType.ptr());
+ m_szStatusString = __tr2qs_ctx("Attempting an active DCC %1 connection","dcc").arg(m_szDccType.ptr());
outputAndLog(m_szStatusString);
}
@@ -841,7 +841,7 @@ void KviDccFileTransfer::startConnection()
m_pDescriptor->szPort.utf8().data(),
m_pDescriptor->szLocalFileSize.utf8().data(),0x01);
}
- m_szStatusString = __tr2qs_ctx("Sent DCC RESUME request to %1, waiting for ACCEPT","dcc").tqarg(m_pDescriptor->szNick);
+ m_szStatusString = __tr2qs_ctx("Sent DCC RESUME request to %1, waiting for ACCEPT","dcc").arg(m_pDescriptor->szNick);
outputAndLog(m_szStatusString);
// setup the resume timer: we don't want to wait forever
@@ -919,7 +919,7 @@ void KviDccFileTransfer::abort()
else if(m_pSlaveSendThread)tmp.setNum(m_pSlaveSendThread->sentBytes());
else tmp = '0';
- m_eGeneraltqStatus = Failure;
+ m_eGeneralStatus = Failure;
m_tTransferEndTime = kvi_unixTime();
m_szStatusString = __tr2qs_ctx("Transfer failed: ","dcc");
m_szStatusString += __tr2qs_ctx("Aborted","dcc");
@@ -988,7 +988,7 @@ void KviDccFileTransfer::retryRevDCC()
void KviDccFileTransfer::fillStatusString(TQString &szBuffer)
{
- switch(m_eGeneraltqStatus)
+ switch(m_eGeneralStatus)
{
case Connecting:
szBuffer = "connecting";
@@ -1010,7 +1010,7 @@ void KviDccFileTransfer::fillStatusString(TQString &szBuffer)
bool KviDccFileTransfer::active()
{
- return ((m_eGeneraltqStatus == Connecting) || (m_eGeneraltqStatus == Transferring));
+ return ((m_eGeneralStatus == Connecting) || (m_eGeneralStatus == Transferring));
}
int KviDccFileTransfer::bandwidthLimit()
@@ -1108,7 +1108,7 @@ void KviDccFileTransfer::displayPaint(TQPainter * p,int column,int width,int hei
{
TQString txt;
- bool bIsTerminated = ((m_eGeneraltqStatus == Success) || (m_eGeneraltqStatus == Failure));
+ bool bIsTerminated = ((m_eGeneralStatus == Success) || (m_eGeneralStatus == Failure));
switch(column)
{
@@ -1117,7 +1117,7 @@ void KviDccFileTransfer::displayPaint(TQPainter * p,int column,int width,int hei
int xoffset = 0;
int yoffset = 0;
if(m_pDescriptor->bRecvFile)yoffset = 64;
- switch(m_eGeneraltqStatus)
+ switch(m_eGeneralStatus)
{
case Connecting: xoffset = 0; break;
case Transferring: xoffset = 48; break;
@@ -1236,18 +1236,18 @@ void KviDccFileTransfer::displayPaint(TQPainter * p,int column,int width,int hei
if(iW2 > 0)p->fillRect(5 + iL2,5,iW2,10,bIsTerminated ? TQColor(150,130,110) : TQColor(220,170,100));
p->fillRect(5,5,iL2,10,bIsTerminated ? TQColor(140,110,110) : TQColor(200,100,100));
- txt = TQString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).tqarg(KviTQString::makeSizeReadable(iAckedBytes)).tqarg(KviTQString::makeSizeReadable(m_uTotalFileSize)).tqarg(dPerc2,0,'f',2);
+ txt = TQString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).arg(KviTQString::makeSizeReadable(iAckedBytes)).arg(KviTQString::makeSizeReadable(m_uTotalFileSize)).arg(dPerc2,0,'f',2);
} else {
// we are receiving a file or not sending acks
double dPerc = (double)(((double)uTransferred) * 100.0) / (double)m_uTotalFileSize;
int iL = (int) ((((double)iW) * dPerc) / 100.0);
p->fillRect(5,5,iL,10,bIsTerminated ? TQColor(140,110,110) : TQColor(200,100,100));
- txt = TQString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).tqarg(KviTQString::makeSizeReadable(uTransferred)).tqarg(KviTQString::makeSizeReadable(m_uTotalFileSize)).tqarg(dPerc,0,'f',2);
+ txt = TQString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).arg(KviTQString::makeSizeReadable(uTransferred)).arg(KviTQString::makeSizeReadable(m_uTotalFileSize)).arg(dPerc,0,'f',2);
}
} else {
- txt = TQString(__tr2qs_ctx("%1","dcc")).tqarg(KviTQString::makeSizeReadable(uTransferred));
+ txt = TQString(__tr2qs_ctx("%1","dcc")).arg(KviTQString::makeSizeReadable(uTransferred));
}
p->setPen(TQt::black);
@@ -1343,7 +1343,7 @@ TQString KviDccFileTransfer::tipText()
TQString s;
- s = TQString("<table><tr><td bgcolor=\"#000000\"><font color=\"#FFFFFF\"><b>DCC %1 (ID %2)</b></font></td></tr>").tqarg(m_szDccType.ptr()).tqarg(id());
+ s = TQString("<table><tr><td bgcolor=\"#000000\"><font color=\"#FFFFFF\"><b>DCC %1 (ID %2)</b></font></td></tr>").arg(m_szDccType.ptr()).arg(id());
s += "<tr><td bgcolor=\"#404040\"><font color=\"#FFFFFF\">";
s += __tr2qs_ctx("Transfer Log","dcc");
@@ -1396,7 +1396,7 @@ KviDccFileTransfer * KviDccFileTransfer::nonFailedTransferWithLocalFileName(cons
if(t->localFileName() == szLocalFileName)
#endif
{
- if(t->m_eGeneraltqStatus != Failure)
+ if(t->m_eGeneralStatus != Failure)
return t;
}
}
@@ -1456,7 +1456,7 @@ void KviDccFileTransfer::outputAndLog(int msgtype,const TQString &s)
void KviDccFileTransfer::addToTransferLog(const TQString &s)
{
- TQDateTime dt = TQDateTime::tqcurrentDateTime();
+ TQDateTime dt = TQDateTime::currentDateTime();
TQString ts;
ts.sprintf("[%4d.%2d.%2d %2d:%2d:%2d] ",dt.date().year(),dt.date().month(),dt.date().day(),dt.time().hour(),dt.time().minute(),dt.time().second());
m_szTransferLog += ts+s;
@@ -1477,14 +1477,14 @@ void KviDccFileTransfer::connectionInProgress()
// if(TRIGGER_EVENT_5PARAM_RETVALUE(KviEvent_OnDCCSendConnected,this,m_pDescriptor->szPort.ptr(),m_pDescriptor->szFileName.ptr(),m_pDescriptor->szNick.ptr(),m_pDescriptor->szUser.ptr(),m_pDescriptor->szHost.ptr()));
// }
//
- m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").tqarg(m_pDescriptor->szIp).tqarg(m_pDescriptor->szPort);
+ m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").arg(m_pDescriptor->szIp).arg(m_pDescriptor->szPort);
outputAndLog(m_szStatusString);
displayUpdate();
return;
}
// PASSIVE CONNECTION
- m_szStatusString = __tr2qs_ctx("Listening on interface %1 port %2","dcc").tqarg(m_pMarshal->localIp()).tqarg(m_pMarshal->localPort());
+ m_szStatusString = __tr2qs_ctx("Listening on interface %1 port %2","dcc").arg(m_pMarshal->localIp()).arg(m_pMarshal->localPort());
outputAndLog(m_szStatusString);
if(m_pDescriptor->bSendRequest)
@@ -1507,7 +1507,7 @@ void KviDccFileTransfer::connectionInProgress()
if(!tmp.isEmpty())
{
ip = tmp;
- outputAndLog(__tr2qs_ctx("The local IP address is private, determining from IRC server: %1","dcc").tqarg(ip));
+ outputAndLog(__tr2qs_ctx("The local IP address is private, determining from IRC server: %1","dcc").arg(ip));
} else {
outputAndLog(__tr2qs_ctx("The local IP address is private, but unable to determine it from the IRC server","dcc"));
}
@@ -1558,9 +1558,9 @@ void KviDccFileTransfer::connectionInProgress()
ip.utf8().data(),port.ptr(),
&(m_pDescriptor->szLocalFileSize),0x01);
}
- outputAndLog(__tr2qs_ctx("Sent DCC %1 request to %2, waiting for remote client to connect...","dcc").tqarg(szReq.ptr()).tqarg(m_pDescriptor->szNick));
+ outputAndLog(__tr2qs_ctx("Sent DCC %1 request to %2, waiting for remote client to connect...","dcc").arg(szReq.ptr()).arg(m_pDescriptor->szNick));
} else {
- outputAndLog(__tr2qs_ctx("DCC %1 request not sent, awaiting manual connection","dcc").tqarg(m_szDccType.ptr()));
+ outputAndLog(__tr2qs_ctx("DCC %1 request not sent, awaiting manual connection","dcc").arg(m_szDccType.ptr()));
}
KVS_TRIGGER_EVENT_1(KviEvent_OnDCCFileTransferConnectionInProgress,eventWindow(),m_pDescriptor->idString());
@@ -1579,7 +1579,7 @@ void KviDccFileTransfer::startingSSLHandshake()
void KviDccFileTransfer::sslError(const char * msg)
{
#ifdef COMPILE_SSL_SUPPORT
- outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("[SSL ERROR]: %1","dcc").tqarg(msg));
+ outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("[SSL ERROR]: %1","dcc").arg(msg));
#endif
}
@@ -1602,7 +1602,7 @@ bool KviDccFileTransfer::event(TQEvent *e)
m_szStatusString = __tr2qs_ctx("Transfer failed: ","dcc");
m_szStatusString += szErrorString;
- m_eGeneraltqStatus = Failure;
+ m_eGeneralStatus = Failure;
m_tTransferEndTime = kvi_unixTime();
KVS_TRIGGER_EVENT_3(KviEvent_OnDCCFileTransferFailed,
@@ -1642,7 +1642,7 @@ bool KviDccFileTransfer::event(TQEvent *e)
if(m_pDescriptor->bRecvFile)g_pApp->fileDownloadTerminated(true,m_pDescriptor->szFileName.utf8().data(),m_pDescriptor->szLocalFileName.utf8().data(),m_pDescriptor->szNick.utf8().data());
m_szStatusString = __tr2qs_ctx("Transfer completed","dcc");
outputAndLog(m_szStatusString);
- m_eGeneraltqStatus = Success;
+ m_eGeneralStatus = Success;
m_tTransferEndTime = kvi_unixTime();
KVS_TRIGGER_EVENT_2(KviEvent_OnDCCFileTransferSuccess,
@@ -1677,7 +1677,7 @@ bool KviDccFileTransfer::event(TQEvent *e)
void KviDccFileTransfer::handleMarshalError(int err)
{
TQString szErr = KviError::getDescription(err);
- m_eGeneraltqStatus = Failure;
+ m_eGeneralStatus = Failure;
m_szStatusString = __tr2qs_ctx("Transfer failed: ","dcc");
m_szStatusString += szErr;
outputAndLog(m_szStatusString);
@@ -1687,8 +1687,8 @@ void KviDccFileTransfer::handleMarshalError(int err)
void KviDccFileTransfer::connected()
{
- outputAndLog(__tr2qs_ctx("Connected to %1:%2","dcc").tqarg(m_pMarshal->remoteIp()).tqarg(m_pMarshal->remotePort()));
- outputAndLog(__tr2qs_ctx("Local end is %1:%2","dcc").tqarg(m_pMarshal->localIp()).tqarg(m_pMarshal->localPort()));
+ outputAndLog(__tr2qs_ctx("Connected to %1:%2","dcc").arg(m_pMarshal->remoteIp()).arg(m_pMarshal->remotePort()));
+ outputAndLog(__tr2qs_ctx("Local end is %1:%2","dcc").arg(m_pMarshal->localIp()).arg(m_pMarshal->localPort()));
m_tTransferStartTime = kvi_unixTime();
@@ -1731,7 +1731,7 @@ void KviDccFileTransfer::connected()
m_pSlaveSendThread->start();
}
- m_eGeneraltqStatus = Transferring;
+ m_eGeneralStatus = Transferring;
m_szStatusString = __tr2qs_ctx("Transferring data","dcc");
KVS_TRIGGER_EVENT_1(KviEvent_OnDCCFileTransferBegin,eventWindow(),m_pDescriptor->idString());
@@ -1758,7 +1758,7 @@ bool KviDccFileTransfer::resumeAccepted(const char *filename,const char *port,co
delete m_pResumeTimer;
m_pResumeTimer = 0;
- outputAndLog(__tr2qs_ctx("RESUME accepted, transfer will begin at position %1","dcc").tqarg(m_pDescriptor->szLocalFileSize));
+ outputAndLog(__tr2qs_ctx("RESUME accepted, transfer will begin at position %1","dcc").arg(m_pDescriptor->szLocalFileSize));
listenOrConnect();
@@ -1768,7 +1768,7 @@ bool KviDccFileTransfer::resumeAccepted(const char *filename,const char *port,co
if(ret != KviError_success)handleMarshalError(ret);
else {
- m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").tqarg(m_pDescriptor->szIp).tqarg(m_pDescriptor->szPort);
+ m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").arg(m_pDescriptor->szIp).arg(m_pDescriptor->szPort);
outputAndLog(m_szStatusString);
displayUpdate();
}
@@ -1794,11 +1794,11 @@ bool KviDccFileTransfer::doResume(const char * filename,const char * port,unsign
}
if(iLocalFileSize <= filePos)
{
- outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Invalid RESUME request: Position %1 is larger than file size","dcc").tqarg(filePos));
+ outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Invalid RESUME request: Position %1 is larger than file size","dcc").arg(filePos));
return false;
}
- outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Accepting RESUME request, transfer will begin at position %1","dcc").tqarg(filePos));
+ outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Accepting RESUME request, transfer will begin at position %1","dcc").arg(filePos));
m_pDescriptor->szFileSize.setNum(filePos);
@@ -1830,7 +1830,7 @@ KviDccFileTransferBandwidthDialog::KviDccFileTransferBandwidthDialog(TQWidget *
m_pTransfer = t;
int iVal = m_pTransfer->bandwidthLimit();
- TQString szText = __tr2qs_ctx("Configure bandwidth for DCC transfer %1","dcc").tqarg(t->id());
+ TQString szText = __tr2qs_ctx("Configure bandwidth for DCC transfer %1","dcc").arg(t->id());
setCaption(szText);
szText = t->isFileUpload() ? __tr2qs_ctx("Limit upload bandwidth to","dcc") : __tr2qs_ctx("Limit download bandwidth to","dcc");