diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-06-03 16:00:05 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-06-03 16:00:05 +0200 |
commit | caab7d3cd3e687d1bdc60d73a73a0728a92b58ad (patch) | |
tree | f976a4d95f8f4737ef6a193fbc18443ab69e93a7 | |
parent | Using Application::palette for ListItems (diff) | |
download | rekonq-caab7d3cd3e687d1bdc60d73a73a0728a92b58ad.tar.xz |
This should save rekonq from crashes in closed tabs view.
Anyway, this crash smells as a QtWebKit bug in QWebPage deletion.
BUG:237767
-rw-r--r-- | src/websnap.cpp | 11 | ||||
-rw-r--r-- | src/websnap.h | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/websnap.cpp b/src/websnap.cpp index aaaed1d5..0f2dc7b9 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 c85dc0d2..03d63746 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 * |