◆ Updater()
| Updater::Updater |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
Construct a new instance of the Updater class.
- Parameters
-
| parent | Object which Updater should be child of. |
◆ bytesDownloaded
| 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.
◆ checkForUpdate()
| int Updater::checkForUpdate |
( |
| ) |
|
Creates the network request using the updateHostUrl.
This method blocks until the finished signal is caught.
- Returns
- int - 1 if found, 0 if not found, -1 if an error occurred
◆ downloadUpdate()
| int 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
- int - True if the download finished successfully, false otherwise
◆ getDownloadFileName()
| QString Updater::getDownloadFileName |
( |
| ) |
|
Method to check the downloaded file name.
- Returns
- QString - The name of the downloaded file
◆ getDownloadSize()
| qint64 Updater::getDownloadSize |
( |
| ) |
|
Method to check the size of the download.
- Returns
- qint64 - The size of the download file
◆ getErrorMessage()
| QString Updater::getErrorMessage |
( |
| ) |
|
Method to check the descriptive error message.
- Returns
- QString - The error in human-readable format
◆ getNumBytesDownloaded()
| qint64 Updater::getNumBytesDownloaded |
( |
| ) |
|
Method to check how many bytes have been downloaded.
- Returns
- qint64 - The number of bytes downloaded
◆ getUpdateHost()
| QString Updater::getUpdateHost |
( |
| ) |
|
Method to check the downloaded file name.
- Returns
- QString - The name of the downloaded file
◆ parseTagName()
| 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)
◆ setUpdateHost()
| void Updater::setUpdateHost |
( |
QString |
updateHostUrl | ) |
|
Sets the update host for the Updater.
- Parameters
-
| updateHostUrl | - String host URL |
◆ startHulaLoopApp()
| void Updater::startHulaLoopApp |
( |
| ) |
|
Opens the HulaLoop application.
This method is called only if no update was found.
◆ startHulaLoopInstaller()
| 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: