Qt Utilities: QtUtilities::Updater Class Reference

Qt Utilities 6.20.0 Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models

Loading...
Searching...
No Matches
Classes | Public Types | Public Slots | Signals | Public Member Functions | Properties | List of all members
QtUtilities::Updater Class Reference

The Updater class allows downloading and applying an update. More...

`#include <updater.h>`

Inheritance diagram for QtUtilities::Updater:
[legend]
Collaboration diagram for QtUtilities::Updater:
[legend]

## Classes
struct | Update

## Public Types
using | VerifyFunction = std::function<QString(const Update &)>

## Public Slots
bool | performUpdate (const QString &downloadUrl, const QString &signatureUrl)
void | abortUpdate ()

## Signals
void | inProgressChanged (bool inProgress)
void | updateFailed (const QString &error)
void | updateStored ()
void | updatePercentageChanged (qint64 bytesReceived, qint64 bytesTotal)
void | updateStatusChanged (const QString &statusMessage)

## Public Member Functions
| Updater (const QString &executableName, QObject *parent=nullptr)
| Updater (const QString &executableName, const QString &signatureExtension, QObject *parent=nullptr)
| ~Updater () override
bool | isInProgress () const
QString | overallStatus () const
const QString & | error () const
const QString & | statusMessage () const
const QString & | storedPath () const
void | setNetworkAccessManager (QNetworkAccessManager *nm)
void | setVerifier (VerifyFunction &&verifyFunction)

## Properties
bool | inProgress
QString | overallStatus
QString | error
QString | statusMessage
QString | storedPath

## Detailed Description

The Updater class allows downloading and applying an update.

Remarks
  This class is experimental and might be changed in incompatible ways (API and ABI wise) or completely removed in further minor/patch releases.

Definition at line 131 of file updater.h.

## Member Typedef Documentation

## ◆ VerifyFunction

using QtUtilities::Updater::VerifyFunction = std::function<QString(const Update &)>

Definition at line 146 of file updater.h.

## Constructor & Destructor Documentation

## ◆ Updater() [1/2]

QtUtilities::Updater::Updater | ( | const QString & | executableName,
|  | QObject * | parent = nullptr )
| explicit

Definition at line 750 of file updater.cpp.

## ◆ Updater() [2/2]

QtUtilities::Updater::Updater | ( | const QString & | executableName,
|  | const QString & | signatureExtension,
|  | QObject * | parent = nullptr )
| explicit

Definition at line 755 of file updater.cpp.

## ◆ ~Updater()

QtUtilities::Updater::~Updater | ( |  | ) |
| override

Definition at line 775 of file updater.cpp.

## Member Function Documentation

## ◆ abortUpdate

void QtUtilities::Updater::abortUpdate | ( |  | ) |
| slot

Definition at line 862 of file updater.cpp.

## ◆ error()

const QString & QtUtilities::Updater::error | ( |  | ) | const

Definition at line 797 of file updater.cpp.

## ◆ inProgressChanged

void QtUtilities::Updater::inProgressChanged | ( | bool | inProgress | ) |
| signal

## ◆ isInProgress()

bool QtUtilities::Updater::isInProgress | ( |  | ) | const

Definition at line 779 of file updater.cpp.

## ◆ overallStatus()

QString QtUtilities::Updater::overallStatus | ( |  | ) | const

Definition at line 788 of file updater.cpp.

## ◆ performUpdate

bool QtUtilities::Updater::performUpdate | ( | const QString & | downloadUrl,
|  | const QString & | signatureUrl )
| slot

Definition at line 846 of file updater.cpp.

## ◆ setNetworkAccessManager()

void QtUtilities::Updater::setNetworkAccessManager | ( | QNetworkAccessManager * | nm | ) |

Definition at line 821 of file updater.cpp.

## ◆ setVerifier()

void QtUtilities::Updater::setVerifier | ( | VerifyFunction && | verifyFunction | ) |

Definition at line 830 of file updater.cpp.

## ◆ statusMessage()

const QString & QtUtilities::Updater::statusMessage | ( |  | ) | const

Definition at line 802 of file updater.cpp.

## ◆ storedPath()

const QString & QtUtilities::Updater::storedPath | ( |  | ) | const

Definition at line 811 of file updater.cpp.

## ◆ updateFailed

void QtUtilities::Updater::updateFailed | ( | const QString & | error | ) |
| signal

## ◆ updatePercentageChanged

void QtUtilities::Updater::updatePercentageChanged | ( | qint64 | bytesReceived,
|  | qint64 | bytesTotal )
| signal

## ◆ updateStatusChanged

void QtUtilities::Updater::updateStatusChanged | ( | const QString & | statusMessage | ) |
| signal

## ◆ updateStored

void QtUtilities::Updater::updateStored | ( |  | ) |
| signal

## Property Documentation

## ◆ error

QString QtUtilities::Updater::error
| read

Definition at line 135 of file updater.h.

## ◆ inProgress

bool QtUtilities::Updater::inProgress
| read

Definition at line 133 of file updater.h.

## ◆ overallStatus

QString QtUtilities::Updater::overallStatus
| read

Definition at line 134 of file updater.h.

## ◆ statusMessage

QString QtUtilities::Updater::statusMessage
| read

Definition at line 136 of file updater.h.

## ◆ storedPath

QString QtUtilities::Updater::storedPath
| read

Definition at line 137 of file updater.h.

The documentation for this class was generated from the following files:

- setup/updater.h
- setup/updater.cpp