diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-08-28 19:24:19 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-08-28 19:24:19 +0200 |
commit | f0c11eadaa4b77a4e36130b014b62cd6200c8211 (patch) | |
tree | 556625dc98766a444ea2b916e76446c2cb379357 /src/urlbar/urlbar.cpp | |
parent | Merge commit 'refs/merge-requests/192' of git://gitorious.org/rekonq/mainline (diff) | |
download | rekonq-f0c11eadaa4b77a4e36130b014b62cd6200c8211.tar.xz |
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...
Diffstat (limited to 'src/urlbar/urlbar.cpp')
-rw-r--r-- | src/urlbar/urlbar.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index 65c0a213..0b966b74 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -43,6 +43,7 @@ #include "completionwidget.h" #include "bookmarkprovider.h" #include "bookmarkwidget.h" +#include "iconmanager.h" // KDE Includes #include <KBookmarkManager> @@ -110,7 +111,8 @@ UrlBar::UrlBar(QWidget *parent) connect(_tab->view(), SIGNAL(urlChanged(const QUrl &)), this, SLOT(setQUrl(const QUrl &))); connect(_tab->view(), SIGNAL(loadFinished(bool)), this, SLOT(loadFinished())); connect(_tab->view(), SIGNAL(loadStarted()), this, SLOT(clearRightIcons())); - + connect(_tab->view(), SIGNAL(iconChanged()), this, SLOT(refreshFavicon())); + // bookmark icon connect(Application::bookmarkProvider()->bookmarkManager(), SIGNAL(changed(const QString &, const QString &)), this, SLOT(onBookmarksChanged())); @@ -145,7 +147,7 @@ void UrlBar::setQUrl(const QUrl& url) clearFocus(); KLineEdit::setUrl(url); setCursorPosition(0); - _icon->setIcon(Application::icon(url)); + refreshFavicon(); } } @@ -494,3 +496,16 @@ void UrlBar::suggest() if(!_box.isNull()) _box.data()->suggestUrls( text() ); } + + +void UrlBar::refreshFavicon() +{ + kDebug() << "------------------ REFRESH ME!!! -------------"; +// if( u.scheme() == QL1S("about") ) +// { +// kDebug() << "ABOUT SCHEME..."; +// return; +// } + + _icon->setIcon(Application::iconManager()->iconForUrl(_tab->view()->url())); +} |