summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-02-02 17:58:17 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-02-02 17:58:17 +0100
commitc5aaa8d3f6dcc62bacdbe6829ef14ff4258e26c7 (patch)
tree76971f088e3a7040dcc2139afdfde1f763587d48
parentRevert "Just check access keys on CTRL release" (diff)
downloadrekonq-c5aaa8d3f6dcc62bacdbe6829ef14ff4258e26c7.tar.xz
Removed unuseful renderClosingTabPreview
-rw-r--r--src/webpage.cpp2
-rw-r--r--src/websnap.cpp14
-rw-r--r--src/websnap.h11
3 files changed, 2 insertions, 25 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp
index 7e2214fa..89c52e8a 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -168,7 +168,7 @@ WebPage::~WebPage()
{
disconnect();
- QPixmap preview = WebSnap::renderClosingPagePreview(*this);
+ QPixmap preview = WebSnap::renderPagePreview(*this);
QString path = WebSnap::imagePathFromUrl(mainFrame()->url().toString());
QFile::remove(path);
preview.save(path);
diff --git a/src/websnap.cpp b/src/websnap.cpp
index 6bbaa06a..6db6b3be 100644
--- a/src/websnap.cpp
+++ b/src/websnap.cpp
@@ -103,18 +103,6 @@ QPixmap WebSnap::renderTabPreview(const QWebPage &page, int w, int h)
}
-QPixmap WebSnap::renderClosingPagePreview(const QWebPage &page, int w, int h)
-{
- //scroll to top
- page.mainFrame()->setScrollBarValue(Qt::Vertical, 0);
-
- // reduce as much as possible
- page.setViewportSize(QSize(10, 10));
-
- return renderPagePreview(page, w, h);
-}
-
-
QPixmap WebSnap::renderPagePreview(const QWebPage &page, int w, int h)
{
// remove temporarily scrollbars
@@ -124,7 +112,7 @@ QPixmap WebSnap::renderPagePreview(const QWebPage &page, int w, int h)
int width = page.mainFrame()->contentsSize().width();
page.setViewportSize(QSize(width, width * ((0.0 + h) / w)));
- //render
+ // render
QPixmap pageImage = WebSnap::render(page, page.viewportSize().width(), page.viewportSize().height());
// resize image
diff --git a/src/websnap.h b/src/websnap.h
index f227f083..12a5e04c 100644
--- a/src/websnap.h
+++ b/src/websnap.h
@@ -90,17 +90,6 @@ public:
// TODO: try to make this method work => more previews for the urlbar
/**
- * Snaps a pixmap of size w * h from a page of a tab that is currently closing
- *
- * @param page the page to snap
- * @param w the image width
- * @param h the image height
- *
- * @return the pixmap snapped from the page
- */
- static QPixmap renderClosingPagePreview(const QWebPage &page, int w = defaultWidth, int h = defaultHeight);
-
- /**
* Snaps a pixmap of size w * h from a page for tab preview
*
* @param page the page to snap