summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/webpage.cpp6
-rw-r--r--src/webpage.h2
-rw-r--r--src/webview.cpp8
3 files changed, 8 insertions, 8 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);
}
diff --git a/src/webpage.h b/src/webpage.h
index 8e123647..528ce331 100644
--- a/src/webpage.h
+++ b/src/webpage.h
@@ -56,6 +56,7 @@ public:
{
return _networkAnalyzer;
};
+
inline void enableNetworkAnalyzer(bool b)
{
_networkAnalyzer = b;
@@ -65,6 +66,7 @@ public:
{
return _isOnRekonqPage;
};
+
inline void setIsOnRekonqPage(bool b)
{
_isOnRekonqPage = b;
diff --git a/src/webview.cpp b/src/webview.cpp
index 096b412d..8753b7ec 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -41,7 +41,6 @@
#include "searchengine.h"
#include "urlbar.h"
#include "webpage.h"
-#include "websnap.h"
#include "webtab.h"
// KDE Includes
@@ -107,13 +106,6 @@ WebView::~WebView()
{
if (m_smoothScrolling)
stopScrolling();
-
- WebPage* p = page();
-
- QPixmap preview = WebSnap::renderClosingPagePreview(*p);
- QString path = WebSnap::imagePathFromUrl(p->mainFrame()->url().toString());
- QFile::remove(path);
- preview.save(path);
}