Changeset 10713


Ignore:
Timestamp:
May 31, 2010, 3:30:44 PM (12 years ago)
Author:
Longinus00
Message:

(qt) fix partial seeds showing 100% downloaded

Location:
trunk/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/torrent-delegate.cc

    r10451 r10713  
    9292                  .arg( Utils::sizeToString( haveTotal ) )
    9393                  .arg( Utils::sizeToString( tor.totalSize( ) ) )
    94                   .arg( tor.percentDone( ) * 100.0, 0, 'f', 2 )
     94                  .arg( tor.percentComplete( ) * 100.0, 0, 'f', 2 )
    9595                  .arg( Utils::sizeToString( tor.uploadedEver( ) ) )
    9696                  .arg( Utils::ratioToString( tor.ratio( ) ) )
     
    107107                  .arg( Utils::sizeToString( haveTotal ) )
    108108                  .arg( Utils::sizeToString( tor.totalSize( ) ) )
    109                   .arg( tor.percentDone( ) * 100.0, 0, 'f', 2 )
     109                  .arg( tor.percentComplete( ) * 100.0, 0, 'f', 2 )
    110110                  .arg( Utils::sizeToString( tor.uploadedEver( ) ) )
    111111                  .arg( Utils::ratioToString( tor.ratio( ) ) );
  • trunk/qt/torrent.h

    r10451 r10713  
    254254        int  pieceCount( ) const { return getInt( PIECE_COUNT ); }
    255255        double ratio( ) const { return getDouble( RATIO ); }
     256        double percentComplete( ) const { return haveTotal() / (double)totalSize(); }
    256257        double percentDone( ) const { return getDouble( PERCENT_DONE ); }
    257258        double metadataPercentDone( ) const { return getDouble( METADATA_PERCENT_DONE ); }
Note: See TracChangeset for help on using the changeset viewer.