bit higher adblock download timeout
This commit is contained in:
parent
634a68c390
commit
98e999c968
3 changed files with 7 additions and 6 deletions
|
@ -1187,7 +1187,8 @@ void Application::setupWorkHorsePool() {
|
||||||
void Application::onAdBlockFailure() {
|
void Application::onAdBlockFailure() {
|
||||||
qApp->showGuiMessage(Notification::Event::GeneralEvent,
|
qApp->showGuiMessage(Notification::Event::GeneralEvent,
|
||||||
{tr("AdBlock needs to be configured"),
|
{tr("AdBlock needs to be configured"),
|
||||||
tr("AdBlock is not configured properly. Go to \"Settings\" -> \"Node.js\" and check "
|
tr("AdBlock is not configured properly or failed to start. Go to \"Settings\" -> \"Node.js\" "
|
||||||
|
"and check "
|
||||||
"if your Node.js is properly configured."),
|
"if your Node.js is properly configured."),
|
||||||
QSystemTrayIcon::MessageIcon::Critical},
|
QSystemTrayIcon::MessageIcon::Critical},
|
||||||
{true, true, false});
|
{true, true, false});
|
||||||
|
|
|
@ -205,6 +205,8 @@ void AdBlockManager::onPackageReady(const QObject* sndr,
|
||||||
void AdBlockManager::onPackageError(const QObject* sndr,
|
void AdBlockManager::onPackageError(const QObject* sndr,
|
||||||
const QList<NodeJs::PackageMetadata>& pkgs,
|
const QList<NodeJs::PackageMetadata>& pkgs,
|
||||||
const QString& error) {
|
const QString& error) {
|
||||||
|
Q_UNUSED(sndr)
|
||||||
|
|
||||||
bool concerns_adblock = boolinq::from(pkgs).any([](const NodeJs::PackageMetadata& pkg) {
|
bool concerns_adblock = boolinq::from(pkgs).any([](const NodeJs::PackageMetadata& pkg) {
|
||||||
return pkg.m_name == QSL(CLIQZ_ADBLOCKED_PACKAGE);
|
return pkg.m_name == QSL(CLIQZ_ADBLOCKED_PACKAGE);
|
||||||
});
|
});
|
||||||
|
@ -362,7 +364,7 @@ void AdBlockManager::updateUnifiedFilters() {
|
||||||
|
|
||||||
QByteArray out;
|
QByteArray out;
|
||||||
auto res = NetworkFactory::performNetworkOperation(filter_list_url,
|
auto res = NetworkFactory::performNetworkOperation(filter_list_url,
|
||||||
2000,
|
4000,
|
||||||
{},
|
{},
|
||||||
out,
|
out,
|
||||||
QNetworkAccessManager::Operation::GetOperation);
|
QNetworkAccessManager::Operation::GetOperation);
|
||||||
|
|
|
@ -39,10 +39,8 @@ class AdBlockManager : public QObject {
|
||||||
// and thus cannot run synchronously (when enabling) as process takes
|
// and thus cannot run synchronously (when enabling) as process takes
|
||||||
// some time to start.
|
// some time to start.
|
||||||
//
|
//
|
||||||
// If the process fails then signal
|
// If the process fails then signal processTerminated() is thrown.
|
||||||
// processTerminated() is thrown.
|
// If AdBlock is switched on/off then signal enabledChanged(bool, QString) is thrown.
|
||||||
// If AdBlock is switched on/off then signal
|
|
||||||
// enabledChanged(bool, QString) is thrown.
|
|
||||||
void setEnabled(bool enabled);
|
void setEnabled(bool enabled);
|
||||||
bool isEnabled() const;
|
bool isEnabled() const;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue