|
wiRedPanda
Logic Circuit Simulator
|
Asynchronously queries the GitHub Releases API 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 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.
|
explicit |
Definition at line 68 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 83 of file UpdateChecker.cpp.
References k_apiUrl, 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().