Version: 0.19+ #3146 (using KDE 3.5.4, Kubuntu Package 4:3.5.4-0ubuntu6 ) Compiler: Target: i486-linux-gnu OS: Linux (i686) release 2.6.15-25-k7 Items in the DCC status list that are completed, failed or aborted, show a speed of "?", in my opinion this column should be empty when there is no transfer activity. This would follow the consistency with the "Remaining" column, which clears when a transfer is in a non-transfering state.
SVN commit 578242 by shin: don't show "?" in CPS column in DCC panel for the consitency with "remaining" column. BUG: 133147 M +1 -1 dcctransfer.cpp --- trunk/extragear/network/konversation/src/dcctransfer.cpp #578241:578242 @@ -477,7 +477,7 @@ QString DccTransfer::getCPSPrettyText() const { if ( m_cps == CPS_UNKNOWN ) - return QString( "?" ); + return QString(); else return i18n("%1/sec").arg( KIO::convertSize( (KIO::fileoffset_t)m_cps ) ); }
SVN commit 578246 by shin: show "?" when calculating CPS. CCBUG: 133147 M +7 -4 dcctransfer.cpp --- trunk/extragear/network/konversation/src/dcctransfer.cpp #578245:578246 @@ -37,7 +37,8 @@ #define TIME_REMAINING_NOT_AVAILABLE -1 #define TIME_REMAINING_INFINITE -2 -#define CPS_UNKNOWN -1 +#define CPS_CALCULATING -1 +#define CPS_NOT_IN_TRANSFER -2 DccTransfer::DccTransfer( DccPanel* panel, DccType dccType, const QString& partnerNick ) : KListViewItem( panel->getListView() ) @@ -369,7 +370,7 @@ if ( m_transferLogTime.count() >= 2 ) m_cps = (double)( m_transferLogPosition.last() - m_transferLogPosition.front() ) / (double)( m_transferLogTime.last() - m_transferLogTime.front() ) * 1000; else // avoid zero devision - m_cps = CPS_UNKNOWN; + m_cps = CPS_CALCULATING; // update the remaining time if ( m_cps <= 0 ) @@ -381,7 +382,7 @@ { // avoid zero devision if ( m_timeTransferStarted.secsTo( m_timeTransferFinished ) <= 0 ) - m_cps = CPS_UNKNOWN; + m_cps = CPS_NOT_IN_TRANSFER; else m_cps = (double)( m_transferringPosition - m_transferStartPosition ) / (double)m_timeTransferStarted.secsTo( m_timeTransferFinished ); m_timeRemaining = TIME_REMAINING_NOT_AVAILABLE; @@ -476,7 +477,9 @@ QString DccTransfer::getCPSPrettyText() const { - if ( m_cps == CPS_UNKNOWN ) + if ( m_cps == CPS_CALCULATING ) + return QString( "?" ); + else if ( m_cps == CPS_NOT_IN_TRANSFER ) return QString(); else return i18n("%1/sec").arg( KIO::convertSize( (KIO::fileoffset_t)m_cps ) );