UpdateWorker
The UpdateWorker class is a class providing API to check for current Cutter version and download specific version of one.
Public Functions
explicit UpdateWorker(QObject *parent = nullptr)
void checkCurrentVersion(time_t timeoutMs)
Sends request to determine current version of Cutter. If there is no response in timeoutMs milliseconds, emits
void download(QString filename, QString version)
Downloads provided version of Cutter into downloadDir.
See
Public Slots
void abortDownload()
Stops current process of downloading.
See
download(QDir downloadDir, QString version)
Note
UpdateWorker::downloadFinished(QString filename) is not send after this function.
Signals
void checkComplete(const QVersionNumber &currVerson, const QString &errorMsg)
with timeout error message.
void downloadProcess(size_t bytesReceived, size_t bytesTotal)
The signal is emitted each time when some amount of bytes was downloaded. May be used as indicator of download progress.
void downloadFinished(QString filename)
The signal is emitted as soon as downloading completes.
void downloadError(QString errorStr)
The signal is emitted when error occures during download.
Public Static Functions
static QVersionNumber currentVersionNumber()