|
wiRedPanda
Logic Circuit Simulator
|
Asynchronously queries the site's release data and emits a signal when a newer version is available. More...
#include <UpdateChecker.h>
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) | |
Asynchronously queries the site's release data 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.
latest-release.json rather than the GitHub Releases API directly, so the per-user daily check never counts against GitHub's per-IP API rate limit; that file is itself kept fresh by a CI job that queries the API once per release, not once per user. Definition at line 28 of file UpdateChecker.h.
|
explicit |
Definition at line 79 of file UpdateChecker.cpp.
| 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 94 of file UpdateChecker.cpp.
References k_releaseDataUrl, Settings::updateCheckLastDate(), and Settings::updateChecksDisabled().
| void UpdateChecker::updateAvailable | ( | const QString & | latestVersion, |
| const QUrl & | downloadUrl, | ||
| const QUrl & | releaseUrl ) |
Emitted when a newer release is available and has not been suppressed.
| latestVersion | Human-readable version string, e.g. "4.5.0". |
| downloadUrl | Direct URL to the platform binary asset, or empty if none matched. |
| releaseUrl | Fallback link to the GitHub release page. |
Referenced by UpdateController::checkForUpdates().