resolve URL for correct favicon downloading, fixes #240 #238

This commit is contained in:
thez3ro authored and Janek Bevendorff committed 2017-07-18 18:40:18 +02:00
1 parent 98c812a297
commit 35c6df2535
6 files changed
+39 -5

No files matched your search

+9 -2
View File
@@ -223,8 +223,15 @@ void EditWidgetIcons::fetchFavicon(const QUrl& url)
}
m_httpClient->setConnectingTimeOut(5000, [this]() {
resetFaviconDownload();
MessageBox::warning(this, tr("Error"), tr("Unable to fetch favicon."));
QUrl tempurl = QUrl(m_url);
if (tempurl.scheme() == "http") {
resetFaviconDownload();
MessageBox::warning(this, tr("Error"), tr("Unable to fetch favicon."));
} else {
tempurl.setScheme("http");
tempurl.setPath("/favicon.ico");
fetchFavicon(tempurl);
}
});
m_ui->faviconButton->setDisabled(true);