From b8546e2a1e86126702f65d63a9e090d13d91f328 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 27 Dec 2011 12:27:22 +0100 Subject: IconManager, small cleanup: use (QWeb)Frames instead of pages. --- src/iconmanager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/iconmanager.cpp') diff --git a/src/iconmanager.cpp b/src/iconmanager.cpp index 632a33af..8179ca07 100644 --- a/src/iconmanager.cpp +++ b/src/iconmanager.cpp @@ -92,7 +92,7 @@ KIcon IconManager::iconForUrl(const KUrl &url) } -void IconManager::provideIcon(QWebPage *page, const KUrl &url, bool notify) +void IconManager::provideIcon(QWebFrame *mFrame, const KUrl &url, bool notify) { // provide icons just for http/https sites if (!url.scheme().startsWith(QL1S("http"))) @@ -124,7 +124,7 @@ void IconManager::provideIcon(QWebPage *page, const KUrl &url, bool notify) // find favicon url KUrl faviconUrl; - QWebElement root = page->mainFrame()->documentElement(); + QWebElement root = mFrame->documentElement(); QWebElement e = root.findFirst(QL1S("link[rel~=\"icon\"]")); QString relUrlString = e.attribute(QL1S("href")); if (relUrlString.isEmpty()) @@ -147,7 +147,7 @@ void IconManager::provideIcon(QWebPage *page, const KUrl &url, bool notify) KUrl destUrl(_faviconsDir + url.host()); // download icon - KIO::FileCopyJob *job = KIO::file_copy(faviconUrl, destUrl, -1, KIO::HideProgressInfo); + KIO::FileCopyJob *job = KIO::file_copy(faviconUrl, destUrl, -1, KIO::HideProgressInfo | KIO::Overwrite); if (notify) connect(job, SIGNAL(result(KJob*)), this, SLOT(notifyLastStuffs(KJob *))); else -- cgit v1.2.1