From 66ae5d687c18c60fef4ebd30afb73167b8cea9b8 Mon Sep 17 00:00:00 2001 From: Jerzy Kozera Date: Mon, 20 Jan 2014 00:57:44 +0100 Subject: [PATCH] 20140120 - allow github docsets list download to fail --- zeal/zeal.pro | 2 +- zeal/zealsettingsdialog.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/zeal/zeal.pro b/zeal/zeal.pro index 78349f9..fb3f82e 100644 --- a/zeal/zeal.pro +++ b/zeal/zeal.pro @@ -54,7 +54,7 @@ macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -stdlib=libc+ macx:CONFIG += c++11 win32:DEFINES += WIN32 QUAZIP_BUILD -DEFINES += ZEAL_VERSION=\\\"20140118\\\" +DEFINES += ZEAL_VERSION=\\\"20140120\\\" LIBS += -lz unix:!macx: LIBS += -lxcb -lxcb-keysyms diff --git a/zeal/zealsettingsdialog.cpp b/zeal/zealsettingsdialog.cpp index 6999742..4646469 100644 --- a/zeal/zealsettingsdialog.cpp +++ b/zeal/zealsettingsdialog.cpp @@ -131,6 +131,10 @@ void ZealSettingsDialog::DownloadCompleteCb(QNetworkReply *reply){ qint8 remainingRetries = replies.take(reply); if (reply->error() != QNetworkReply::NoError) { endTasks(); + if (reply->request().url().host() == "raw.github.com") { + // allow github to fail + return; + } if (reply->error() != QNetworkReply::OperationCanceledError) { QMessageBox::warning(this, "No docsets found", "Failed retrieving list of docsets: " + reply->errorString()); } @@ -165,6 +169,9 @@ void ZealSettingsDialog::DownloadCompleteCb(QNetworkReply *reply){ ui->docsetsList->addItem(lwi); } } + if(urls.size() > 0) { + ui->downloadableGroup->show(); + } } else { QString list = reply->readAll(); for(auto item : list.split("\n")) {