diff options
author | Saturneric <[email protected]> | 2023-02-07 09:16:45 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2023-02-07 09:16:45 +0000 |
commit | 7a468420c7a551cba35670e1e051586281a85d9d (patch) | |
tree | 660eb4fabf452fd928f092756596fbea348c5afd /src/ui/struct/SoftwareVersion.cpp | |
parent | feat: use custom password dialog now (diff) | |
download | GpgFrontend-7a468420c7a551cba35670e1e051586281a85d9d.tar.gz GpgFrontend-7a468420c7a551cba35670e1e051586281a85d9d.zip |
fix: solve an issue in version checking
Diffstat (limited to 'src/ui/struct/SoftwareVersion.cpp')
-rw-r--r-- | src/ui/struct/SoftwareVersion.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ui/struct/SoftwareVersion.cpp b/src/ui/struct/SoftwareVersion.cpp index a0ad594b..6a60cb02 100644 --- a/src/ui/struct/SoftwareVersion.cpp +++ b/src/ui/struct/SoftwareVersion.cpp @@ -34,12 +34,12 @@ int GpgFrontend::UI::SoftwareVersion::version_compare(const std::string& a, if (!temp_a.empty() && temp_a.front() == 'v') { temp_a = temp_a.erase(0, 1); - SPDLOG_INFO("real version a: {}", temp_a); + SPDLOG_DEBUG("real version a: {}", temp_a); } if (!temp_b.empty() && temp_b.front() == 'v') { temp_b.erase(0, 1); - SPDLOG_INFO("real version b: {}", temp_b); + SPDLOG_DEBUG("real version b: {}", temp_b); } // First, split the string. @@ -81,6 +81,12 @@ int GpgFrontend::UI::SoftwareVersion::version_compare(const std::string& a, } bool GpgFrontend::UI::SoftwareVersion::NeedUpgrade() const { + SPDLOG_DEBUG("compair version current {} latest {}, result {}", + current_version, latest_version, + version_compare(current_version, latest_version)); + + SPDLOG_DEBUG("load done: {}, pre-release: {}, draft: {}", load_info_done, + latest_prerelease, latest_draft); return load_info_done && !latest_prerelease && !latest_draft && version_compare(current_version, latest_version) < 0; } @@ -92,4 +98,4 @@ bool GpgFrontend::UI::SoftwareVersion::VersionWithDrawn() const { bool GpgFrontend::UI::SoftwareVersion::CurrentVersionReleased() const { return load_info_done && current_version_found; -} +}
\ No newline at end of file |