diff options
| author | saturneric <[email protected]> | 2025-06-10 23:18:10 +0000 |
|---|---|---|
| committer | saturneric <[email protected]> | 2025-06-10 23:18:10 +0000 |
| commit | 52bcd981ba6a888d8d86dd3e0932d9edfdd849b6 (patch) | |
| tree | 2d9d53470494e97c00cfd4158809ce385afaaef1 /src/m_ver_check/SoftwareVersion.h | |
| parent | refactor(github version check): restructure version check task and add commit... (diff) | |
| download | Modules-52bcd981ba6a888d8d86dd3e0932d9edfdd849b6.tar.gz Modules-52bcd981ba6a888d8d86dd3e0932d9edfdd849b6.zip | |
feat(version_checking): add update checking api selection and caching
- add bktus api support for version checking
- implement version info caching with timestamp
- add manual check button in update tab
- support api selection from settings
- add json serialization for version info
Diffstat (limited to '')
| -rw-r--r-- | src/m_ver_check/SoftwareVersion.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/m_ver_check/SoftwareVersion.h b/src/m_ver_check/SoftwareVersion.h index c2fc713..4eeab52 100644 --- a/src/m_ver_check/SoftwareVersion.h +++ b/src/m_ver_check/SoftwareVersion.h @@ -28,6 +28,7 @@ #pragma once +#include <QJsonDocument> #include <QString> /** @@ -47,6 +48,8 @@ struct SoftwareVersion { QString remote_commit_hash_by_tag; QString local_commit_hash; + QDateTime timestamp; + /** * @brief * @@ -89,6 +92,21 @@ struct SoftwareVersion { */ [[nodiscard]] auto CurrentVersionReleased() const -> bool; + /** + * @brief + * + * @return QJsonDocument + */ + [[nodiscard]] auto ToJson() const -> QJsonObject; + + /** + * @brief + * + * @param obj + * @return auto + */ + void FromJson(const QJsonObject& obj); + private: static auto version_compare(const QString& a, const QString& b) -> int; }; |
