summaryrefslogtreecommitdiffstats
path: root/mandriva/2010.2/applications/ktorrent/ktorrent-fix-KBytesPerSecToString.diff
diff options
context:
space:
mode:
authorTim Williams <tmw@autotrain.org>2011-10-17 18:47:27 +0100
committerTim Williams <tmw@autotrain.org>2011-10-17 18:47:27 +0100
commit76ef832ce5348d12a871223d4c034c7daeaddb82 (patch)
tree7024a1f39a6114daa8c5ed24bb31a8687c832b9a /mandriva/2010.2/applications/ktorrent/ktorrent-fix-KBytesPerSecToString.diff
parentec2515f058c60d2478a549f58376db628ba556b9 (diff)
downloadtde-packaging-76ef832ce5348d12a871223d4c034c7daeaddb82.tar.gz
tde-packaging-76ef832ce5348d12a871223d4c034c7daeaddb82.zip
Adding the remaining Mandriva patches and spec files
Diffstat (limited to 'mandriva/2010.2/applications/ktorrent/ktorrent-fix-KBytesPerSecToString.diff')
-rw-r--r--mandriva/2010.2/applications/ktorrent/ktorrent-fix-KBytesPerSecToString.diff15
1 files changed, 15 insertions, 0 deletions
diff --git a/mandriva/2010.2/applications/ktorrent/ktorrent-fix-KBytesPerSecToString.diff b/mandriva/2010.2/applications/ktorrent/ktorrent-fix-KBytesPerSecToString.diff
new file mode 100644
index 000000000..cdd85d4ec
--- /dev/null
+++ b/mandriva/2010.2/applications/ktorrent/ktorrent-fix-KBytesPerSecToString.diff
@@ -0,0 +1,15 @@
+--- libktorrent/interfaces/functions.cpp.orig 2006-05-21 00:06:28.000000000 +0200
++++ libktorrent/interfaces/functions.cpp 2006-05-21 00:06:54.000000000 +0200
+@@ -46,7 +46,11 @@
+ QString KBytesPerSecToString(double speed,int precision)
+ {
+ KLocale* loc = KGlobal::locale();
+- return i18n("%1 KB/s").arg(loc->formatNumber(speed,precision));
++ QString tmp = loc->formatNumber(speed,precision);
++ if (tmp.startsWith("inf"))
++ return i18n("%1 KB/sec").arg("> 0.0");
++ else
++ return i18n("%1 KB/sec").arg(tmp);
+ }
+
+ QString DurationToString(Uint32 nsecs)