From c6611272c2bc4a42580848946c8c5d81bb0409c7 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 16 Dec 2011 09:57:20 -0600 Subject: Revert "Rename a number of old tq methods that are no longer tq specific" This reverts commit 805c2821ceaddada48b346c6d11bd0dc1351a539. --- src/modules/dcc/send.cpp | 66 ++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'src/modules/dcc/send.cpp') diff --git a/src/modules/dcc/send.cpp b/src/modules/dcc/send.cpp index e3ef9e7d..a7485ca2 100644 --- a/src/modules/dcc/send.cpp +++ b/src/modules/dcc/send.cpp @@ -67,7 +67,7 @@ #include #include #include -#include +#include #include #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_eGeneralStatus = Connecting; + m_eGeneraltqStatus = 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").arg(m_szDccType.ptr()); + m_szStatusString = __tr2qs_ctx("Attempting a passive DCC %1 connection","dcc").tqarg(m_szDccType.ptr()); outputAndLog(m_szStatusString); } else { // ACTIVE CONNECTION - m_szStatusString = __tr2qs_ctx("Attempting an active DCC %1 connection","dcc").arg(m_szDccType.ptr()); + m_szStatusString = __tr2qs_ctx("Attempting an active DCC %1 connection","dcc").tqarg(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").arg(m_pDescriptor->szNick); + m_szStatusString = __tr2qs_ctx("Sent DCC RESUME request to %1, waiting for ACCEPT","dcc").tqarg(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_eGeneralStatus = Failure; + m_eGeneraltqStatus = 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_eGeneralStatus) + switch(m_eGeneraltqStatus) { case Connecting: szBuffer = "connecting"; @@ -1010,7 +1010,7 @@ void KviDccFileTransfer::fillStatusString(TQString &szBuffer) bool KviDccFileTransfer::active() { - return ((m_eGeneralStatus == Connecting) || (m_eGeneralStatus == Transferring)); + return ((m_eGeneraltqStatus == Connecting) || (m_eGeneraltqStatus == Transferring)); } int KviDccFileTransfer::bandwidthLimit() @@ -1108,7 +1108,7 @@ void KviDccFileTransfer::displayPaint(TQPainter * p,int column,int width,int hei { TQString txt; - bool bIsTerminated = ((m_eGeneralStatus == Success) || (m_eGeneralStatus == Failure)); + bool bIsTerminated = ((m_eGeneraltqStatus == Success) || (m_eGeneraltqStatus == 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_eGeneralStatus) + switch(m_eGeneraltqStatus) { 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")).arg(KviTQString::makeSizeReadable(iAckedBytes)).arg(KviTQString::makeSizeReadable(m_uTotalFileSize)).arg(dPerc2,0,'f',2); + txt = TQString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).tqarg(KviTQString::makeSizeReadable(iAckedBytes)).tqarg(KviTQString::makeSizeReadable(m_uTotalFileSize)).tqarg(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")).arg(KviTQString::makeSizeReadable(uTransferred)).arg(KviTQString::makeSizeReadable(m_uTotalFileSize)).arg(dPerc,0,'f',2); + txt = TQString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).tqarg(KviTQString::makeSizeReadable(uTransferred)).tqarg(KviTQString::makeSizeReadable(m_uTotalFileSize)).tqarg(dPerc,0,'f',2); } } else { - txt = TQString(__tr2qs_ctx("%1","dcc")).arg(KviTQString::makeSizeReadable(uTransferred)); + txt = TQString(__tr2qs_ctx("%1","dcc")).tqarg(KviTQString::makeSizeReadable(uTransferred)); } p->setPen(TQt::black); @@ -1343,7 +1343,7 @@ TQString KviDccFileTransfer::tipText() TQString s; - s = TQString("").arg(m_szDccType.ptr()).arg(id()); + s = TQString("
DCC %1 (ID %2)
").tqarg(m_szDccType.ptr()).tqarg(id()); s += "
DCC %1 (ID %2)
"; s += __tr2qs_ctx("Transfer Log","dcc"); @@ -1396,7 +1396,7 @@ KviDccFileTransfer * KviDccFileTransfer::nonFailedTransferWithLocalFileName(cons if(t->localFileName() == szLocalFileName) #endif { - if(t->m_eGeneralStatus != Failure) + if(t->m_eGeneraltqStatus != Failure) return t; } } @@ -1456,7 +1456,7 @@ void KviDccFileTransfer::outputAndLog(int msgtype,const TQString &s) void KviDccFileTransfer::addToTransferLog(const TQString &s) { - TQDateTime dt = TQDateTime::currentDateTime(); + TQDateTime dt = TQDateTime::tqcurrentDateTime(); 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").arg(m_pDescriptor->szIp).arg(m_pDescriptor->szPort); + m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").tqarg(m_pDescriptor->szIp).tqarg(m_pDescriptor->szPort); outputAndLog(m_szStatusString); displayUpdate(); return; } // PASSIVE CONNECTION - m_szStatusString = __tr2qs_ctx("Listening on interface %1 port %2","dcc").arg(m_pMarshal->localIp()).arg(m_pMarshal->localPort()); + m_szStatusString = __tr2qs_ctx("Listening on interface %1 port %2","dcc").tqarg(m_pMarshal->localIp()).tqarg(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").arg(ip)); + outputAndLog(__tr2qs_ctx("The local IP address is private, determining from IRC server: %1","dcc").tqarg(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").arg(szReq.ptr()).arg(m_pDescriptor->szNick)); + outputAndLog(__tr2qs_ctx("Sent DCC %1 request to %2, waiting for remote client to connect...","dcc").tqarg(szReq.ptr()).tqarg(m_pDescriptor->szNick)); } else { - outputAndLog(__tr2qs_ctx("DCC %1 request not sent, awaiting manual connection","dcc").arg(m_szDccType.ptr())); + outputAndLog(__tr2qs_ctx("DCC %1 request not sent, awaiting manual connection","dcc").tqarg(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").arg(msg)); + outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("[SSL ERROR]: %1","dcc").tqarg(msg)); #endif } @@ -1602,7 +1602,7 @@ bool KviDccFileTransfer::event(TQEvent *e) m_szStatusString = __tr2qs_ctx("Transfer failed: ","dcc"); m_szStatusString += szErrorString; - m_eGeneralStatus = Failure; + m_eGeneraltqStatus = 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_eGeneralStatus = Success; + m_eGeneraltqStatus = 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_eGeneralStatus = Failure; + m_eGeneraltqStatus = 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").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())); + 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())); m_tTransferStartTime = kvi_unixTime(); @@ -1731,7 +1731,7 @@ void KviDccFileTransfer::connected() m_pSlaveSendThread->start(); } - m_eGeneralStatus = Transferring; + m_eGeneraltqStatus = 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").arg(m_pDescriptor->szLocalFileSize)); + outputAndLog(__tr2qs_ctx("RESUME accepted, transfer will begin at position %1","dcc").tqarg(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").arg(m_pDescriptor->szIp).arg(m_pDescriptor->szPort); + m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").tqarg(m_pDescriptor->szIp).tqarg(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").arg(filePos)); + outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Invalid RESUME request: Position %1 is larger than file size","dcc").tqarg(filePos)); return false; } - outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Accepting RESUME request, transfer will begin at position %1","dcc").arg(filePos)); + outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Accepting RESUME request, transfer will begin at position %1","dcc").tqarg(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").arg(t->id()); + TQString szText = __tr2qs_ctx("Configure bandwidth for DCC transfer %1","dcc").tqarg(t->id()); setCaption(szText); szText = t->isFileUpload() ? __tr2qs_ctx("Limit upload bandwidth to","dcc") : __tr2qs_ctx("Limit download bandwidth to","dcc"); -- cgit v1.2.1