summaryrefslogtreecommitdiff
path: root/src/webview.cpp
diff options
context:
space:
mode:
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 afa63028..3f6b289b 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);
}