From 54a5d32d35101d5fbcb2687665d52415ca3a6aca Mon Sep 17 00:00:00 2001 From: Chris Moeller Date: Sun, 7 Aug 2011 16:26:55 -0700 Subject: [PATCH] Disables JavaScript, which fixes #1089 and other issues related to modal dialogs inside the preview crashing when the preview is destroyed. --- src/qtui/webpreviewitem.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qtui/webpreviewitem.cpp b/src/qtui/webpreviewitem.cpp index 45c080cd..f674166c 100644 --- a/src/qtui/webpreviewitem.cpp +++ b/src/qtui/webpreviewitem.cpp @@ -25,6 +25,7 @@ #include #include #include +#include WebPreviewItem::WebPreviewItem(const QUrl &url) : QGraphicsItem(0), // needs to be a top level item as we otherwise cannot guarantee that it's on top of other chatlines @@ -33,6 +34,7 @@ WebPreviewItem::WebPreviewItem(const QUrl &url) qreal frameWidth = 5; QWebView *webView = new QWebView; + webView->settings()->setAttribute(QWebSettings::JavascriptEnabled, false); webView->load(url); webView->resize(1000, 750); QGraphicsProxyWidget *proxyItem = new QGraphicsProxyWidget(this); -- 2.20.1