aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/struct/SoftwareVersion.h
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2023-02-25 11:49:54 +0000
committerGitHub <[email protected]>2023-02-25 11:49:54 +0000
commitaf1cd680f2496629026ba27707cef2afd860f5f9 (patch)
tree78e78450893e98b8828cc41010e377c1561e5f34 /src/ui/struct/SoftwareVersion.h
parentfix: improve manual (diff)
parentfeat: use aqt to install qt in ci build (diff)
downloadGpgFrontend-af1cd680f2496629026ba27707cef2afd860f5f9.tar.gz
GpgFrontend-af1cd680f2496629026ba27707cef2afd860f5f9.zip
Merge pull request #91 from saturneric/dev/2.0.10/main
Develop 2.1.0.1
Diffstat (limited to '')
-rw-r--r--src/ui/struct/SoftwareVersion.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/ui/struct/SoftwareVersion.h b/src/ui/struct/SoftwareVersion.h
index da93f8c6..9d861ef1 100644
--- a/src/ui/struct/SoftwareVersion.h
+++ b/src/ui/struct/SoftwareVersion.h
@@ -54,7 +54,7 @@ struct SoftwareVersion {
* @return true
* @return false
*/
- [[nodiscard]] bool InfoVaild() const { return load_info_done; }
+ [[nodiscard]] bool InfoValid() const { return load_info_done; }
/**
* @brief
@@ -62,10 +62,7 @@ struct SoftwareVersion {
* @return true
* @return false
*/
- [[nodiscard]] bool NeedUpgrade() const {
- return load_info_done && !latest_prerelease && !latest_draft &&
- current_version < latest_version;
- }
+ [[nodiscard]] bool NeedUpgrade() const;
/**
* @brief
@@ -73,10 +70,7 @@ struct SoftwareVersion {
* @return true
* @return false
*/
- [[nodiscard]] bool VersionWithDrawn() const {
- return load_info_done && !current_version_found && current_prerelease &&
- !current_draft;
- }
+ [[nodiscard]] bool VersionWithDrawn() const;
/**
* @brief
@@ -84,9 +78,10 @@ struct SoftwareVersion {
* @return true
* @return false
*/
- [[nodiscard]] bool CurrentVersionReleased() const {
- return load_info_done && current_version_found;
- }
+ [[nodiscard]] bool CurrentVersionReleased() const;
+
+ private:
+ static int version_compare(const std::string& a, const std::string& b);
};
} // namespace GpgFrontend::UI