Fix memory leak with Dropbox version control plugin.

Review Request #117753 - Created April 24, 2014 and submitted

Emmanuel Pescosta
Fix memory leak with Dropbox version control plugin.

The Dropbox plugins creates a new QLocalSocket on each
beginRetrieval call and this socket should be deleted again
in endRetrieval. But if Dropbox is not running or doesn't respond
beginRetrieval will return false and so endRetrieval won't be called -> memory leak.

In the current version we only call endRetrieval when
beginRetrieval was successfully in UpdateItemStatesThread::run(). 
This causes some problems with version control plugins (like Dropbox plugin), 
which have to do cleanups in endRetrieval.

Now we always call endRetrieval after beginRetrieval when updating the version states.

The Dropbox plugin is the only official version control plugin which really uses endRetrieval,
the other plugins have an empty endRetrieval. Because of that I think it is safe enough
for 4.13.1.
No memory leak anymore, when beginRetrieval was not successful.

Dropbox, Git and svn plugin still work.
Frank Reininghaus
Commit Hook
This review has been submitted with commit c9dab5ba8ad30b819f321666b9e171a3c26d32c1 by Emmanuel Pescosta to branch KDE/4.13.
Emmanuel Pescosta
Review request changed

Status: Closed (submitted)