summaryrefslogtreecommitdiff
path: root/src/newtabpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newtabpage.cpp')
-rw-r--r--src/newtabpage.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp
index 529a9804..09d15af6 100644
--- a/src/newtabpage.cpp
+++ b/src/newtabpage.cpp
@@ -36,6 +36,7 @@
#include "application.h"
#include "bookmarkmanager.h"
#include "downloadmanager.h"
+#include "iconmanager.h"
#include "historymodels.h"
#include "mainview.h"
#include "mainwindow.h"
@@ -416,8 +417,6 @@ void NewTabPage::historyPage()
}
int i = 0;
- QString faviconsDir = KStandardDirs::locateLocal("cache" , "favicons/" , true);
- QString icon = QL1S("file://") + KGlobal::dirs()->findResource("icon", "oxygen/16x16/mimetypes/text-html.png");
const int maxTextSize = 103;
const int truncateSize = 100;
do
@@ -435,14 +434,10 @@ void NewTabPage::historyPage()
QModelIndex son = model->index(j, 0, index);
KUrl u = son.data(HistoryModel::UrlStringRole).toUrl();
- QString b = faviconsDir + u.host() + QL1S(".png");
- if (QFile::exists(b))
- icon = QL1S("file://") + b;
-
little.appendInside(son.data(HistoryModel::DateTimeRole).toDateTime().toString("hh:mm"));
little.appendInside(QL1S("  "));
little.appendInside(markup(QL1S("img")));
- little.lastChild().setAttribute(QL1S("src"), icon);
+ little.lastChild().setAttribute(QL1S("src"), rApp->iconManager()->iconPathForUrl(u));
little.lastChild().setAttribute(QL1S("width"), QL1S("16"));
little.lastChild().setAttribute(QL1S("height"), QL1S("16"));
little.appendInside(QL1S("  "));
@@ -653,6 +648,7 @@ QWebElement NewTabPage::createLinkItem(const QString &title, const QString &urlS
return nav;
}
+
void NewTabPage::updateWindowIcon()
{
int currentIndex = rApp->mainWindow()->mainView()->currentIndex();