diff options
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; |