summaryrefslogtreecommitdiffstats
path: root/src/modules/http
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:57:20 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:57:20 -0600
commitc6611272c2bc4a42580848946c8c5d81bb0409c7 (patch)
tree0fd5b58844663dfcd00fb2b79cf67dd0fd429c62 /src/modules/http
parent805c2821ceaddada48b346c6d11bd0dc1351a539 (diff)
downloadkvirc-c6611272c2bc4a42580848946c8c5d81bb0409c7.tar.gz
kvirc-c6611272c2bc4a42580848946c8c5d81bb0409c7.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 805c2821ceaddada48b346c6d11bd0dc1351a539.
Diffstat (limited to 'src/modules/http')
-rw-r--r--src/modules/http/httpfiletransfer.cpp40
-rw-r--r--src/modules/http/httpfiletransfer.h4
2 files changed, 22 insertions, 22 deletions
diff --git a/src/modules/http/httpfiletransfer.cpp b/src/modules/http/httpfiletransfer.cpp
index 8ad7c8f9..789b7a1b 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_eGeneralStatus = Initializing;
+ m_eGeneraltqStatus = Initializing;
m_szStatusString = __tr2qs_ctx("Initializing","http");
}
@@ -110,20 +110,20 @@ void KviHttpFileTransfer::fillContextPopup(KviTalPopupMenu * m,int column)
bool KviHttpFileTransfer::active()
{
- return ((m_eGeneralStatus == Connecting) || (m_eGeneralStatus == Downloading));
+ return ((m_eGeneraltqStatus == Connecting) || (m_eGeneraltqStatus == Downloading));
}
void KviHttpFileTransfer::displayPaint(TQPainter * p,int column,int width,int height)
{
TQString txt;
- bool bIsTerminated = ((m_eGeneralStatus == Success) || (m_eGeneralStatus == Failure));
+ bool bIsTerminated = ((m_eGeneraltqStatus == Success) || (m_eGeneraltqStatus == Failure));
switch(column)
{
case COLUMN_TRANSFERTYPE:
{
int offset = 0;
- switch(m_eGeneralStatus)
+ switch(m_eGeneraltqStatus)
{
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")).arg(KviTQString::makeSizeReadable(uRecvd))
- .arg(KviTQString::makeSizeReadable(uTotal)).arg(dPerc,0,'f',2);
+ txt = TQString(__tr2qs_ctx("%1 of %2 (%3 %)","http")).tqarg(KviTQString::makeSizeReadable(uRecvd))
+ .tqarg(KviTQString::makeSizeReadable(uTotal)).tqarg(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")).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);
+ 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);
} 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")).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);
+ 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);
} 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>").arg(id());
+ s = TQString("<table><tr><td bgcolor=\"#000000\"><font color=\"#FFFFFF\"><b>HTTP Transfer (ID %1)</b></font></td></tr>").tqarg(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").arg(hostname);
+ m_szStatusString = __tr2qs_ctx("Resolving host %1","http").tqarg(hostname);
displayUpdate();
}
void KviHttpFileTransfer::contactingHost(const TQString &ipandport)
{
- m_szStatusString = __tr2qs_ctx("Contacting host %1","http").arg(ipandport);
+ m_szStatusString = __tr2qs_ctx("Contacting host %1","http").tqarg(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").arg(response);
+ m_szStatusString = __tr2qs_ctx("Transferring data (%1)","http").tqarg(response);
m_tTransferStartTime = kvi_unixTime();
- m_eGeneralStatus = Downloading;
+ m_eGeneraltqStatus = Downloading;
displayUpdate();
}
@@ -439,7 +439,7 @@ void KviHttpFileTransfer::transferTerminated(bool bSuccess)
if(bSuccess)
{
m_szStatusString = __tr2qs_ctx("Transfer completed","http");
- m_eGeneralStatus = Success;
+ m_eGeneraltqStatus = 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_eGeneralStatus = Failure;
+ m_eGeneraltqStatus = 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_eGeneralStatus = Connecting;
+ m_eGeneraltqStatus = Connecting;
return m_pHttpRequest->start();
}
diff --git a/src/modules/http/httpfiletransfer.h b/src/modules/http/httpfiletransfer.h
index cfba8910..792205b1 100644
--- a/src/modules/http/httpfiletransfer.h
+++ b/src/modules/http/httpfiletransfer.h
@@ -38,7 +38,7 @@ class KviTalPopupMenu;
class KviHttpFileTransfer : public KviFileTransfer
{
- enum GeneralStatus { Initializing, Connecting, Downloading, Success, Failure };
+ enum GeneraltqStatus { Initializing, Connecting, Downloading, Success, Failure };
Q_OBJECT
TQ_OBJECT
public:
@@ -46,7 +46,7 @@ public:
~KviHttpFileTransfer();
private:
KviHttpRequest * m_pHttpRequest;
- GeneralStatus m_eGeneralStatus;
+ GeneraltqStatus m_eGeneraltqStatus;
TQString m_szStatusString;
TQStringList m_lHeaders;