mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-24 14:15:47 -04:00
Add option to prefer DuckDuckGo
This commit is contained in:
parent
7bd079d48d
commit
12e020b7c2
2 changed files with 4 additions and 4 deletions
|
@ -212,7 +212,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="fallbackToSearch">
|
<widget class="QCheckBox" name="fallbackToSearch">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Use DuckDuckGo as fallback for downloading website icons</string>
|
<string>Use DuckDuckGo to download website icons</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -223,16 +223,16 @@ void EditWidgetIcons::downloadFavicon()
|
||||||
QUrl fallbackUrl = QUrl("https://icons.duckduckgo.com");
|
QUrl fallbackUrl = QUrl("https://icons.duckduckgo.com");
|
||||||
fallbackUrl.setPath("/ip3/" + QUrl::toPercentEncoding(fullyQualifiedDomain) + ".ico");
|
fallbackUrl.setPath("/ip3/" + QUrl::toPercentEncoding(fullyQualifiedDomain) + ".ico");
|
||||||
|
|
||||||
m_urlsToTry.append(fallbackUrl);
|
|
||||||
|
|
||||||
if (!hostIsIp) {
|
if (!hostIsIp) {
|
||||||
QString secondLevelDomain = getSecondLevelDomain(m_url);
|
QString secondLevelDomain = getSecondLevelDomain(m_url);
|
||||||
|
|
||||||
if (fullyQualifiedDomain != secondLevelDomain) {
|
if (fullyQualifiedDomain != secondLevelDomain) {
|
||||||
fallbackUrl.setPath("/ip3/" + QUrl::toPercentEncoding(secondLevelDomain) + ".ico");
|
fallbackUrl.setPath("/ip3/" + QUrl::toPercentEncoding(secondLevelDomain) + ".ico");
|
||||||
m_urlsToTry.append(fallbackUrl);
|
m_urlsToTry.prepend(fallbackUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_urlsToTry.prepend(fallbackUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
startFetchFavicon(m_urlsToTry.takeFirst());
|
startFetchFavicon(m_urlsToTry.takeFirst());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue