diff --git a/src/lib/adblock/adblocksubscription.cpp b/src/lib/adblock/adblocksubscription.cpp index 868114a22..e069b3442 100644 --- a/src/lib/adblock/adblocksubscription.cpp +++ b/src/lib/adblock/adblocksubscription.cpp @@ -168,6 +168,9 @@ void AdBlockSubscription::subscriptionDownloaded() loadSubscription(AdBlockManager::instance()->disabledRules()); emit subscriptionUpdated(); } + else { + emit subscriptionError(tr("Cannot load subscription!")); + } m_reply->deleteLater(); m_reply = 0; diff --git a/src/lib/adblock/adblocksubscription.h b/src/lib/adblock/adblocksubscription.h index c6d6cfd29..510ef5fd5 100644 --- a/src/lib/adblock/adblocksubscription.h +++ b/src/lib/adblock/adblocksubscription.h @@ -103,6 +103,7 @@ public slots: signals: void subscriptionUpdated(); + void subscriptionError(const QString &message); protected slots: void subscriptionDownloaded(); diff --git a/src/lib/adblock/adblocktreewidget.cpp b/src/lib/adblock/adblocktreewidget.cpp index 14bfadf14..908571725 100644 --- a/src/lib/adblock/adblocktreewidget.cpp +++ b/src/lib/adblock/adblocktreewidget.cpp @@ -38,6 +38,7 @@ AdBlockTreeWidget::AdBlockTreeWidget(AdBlockSubscription* subscription, QWidget* connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuRequested(QPoint))); connect(this, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(itemChanged(QTreeWidgetItem*))); connect(m_subscription, SIGNAL(subscriptionUpdated()), this, SLOT(subscriptionUpdated())); + connect(m_subscription, SIGNAL(subscriptionError(QString)), this, SLOT(subscriptionError(QString))); } AdBlockSubscription* AdBlockTreeWidget::subscription() const @@ -178,6 +179,15 @@ void AdBlockTreeWidget::subscriptionUpdated() m_itemChangingBlock = false; } +void AdBlockTreeWidget::subscriptionError(const QString &message) +{ + refresh(); + + m_itemChangingBlock = true; + m_topItem->setText(0, tr("%1 (Error: %2)").arg(m_subscription->title(), message)); + m_itemChangingBlock = false; +} + void AdBlockTreeWidget::adjustItemFeatures(QTreeWidgetItem* item, const AdBlockRule* rule) { if (!rule->isEnabled()) { diff --git a/src/lib/adblock/adblocktreewidget.h b/src/lib/adblock/adblocktreewidget.h index 35f85c94e..32474f936 100644 --- a/src/lib/adblock/adblocktreewidget.h +++ b/src/lib/adblock/adblocktreewidget.h @@ -45,6 +45,7 @@ private slots: void copyFilter(); void subscriptionUpdated(); + void subscriptionError(const QString &message); private: void adjustItemFeatures(QTreeWidgetItem* item, const AdBlockRule* rule); diff --git a/src/lib/network/networkmanager.cpp b/src/lib/network/networkmanager.cpp index b2ccfe385..dae71dfd8 100644 --- a/src/lib/network/networkmanager.cpp +++ b/src/lib/network/networkmanager.cpp @@ -83,8 +83,8 @@ NetworkManager::NetworkManager(QObject* parent) m_proxyFactory = new NetworkProxyFactory(); setProxyFactory(m_proxyFactory); - loadSettings(); + loadSettings(); } void NetworkManager::loadSettings() @@ -100,7 +100,7 @@ void NetworkManager::loadSettings() // Force SSLv3 for servers that doesn't understand TLSv1 handshake QStringList sslv3Sites; sslv3Sites << QLatin1String("centrum.sk") << QLatin1String("centrum.cz") << QLatin1String("oneaccount.com") << QLatin1String("hdi.de") - << QLatin1String("live.com") << QLatin1String("i0.cz") << QLatin1String("sermepa.es"); + << QLatin1String("live.com") << QLatin1String("i0.cz") << QLatin1String("sermepa.es") << QLatin1String("easylist-downloads.adblockplus.org"); settings.beginGroup("Web-Browser-Settings"); m_doNotTrack = settings.value("DoNotTrack", false).toBool(); @@ -110,7 +110,6 @@ void NetworkManager::loadSettings() m_acceptLanguage = AcceptLanguage::generateHeader(settings.value("Language/acceptLanguage", AcceptLanguage::defaultLanguage()).toStringList()); - #if defined(Q_OS_WIN) || defined(Q_OS_HAIKU) || defined(Q_OS_OS2) QString certDir = mApp->PROFILEDIR + "certificates"; QString bundlePath = certDir + "/ca-bundle.crt";