Removed most of the usages of std::ostringstream in the gui.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5056 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-03-28 18:02:49 +00:00
parent 9ef7d08d2b
commit 4cb844c44d
38 changed files with 190 additions and 354 deletions

View file

@ -30,7 +30,6 @@
#include "util/misc.h"
#include <sstream>
#include <iomanip>
DHTStatus::DHTStatus(QWidget *parent)

View file

@ -24,8 +24,6 @@
#include "peerstatus.h"
#include <sstream>
PeerStatus::PeerStatus(QWidget *parent)
: QWidget(parent)
{
@ -50,16 +48,10 @@ void PeerStatus::getPeerStatus(unsigned int nFriendCount, unsigned int nOnlineCo
{
/* set users/friends/network */
std::ostringstream out;
out << nFriendCount << " ";
std::ostringstream out2;
out2 << nOnlineCount << "";
statusPeers->setToolTip(tr("Online Friends/Total Friends") );
if (statusPeers)
statusPeers -> setText( "<strong>" + tr("Friends") + ":</strong> " + QString::fromStdString(out2.str()) + "/" + QString::fromStdString(out.str()) );
statusPeers -> setText(QString("<strong>%1:</strong> %2/%3 ").arg(tr("Friends")).arg(nOnlineCount).arg(nFriendCount));
if (nOnlineCount > 0)
{

View file

@ -25,7 +25,6 @@
#include "ratesstatus.h"
#include <retroshare/rsiface.h>
#include <sstream>
#include <iomanip>
RatesStatus::RatesStatus(QWidget *parent)
@ -51,16 +50,9 @@ void RatesStatus::getRatesStatus(float downKb, float upKb)
{
/* set users/friends/network */
std::ostringstream out;
out << std::setprecision(2) << std::fixed << downKb ;
std::ostringstream out2;
out2 << std::setprecision(2) << std::fixed << upKb ;
if (statusRates)
statusRates -> setText( tr("<strong>Down:</strong>") + " " + QString::fromStdString(out.str()) + " (kB/s) | " + tr("<strong>Up:</strong>") + " " + QString::fromStdString(out2.str()) + " (kB/s) " );
statusRates -> setText(QString("<strong>%1:</strong> %2 (kB/s) | <strong>%3:</strong> %4 (kB/s) ").arg(tr("Down")).arg(downKb, 0, 'f', 2).arg(tr("Up")).arg(upKb, 0, 'f', 2));
if( upKb > 0 || downKb < 0 )
{
iconLabel->setPixmap(QPixmap(":/images/up1down0.png"));