Changeset 11054


Ignore:
Timestamp:
Jul 25, 2010, 8:36:33 PM (12 years ago)
Author:
charles
Message:

(trunk qt) silence a few compiler warnings

Location:
trunk/qt
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/details.cc

    r11047 r11054  
    382382    else {
    383383        bool isMixed = false;
    384         int ratioType = torrents.first()->ratio();
     384        int ratioType = (int) torrents.first()->ratio();
    385385        if( ratioType > 0 ) ratioType = 0;
    386386        foreach( const Torrent *t, torrents )
     
    637637
    638638        mySingleDownSpin->blockSignals( true );
    639         mySingleDownSpin->setValue( tor->downloadLimit().KBps() );
     639        mySingleDownSpin->setValue( (int)tor->downloadLimit().KBps() );
    640640        mySingleDownSpin->blockSignals( false );
    641641
    642642        mySingleUpSpin->blockSignals( true );
    643         mySingleUpSpin->setValue( tor->uploadLimit().KBps() );
     643        mySingleUpSpin->setValue( (int)tor->uploadLimit().KBps() );
    644644        mySingleUpSpin->blockSignals( false );
    645645
  • trunk/qt/formatter.cc

    r11043 r11054  
    8585Speed :: fromKBps( double KBps )
    8686{
    87     return KBps * speed_K;
     87    return int( KBps * speed_K );
    8888}
    8989
     
    9393
    9494QString
    95 Formatter :: memToString( double bytes )
     95Formatter :: memToString( uint64_t bytes )
    9696{
    9797    if( !bytes )
     
    105105
    106106QString
    107 Formatter :: sizeToString( double bytes )
     107Formatter :: sizeToString( uint64_t bytes )
    108108{
    109109    if( !bytes )
  • trunk/qt/formatter.h

    r11043 r11054  
    3131    public:
    3232
    33         static QString memToString( double bytes );
    34         static QString sizeToString( double bytes );
     33        static QString memToString( uint64_t bytes );
     34        static QString sizeToString( uint64_t bytes );
    3535        static QString speedToString( const Speed& speed );
    3636        static QString percentToString( double x );
  • trunk/qt/speed.h

    r10957 r11054  
    2828        static Speed fromKBps( double KBps );
    2929        static Speed fromBps( int Bps ) { return Speed( Bps ); }
    30         void setBps( double Bps ) { _Bps = Bps; }
     30        void setBps( int Bps ) { _Bps = Bps; }
    3131        Speed& operator+=( const Speed& that ) { _Bps += that._Bps; return *this; }
    3232        Speed operator+( const Speed& that ) const { return Speed( _Bps + that._Bps ); }
Note: See TracChangeset for help on using the changeset viewer.