From 01fdb95c30f6bff84e28fc42b0a75677ff32e671 Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 15 Oct 2014 22:16:23 +0000 Subject: [PATCH] small fixes in number display git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7613 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/common/RSGraphWidget.cpp | 2 +- retroshare-gui/src/gui/statistics/turtlegraph.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/retroshare-gui/src/gui/common/RSGraphWidget.cpp b/retroshare-gui/src/gui/common/RSGraphWidget.cpp index 980b6b436..9d2fe6212 100644 --- a/retroshare-gui/src/gui/common/RSGraphWidget.cpp +++ b/retroshare-gui/src/gui/common/RSGraphWidget.cpp @@ -80,7 +80,7 @@ QString RSGraphSource::displayName(int i) const QString RSGraphSource::displayValue(float v) const { - return QString::number(v,'g',2) + " " + unitName() ; + return QString::number(v,'f',2) + " " + unitName() ; } void RSGraphSource::getCurrentValues(std::vector& vals) const diff --git a/retroshare-gui/src/gui/statistics/turtlegraph.h b/retroshare-gui/src/gui/statistics/turtlegraph.h index 7d3155f9e..474b0d8df 100644 --- a/retroshare-gui/src/gui/statistics/turtlegraph.h +++ b/retroshare-gui/src/gui/statistics/turtlegraph.h @@ -21,11 +21,11 @@ class TurtleGraphSource: public RSGraphSource virtual QString displayValue(float v) const { if(v < 1000) - return QString::number(v,'g',2) + " B/s" ; + return QString::number(v,'f',2) + " B/s" ; else if(v < 1000*1024) - return QString::number(v/1024.0,'g',2) + " KB/s" ; + return QString::number(v/1024.0,'f',2) + " KB/s" ; else - return QString::number(v/(1024.0*1024),'g',2) + " MB/s" ; + return QString::number(v/(1024.0*1024),'f',2) + " MB/s" ; } };