diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-09-17 00:42:55 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-09-17 00:42:55 +0200 |
commit | 596d75fa61f58f489a898ce1918ee04170dbcf6a (patch) | |
tree | 58051bd873d88f4896c2c84e24a20071a721d877 /src/previewselectorbar.cpp | |
parent | Merge commit 'refs/merge-requests/2295' of git://gitorious.org/rekonq/mainline (diff) | |
parent | Websnaps: change the image path to use base64. (diff) | |
download | rekonq-596d75fa61f58f489a898ce1918ee04170dbcf6a.tar.xz |
Merge commit 'refs/merge-requests/211' of git://gitorious.org/rekonq/mainline into m211
Diffstat (limited to 'src/previewselectorbar.cpp')
-rw-r--r-- | src/previewselectorbar.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/previewselectorbar.cpp b/src/previewselectorbar.cpp index 209a0a92..1b3d3380 100644 --- a/src/previewselectorbar.cpp +++ b/src/previewselectorbar.cpp @@ -31,6 +31,7 @@ // Self Includes #include "rekonq.h" +#include "websnap.h" // Local Include #include "application.h" @@ -126,6 +127,11 @@ void PreviewSelectorBar::clicked() KUrl url = page->mainFrame()->url(); QStringList names = ReKonfig::previewNames(); QStringList urls = ReKonfig::previewUrls(); + //cleanup the previous image from the cache (useful to refresh the snapshot) + QFile::remove(WebSnap::imagePathFromUrl(urls.at(m_previewIndex))); + page->mainFrame()->setScrollBarValue(Qt::Vertical, 0); + QPixmap preview = WebSnap::renderPagePreview(*page); + preview.save(WebSnap::imagePathFromUrl(url)); urls.replace(m_previewIndex, url.toMimeDataString()); names.replace(m_previewIndex, page->mainFrame()->title()); |