diff options
author | megabigbug <megabigbug@arrakis.(none)> | 2010-06-26 23:02:10 +0200 |
---|---|---|
committer | megabigbug <megabigbug@arrakis.(none)> | 2010-06-26 23:02:10 +0200 |
commit | 76452bac93c7095b6a5a47c84d0b0571af2df59e (patch) | |
tree | 0ce57ef7e0d284c7e9cebbf3b772063275ec15b9 /src/webview.cpp | |
parent | Merge commit 'refs/merge-requests/142' of git://gitorious.org/rekonq/mainline... (diff) | |
download | rekonq-76452bac93c7095b6a5a47c84d0b0571af2df59e.tar.xz |
improve previews: compute preview when webview is deleted => instant preview in closed tab page
Diffstat (limited to 'src/webview.cpp')
-rw-r--r-- | src/webview.cpp | 8 |
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); } |