Disables JavaScript, which fixes #1089 and other issues related to modal dialogs...
[quassel.git] / src / qtui / webpreviewitem.cpp
index eb12eea..f674166 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-08 by the Quassel Project                          *
+ *   Copyright (C) 2005-09 by the Quassel Project                          *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
 #include <QGraphicsProxyWidget>
 #include <QPainter>
 #include <QWebView>
+#include <QWebSettings>
 
-WebPreviewItem::WebPreviewItem(const QString &url)
+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
     _boundingRect(0, 0, 400, 300)
 {
   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);