summaryrefslogtreecommitdiff
path: root/src/webpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webpage.cpp')
-rw-r--r--src/webpage.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp
index 1b7241f2..772cffb1 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -48,6 +48,7 @@
#include "newtabpage.h"
#include "urlbar.h"
#include "webpluginfactory.h"
+#include "websnap.h"
#include "webtab.h"
#include "searchengine.h"
#include "sslwidget.h"
@@ -167,6 +168,11 @@ WebPage::WebPage(QWidget *parent)
WebPage::~WebPage()
{
disconnect();
+
+ QPixmap preview = WebSnap::renderClosingPagePreview(*this);
+ QString path = WebSnap::imagePathFromUrl(mainFrame()->url().toString());
+ QFile::remove(path);
+ preview.save(path);
}