Rename KLocale to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 7b0ae78a46
commit 95fa1b2e1f

@ -159,7 +159,7 @@ void TrayIcon::maxShareRatioReached(kt::TorrentInterface* tc)
return;
const TorrentStats & s = tc->getStats();
KLocale* loc = TDEGlobal::locale();
TDELocale* loc = TDEGlobal::locale();
double speed_up = (double)s.bytes_uploaded / 1024.0;
TQString msg = i18n("<b>%1</b> has reached its maximum share ratio of %2 and has been stopped."
@ -178,7 +178,7 @@ void TrayIcon::maxSeedTimeReached(kt::TorrentInterface* tc)
return;
const TorrentStats & s = tc->getStats();
KLocale* loc = TDEGlobal::locale();
TDELocale* loc = TDEGlobal::locale();
double speed_up = (double)s.bytes_uploaded / 1024.0;
TQString msg = i18n("<b>%1</b> has reached its maximum seed time of %2 hours and has been stopped."
@ -223,7 +223,7 @@ void TrayIcon::queuingNotPossible(kt::TorrentInterface* tc)
const TorrentStats & s = tc->getStats();
TQString msg;
KLocale* loc = TDEGlobal::locale();
TDELocale* loc = TDEGlobal::locale();
if (tc->overMaxRatio())
msg = i18n("<b>%1</b> has reached its maximum share ratio of %2 and cannot be enqueued. Remove the limit manually if you want to continue seeding.")

@ -36,7 +36,7 @@ Index: estimation-scripts/enable-logging.diff
-@@ -114,8 +119,43 @@
- setText(6,KBytesPerSecToString(tc->getUploadRate() / 1024.0));
-
- KLocale* loc = TDEGlobal::locale();
- TDELocale* loc = TDEGlobal::locale();
-+
-+
-+ if(counter==1)
@ -145,7 +145,7 @@ Index: apps/ktorrent/ktorrentviewitem.cpp
@@ -114,8 +121,46 @@
setText(6,KBytesPerSecToString(s.upload_rate / 1024.0));
KLocale* loc = TDEGlobal::locale();
TDELocale* loc = TDEGlobal::locale();
+
+
+

@ -30,7 +30,7 @@ namespace kt
TQString BytesToString(Uint64 bytes,int precision)
{
KLocale* loc = TDEGlobal::locale();
TDELocale* loc = TDEGlobal::locale();
if (bytes >= 1024 * 1024 * 1024)
return i18n("%1 GB").arg(loc->formatNumber(bytes / TO_GIG,precision < 0 ? 2 : precision));
else if (bytes >= 1024*1024)
@ -43,13 +43,13 @@ namespace kt
TQString KBytesPerSecToString(double speed,int precision)
{
KLocale* loc = TDEGlobal::locale();
TDELocale* loc = TDEGlobal::locale();
return i18n("%1 KB/s").arg(loc->formatNumber(speed,precision));
}
TQString DurationToString(Uint32 nsecs)
{
KLocale* loc = TDEGlobal::locale();
TDELocale* loc = TDEGlobal::locale();
TQTime t;
int ndays = nsecs / 86400;
t = t.addSecs(nsecs % 86400);

@ -185,7 +185,7 @@ namespace kt
percent = 0.0;
else if (percent > 100.0)
percent = 100.0;
KLocale* loc = TDEGlobal::locale();
TDELocale* loc = TDEGlobal::locale();
it.current()->setText(4,i18n("%1 %").arg(loc->formatNumber(percent,2)));
}
}

@ -91,7 +91,7 @@ namespace kt
percent = 0.0;
else if (percent > 100.0)
percent = 100.0;
KLocale* loc = TDEGlobal::locale();
TDELocale* loc = TDEGlobal::locale();
setText(4,i18n("%1 %").arg(loc->formatNumber(percent,2)));
perc_complete = percent;
}

@ -28,7 +28,7 @@ namespace kt{
/**
* @author Jonas Widarsson
*
* A float validator that respects KLocale::decimalSymbol()
* A float validator that respects TDELocale::decimalSymbol()
*/
class LocaleFloatValidator : public TQValidator
{

@ -155,7 +155,7 @@ namespace kt
void PeerViewItem::update()
{
KLocale* loc = TDEGlobal::locale();
TDELocale* loc = TDEGlobal::locale();
const PeerInterface::Stats & s = peer->getStats();
if (s.download_rate >= 103) // lowest "visible" speed, all below will be 0,0 Kb/s

@ -46,7 +46,7 @@ namespace kt
TQString BytesToString2(Uint64 bytes,int precision = 2)
{
KLocale* loc = TDEGlobal::locale();
TDELocale* loc = TDEGlobal::locale();
if (bytes >= 1024 * 1024 * 1024)
return TQString("%1 GB").arg(loc->formatNumber(bytes / TO_GIG,precision < 0 ? 2 : precision));
else if (bytes >= 1024*1024)
@ -59,7 +59,7 @@ namespace kt
TQString KBytesPerSecToString2(double speed,int precision = 2)
{
KLocale* loc = TDEGlobal::locale();
TDELocale* loc = TDEGlobal::locale();
return TQString("%1 KB/s").arg(loc->formatNumber(speed,precision));
}

Loading…
Cancel
Save