diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-30 10:21:58 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-30 10:21:58 +0200 |
commit | b4516b0bacb68179eb6f7cbff9c6474ec03cc9ab (patch) | |
tree | ac6ffe5c874627302ddbce6a7dd350e1b6efb0c6 /src/websnap.cpp | |
parent | a lot fo changes in the history/bookmarks page (restored initial method rewam... (diff) | |
download | rekonq-b4516b0bacb68179eb6f7cbff9c6474ec03cc9ab.tar.xz |
BIG BIG commit
removed:
- last closed tabs feature
- new tab page settings (unuseful, we need something better)
implemented
- new home page layout (needs love)
- new about: protocol to load home page sections
- preview images cache
todo:
- cleaning cache mechanism
- bug fixing
- add/remove to preferred actions
Diffstat (limited to 'src/websnap.cpp')
-rw-r--r-- | src/websnap.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/websnap.cpp b/src/websnap.cpp index 6293b2e9..9d747e66 100644 --- a/src/websnap.cpp +++ b/src/websnap.cpp @@ -43,11 +43,10 @@ #define HEIGHT 150 -WebSnap::WebSnap(const QString &url, const QString &pos) +WebSnap::WebSnap(const QString &url) : QObject() { m_url = url; - m_pos = pos; // this to not register websnap history m_page.settings()->setAttribute(QWebSettings::PrivateBrowsingEnabled, true); @@ -61,6 +60,7 @@ void WebSnap::load() m_page.mainFrame()->load( QUrl(m_url) ); } + QPixmap WebSnap::renderPreview(const QWebPage &page,int w, int h) { // prepare page @@ -102,6 +102,7 @@ QPixmap WebSnap::renderPreview(const QWebPage &page,int w, int h) return image; } + void WebSnap::saveResult(bool ok) { // crude error-checking @@ -111,12 +112,8 @@ void WebSnap::saveResult(bool ok) return; } - QString path = KStandardDirs::locateLocal("cache", QString("thumbs/rek") + m_pos + ".png", true); m_image = renderPreview(m_page, WIDTH, HEIGHT); - if(m_image.save(path)) - { - emit finished(); - } + emit finished(); } |