wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
UpdateChecker Class Reference

Asynchronously queries the GitHub Releases API and emits a signal when a newer version is available. More...

#include <UpdateChecker.h>

Inheritance diagram for UpdateChecker:
[legend]

Public Member Functions

void checkForUpdates ()
 Initiates an asynchronous version check.
void updateAvailable (const QString &latestVersion, const QUrl &downloadUrl, const QUrl &releaseUrl)
 Emitted when a newer release is available and has not been suppressed.
 UpdateChecker (QObject *parent=nullptr)

Detailed Description

Asynchronously queries the GitHub Releases API and emits a signal when a newer version is available.

Call checkForUpdates() once after the main window is shown. The check is skipped if one was already performed today. If the fetched release version is newer than the running application and has not been suppressed by the user, updateAvailable is emitted.

Definition at line 24 of file UpdateChecker.h.

Constructor & Destructor Documentation

◆ UpdateChecker()

UpdateChecker::UpdateChecker ( QObject * parent = nullptr)
explicit

Definition at line 68 of file UpdateChecker.cpp.

Member Function Documentation

◆ checkForUpdates()

void UpdateChecker::checkForUpdates ( )

Initiates an asynchronous version check.

Returns immediately. The check is skipped silently if it was already performed today or if the user previously chose to suppress notifications for the latest available version.

Definition at line 83 of file UpdateChecker.cpp.

References k_apiUrl, Settings::updateCheckLastDate(), and Settings::updateChecksDisabled().

◆ updateAvailable()

void UpdateChecker::updateAvailable ( const QString & latestVersion,
const QUrl & downloadUrl,
const QUrl & releaseUrl )

Emitted when a newer release is available and has not been suppressed.

Parameters
latestVersionHuman-readable version string, e.g. "4.5.0".
downloadUrlDirect URL to the platform binary asset, or empty if none matched.
releaseUrlFallback link to the GitHub release page.

Referenced by UpdateController::checkForUpdates().


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