Quote Originally Posted by patrik08 View Post
new QHttp();
QHttpRequestHeader header("DELETE", pathorfile ,1,1); /* header */

http://www.webdav.org/specs/rfc2518....ection.8.6.2.1

Qt Code:
  1. DavDelete *lismix = new DavDelete(dbdav,anextpath);
To copy to clipboard, switch view to plain text mode 
If the first two lines are the contents of your DavDelete, may I propose to you to change the class to take a list of files to delete?

The problem with your approach is that for every delete a new connection to the webdav server is created, while if you would create multiple requests on a single QHttp the same connection might be used, which is generally faster (even more so if the server and QHttp can do pipelining..but I do not know that).


(Disregard if you are actually doing this ;-)

The recursiveDeleteDir approach I posted would work very well for that, since you have, at the end, a list of all paths and files to delete (even in the right order so that you can delete them in a row without error) which you would just have to send to the WebDav server.

[For this to work efficiently, you must have the isFile, isDir children etc. function only using a local cache of course ;-)]