summaryrefslogtreecommitdiff
path: root/src/websnap.cpp
diff options
context:
space:
mode:
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);