mirror of
https://github.com/transmission/transmission
synced 2025-03-04 02:28:03 +00:00
(trunk qt) silence a few compiler warnings
This commit is contained in:
parent
b00b147e03
commit
7ae565ccdf
4 changed files with 9 additions and 9 deletions
|
@ -381,7 +381,7 @@ Details :: refresh( )
|
|||
string = Formatter::ratioToString( torrents.first()->ratio() );
|
||||
else {
|
||||
bool isMixed = false;
|
||||
int ratioType = torrents.first()->ratio();
|
||||
int ratioType = (int) torrents.first()->ratio();
|
||||
if( ratioType > 0 ) ratioType = 0;
|
||||
foreach( const Torrent *t, torrents )
|
||||
{
|
||||
|
@ -636,11 +636,11 @@ Details :: refresh( )
|
|||
myBandwidthPriorityCombo->blockSignals( false );
|
||||
|
||||
mySingleDownSpin->blockSignals( true );
|
||||
mySingleDownSpin->setValue( tor->downloadLimit().KBps() );
|
||||
mySingleDownSpin->setValue( (int)tor->downloadLimit().KBps() );
|
||||
mySingleDownSpin->blockSignals( false );
|
||||
|
||||
mySingleUpSpin->blockSignals( true );
|
||||
mySingleUpSpin->setValue( tor->uploadLimit().KBps() );
|
||||
mySingleUpSpin->setValue( (int)tor->uploadLimit().KBps() );
|
||||
mySingleUpSpin->blockSignals( false );
|
||||
|
||||
myPeerLimitSpin->blockSignals( true );
|
||||
|
|
|
@ -84,7 +84,7 @@ Speed :: KBps( ) const
|
|||
Speed
|
||||
Speed :: fromKBps( double KBps )
|
||||
{
|
||||
return KBps * speed_K;
|
||||
return int( KBps * speed_K );
|
||||
}
|
||||
|
||||
/***
|
||||
|
@ -92,7 +92,7 @@ Speed :: fromKBps( double KBps )
|
|||
***/
|
||||
|
||||
QString
|
||||
Formatter :: memToString( double bytes )
|
||||
Formatter :: memToString( uint64_t bytes )
|
||||
{
|
||||
if( !bytes )
|
||||
return tr( "None" );
|
||||
|
@ -104,7 +104,7 @@ Formatter :: memToString( double bytes )
|
|||
}
|
||||
|
||||
QString
|
||||
Formatter :: sizeToString( double bytes )
|
||||
Formatter :: sizeToString( uint64_t bytes )
|
||||
{
|
||||
if( !bytes )
|
||||
return tr( "None" );
|
||||
|
|
|
@ -30,8 +30,8 @@ class Formatter: public QObject
|
|||
|
||||
public:
|
||||
|
||||
static QString memToString( double bytes );
|
||||
static QString sizeToString( double bytes );
|
||||
static QString memToString( uint64_t bytes );
|
||||
static QString sizeToString( uint64_t bytes );
|
||||
static QString speedToString( const Speed& speed );
|
||||
static QString percentToString( double x );
|
||||
static QString ratioToString( double ratio );
|
||||
|
|
|
@ -27,7 +27,7 @@ class Speed
|
|||
bool isZero( ) const { return _Bps == 0; }
|
||||
static Speed fromKBps( double KBps );
|
||||
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 ) const { return Speed( _Bps + that._Bps ); }
|
||||
bool operator<( const Speed& that ) const { return _Bps < that._Bps; }
|
||||
|
|
Loading…
Add table
Reference in a new issue