Bug 184127 - Kget closes automatically when a download is marked as finished in the list
Summary: Kget closes automatically when a download is marked as finished in the list
Status: RESOLVED FIXED
Alias: None
Product: kget
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KGet authors
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-12 11:46 UTC by Rémy Greinhofer
Modified: 2009-04-19 11:58 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rémy Greinhofer 2009-02-12 11:46:13 UTC
Version:           2.2.0 (using 4.2.00 (KDE 4.2.0), Debian packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.26-1-amd64

I checked the option in KGet to automatically quit after the files are downloaded. This works fine.

However now, if I don't clean the list of completed downloads and I try to open Kget again, it stays open only for a couple of seconds although the downloads were completed during a previous session.

Workarounds:
1°) Be very fast to click on Donwloads > Delete all finished
2°) Download a big file and change your settings
Comment 1 Rémy Greinhofer 2009-02-12 11:59:21 UTC
After a quick search in the SVN, I think the problem might come from the file Kget.cpp, in the function void TransferFinishedObserver::checkAndFinish().

There is a loop:
foreach(TransferGroup *transferGroup, KGet::m_transferTreeModel->transferGroups()) {
	  	         foreach(TransferHandler *transfer, transferGroup->handler()->transfers()) {
 	  	             if(transfer->status() != Job::Finished) {
	  	                 quitFlag = false;
 	  	             }
 	  	         }
 	  	     }
I think in this loop, there should be an additional check to check whether the download was finished in a previous session or not.
Comment 2 Lukas Appelhans 2009-04-19 11:58:42 UTC
SVN commit 956021 by lappelhans:

Fix kget closing when all downloads are finished
Patch by Nikhil Marathe...
BUG:184127
CCMAIL:nsm.nikhil@gmail.com


 M  +6 -0      job.cpp  
 M  +5 -0      job.h  
 M  +2 -0      transfer.cpp  
 M  +20 -0     transferhandler.cpp  
 M  +1 -0      transferhandler.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=956021