| Updater::Updater |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
Construct a new instance of the Updater class.
- Parameters
-
| parent | Object which Updater should be child of. |
| void hula::Updater::bytesDownloaded |
( |
| ) |
|
|
signal |
A signal emitted when QNetworkReply's readyRead signal is triggered.
This method informs the QML side of how many bytes were read by the network request and is used to update the progress bar accordingly.
| bool Updater::checkForUpdate |
( |
| ) |
|
Creates the network request using the updateHostUrl.
This method blocks until the finished signal is caught.
- Returns
- bool - True if an update was found, false otherwise
| bool Updater::downloadUpdate |
( |
| ) |
|
Creates the network request using the downloadHostUrl.
This method writes incrementally to a file in the system's temporary directory and blocks until the finished signal is caught.
- Returns
- bool - True if the download finished successfully, false otherwise
| QString Updater::getDownloadFileName |
( |
| ) |
|
Method to check the downloaded file name.
- Returns
- QString - The name of the downloaded file
| qint64 Updater::getDownloadSize |
( |
| ) |
|
Method to check the size of the download.
- Returns
- qint64 - The size of the download file
| qint64 Updater::getNumBytesDownloaded |
( |
| ) |
|
Method to check how many bytes have been downloaded.
- Returns
- qint64 - The number of bytes downloaded
| QString Updater::getUpdateHost |
( |
| ) |
|
Method to check the downloaded file name.
- Returns
- QString - The name of the downloaded file
| QList< int > Updater::parseTagName |
( |
const QString & |
tagName | ) |
|
A method to parse the tag name returned from the GitHub Releases API.
- Parameters
-
| tagName | - QString containing the GitHub Releases tag name |
- Returns
- QList<int> - A QList holding the version segments (major, minor, revision, build)
| void Updater::setUpdateHost |
( |
QString |
updateHostUrl | ) |
|
Sets the update host for the Updater.
- Parameters
-
| updateHostUrl | - String host URL |
| void Updater::startHulaLoopApp |
( |
| ) |
|
Opens the HulaLoop application.
This method is called only if no update was found.
| void Updater::startHulaLoopInstaller |
( |
| ) |
|
Opens the HulaLoop installer application.
This method is called only if an update was found.
The documentation for this class was generated from the following files: