diff options
Diffstat (limited to 'src/modules/http/httpfiletransfer.cpp')
-rw-r--r-- | src/modules/http/httpfiletransfer.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/modules/http/httpfiletransfer.cpp b/src/modules/http/httpfiletransfer.cpp index 789b7a1b..8ad7c8f9 100644 --- a/src/modules/http/httpfiletransfer.cpp +++ b/src/modules/http/httpfiletransfer.cpp @@ -67,7 +67,7 @@ KviHttpFileTransfer::KviHttpFileTransfer() connect(m_pHttpRequest,TQT_SIGNAL(receivedResponse(const TQString &)),this,TQT_SLOT(receivedResponse(const TQString &))); connect(m_pHttpRequest,TQT_SIGNAL(connectionEstabilished()),this,TQT_SLOT(connectionEstabilished())); - m_eGeneraltqStatus = Initializing; + m_eGeneralStatus = Initializing; m_szStatusString = __tr2qs_ctx("Initializing","http"); } @@ -110,20 +110,20 @@ void KviHttpFileTransfer::fillContextPopup(KviTalPopupMenu * m,int column) bool KviHttpFileTransfer::active() { - return ((m_eGeneraltqStatus == Connecting) || (m_eGeneraltqStatus == Downloading)); + return ((m_eGeneralStatus == Connecting) || (m_eGeneralStatus == Downloading)); } void KviHttpFileTransfer::displayPaint(TQPainter * p,int column,int width,int height) { TQString txt; - bool bIsTerminated = ((m_eGeneraltqStatus == Success) || (m_eGeneraltqStatus == Failure)); + bool bIsTerminated = ((m_eGeneralStatus == Success) || (m_eGeneralStatus == Failure)); switch(column) { case COLUMN_TRANSFERTYPE: { int offset = 0; - switch(m_eGeneraltqStatus) + switch(m_eGeneralStatus) { case Initializing: offset = 0; break; case Connecting: offset = 0; break; @@ -211,8 +211,8 @@ void KviHttpFileTransfer::displayPaint(TQPainter * p,int column,int width,int he //iR = iW - iL; p->fillRect(5,5,iL,10,bIsTerminated ? TQColor(140,110,110) : TQColor(200,100,100)); - txt = TQString(__tr2qs_ctx("%1 of %2 (%3 %)","http")).tqarg(KviTQString::makeSizeReadable(uRecvd)) - .tqarg(KviTQString::makeSizeReadable(uTotal)).tqarg(dPerc,0,'f',2); + txt = TQString(__tr2qs_ctx("%1 of %2 (%3 %)","http")).arg(KviTQString::makeSizeReadable(uRecvd)) + .arg(KviTQString::makeSizeReadable(uTotal)).arg(dPerc,0,'f',2); } else { txt = KviTQString::makeSizeReadable(m_pHttpRequest->receivedSize()); } @@ -265,17 +265,17 @@ void KviHttpFileTransfer::displayPaint(TQPainter * p,int column,int width,int he { KviTimeUtils::secondsToDaysHoursMinsSecs(kvi_timeSpan(m_tTransferEndTime,m_tTransferStartTime),&uD,&uH,&uM,&uS); txt = "TOT: "; - if(uD > 0)txt += TQString(__tr2qs_ctx("%1d %2h %3m %4s","http")).tqarg(uD).tqarg(uH).tqarg(uM).tqarg(uS); - else if(uH > 0)txt += TQString(__tr2qs_ctx("%2h %3m %4s","http")).tqarg(uH).tqarg(uM).tqarg(uS); - else txt += TQString(__tr2qs_ctx("%3m %4s","http")).tqarg(uM).tqarg(uS); + if(uD > 0)txt += TQString(__tr2qs_ctx("%1d %2h %3m %4s","http")).arg(uD).arg(uH).arg(uM).arg(uS); + else if(uH > 0)txt += TQString(__tr2qs_ctx("%2h %3m %4s","http")).arg(uH).arg(uM).arg(uS); + else txt += TQString(__tr2qs_ctx("%3m %4s","http")).arg(uM).arg(uS); } else { if(iEta >= 0) { KviTimeUtils::secondsToDaysHoursMinsSecs(iEta,&uD,&uH,&uM,&uS); txt = "ETA: "; - if(uD > 0)txt += TQString(__tr2qs_ctx("%1d %2h %3m %4s","http")).tqarg(uD).tqarg(uH).tqarg(uM).tqarg(uS); - else if(uH > 0)txt += TQString(__tr2qs_ctx("%2h %3m %4s","http")).tqarg(uH).tqarg(uM).tqarg(uS); - else txt += TQString(__tr2qs_ctx("%3m %4s","http")).tqarg(uM).tqarg(uS); + if(uD > 0)txt += TQString(__tr2qs_ctx("%1d %2h %3m %4s","http")).arg(uD).arg(uH).arg(uM).arg(uS); + else if(uH > 0)txt += TQString(__tr2qs_ctx("%2h %3m %4s","http")).arg(uH).arg(uM).arg(uS); + else txt += TQString(__tr2qs_ctx("%3m %4s","http")).arg(uM).arg(uS); } else { txt = "ETA: Unknown"; } @@ -301,7 +301,7 @@ int KviHttpFileTransfer::displayHeight(int iLineSpacing) TQString KviHttpFileTransfer::tipText() { TQString s; - s = TQString("<table><tr><td bgcolor=\"#000000\"><font color=\"#FFFFFF\"><b>HTTP Transfer (ID %1)</b></font></td></tr>").tqarg(id()); + s = TQString("<table><tr><td bgcolor=\"#000000\"><font color=\"#FFFFFF\"><b>HTTP Transfer (ID %1)</b></font></td></tr>").arg(id()); if(m_lRequest.count() > 0) { @@ -390,13 +390,13 @@ void KviHttpFileTransfer::connectionEstabilished() void KviHttpFileTransfer::resolvingHost(const TQString &hostname) { - m_szStatusString = __tr2qs_ctx("Resolving host %1","http").tqarg(hostname); + m_szStatusString = __tr2qs_ctx("Resolving host %1","http").arg(hostname); displayUpdate(); } void KviHttpFileTransfer::contactingHost(const TQString &ipandport) { - m_szStatusString = __tr2qs_ctx("Contacting host %1","http").tqarg(ipandport); + m_szStatusString = __tr2qs_ctx("Contacting host %1","http").arg(ipandport); displayUpdate(); } @@ -404,9 +404,9 @@ void KviHttpFileTransfer::receivedResponse(const TQString &response) { m_lHeaders.clear(); m_lHeaders.append(response); - m_szStatusString = __tr2qs_ctx("Transferring data (%1)","http").tqarg(response); + m_szStatusString = __tr2qs_ctx("Transferring data (%1)","http").arg(response); m_tTransferStartTime = kvi_unixTime(); - m_eGeneraltqStatus = Downloading; + m_eGeneralStatus = Downloading; displayUpdate(); } @@ -439,7 +439,7 @@ void KviHttpFileTransfer::transferTerminated(bool bSuccess) if(bSuccess) { m_szStatusString = __tr2qs_ctx("Transfer completed","http"); - m_eGeneraltqStatus = Success; + m_eGeneralStatus = Success; displayUpdate(); if(out && (!m_bNoOutput))out->output(KVI_OUT_GENERICSUCCESS,__tr2qs_ctx("[HTTP %d]: Transfer completed","http"),id()); g_pApp->fileDownloadTerminated(true,m_pHttpRequest->url().url().ptr(),m_pHttpRequest->fileName(),TQString(),TQString(),!m_bNotifyCompletion); @@ -447,7 +447,7 @@ void KviHttpFileTransfer::transferTerminated(bool bSuccess) m_szStatusString = __tr2qs_ctx("Transfer failed","http"); m_szStatusString += ": "; m_szStatusString += m_pHttpRequest->lastError(); - m_eGeneraltqStatus = Failure; + m_eGeneralStatus = Failure; displayUpdate(); if(out && (!m_bNoOutput))out->output(KVI_OUT_GENERICERROR,__tr2qs_ctx("[HTTP %d]: Transfer failed: %Q","http"),id(),&(m_pHttpRequest->lastError())); g_pApp->fileDownloadTerminated(false,m_pHttpRequest->url().url().ptr(),m_pHttpRequest->fileName(),TQString(),m_pHttpRequest->lastError(),!m_bNotifyCompletion); @@ -482,7 +482,7 @@ void KviHttpFileTransfer::headersReceived(KviPointerHashTable<const char *,KviSt bool KviHttpFileTransfer::startDownload() { - m_eGeneraltqStatus = Connecting; + m_eGeneralStatus = Connecting; return m_pHttpRequest->start(); } |