From f0c11eadaa4b77a4e36130b014b62cd6200c8211 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 28 Aug 2010 19:24:19 +0200 Subject: Switching to "KDE" icon cache. While this "brute force" change can be dangerous, it seems let everything work as expected (at least here). It also lets us to retrieve icons when sites are not visited (eg: search engines or old bookmarks) It also contains fixes & improvements for icons management in History & Bookmarks classes. More code to maintain, but more things working.Let's see what'll happen... --- src/mainview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mainview.cpp') diff --git a/src/mainview.cpp b/src/mainview.cpp index dc759c9e..75d98b39 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -38,6 +38,7 @@ #include "tabbar.h" #include "urlbar.h" #include "sessionmanager.h" +#include "iconmanager.h" // KDE Includes #include @@ -322,7 +323,6 @@ WebTab *MainView::newWebTab(bool focused) // connecting webview with mainview connect(tab->view(), SIGNAL(loadStarted()), this, SLOT(webViewLoadStarted())); connect(tab->view(), SIGNAL(loadFinished(bool)), this, SLOT(webViewLoadFinished(bool))); - connect(tab->view(), SIGNAL(iconChanged()), this, SLOT(webViewIconChanged())); connect(tab->view(), SIGNAL(titleChanged(const QString &)), this, SLOT(webViewTitleChanged(const QString &))); connect(tab->view(), SIGNAL(urlChanged(const QUrl &)), this, SLOT(webViewUrlChanged(const QUrl &))); @@ -576,7 +576,7 @@ void MainView::webViewIconChanged() int index = indexOf(view->parentWidget()); if (-1 != index) { - KIcon icon = Application::icon(view->url()); + KIcon icon = Application::iconManager()->iconForUrl(view->url()); QLabel *label = animatedLoading(index, false); QMovie *movie = label->movie(); delete movie; @@ -725,7 +725,7 @@ void MainView::detachTab(int index, MainWindow *toWindow) w = Application::instance()->newMainWindow(false); else w = toWindow; - w->mainView()->addTab(tab, Application::icon(u), label); + w->mainView()->addTab(tab, Application::iconManager()->iconForUrl(u), label); w->mainView()->widgetBar()->insertWidget(0, bar); w->mainView()->updateTabBar(); } -- cgit v1.2.1