diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-05-31 11:33:19 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-05-31 11:33:53 +0200 |
commit | d2d5d24f86f12a2d1b0a6bc46c0d48306d7d2130 (patch) | |
tree | d67555a6c699c49a89ea10863b6c0e4c0c3f5cae /src/webengine/api/qquickwebengineview.cpp | |
parent | f9e951d0946fe0fcd51e9015108f92c46ecc8138 (diff) | |
parent | 42d864c86d8c85db7b2d42f8505d962a642e4c77 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I561c00b3a844ab493a5bf0148a5923662842cf5d
Diffstat (limited to 'src/webengine/api/qquickwebengineview.cpp')
-rw-r--r-- | src/webengine/api/qquickwebengineview.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index 1b1dcec25..36a7b69b9 100644 --- a/src/webengine/api/qquickwebengineview.cpp +++ b/src/webengine/api/qquickwebengineview.cpp @@ -124,6 +124,8 @@ QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate() , m_dpiScale(1.0) , m_backgroundColor(Qt::white) , m_defaultZoomFactor(1.0) + // QTBUG-53467 + , m_menuEnabled(true) { // The gold standard for mobile web content is 160 dpi, and the devicePixelRatio expected // is the (possibly quantized) ratio of device dpi to 160 dpi. @@ -141,6 +143,8 @@ QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate() // 1x, 2x, 3x etc assets that fit an integral number of pixels. setDevicePixelRatio(qMax(1, qRound(webPixelRatio))); } + if (platform == QLatin1Literal("eglfs")) + m_menuEnabled = false; #ifndef QT_NO_ACCESSIBILITY QAccessible::installFactory(&webAccessibleFactory); #endif // QT_NO_ACCESSIBILITY @@ -191,6 +195,12 @@ bool QQuickWebEngineViewPrivate::contextMenuRequested(const WebEngineContextMenu { Q_Q(QQuickWebEngineView); + if (!m_menuEnabled) { + qWarning("You are trying to open context menu on eglfs backend, which is not currently supported\n" + "See QTBUG-53467."); + return false; + } + // Assign the WebEngineView as the parent of the menu, so mouse events are properly propagated // on OSX. QObject *menu = ui()->addMenu(q, QString(), data.pos); @@ -1075,6 +1085,12 @@ void QQuickWebEngineViewPrivate::startDragging(const content::DropData &dropData adapter->startDragging(q_ptr->window(), dropData, allowedActions, pixmap, offset); } +bool QQuickWebEngineViewPrivate::isEnabled() const +{ + const Q_Q(QQuickWebEngineView); + return q->isEnabled(); +} + bool QQuickWebEngineView::isLoading() const { Q_D(const QQuickWebEngineView); |