summaryrefslogtreecommitdiff
path: root/src/websnap.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-06-03 16:00:05 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-06-03 16:00:05 +0200
commitcaab7d3cd3e687d1bdc60d73a73a0728a92b58ad (patch)
treef976a4d95f8f4737ef6a193fbc18443ab69e93a7 /src/websnap.cpp
parentUsing Application::palette for ListItems (diff)
downloadrekonq-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
Diffstat (limited to 'src/websnap.cpp')
-rw-r--r--src/websnap.cpp11
1 files changed, 10 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);