summaryrefslogtreecommitdiff
path: root/src/websnap.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-04-17 18:27:40 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-04-17 18:27:40 +0200
commit8ef95ed5f65c07020a91b9fce306eacc0309794a (patch)
tree1292b44906fddb23d368335daf32eed615a7ca70 /src/websnap.cpp
parentBased on Lionel's merge request #80: (diff)
downloadrekonq-8ef95ed5f65c07020a91b9fce306eacc0309794a.tar.xz
Clean tab previews, not showing on loading
removed a duplicated method and save one QPixmap in WebSnap class
Diffstat (limited to 'src/websnap.cpp')
-rw-r--r--src/websnap.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/websnap.cpp b/src/websnap.cpp
index 906bbc1e..612fdf4e 100644
--- a/src/websnap.cpp
+++ b/src/websnap.cpp
@@ -146,20 +146,22 @@ QString WebSnap::guessNameFromUrl(QUrl url)
void WebSnap::saveResult(bool ok)
{
+ QPixmap image = QPixmap();
+
// crude error-checking
if (!ok)
{
kDebug() << "Error loading site..";
m_snapTitle = "Error...";
- m_image = QPixmap();
+
}
else
{
- m_image = renderPreview(m_page, WIDTH, HEIGHT);
+ image = renderPreview(m_page, WIDTH, HEIGHT);
m_snapTitle = m_page.mainFrame()->title();
}
QFile::remove(fileForUrl(m_url).toLocalFile());
- m_image.save(fileForUrl(m_url).toLocalFile());
+ image.save(fileForUrl(m_url).toLocalFile());
NewTabPage p( m_frame );
p.snapFinished(m_previewIndex, m_url, m_snapTitle);