Summary: | Rekonq crashed while creating thumbnails in Closed Tabs view | ||
---|---|---|---|
Product: | [Unmaintained] rekonq | Reporter: | Leonardo La Malfa <leonardo.la.malfa> |
Component: | general | Assignee: | Andrea Diamantini <adjam7> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | 0.4.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Bug Depends on: | |||
Bug Blocks: | 237890 |
Description
Leonardo La Malfa
2010-05-15 23:09:56 UTC
commit caab7d3cd3e687d1bdc60d73a73a0728a92b58ad Author: Andrea Diamantini <adjam7@gmail.com> Date: Thu Jun 3 16:00:05 2010 +0200 This should save rekonq from crashes in closed tabs view. Anyway, this crash smells as a QtWebKit bug in QWebPage deletion. BUG:237767 diff --git a/src/websnap.cpp b/src/websnap.cpp index aaaed1d..0f2dc7b 100644 --- a/src/websnap.cpp +++ b/src/websnap.cpp @@ -42,12 +42,12 @@ #include <QtCore/QFile> #include <QtGui/QPainter> +#include <QtGui/QAction> #include <QtWebKit/QWebFrame> #include <QtWebKit/QWebSettings> - WebSnap::WebSnap(const KUrl& url, QObject *parent) : QObject(parent) , m_url(url) @@ -64,6 +64,15 @@ WebSnap::WebSnap(const KUrl& url, QObject *parent) QTimer::singleShot(0, this, SLOT(load())); } + +WebSnap::~WebSnap() +{ + kDebug() << "oh oh.."; + m_page.action(QWebPage::Stop)->trigger(); + m_page.deleteLater(); +} + + void WebSnap::load() { m_page.mainFrame()->load(m_url); diff --git a/src/websnap.h b/src/websnap.h index c85dc0d..03d6374 100644 --- a/src/websnap.h +++ b/src/websnap.h @@ -77,6 +77,8 @@ public: */ explicit WebSnap(const KUrl &url, QObject *parent = 0); + ~WebSnap(); + /** * Snaps a pixmap of size w * h from a page and save it to cache * |