diff options
Diffstat (limited to 'src/application.cpp')
-rw-r--r-- | src/application.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/application.cpp b/src/application.cpp index 2e1c70a8..a5b4e759 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -260,22 +260,24 @@ SessionManager *Application::sessionManager() KIcon Application::icon(const KUrl &url) { - if( !Application::instance()->mainWindowList().isEmpty() ) // avoid infinite loop at startup - { + // avoid infinite loop at startup + if( Application::instance()->mainWindowList().isEmpty() ) + return KIcon("text-html"); - if(url == KUrl("about:closedTabs")) - return KIcon("tab-close"); - if(url == KUrl("about:history")) - return KIcon("view-history"); - if(url == KUrl("about:bookmarks")) - return KIcon("bookmarks"); - if(url == KUrl("about:favorites")) - return KIcon("emblem-favorite"); - } - + // first things first.. if(url.isEmpty()) return KIcon("text-html"); - + + // rekonq icons.. + if(url == KUrl("about:closedTabs")) + return KIcon("tab-close"); + if(url == KUrl("about:history")) + return KIcon("view-history"); + if(url == KUrl("about:bookmarks")) + return KIcon("bookmarks"); + if(url == KUrl("about:favorites")) + return KIcon("emblem-favorite"); + KIcon icon = KIcon(QWebSettings::iconForUrl(url)); if (icon.isNull()) { |