UpdateWorker¶
-
class UpdateWorker : public QObject¶
The UpdateWorker class is a class providing API to check for current Cutter version.
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 showUpdateDialog(bool showDontCheckForUpdatesButton)¶
Shows dialog that allows user to download latest version of Cutter from website. This dialog also has “Don’t check for updates” button which disables on-start update checks if showDontCheckForUpdatesButton is true.
Signals
-
void checkComplete(const QVersionNumber &currVerson, const QString &errorMsg)¶
with timeout error message.
The signal is emitted when check has been done with an empty errorMsg string. In case of an error currVerson is null and errorMsg contains description of error.
See also
checkComplete(const QString& verson, const QString& errorMsg)
Public Static Functions
-
static QVersionNumber currentVersionNumber()¶
- Returns:
the version of this Cutter binary, derived from CUTTER_VERSION_MAJOR, CUTTER_VERSION_MINOR and CUTTER_VERSION_PATCH.
-
explicit UpdateWorker(QObject *parent = nullptr)¶