Asynchronous update checker using Qt6::Network.
More...
#include <UpdateChecker.hpp>
|
| static QString | PlatformId () |
| |
| static bool | IsPluginCompatible (const updates::PluginUpdateInfo &info) |
| | Returns true when manifest apiVersion and minAppVersion are compatible with the running application.
|
| |
| static std::string | StripV (const QString &tagName) |
| |
| static bool | VersionGreater (const std::string &a, const std::string &b) |
| | Semantic version comparison: returns true when a > b. Handles "major.minor.patch" strings.
|
| |
Asynchronous update checker using Qt6::Network.
Queries the GitHub Releases API for bula173/LogViewer and optionally downloads the plugins_manifest.json asset listed in that release to enumerate available plugin updates.
Usage:
checker->CheckAsync();
Asynchronous update checker using Qt6::Network.
Definition UpdateChecker.hpp:27
void UpdateCheckComplete(updates::UpdateCheckResult result)
◆ UpdateChecker()
| ui::qt::UpdateChecker::UpdateChecker |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
◆ CheckAsync()
| void ui::qt::UpdateChecker::CheckAsync |
( |
| ) |
|
Start an asynchronous update check.
Emits either UpdateCheckComplete or UpdateCheckFailed when finished. Safe to call from the main thread.
◆ DoPluginDownload()
◆ DownloadPlugin()
Download a plugin ZIP to a temp location then verify its checksum.
Emits PluginDownloadProgress, then PluginDownloadComplete or PluginDownloadFailed when done.
- Parameters
-
| info | Plugin update info including downloadUrl and sha256. |
◆ IsChecking()
| bool ui::qt::UpdateChecker::IsChecking |
( |
| ) |
const |
|
inline |
True while an update check is in progress.
◆ IsPluginCompatible()
Returns true when manifest apiVersion and minAppVersion are compatible with the running application.
◆ OnManifestReply
| void ui::qt::UpdateChecker::OnManifestReply |
( |
QNetworkReply * |
reply | ) |
|
|
privateslot |
◆ OnReleaseReply
| void ui::qt::UpdateChecker::OnReleaseReply |
( |
QNetworkReply * |
reply | ) |
|
|
privateslot |
◆ OnSslErrors()
| void ui::qt::UpdateChecker::OnSslErrors |
( |
QNetworkReply * |
reply, |
|
|
const QList< QSslError > & |
errors |
|
) |
| |
|
private |
◆ PlatformId()
| QString ui::qt::UpdateChecker::PlatformId |
( |
| ) |
|
|
staticprivate |
Returns "linux", "windows", or "macos" based on the build target.
◆ PluginDownloadComplete
| void ui::qt::UpdateChecker::PluginDownloadComplete |
( |
QString |
pluginId, |
|
|
QString |
tempFilePath |
|
) |
| |
|
signal |
◆ PluginDownloadFailed
| void ui::qt::UpdateChecker::PluginDownloadFailed |
( |
QString |
pluginId, |
|
|
QString |
errorMessage |
|
) |
| |
|
signal |
◆ PluginDownloadProgress
| void ui::qt::UpdateChecker::PluginDownloadProgress |
( |
QString |
pluginId, |
|
|
qint64 |
bytesReceived, |
|
|
qint64 |
bytesTotal |
|
) |
| |
|
signal |
◆ StripV()
| std::string ui::qt::UpdateChecker::StripV |
( |
const QString & |
tagName | ) |
|
|
staticprivate |
Strip leading 'v' from a GitHub tag name ("v1.2.0" → "1.2.0").
◆ UpdateCheckComplete
◆ UpdateCheckFailed
| void ui::qt::UpdateChecker::UpdateCheckFailed |
( |
QString |
errorMessage | ) |
|
|
signal |
◆ VersionGreater()
| bool ui::qt::UpdateChecker::VersionGreater |
( |
const std::string & |
a, |
|
|
const std::string & |
b |
|
) |
| |
|
staticprivate |
Semantic version comparison: returns true when a > b. Handles "major.minor.patch" strings.
◆ kGitHubApiUrl
| constexpr const char* ui::qt::UpdateChecker::kGitHubApiUrl |
|
staticconstexprprivate |
Initial value:=
"https://api.github.com/repos/bula173/LogViewer/releases/latest"
◆ m_checking
| bool ui::qt::UpdateChecker::m_checking {false} |
|
private |
◆ m_net
| QNetworkAccessManager ui::qt::UpdateChecker::m_net |
|
private |
◆ m_pending
Assembled during the two-step check.
The documentation for this class was generated from the following files: