diff options
author | Saturn&Eric <[email protected]> | 2021-07-19 20:13:05 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-19 20:13:05 +0000 |
commit | 837e9748bb6bc5b3255b0475b8bbb3106e061b9c (patch) | |
tree | 67acd04b79d0ce779fc2ade5bb3e43a872f660cd /src/ui/help | |
parent | Merge pull request #13 from saturneric/develop (diff) | |
parent | Add multi-language support. (diff) | |
download | GpgFrontend-1.2.2.tar.gz GpgFrontend-1.2.2.zip |
Merge pull request #14 from saturneric/developv1.2.2
Version 1.2.2
Diffstat (limited to 'src/ui/help')
-rw-r--r-- | src/ui/help/AboutDialog.cpp | 7 | ||||
-rw-r--r-- | src/ui/help/VersionCheckThread.cpp | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/ui/help/AboutDialog.cpp b/src/ui/help/AboutDialog.cpp index 4c9b54c9..807c509d 100644 --- a/src/ui/help/AboutDialog.cpp +++ b/src/ui/help/AboutDialog.cpp @@ -181,6 +181,13 @@ void UpdateTab::getLatestVersion() { this->pb->setHidden(true); + if(replay->error() != QNetworkReply::NoError) { + qDebug() << "VersionCheckThread Found Network Error"; + auto latestVersion = "Unknown"; + latestVersionLabel->setText("<center><b>" + tr("Latest Version From Github: ") + latestVersion + "</b></center>"); + return; + } + QByteArray bytes = replay->readAll(); Document d; diff --git a/src/ui/help/VersionCheckThread.cpp b/src/ui/help/VersionCheckThread.cpp index 7bd0eb8f..c7c77d1c 100644 --- a/src/ui/help/VersionCheckThread.cpp +++ b/src/ui/help/VersionCheckThread.cpp @@ -20,6 +20,11 @@ void VersionCheckThread::run() { QApplication::processEvents(); } + if(mNetworkReply->error() != QNetworkReply::NoError) { + qDebug() << "VersionCheckThread Found Network Error"; + return; + } + QByteArray bytes = mNetworkReply->readAll(); Document d; |