summaryrefslogtreecommitdiff
path: root/src/newtabpage.cpp
diff options
context:
space:
mode:
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;