diff options
author | Saturneric <[email protected]> | 2021-08-19 04:28:57 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-08-19 04:28:57 +0000 |
commit | d9822971050c5b796a1a5a7b4a45bfd9a00e0d88 (patch) | |
tree | b8759e6ea881a370e8fea667b5adf8facf9d4082 /src/ui/help/AboutDialog.cpp | |
parent | Bugs Fixed; Improve Functions; (diff) | |
download | GpgFrontend-d9822971050c5b796a1a5a7b4a45bfd9a00e0d88.tar.gz GpgFrontend-d9822971050c5b796a1a5a7b4a45bfd9a00e0d88.zip |
Bugs Fixed; Improve Functions;
Diffstat (limited to 'src/ui/help/AboutDialog.cpp')
-rw-r--r-- | src/ui/help/AboutDialog.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/ui/help/AboutDialog.cpp b/src/ui/help/AboutDialog.cpp index 762f0208..e5798541 100644 --- a/src/ui/help/AboutDialog.cpp +++ b/src/ui/help/AboutDialog.cpp @@ -191,6 +191,7 @@ void UpdateTab::processReplyDataFromUpdateServer(const QByteArray& data) { qDebug() << "Try to Process Reply Data From Update Server"; this->pb->setHidden(true); + Document d; if (d.Parse(data.constData()).HasParseError() || !d.IsObject()) { qDebug() << "VersionCheckThread Found Network Error"; @@ -203,18 +204,14 @@ void UpdateTab::processReplyDataFromUpdateServer(const QByteArray& data) { qDebug() << "Latest Version From Github" << latestVersion; - QRegularExpression re("^[vV](\\d+\\.)?(\\d+\\.)?(\\*|\\d+)"); + QRegularExpression re(R"(^[vV](\d+\.)?(\d+\.)?(\*|\d+))"); QRegularExpressionMatch match = re.match(latestVersion); if (match.hasMatch()) { - latestVersion = match.captured(0); // matched == "23 def" + latestVersion = match.captured(0); qDebug() << "Latest Version Matched" << latestVersion; - } else { - latestVersion = "Unknown"; - } + } else latestVersion = "Unknown"; latestVersionLabel->setText("<center><b>" + tr("Latest Version From Github: ") + latestVersion + "</b></center>"); - if(latestVersion > currentVersion) { - upgradeLabel->setHidden(false); - } + if(latestVersion > currentVersion) upgradeLabel->setHidden(false); } |