diff options
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())); +} |