(trunk qt) silence a few compiler warnings
This commit is contained in:
parent
b00b147e03
commit
7ae565ccdf
|
@ -381,7 +381,7 @@ Details :: refresh( )
|
||||||
string = Formatter::ratioToString( torrents.first()->ratio() );
|
string = Formatter::ratioToString( torrents.first()->ratio() );
|
||||||
else {
|
else {
|
||||||
bool isMixed = false;
|
bool isMixed = false;
|
||||||
int ratioType = torrents.first()->ratio();
|
int ratioType = (int) torrents.first()->ratio();
|
||||||
if( ratioType > 0 ) ratioType = 0;
|
if( ratioType > 0 ) ratioType = 0;
|
||||||
foreach( const Torrent *t, torrents )
|
foreach( const Torrent *t, torrents )
|
||||||
{
|
{
|
||||||
|
@ -636,11 +636,11 @@ Details :: refresh( )
|
||||||
myBandwidthPriorityCombo->blockSignals( false );
|
myBandwidthPriorityCombo->blockSignals( false );
|
||||||
|
|
||||||
mySingleDownSpin->blockSignals( true );
|
mySingleDownSpin->blockSignals( true );
|
||||||
mySingleDownSpin->setValue( tor->downloadLimit().KBps() );
|
mySingleDownSpin->setValue( (int)tor->downloadLimit().KBps() );
|
||||||
mySingleDownSpin->blockSignals( false );
|
mySingleDownSpin->blockSignals( false );
|
||||||
|
|
||||||
mySingleUpSpin->blockSignals( true );
|
mySingleUpSpin->blockSignals( true );
|
||||||
mySingleUpSpin->setValue( tor->uploadLimit().KBps() );
|
mySingleUpSpin->setValue( (int)tor->uploadLimit().KBps() );
|
||||||
mySingleUpSpin->blockSignals( false );
|
mySingleUpSpin->blockSignals( false );
|
||||||
|
|
||||||
myPeerLimitSpin->blockSignals( true );
|
myPeerLimitSpin->blockSignals( true );
|
||||||
|
|
|
@ -84,7 +84,7 @@ Speed :: KBps( ) const
|
||||||
Speed
|
Speed
|
||||||
Speed :: fromKBps( double KBps )
|
Speed :: fromKBps( double KBps )
|
||||||
{
|
{
|
||||||
return KBps * speed_K;
|
return int( KBps * speed_K );
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
@ -92,7 +92,7 @@ Speed :: fromKBps( double KBps )
|
||||||
***/
|
***/
|
||||||
|
|
||||||
QString
|
QString
|
||||||
Formatter :: memToString( double bytes )
|
Formatter :: memToString( uint64_t bytes )
|
||||||
{
|
{
|
||||||
if( !bytes )
|
if( !bytes )
|
||||||
return tr( "None" );
|
return tr( "None" );
|
||||||
|
@ -104,7 +104,7 @@ Formatter :: memToString( double bytes )
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
Formatter :: sizeToString( double bytes )
|
Formatter :: sizeToString( uint64_t bytes )
|
||||||
{
|
{
|
||||||
if( !bytes )
|
if( !bytes )
|
||||||
return tr( "None" );
|
return tr( "None" );
|
||||||
|
|
|
@ -30,8 +30,8 @@ class Formatter: public QObject
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static QString memToString( double bytes );
|
static QString memToString( uint64_t bytes );
|
||||||
static QString sizeToString( double bytes );
|
static QString sizeToString( uint64_t bytes );
|
||||||
static QString speedToString( const Speed& speed );
|
static QString speedToString( const Speed& speed );
|
||||||
static QString percentToString( double x );
|
static QString percentToString( double x );
|
||||||
static QString ratioToString( double ratio );
|
static QString ratioToString( double ratio );
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Speed
|
||||||
bool isZero( ) const { return _Bps == 0; }
|
bool isZero( ) const { return _Bps == 0; }
|
||||||
static Speed fromKBps( double KBps );
|
static Speed fromKBps( double KBps );
|
||||||
static Speed fromBps( int Bps ) { return Speed( Bps ); }
|
static Speed fromBps( int Bps ) { return Speed( Bps ); }
|
||||||
void setBps( double Bps ) { _Bps = Bps; }
|
void setBps( int Bps ) { _Bps = Bps; }
|
||||||
Speed& operator+=( const Speed& that ) { _Bps += that._Bps; return *this; }
|
Speed& operator+=( const Speed& that ) { _Bps += that._Bps; return *this; }
|
||||||
Speed operator+( const Speed& that ) const { return Speed( _Bps + that._Bps ); }
|
Speed operator+( const Speed& that ) const { return Speed( _Bps + that._Bps ); }
|
||||||
bool operator<( const Speed& that ) const { return _Bps < that._Bps; }
|
bool operator<( const Speed& that ) const { return _Bps < that._Bps; }
|
||||||
|
|
Loading…
Reference in New Issue