summaryrefslogtreecommitdiff
path: root/src/newtabpage.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-02-02 23:21:27 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-02-02 23:21:27 +0100
commitf7ae82bf7c7821ad3bd9a4a0fa9c0068fc2fc2e3 (patch)
tree560bd702d131db12803982bb5b79749aa8a882cf /src/newtabpage.cpp
parentRemoved unuseful renderClosingTabPreview (diff)
downloadrekonq-f7ae82bf7c7821ad3bd9a4a0fa9c0068fc2fc2e3.tar.xz
clean up WebSnap and provide automatic thumbs update for about:tabs
page
Diffstat (limited to 'src/newtabpage.cpp')
-rw-r--r--src/newtabpage.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp
index 6325bc79..7392c920 100644
--- a/src/newtabpage.cpp
+++ b/src/newtabpage.cpp
@@ -540,6 +540,13 @@ void NewTabPage::tabsPage()
if (url.protocol() == QL1S("about"))
continue;
+ if (!WebSnap::existsImage(url))
+ {
+ kDebug() << "image doesn't exist for url: " << url;
+ QPixmap preview = WebSnap::renderPagePreview(*w->mainView()->webTab(i)->page());
+ QString path = WebSnap::imagePathFromUrl(url.url());
+ preview.save(path);
+ }
QString name = w->mainView()->webTab(i)->view()->title();
QWebElement prev;