summaryrefslogtreecommitdiff
path: root/src/webview.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-06-28 17:49:28 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-06-28 17:49:28 +0200
commitceef608527587443098df9284211cebec2e882b9 (patch)
treeff075538236ad5ff6eef0765a635918c10d17ce0 /src/webview.cpp
parentMerge branch 'master' of gitorious.org:rekonq/mainline (diff)
parentadd comments (diff)
downloadrekonq-ceef608527587443098df9284211cebec2e882b9.tar.xz
Merge commit 'refs/merge-requests/143' of git://gitorious.org/rekonq/mainline into m143
Diffstat (limited to 'src/webview.cpp')
-rw-r--r--src/webview.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index f6c90bdd..3b81b0bb 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -38,6 +38,7 @@
#include "webpage.h"
#include "bookmarksmanager.h"
#include "searchengine.h"
+#include "websnap.h"
// KDE Includes
#include <KService>
@@ -111,6 +112,13 @@ WebView::~WebView()
{
delete _scrollTimer;
disconnect();
+
+ WebPage* p = page();
+
+ QPixmap preview = WebSnap::renderClosingPagePreview(*p);
+ QString path = WebSnap::imagePathFromUrl(p->mainFrame()->url().toString());
+ QFile::remove(path);
+ preview.save(path);
}