diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-04-17 18:27:40 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-04-17 18:27:40 +0200 |
commit | 8ef95ed5f65c07020a91b9fce306eacc0309794a (patch) | |
tree | 1292b44906fddb23d368335daf32eed615a7ca70 /src/websnap.cpp | |
parent | Based on Lionel's merge request #80: (diff) | |
download | rekonq-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.cpp | 8 |
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); |