MCPcopy Create free account
hub / github.com/LeFroid/Viper-Browser / WebView

Method WebView

src/ui/web/WebView.cpp:31–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29#include "WebWidget.h"
30
31WebView::WebView(bool privateView, QWidget *parent) :
32 QWebEngineView(parent),
33 m_page(nullptr),
34 m_progress(0),
35 m_privateView(privateView),
36 m_contextMenuHelper(),
37 m_jsCallbackResult(),
38 m_viewFocusProxy(nullptr),
39 m_thumbnail()
40{
41 setAcceptDrops(true);
42 setObjectName(QLatin1String("webView"));
43 setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
44
45 // Load context menu helper script for image URL detection
46 QFile contextScriptFile(QLatin1String(":/ContextMenuHelper.js"));
47 if (contextScriptFile.open(QIODevice::ReadOnly))
48 {
49 m_contextMenuHelper = QString(contextScriptFile.readAll());
50 contextScriptFile.close();
51 }
52}
53
54WebView::~WebView()
55{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected