summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
index a80c5d3548..490ada1691 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
@@ -65,6 +65,7 @@ public:
void _q_doLoadFinished(bool success);
void _q_updateMicroFocus();
+ void _q_pageDestroyed();
QGraphicsWebView* q;
QWebPage* page;
@@ -97,6 +98,12 @@ void QGraphicsWebViewPrivate::_q_updateMicroFocus()
#endif
}
+void QGraphicsWebViewPrivate::_q_pageDestroyed()
+{
+ page = 0;
+ q->setPage(0);
+}
+
void QGraphicsWebViewPrivate::scroll(int dx, int dy, const QRect& rectToScroll)
{
q->scroll(qreal(dx), qreal(dy), QRectF(rectToScroll));
@@ -454,6 +461,8 @@ void QGraphicsWebView::setPage(QWebPage* page)
this, SIGNAL(linkClicked(QUrl)));
connect(d->page, SIGNAL(microFocusChanged()),
this, SLOT(_q_updateMicroFocus()));
+ connect(d->page, SIGNAL(destroyed()),
+ this, SLOT(_q_pageDestroyed()));
}
/*!