X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fwebpreviewitem.cpp;h=f674166c847e476db3c5eecf5e18cee14f6b2a1d;hp=7070c1165d5031bac29d0ab4d198bfec98dc8c67;hb=54a5d32d35101d5fbcb2687665d52415ca3a6aca;hpb=4e8c5025fef997fcee75673c7bb1ca0a786e064b diff --git a/src/qtui/webpreviewitem.cpp b/src/qtui/webpreviewitem.cpp index 7070c116..f674166c 100644 --- a/src/qtui/webpreviewitem.cpp +++ b/src/qtui/webpreviewitem.cpp @@ -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 * @@ -24,15 +24,17 @@ #include #include -#include +#include +#include -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); @@ -54,10 +56,6 @@ void WebPreviewItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *op painter->setBrush(Qt::black); painter->setRenderHints(QPainter::Antialiasing); painter->drawRoundedRect(boundingRect(), 10, 10); - - painter->setPen(QPen(Qt::green)); - QString text = QString::number(zValue()); - painter->drawText(_boundingRect.center(), text); } #endif //#ifdef HAVE_WEBKIT