mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-13 08:19:50 -05:00
Add option to prefer DuckDuckGo
This commit is contained in:
parent
7bd079d48d
commit
12e020b7c2
@ -212,7 +212,7 @@
|
||||
<item>
|
||||
<widget class="QCheckBox" name="fallbackToSearch">
|
||||
<property name="text">
|
||||
<string>Use DuckDuckGo as fallback for downloading website icons</string>
|
||||
<string>Use DuckDuckGo to download website icons</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -223,16 +223,16 @@ void EditWidgetIcons::downloadFavicon()
|
||||
QUrl fallbackUrl = QUrl("https://icons.duckduckgo.com");
|
||||
fallbackUrl.setPath("/ip3/" + QUrl::toPercentEncoding(fullyQualifiedDomain) + ".ico");
|
||||
|
||||
m_urlsToTry.append(fallbackUrl);
|
||||
|
||||
if (!hostIsIp) {
|
||||
QString secondLevelDomain = getSecondLevelDomain(m_url);
|
||||
|
||||
if (fullyQualifiedDomain != secondLevelDomain) {
|
||||
fallbackUrl.setPath("/ip3/" + QUrl::toPercentEncoding(secondLevelDomain) + ".ico");
|
||||
m_urlsToTry.append(fallbackUrl);
|
||||
m_urlsToTry.prepend(fallbackUrl);
|
||||
}
|
||||
}
|
||||
|
||||
m_urlsToTry.prepend(fallbackUrl);
|
||||
}
|
||||
|
||||
startFetchFavicon(m_urlsToTry.takeFirst());
|
||||
|
Loading…
Reference in New Issue
Block a user