LocalFileDownloader Class
(KDUpdater::LocalFileDownloader)The LocalFileDownloader class is used to copy files from the local file system. More...
Header: | #include <LocalFileDownloader> |
Protected Functions
void | onError() |
void | onSuccess() |
void | timerEvent(int *event) |
Detailed Description
The LocalFileDownloader class is used to copy files from the local file system.
The user of KDUpdater might be simultaneously downloading several files; sometimes in parallel to other file downloaders. If copying a local file takes a long time, it will make the other downloads hang. Therefore, a timer is used and one block of data is copied per unit time, even though QFile::copy() does the task of copying local files from one place to another.
Member Function Documentation
[protected]
void LocalFileDownloader::onError()
Clears the destination file if an error occurs during copying and stops the download speed timer.
[protected]
void LocalFileDownloader::onSuccess()
Closes the destination file after it has been successfully copied and stops the download speed timer.
[protected]
void LocalFileDownloader::timerEvent(int *event)
Called when the download timer event event occurs.