From 647c384a9b77a947d1dac2a44dd376d0120ea42d Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 2 Oct 2009 01:42:30 +0200 Subject: no more strange windows opened while loading previews :) --- src/websnap.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/websnap.cpp b/src/websnap.cpp index d7871adc..284e8fc5 100644 --- a/src/websnap.cpp +++ b/src/websnap.cpp @@ -50,6 +50,11 @@ WebSnap::WebSnap(const QUrl &url) // this to not register websnap history m_page.settings()->setAttribute(QWebSettings::PrivateBrowsingEnabled, true); + + // this to not let this page open other windows + m_page.settings()->setAttribute(QWebSettings::PluginsEnabled, false); + m_page.settings()->setAttribute(QWebSettings::JavascriptEnabled, false); + connect(&m_page, SIGNAL(loadFinished(bool)), this, SLOT(saveResult(bool))); QTimer::singleShot(0, this, SLOT(load())); } -- cgit v1.2.1