Remediate errors in various favicon fetch scenarios (#2779)

Fixes stuck "Download favicon" button on icon download attempts for IP
address hosts by skipping attempts to get 2nd level domain resources
(which resulted in calls to 0.0.0.<rightmost octet of original IP>).

Fixes some cases when DuckDuckGo fallback fails to find icon of >2-level
domains, by adding a request to a DDG URL based on entry's 2nd level
domain.

Repurposes EditWidgetIcons' private fetchCanceled slot (which as of #2439,
is unused by any code) into public abortRequests slot, which is
connected to the entry edit widget's accepted and rejected signals (in
other words, Ok or Cancel was pressed).
This commit is contained in:
Kyle Kneitinger 2019-03-17 06:45:37 -07:00 committed by Jonathan White
parent 11ecaf4fa4
commit 84f5adb24a
3 changed files with 33 additions and 8 deletions

View file

@ -194,6 +194,8 @@ void EditEntryWidget::setupAdvanced()
void EditEntryWidget::setupIcon()
{
addPage(tr("Icon"), FilePath::instance()->icon("apps", "preferences-desktop-icons"), m_iconsWidget);
connect(this, SIGNAL(accepted()), m_iconsWidget, SLOT(abortRequests()));
connect(this, SIGNAL(rejected()), m_iconsWidget, SLOT(abortRequests()));
}
void EditEntryWidget::setupAutoType()