summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/application.cpp28
-rw-r--r--src/mainview.cpp2
-rw-r--r--src/mainwindow.cpp2
-rw-r--r--src/webview.cpp2
4 files changed, 18 insertions, 16 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())
{
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 0db31c1a..940e1273 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -583,7 +583,7 @@ void MainView::webViewIconChanged()
int index = indexOf( view->parentWidget() );
if (-1 != index)
{
- QIcon icon = Application::icon(view->url());
+ KIcon icon = Application::icon(view->url());
QLabel *label = animatedLoading(index, false);
QMovie *movie = label->movie();
delete movie;
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index e965aa19..a4df5756 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1165,7 +1165,7 @@ void MainWindow::aboutToShowBackMenu()
QWebHistoryItem item = historyList.at(i);
KAction *action = new KAction(this);
action->setData(i + offset);
- QIcon icon = Application::icon( item.url() );
+ KIcon icon = Application::icon( item.url() );
action->setIcon( icon );
action->setText( item.title() );
m_historyBackMenu->addAction(action);
diff --git a/src/webview.cpp b/src/webview.cpp
index e1ba2a46..36f62bfa 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -164,7 +164,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
const QString searchProviderPrefix = *(service->property("Keys").toStringList().begin()) + keywordDelimiter;
data.setData(searchProviderPrefix + "some keyword");
a = new KAction(service->name(), this);
- a->setIcon(Application::icon(KUrl(data.uri())));
+ a->setIcon( Application::icon( data.uri() ) );
a->setData(searchProviderPrefix);
connect(a, SIGNAL(triggered(bool)), this, SLOT(search()));
searchMenu->addAction(a);