Changeset 11054
- Timestamp:
- Jul 25, 2010, 8:36:33 PM (12 years ago)
- Location:
- trunk/qt
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt/details.cc
r11047 r11054 382 382 else { 383 383 bool isMixed = false; 384 int ratioType = torrents.first()->ratio();384 int ratioType = (int) torrents.first()->ratio(); 385 385 if( ratioType > 0 ) ratioType = 0; 386 386 foreach( const Torrent *t, torrents ) … … 637 637 638 638 mySingleDownSpin->blockSignals( true ); 639 mySingleDownSpin->setValue( tor->downloadLimit().KBps() );639 mySingleDownSpin->setValue( (int)tor->downloadLimit().KBps() ); 640 640 mySingleDownSpin->blockSignals( false ); 641 641 642 642 mySingleUpSpin->blockSignals( true ); 643 mySingleUpSpin->setValue( tor->uploadLimit().KBps() );643 mySingleUpSpin->setValue( (int)tor->uploadLimit().KBps() ); 644 644 mySingleUpSpin->blockSignals( false ); 645 645 -
trunk/qt/formatter.cc
r11043 r11054 85 85 Speed :: fromKBps( double KBps ) 86 86 { 87 return KBps * speed_K;87 return int( KBps * speed_K ); 88 88 } 89 89 … … 93 93 94 94 QString 95 Formatter :: memToString( doublebytes )95 Formatter :: memToString( uint64_t bytes ) 96 96 { 97 97 if( !bytes ) … … 105 105 106 106 QString 107 Formatter :: sizeToString( doublebytes )107 Formatter :: sizeToString( uint64_t bytes ) 108 108 { 109 109 if( !bytes ) -
trunk/qt/formatter.h
r11043 r11054 31 31 public: 32 32 33 static QString memToString( doublebytes );34 static QString sizeToString( doublebytes );33 static QString memToString( uint64_t bytes ); 34 static QString sizeToString( uint64_t bytes ); 35 35 static QString speedToString( const Speed& speed ); 36 36 static QString percentToString( double x ); -
trunk/qt/speed.h
r10957 r11054 28 28 static Speed fromKBps( double KBps ); 29 29 static Speed fromBps( int Bps ) { return Speed( Bps ); } 30 void setBps( doubleBps ) { _Bps = Bps; }30 void setBps( int Bps ) { _Bps = Bps; } 31 31 Speed& operator+=( const Speed& that ) { _Bps += that._Bps; return *this; } 32 32 Speed operator+( const Speed& that ) const { return Speed( _Bps + that._Bps ); }
Note: See TracChangeset
for help on using the changeset viewer.