From: Stefan Bund Date: Fri, 28 Jan 2011 09:51:47 +0000 (+0100) Subject: remove context menu when running in release mode X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=af3471120c35b687296897417fcb71ff78d4365d;p=pykit.git remove context menu when running in release mode --- diff --git a/Viewer.cc b/Viewer.cc index 46b8419..0076481 100644 --- a/Viewer.cc +++ b/Viewer.cc @@ -98,6 +98,8 @@ prefix_ pykit::Viewer::Viewer(QUrl const & url, Publisher * publisher, QWidget * : QWebView (parent) { QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, true); + if (! QWebSettings::globalSettings()->testAttribute(QWebSettings::DeveloperExtrasEnabled)) + setContextMenuPolicy(Qt::NoContextMenu); page()->setNetworkAccessManager( new InternalNetworkAccessManager(page()->networkAccessManager(), this, publisher)); #ifdef POPPLER