Version: SVN revision 690315 (using KDE KDE 3.5.6) Installed from: Compiled From Sources Compiler: gcc 4.1.2 OS: Linux In SVN, the "transferring time" part of the detailed info panel is updated with the time the transfer took only after it's finished. Besides, when another transfer is started and another transfer is selected, none of them have their information updated in the panel every 0.5 seconds anymore.
Created attachment 21211 [details] Fix both problems. This patch fixes both problems. Maybe the code for getting the transferring time should be moved to a getTransferringTime method in dcctransfer.cpp
SVN commit 690460 by psn: * Fix for the info update in the details panel when more then one transfer * Continually update the transfer time Patch by Raphael Kubo da Costa BUG:148068 M +15 -2 dcctransferdetailedinfopanel.cpp --- branches/extragear/kde3/network/konversation/src/dcctransferdetailedinfopanel.cpp #690459:690460 @@ -47,10 +47,15 @@ // we can't do disconnect( m_item->transfer(), 0, this, 0 ) here // because m_item can have been deleted already. - // set up the auto view-udpate timer + // set up the auto view-update timer connect( m_autoViewUpdateTimer, SIGNAL( timeout() ), this, SLOT( updateView() ) ); m_item = item; + + // If the file is already being transferred, the timer must be started here, + // otherwise the information will not be updated every 0.5sec + if (m_item->transfer()->getStatus() == DccTransfer::Transferring) + m_autoViewUpdateTimer->start(500, false); connect( m_item->transfer(), SIGNAL( statusChanged( DccTransfer*, int, int ) ), this, SLOT( slotTransferStatusChanged( DccTransfer*, int, int ) ) ); updateView(); @@ -129,7 +134,15 @@ m_labelTransferringTime->setText( "" ); else { - int transferringTime = transfer->getTimeTransferStarted().secsTo( transfer->getTimeTransferFinished() ); + int transferringTime; + + // The transfer is still in progress + if ( transfer->getTimeTransferFinished().isNull() ) + transferringTime = transfer->getTimeTransferStarted().secsTo( QDateTime::currentDateTime() ); + // The transfer has finished + else + transferringTime = transfer->getTimeTransferStarted().secsTo( transfer->getTimeTransferFinished() ); + if ( transferringTime >= 1 ) m_labelTransferringTime->setText( DccTransferPanelItem::secToHMS( transferringTime ) ); else