From 805c2821ceaddada48b346c6d11bd0dc1351a539 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:33:07 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- src/modules/http/httpfiletransfer.cpp | 40 +++++++++++++++++------------------ src/modules/http/httpfiletransfer.h | 4 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) (limited to 'src/modules/http') 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("").tqarg(id()); + s = TQString("
HTTP Transfer (ID %1)
").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(KviPointerHashTablestart(); } diff --git a/src/modules/http/httpfiletransfer.h b/src/modules/http/httpfiletransfer.h index 792205b1..cfba8910 100644 --- a/src/modules/http/httpfiletransfer.h +++ b/src/modules/http/httpfiletransfer.h @@ -38,7 +38,7 @@ class KviTalPopupMenu; class KviHttpFileTransfer : public KviFileTransfer { - enum GeneraltqStatus { Initializing, Connecting, Downloading, Success, Failure }; + enum GeneralStatus { Initializing, Connecting, Downloading, Success, Failure }; Q_OBJECT TQ_OBJECT public: @@ -46,7 +46,7 @@ public: ~KviHttpFileTransfer(); private: KviHttpRequest * m_pHttpRequest; - GeneraltqStatus m_eGeneraltqStatus; + GeneralStatus m_eGeneralStatus; TQString m_szStatusString; TQStringList m_lHeaders; -- cgit v1.2.1
HTTP Transfer (ID %1)