diff options
| author | 2010-05-14 13:49:51 +0000 | |
|---|---|---|
| committer | 2010-05-14 13:49:51 +0000 | |
| commit | f92c7d6e3b847d502e40bc0578d830d4919f09e4 (patch) | |
| tree | 5818ed8f6fed117219da997370c9bf8ff3ccb0b2 /src/modules/http | |
| parent | Some fixes in classeditor (diff) | |
| download | KVIrc-f92c7d6e3b847d502e40bc0578d830d4919f09e4.tar.gz KVIrc-f92c7d6e3b847d502e40bc0578d830d4919f09e4.tar.bz2 KVIrc-f92c7d6e3b847d502e40bc0578d830d4919f09e4.zip | |
Merge the use of multiple QString()::arg(QString) calls to avoid format strings
Filter out any urlencoded path form dcc file names
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@4317 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/http')
| -rw-r--r-- | src/modules/http/httpfiletransfer.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/http/httpfiletransfer.cpp b/src/modules/http/httpfiletransfer.cpp index bd78f7619..f2cb79dd5 100644 --- a/src/modules/http/httpfiletransfer.cpp +++ b/src/modules/http/httpfiletransfer.cpp @@ -208,8 +208,8 @@ void KviHttpFileTransfer::displayPaint(QPainter * p,int column, QRect rect) //iR = iW - iL; p->fillRect(rect.left() + 5, rect.top() + 5,iL,10,bIsTerminated ? QColor(140,110,110) : QColor(200,100,100)); - txt = QString(__tr2qs_ctx("%1 of %2 (%3 %)","http")).arg(KviQString::makeSizeReadable(uRecvd)) - .arg(KviQString::makeSizeReadable(uTotal)).arg(dPerc,0,'f',2); + txt = QString(__tr2qs_ctx("%1 of %2 (%3 %)","http")).arg(KviQString::makeSizeReadable(uRecvd), + KviQString::makeSizeReadable(uTotal)).arg(dPerc,0,'f',2); } else { txt = KviQString::makeSizeReadable(m_pHttpRequest->receivedSize()); } @@ -260,17 +260,17 @@ void KviHttpFileTransfer::displayPaint(QPainter * p,int column, QRect rect) { KviTimeUtils::secondsToDaysHoursMinsSecs(kvi_timeSpan(m_tTransferEndTime,m_tTransferStartTime),&uD,&uH,&uM,&uS); txt = "TOT: "; - if(uD > 0)txt += QString(__tr2qs_ctx("%1d %2h %3m %4s","http")).arg(uD).arg(uH).arg(uM).arg(uS); - else if(uH > 0)txt += QString(__tr2qs_ctx("%2h %3m %4s","http")).arg(uH).arg(uM).arg(uS); - else txt += QString(__tr2qs_ctx("%3m %4s","http")).arg(uM).arg(uS); + if(uD > 0)txt += QString(__tr2qs_ctx("%1d %2h %3m %4s","http")).arg(uD, uH, uM, uS); + else if(uH > 0)txt += QString(__tr2qs_ctx("%2h %3m %4s","http")).arg(uH, uM, uS); + else txt += QString(__tr2qs_ctx("%3m %4s","http")).arg(uM, uS); } else { if(iEta >= 0) { KviTimeUtils::secondsToDaysHoursMinsSecs(iEta,&uD,&uH,&uM,&uS); txt = "ETA: "; - if(uD > 0)txt += QString(__tr2qs_ctx("%1d %2h %3m %4s","http")).arg(uD).arg(uH).arg(uM).arg(uS); - else if(uH > 0)txt += QString(__tr2qs_ctx("%2h %3m %4s","http")).arg(uH).arg(uM).arg(uS); - else txt += QString(__tr2qs_ctx("%3m %4s","http")).arg(uM).arg(uS); + if(uD > 0)txt += QString(__tr2qs_ctx("%1d %2h %3m %4s","http")).arg(uD, uH, uM, uS); + else if(uH > 0)txt += QString(__tr2qs_ctx("%2h %3m %4s","http")).arg(uH, uM, uS); + else txt += QString(__tr2qs_ctx("%3m %4s","http")).arg(uM, uS); } else { txt = "ETA: Unknown"; } |
