diff --git a/src/core/Config.cpp b/src/core/Config.cpp index 1b97a09569..4e142875ee 100644 --- a/src/core/Config.cpp +++ b/src/core/Config.cpp @@ -148,7 +148,7 @@ void Config::init(const QString& fileName) m_defaults.insert("security/passwordscleartext", false); m_defaults.insert("security/hidepassworddetails", true); m_defaults.insert("security/autotypeask", true); - m_defaults.insert("security/IconDownloadFallbackToGoogle", false); + m_defaults.insert("security/IconDownloadFallbackToDuckDuckGo", false); m_defaults.insert("security/resettouchid", false); m_defaults.insert("security/resettouchidtimeout", 30); m_defaults.insert("security/resettouchidscreenlock", true); diff --git a/src/gui/EditWidgetIcons.cpp b/src/gui/EditWidgetIcons.cpp index 4538576d21..a623f07dcb 100644 --- a/src/gui/EditWidgetIcons.cpp +++ b/src/gui/EditWidgetIcons.cpp @@ -219,12 +219,12 @@ void EditWidgetIcons::downloadFavicon() } m_urlsToTry.append(QUrl(m_url.scheme() + "://" + secondLevelDomain + "/favicon.ico")); - // Try to use Google fallback, if enabled - if (config()->get("security/IconDownloadFallbackToGoogle", false).toBool()) { - QUrl urlGoogle = QUrl("https://www.google.com/s2/favicons"); + // Try to use DuckDuckGo fallback, if enabled + if (config()->get("security/IconDownloadFallbackToDuckDuckGo", false).toBool()) { + QUrl urlDuckDuckGo = QUrl("https://icons.duckduckgo.com"); - urlGoogle.setQuery("domain=" + QUrl::toPercentEncoding(secondLevelDomain)); - m_urlsToTry.append(urlGoogle); + urlDuckDuckGo.setPath("/ip3/" + QUrl::toPercentEncoding(fullyQualifiedDomain) + ".ico"); + m_urlsToTry.append(urlDuckDuckGo); } startFetchFavicon(m_urlsToTry.takeFirst()); @@ -242,7 +242,7 @@ void EditWidgetIcons::fetchFinished() { #ifdef WITH_XC_NETWORKING QImage image; - bool googleFallbackEnabled = config()->get("security/IconDownloadFallbackToGoogle", false).toBool(); + bool duckDuckGoFallbackEnabled = config()->get("security/IconDownloadFallbackToDuckDuckGo", false).toBool(); bool error = (m_reply->error() != QNetworkReply::NoError); QUrl redirectTarget = getRedirectTarget(m_reply); @@ -275,9 +275,9 @@ void EditWidgetIcons::fetchFinished() startFetchFavicon(m_urlsToTry.takeFirst()); return; } else { - if (!googleFallbackEnabled) { + if (!duckDuckGoFallbackEnabled) { emit messageEditEntry(tr("Unable to fetch favicon.") + "\n" + - tr("Hint: You can enable Google as a fallback under Tools>Settings>Security"), + tr("Hint: You can enable DuckDuckGo as a fallback under Tools>Settings>Security"), MessageWidget::Error); } else { emit messageEditEntry(tr("Unable to fetch favicon."), MessageWidget::Error); diff --git a/src/gui/SettingsWidget.cpp b/src/gui/SettingsWidget.cpp index c302b1ef26..a90a84a5c9 100644 --- a/src/gui/SettingsWidget.cpp +++ b/src/gui/SettingsWidget.cpp @@ -186,7 +186,7 @@ void SettingsWidget::loadSettings() m_secUi->lockDatabaseMinimizeCheckBox->setChecked(config()->get("security/lockdatabaseminimize").toBool()); m_secUi->lockDatabaseOnScreenLockCheckBox->setChecked(config()->get("security/lockdatabasescreenlock").toBool()); m_secUi->relockDatabaseAutoTypeCheckBox->setChecked(config()->get("security/relockautotype").toBool()); - m_secUi->fallbackToGoogle->setChecked(config()->get("security/IconDownloadFallbackToGoogle").toBool()); + m_secUi->fallbackToDuckDuckGo->setChecked(config()->get("security/IconDownloadFallbackToDuckDuckGo").toBool()); m_secUi->passwordCleartextCheckBox->setChecked(config()->get("security/passwordscleartext").toBool()); m_secUi->passwordDetailsCleartextCheckBox->setChecked(config()->get("security/hidepassworddetails").toBool()); @@ -256,7 +256,7 @@ void SettingsWidget::saveSettings() config()->set("security/lockdatabaseminimize", m_secUi->lockDatabaseMinimizeCheckBox->isChecked()); config()->set("security/lockdatabasescreenlock", m_secUi->lockDatabaseOnScreenLockCheckBox->isChecked()); config()->set("security/relockautotype", m_secUi->relockDatabaseAutoTypeCheckBox->isChecked()); - config()->set("security/IconDownloadFallbackToGoogle", m_secUi->fallbackToGoogle->isChecked()); + config()->set("security/IconDownloadFallbackToDuckDuckGo", m_secUi->fallbackToDuckDuckGo->isChecked()); config()->set("security/passwordscleartext", m_secUi->passwordCleartextCheckBox->isChecked()); config()->set("security/hidepassworddetails", m_secUi->passwordDetailsCleartextCheckBox->isChecked()); diff --git a/src/gui/SettingsWidgetSecurity.ui b/src/gui/SettingsWidgetSecurity.ui index db46b40162..87c1ad5ce7 100644 --- a/src/gui/SettingsWidgetSecurity.ui +++ b/src/gui/SettingsWidgetSecurity.ui @@ -203,9 +203,9 @@ - + - Use Google as fallback for downloading website icons + Use DuckDuckGo as fallback for downloading website icons