[Kget] branches/KDE/4.3/kdenetwork/kget/core

Carsten Pfeiffer pfeiffer at kde.org
Thu Jul 23 11:55:51 CEST 2009


SVN commit 1001434 by pfeiffer:

BUG: 170496
CCMAIL: kget at kde.org
do not save finished transfers in the transfers.kgt list at all


 M  +8 -4      transfergroup.cpp  


--- branches/KDE/4.3/kdenetwork/kget/core/transfergroup.cpp #1001433:1001434
@@ -354,10 +354,14 @@
 
     for( ; it!=itEnd; ++it )
     {
-        kDebug(5001) << "  -->  " << name() << "  transfer: " << ((Transfer *) *it)->source();
-        QDomElement t = e.ownerDocument().createElement("Transfer");
-        e.appendChild(t);
-        ((Transfer *) *it)->save(t);
+        Transfer* transfer = static_cast<Transfer*>(*it);
+        if (transfer->status() != Job::Finished) // do not save finished downloads
+        {
+            kDebug(5001) << "  -->  " << name() << "  transfer: " << transfer->source();
+            QDomElement t = e.ownerDocument().createElement("Transfer");
+            e.appendChild(t);
+            transfer->save(t);
+        }
     }
 }
 


More information about the Kget mailing list