summaryrefslogtreecommitdiff
path: root/src/websnap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/websnap.cpp')
-rw-r--r--src/websnap.cpp11
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();
}