From f569bae99c9a767ebc1b0eb544f9ba03b13ddfc4 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Sat, 5 Nov 2011 15:45:38 +0000 Subject: [PATCH] (trunk qt) fix minor bugs in the torrent details dialog's info tab. --- qt/details.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qt/details.cc b/qt/details.cc index f1c5984e6..a4815eae0 100644 --- a/qt/details.cc +++ b/qt/details.cc @@ -360,9 +360,10 @@ Details :: refresh( ) bool isMixed = false; bool allPaused = true; bool allFinished = true; - const tr_torrent_activity activity = torrents[0]->getActivity( ); + const tr_torrent_activity baseline = torrents[0]->getActivity( ); foreach( const Torrent * t, torrents ) { - if( activity != t->getActivity( ) ) + const tr_torrent_activity activity = t->getActivity( ); + if( activity != baseline ) isMixed = true; if( activity != TR_STATUS_STOPPED ) allPaused = allFinished = false; @@ -445,10 +446,11 @@ Details :: refresh( ) myAvailabilityLabel->setText( string ); // myDownloadedLabel - uint64_t d = 0, f = 0; if( torrents.empty( ) ) string = none; else { + uint64_t d = 0; + uint64_t f = 0; foreach( const Torrent * t, torrents ) { d += t->downloadedEver( ); f += t->failedEver( );