Changeset 9261 for trunk/qt/mainwin.cc
- Timestamp:
- Oct 10, 2009, 12:39:38 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt/mainwin.cc
r9247 r9261 719 719 .arg( Utils :: sizeToString( stats.uploadedBytes ) ); 720 720 } 721 else / * default is "total-ratio" */721 else // default is "total-ratio" 722 722 { 723 723 str = tr( "Ratio: %1" ).arg( Utils :: ratioToString( mySession.getCumulativeStats().ratio ) ); … … 738 738 const int rowCount( model->rowCount( ) ); 739 739 740 / * count how many torrents are selected, paused, etc */740 // count how many torrents are selected, paused, etc 741 741 for( int row=0; row<rowCount; ++row ) { 742 742 const QModelIndex modelIndex( model->index( row, 0 ) ); 743 743 assert( model == modelIndex.model( ) ); 744 744 const Torrent * tor( model->data( modelIndex, TorrentModel::TorrentRole ).value<const Torrent*>( ) ); 745 const bool isSelected( selectionModel->isSelected( modelIndex ) ); 746 const bool isPaused( tor->isPaused( ) ); 747 if( isSelected ) 748 ++selected; 749 if( isPaused ) 750 ++ paused; 751 if( isSelected && isPaused ) 752 ++selectedAndPaused; 753 if( tor->canManualAnnounce( ) ) 754 ++canAnnounce; 745 if( tor ) { 746 const bool isSelected( selectionModel->isSelected( modelIndex ) ); 747 const bool isPaused( tor->isPaused( ) ); 748 if( isSelected ) 749 ++selected; 750 if( isPaused ) 751 ++ paused; 752 if( isSelected && isPaused ) 753 ++selectedAndPaused; 754 if( tor->canManualAnnounce( ) ) 755 ++canAnnounce; 756 } 755 757 } 756 758
Note: See TracChangeset
for help on using the changeset viewer.