downloadToFile


#1

How does calling the destructor of this ‘cancel the download task if necessary’ as it says in the manual?

The destructor is empty and the class doesn’t seem to contain any other code that’ll be executed if I delete it…?


#2

It inherits a class that has a destructor that does something? There’s an object member variable that has a destructor that does something?


#3

I couldn’t see any of those…! I might be being dumb.


#4

In most implementations dowloadToFile() returns a FallbackDownloadTask, which derives from DownloadTask and has stream->cancel(); in its destructor.


#5

Ah - thanks, that’s it. Makes sense now.