| 29 | #include "WebWidget.h" |
| 30 | |
| 31 | WebView::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 | |
| 54 | WebView::~WebView() |
| 55 | { |
nothing calls this directly
no outgoing calls
no test coverage detected